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

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

[_rational, _Riccati]

Book solution method
Riccati ODE, Special cases

Mathematica
cpu = 0.353352 (sec), leaf count = 103

$\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.071 (sec), leaf count = 38

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

DSolve[x*y'[x] == a*x^(2*n) + y[x]*(n + b*y[x]),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*diff(y(x),x) = a*x^(2*n)+(n+b*y(x))*y(x), y(x))

Maple raw output

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