ODE
\[ x y(x) y'(x)=a x^3 \cos (x)+y(x)^2 \] ODE Classification
[[_homogeneous, `class D`], _Bernoulli]
Book solution method
The Bernoulli ODE
Mathematica ✓
cpu = 0.350704 (sec), leaf count = 38
\[\left \{\left \{y(x)\to -x \sqrt {2 a \sin (x)+c_1}\right \},\left \{y(x)\to x \sqrt {2 a \sin (x)+c_1}\right \}\right \}\]
Maple ✓
cpu = 0.029 (sec), leaf count = 30
\[\left [y \left (x \right ) = \sqrt {2 \sin \left (x \right ) a +\textit {\_C1}}\, x, y \left (x \right ) = -\sqrt {2 \sin \left (x \right ) a +\textit {\_C1}}\, x\right ]\] Mathematica raw input
DSolve[x*y[x]*y'[x] == a*x^3*Cos[x] + y[x]^2,y[x],x]
Mathematica raw output
{{y[x] -> -(x*Sqrt[C[1] + 2*a*Sin[x]])}, {y[x] -> x*Sqrt[C[1] + 2*a*Sin[x]]}}
Maple raw input
dsolve(x*y(x)*diff(y(x),x) = a*x^3*cos(x)+y(x)^2, y(x))
Maple raw output
[y(x) = (2*sin(x)*a+_C1)^(1/2)*x, y(x) = -(2*sin(x)*a+_C1)^(1/2)*x]