4.14.5 \(x \left (a x y(x)+x^2+2 y(x)^2\right ) y'(x)=y(x)^2 (a x+2 y(x))\)

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

[[_homogeneous, `class A`], _rational, _dAlembert]

Book solution method
Homogeneous equation

Mathematica
cpu = 0.0639051 (sec), leaf count = 31

\[\text {Solve}\left [\frac {a y(x)}{x}+\frac {y(x)^2}{x^2}+\log \left (\frac {y(x)}{x}\right )+\log (x)=c_1,y(x)\right ]\]

Maple
cpu = 0.013 (sec), leaf count = 37

\[ \left \{ -{\frac {ay \relax (x ) }{x}}-\ln \left ({\frac {y \relax (x ) }{x}} \right ) -{\frac { \left (y \relax (x ) \right ) ^{2}}{{x}^{2}}}-\ln \relax (x ) -{\it \_C1}=0 \right \} \] Mathematica raw input

DSolve[x*(x^2 + a*x*y[x] + 2*y[x]^2)*y'[x] == y[x]^2*(a*x + 2*y[x]),y[x],x]

Mathematica raw output

Solve[Log[x] + Log[y[x]/x] + (a*y[x])/x + y[x]^2/x^2 == C[1], y[x]]

Maple raw input

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

Maple raw output

-a/x*y(x)-ln(y(x)/x)-1/x^2*y(x)^2-ln(x)-_C1 = 0