4.11.31 \(x (y(x)+x) y'(x)=x^2+y(x)^2\)

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

[[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

Book solution method
Homogeneous equation

Mathematica
cpu = 0.271702 (sec), leaf count = 30

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

Maple
cpu = 0.193 (sec), leaf count = 32

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = x*exp(-LambertW(1/2*exp(-1/2*_C1)*exp(-1/2)/x^(1/2))-1/2*_C1-1/2-1/2*ln(
x))+x]