4.11.43 \(a+2 x y(x) y'(x)+y(x)^2=0\)

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

[_separable]

Book solution method
Exact equation

Mathematica
cpu = 0.291917 (sec), leaf count = 52

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

Maple
cpu = 0.019 (sec), leaf count = 36

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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