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.402205 (sec), leaf count = 86

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

Maple
cpu = 0.033 (sec), leaf count = 98

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

Maple raw output

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