4.21.4 \(a^2 x+y(x)^3 \left (-y'(x)\right )+x y(x)^2 y'(x)^2=0\)

ODE
\[ a^2 x+y(x)^3 \left (-y'(x)\right )+x y(x)^2 y'(x)^2=0 \] ODE Classification

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

Book solution method
Change of variable

Mathematica
cpu = 0.947837 (sec), leaf count = 144

\[\left \{\left \{y(x)\to -\frac {\sqrt {2} \sqrt {a} \sqrt {x}}{\sqrt [4]{\text {sech}^2(-\log (x)+c_1)}}\right \},\left \{y(x)\to -\frac {i \sqrt {2} \sqrt {a} \sqrt {x}}{\sqrt [4]{\text {sech}^2(-\log (x)+c_1)}}\right \},\left \{y(x)\to \frac {i \sqrt {2} \sqrt {a} \sqrt {x}}{\sqrt [4]{\text {sech}^2(-\log (x)+c_1)}}\right \},\left \{y(x)\to \frac {\sqrt {2} \sqrt {a} \sqrt {x}}{\sqrt [4]{\text {sech}^2(-\log (x)+c_1)}}\right \}\right \}\]

Maple
cpu = 8.743 (sec), leaf count = 158

\[\left [y \left (x \right ) = \sqrt {-2 a x}, y \left (x \right ) = \sqrt {2}\, \sqrt {a x}, y \left (x \right ) = -\sqrt {-2 a x}, y \left (x \right ) = -\sqrt {2}\, \sqrt {a x}, y \left (x \right ) = {\mathrm e}^{\frac {\textit {\_C1}}{2}+\frac {\RootOf \left (16 a^{2} x \,{\mathrm e}^{2 \textit {\_C1}} {\mathrm e}^{2 \textit {\_Z}}+{\mathrm e}^{2 \textit {\_Z}} x^{3}-4 \,{\mathrm e}^{2 \textit {\_C1}} {\mathrm e}^{3 \textit {\_Z}}\right )}{2}-\frac {\ln \left (x \right )}{2}}, y \left (x \right ) = {\mathrm e}^{-\frac {\textit {\_C1}}{2}+\frac {\RootOf \left (x^{2} \left (16 \,{\mathrm e}^{-2 \textit {\_C1}} {\mathrm e}^{2 \textit {\_Z}} x^{2} a^{2} {\mathrm e}^{2 \textit {\_C1}}-4 x \,{\mathrm e}^{3 \textit {\_Z}}+{\mathrm e}^{2 \textit {\_Z}} {\mathrm e}^{2 \textit {\_C1}}\right )\right )}{2}+\frac {\ln \left (x \right )}{2}}\right ]\] Mathematica raw input

DSolve[a^2*x - y[x]^3*y'[x] + x*y[x]^2*y'[x]^2 == 0,y[x],x]

Mathematica raw output

{{y[x] -> -((Sqrt[2]*Sqrt[a]*Sqrt[x])/(Sech[C[1] - Log[x]]^2)^(1/4))}, {y[x] -> 
((-I)*Sqrt[2]*Sqrt[a]*Sqrt[x])/(Sech[C[1] - Log[x]]^2)^(1/4)}, {y[x] -> (I*Sqrt[
2]*Sqrt[a]*Sqrt[x])/(Sech[C[1] - Log[x]]^2)^(1/4)}, {y[x] -> (Sqrt[2]*Sqrt[a]*Sq
rt[x])/(Sech[C[1] - Log[x]]^2)^(1/4)}}

Maple raw input

dsolve(x*y(x)^2*diff(y(x),x)^2-y(x)^3*diff(y(x),x)+a^2*x = 0, y(x))

Maple raw output

[y(x) = (-2*a*x)^(1/2), y(x) = 2^(1/2)*(a*x)^(1/2), y(x) = -(-2*a*x)^(1/2), y(x)
 = -2^(1/2)*(a*x)^(1/2), y(x) = exp(1/2*_C1+1/2*RootOf(16*a^2*x*exp(1/2*_C1)^4*e
xp(1/2*_Z)^4+exp(_Z)^2*x^3-4*exp(_C1)^2*exp(_Z)^3)-1/2*ln(x)), y(x) = exp(-1/2*_
C1+1/2*RootOf(x^2*(16*exp(-1/2*_C1)^4*exp(1/2*_Z)^4*x^2*a^2*exp(_C1)^2-4*x*exp(_
Z)^3+exp(_Z)^2*exp(_C1)^2))+1/2*ln(x))]