4.5.42 \(2 x y'(x)+y(x) \left (y(x)^2+1\right )=0\)

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

[_separable]

Book solution method
Separable ODE, Neither variable missing

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

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

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

\[\left [y \left (x \right ) = \frac {1}{\sqrt {x \textit {\_C1} -1}}, y \left (x \right ) = -\frac {1}{\sqrt {x \textit {\_C1} -1}}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> ((-I)*E^C[1])/Sqrt[E^(2*C[1]) - x]}, {y[x] -> (I*E^C[1])/Sqrt[E^(2*C[1
]) - x]}}

Maple raw input

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

Maple raw output

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