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

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

[_separable]

Book solution method
Separable ODE, Neither variable missing

Mathematica
cpu = 0.371305 (sec), leaf count = 38

\[\left \{\left \{y(x)\to \text {InverseFunction}\left [\frac {\text {$\#$1}^2}{2}+2 \text {$\#$1}+4 \log (\text {$\#$1}-2)-6\& \right ]\left [\frac {x^2}{2}+c_1\right ]\right \}\right \}\]

Maple
cpu = 0.024 (sec), leaf count = 27

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

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

Mathematica raw output

{{y[x] -> InverseFunction[-6 + 4*Log[-2 + #1] + 2*#1 + #1^2/2 & ][x^2/2 + C[1]]}
}

Maple raw input

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

Maple raw output

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