##### 4.8.38 $$x^n y'(x)=a^2 x^{2 n-2}+b^2 y(x)^2$$

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

[[_homogeneous, class G], _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.395966 (sec), leaf count = 122

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

Maple
cpu = 0.084 (sec), leaf count = 88

$\left [y \left (x \right ) = \frac {\left (-\tan \left (-\frac {\ln \left (x \right ) \sqrt {4 a^{2} b^{2}-n^{2}+2 n -1}}{2}+\frac {\textit {\_C1} \sqrt {4 a^{2} b^{2}-n^{2}+2 n -1}}{2}\right ) \sqrt {4 a^{2} b^{2}-n^{2}+2 n -1}+n -1\right ) x^{n -1}}{2 b^{2}}\right ]$ Mathematica raw input

DSolve[x^n*y'[x] == a^2*x^(-2 + 2*n) + b^2*y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> (x^(-1 + n)*((-1 - a*b*Sqrt[-4 + (-1 + n)^2/(a^2*b^2)] + n)*x^(a*b*Sqr
t[-4 + (-1 + n)^2/(a^2*b^2)]) + (-1 + a*b*Sqrt[-4 + (-1 + n)^2/(a^2*b^2)] + n)*C
[1]))/(2*b^2*(x^(a*b*Sqrt[-4 + (-1 + n)^2/(a^2*b^2)]) + C[1]))}}

Maple raw input

dsolve(x^n*diff(y(x),x) = a^2*x^(2*n-2)+b^2*y(x)^2, y(x))

Maple raw output

[y(x) = 1/2*(-tan(-1/2*ln(x)*(4*a^2*b^2-n^2+2*n-1)^(1/2)+1/2*_C1*(4*a^2*b^2-n^2+
2*n-1)^(1/2))*(4*a^2*b^2-n^2+2*n-1)^(1/2)+n-1)*x^(n-1)/b^2]