##### 4.6.16 $$x^2 y'(x)=a+b x^n+x^2 y(x)^2$$

ODE
$x^2 y'(x)=a+b x^n+x^2 y(x)^2$ ODE Classiﬁcation

[_rational, _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.377029 (sec), leaf count = 1260

$\left \{\left \{y(x)\to \frac {-n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}+1} \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}+1} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}-1}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) b^{\frac {i \sqrt {4 a-1}}{n}+\frac {1}{2}}+n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}+1} \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}+1} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}+1}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) b^{\frac {i \sqrt {4 a-1}}{n}+\frac {1}{2}}-i \sqrt {4 a-1} n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}+1} \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}+\frac {1}{2}} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) b^{\frac {i \sqrt {4 a-1}}{n}}-n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}+1} \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}+\frac {1}{2}} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) b^{\frac {i \sqrt {4 a-1}}{n}}+n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}} \sqrt {(1-4 a) n^2} \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}+\frac {1}{2}} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) b^{\frac {i \sqrt {4 a-1}}{n}}-n^{\frac {2 i \sqrt {4 a-1}}{n}} \left (-i \sqrt {4 a-1} n+n+\sqrt {(1-4 a) n^2}\right ) \left (x^n\right )^{\frac {\sqrt {(1-4 a) n^2}}{n^2}+\frac {1}{2}} J_{-\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) c_1 \Gamma \left (1-\frac {\sqrt {1-4 a}}{n}\right ) b^{\frac {\sqrt {(1-4 a) n^2}}{n^2}}-n^{\frac {2 i \sqrt {4 a-1}}{n}+1} \left (x^n\right )^{\frac {\sqrt {(1-4 a) n^2}}{n^2}+1} J_{-\frac {\sqrt {(1-4 a) n^2}}{n^2}-1}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) c_1 \Gamma \left (1-\frac {\sqrt {1-4 a}}{n}\right ) b^{\frac {\sqrt {(1-4 a) n^2}}{n^2}+\frac {1}{2}}+n^{\frac {2 i \sqrt {4 a-1}}{n}+1} \left (x^n\right )^{\frac {\sqrt {(1-4 a) n^2}}{n^2}+1} J_{1-\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) c_1 \Gamma \left (1-\frac {\sqrt {1-4 a}}{n}\right ) b^{\frac {\sqrt {(1-4 a) n^2}}{n^2}+\frac {1}{2}}}{2 n x \sqrt {x^n} \left (b^{\frac {i \sqrt {4 a-1}}{n}} n^{\frac {2 \sqrt {(1-4 a) n^2}}{n^2}} J_{\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) \Gamma \left (\frac {n+\sqrt {1-4 a}}{n}\right ) \left (x^n\right )^{\frac {i \sqrt {4 a-1}}{n}}+b^{\frac {\sqrt {(1-4 a) n^2}}{n^2}} n^{\frac {2 i \sqrt {4 a-1}}{n}} J_{-\frac {\sqrt {(1-4 a) n^2}}{n^2}}\left (\frac {2 \sqrt {b} \sqrt {x^n}}{n}\right ) c_1 \Gamma \left (1-\frac {\sqrt {1-4 a}}{n}\right ) \left (x^n\right )^{\frac {\sqrt {(1-4 a) n^2}}{n^2}}\right )}\right \}\right \}$

Maple
cpu = 0.107 (sec), leaf count = 275

$\left [y \left (x \right ) = \frac {x^{\frac {n}{2}} \sqrt {b}\, \textit {\_C1} \BesselY \left (\frac {\sqrt {1-4 a}+n}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )}{x \left (\BesselY \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) \textit {\_C1} +\BesselJ \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )\right )}+\frac {\left (-\sqrt {1-4 a}\, \textit {\_C1} -\textit {\_C1} \right ) \BesselY \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )+2 \BesselJ \left (\frac {\sqrt {1-4 a}+n}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) \sqrt {b}\, x^{\frac {n}{2}}+\left (-\sqrt {1-4 a}-1\right ) \BesselJ \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right )}{2 x \left (\BesselY \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}{2}}}{n}\right ) \textit {\_C1} +\BesselJ \left (\frac {\sqrt {1-4 a}}{n}, \frac {2 \sqrt {b}\, x^{\frac {n}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