4.11.24 \(a x+x (y(x)+2) y'(x)=0\)

ODE
\[ a x+x (y(x)+2) y'(x)=0 \] ODE Classification

[_quadrature]

Book solution method
Separable ODE, Neither variable missing

Mathematica
cpu = 0.171372 (sec), leaf count = 50

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

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

\[\left [y \left (x \right ) = -2-\sqrt {-2 \textit {\_C1} a -2 a x +4}, y \left (x \right ) = -2+\sqrt {-2 \textit {\_C1} a -2 a x +4}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -2 - Sqrt[2]*Sqrt[2 - a*x + C[1]]}, {y[x] -> -2 + Sqrt[2]*Sqrt[2 - a*x
 + C[1]]}}

Maple raw input

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

Maple raw output

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