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

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

[[_homogeneous, `class D`], _rational, _Bernoulli]

Book solution method
Exact equation, integrating factor

Mathematica
cpu = 0.249153 (sec), leaf count = 47

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

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

\[\left [y \left (x \right ) = \sqrt {\textit {\_C1} \,{\mathrm e}^{-x}-x^{2}}, y \left (x \right ) = -\sqrt {\textit {\_C1} \,{\mathrm e}^{-x}-x^{2}}\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = (_C1*exp(-x)-x^2)^(1/2), y(x) = -(_C1*exp(-x)-x^2)^(1/2)]