4.11.16 \(x y(x) y'(x)=a x^n+b y(x)^2\)

ODE
\[ x y(x) y'(x)=a x^n+b y(x)^2 \] ODE Classification

[[_homogeneous, `class G`], _rational, _Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.0209403 (sec), leaf count = 86

\[\left \{\left \{y(x)\to -\frac {\sqrt {c_1 (2 b-n) x^{2 b}-2 a x^n}}{\sqrt {2 b-n}}\right \},\left \{y(x)\to \frac {\sqrt {c_1 (2 b-n) x^{2 b}-2 a x^n}}{\sqrt {2 b-n}}\right \}\right \}\]

Maple
cpu = 0.008 (sec), leaf count = 31

\[ \left \{ 2\,{\frac {a{x}^{n}}{2\,b-n}}-{x}^{2\,b}{\it \_C1}+ \left (y \relax (x ) \right ) ^{2}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -(Sqrt[-2*a*x^n + (2*b - n)*x^(2*b)*C[1]]/Sqrt[2*b - n])}, {y[x] -> Sq
rt[-2*a*x^n + (2*b - n)*x^(2*b)*C[1]]/Sqrt[2*b - n]}}

Maple raw input

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

Maple raw output

2/(2*b-n)*x^n*a-x^(2*b)*_C1+y(x)^2 = 0