4.10.21 \(x^2+2 (y(x)+x) y'(x)+2 y(x)=0\)

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

[_exact, _rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type``class A`]]

Book solution method
Exact equation

Mathematica
cpu = 0.00919663 (sec), leaf count = 53

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

Maple
cpu = 0.012 (sec), leaf count = 19

\[ \left \{ {\frac {{x}^{3}}{3}}+2\,xy \relax (x ) + \left (y \relax (x ) \right ) ^{2}+{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> -x - Sqrt[x^2 - x^3/3 + C[1]]}, {y[x] -> -x + Sqrt[x^2 - x^3/3 + C[1]]
}}

Maple raw input

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

Maple raw output

1/3*x^3+2*x*y(x)+y(x)^2+_C1 = 0