4.11.30 \(x (x-y(x)) y'(x)+y(x)^2=0\)

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

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

Book solution method
Homogeneous equation

Mathematica
cpu = 0.014677 (sec), leaf count = 20

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

Maple
cpu = 0.011 (sec), leaf count = 26

\[ \left \{ -\ln \left ( {\frac {y \left ( x \right ) }{x}} \right ) +{\frac {y \left ( x \right ) }{x}}-\ln \left ( x \right ) -{\it \_C1}=0 \right \} \] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

-ln(y(x)/x)+y(x)/x-ln(x)-_C1 = 0