4.8.39 $$x^n y'(x)=x^{n-1} \left (a x^{2 n}-b y(x)^2+n y(x)\right )$$

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

[_rational, _Riccati]

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 0.343088 (sec), leaf count = 113

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

Maple
cpu = 0.11 (sec), leaf count = 42

$\left [y \left (x \right ) = -\frac {i \tan \left (\frac {i x^{n} \sqrt {a}\, \sqrt {b}-\textit {\_C1} n}{n}\right ) \sqrt {a}\, x^{n}}{\sqrt {b}}\right ]$ Mathematica raw input

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

Mathematica raw output

{{y[x] -> (Sqrt[a]*x^n*(-Cos[(Sqrt[a]*Sqrt[-b]*x^n)/n] + C[1]*Sin[(Sqrt[a]*Sqrt[
-b]*x^n)/n]))/(Sqrt[-b]*(C[1]*Cos[(Sqrt[a]*Sqrt[-b]*x^n)/n] + Sin[(Sqrt[a]*Sqrt[
-b]*x^n)/n]))}}

Maple raw input

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

Maple raw output

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