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

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

[[_homogeneous, `class A`], _rational, _dAlembert]

Book solution method
Homogeneous ODE, \(x^n f\left ( \frac {y}{x} , y' \right )=0\), Solve for \(p\)

Mathematica
cpu = 0.365894 (sec), leaf count = 69

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

Maple
cpu = 0.115 (sec), leaf count = 109

\[\left [y \left (x \right ) = 0, y \left (x \right ) = \RootOf \left (-2 \ln \left (x \right )+\int _{}^{\textit {\_Z}}\frac {-2 \textit {\_a}^{2}+\sqrt {2 \textit {\_a}^{3}-4 \textit {\_a}^{2}+2 \textit {\_a}}}{\textit {\_a} \left (\textit {\_a}^{2}+1\right )}d \textit {\_a} +2 \textit {\_C1} \right ) x, y \left (x \right ) = \RootOf \left (-2 \ln \left (x \right )-\left (\int _{}^{\textit {\_Z}}\frac {2 \textit {\_a}^{2}+\sqrt {2 \textit {\_a}^{3}-4 \textit {\_a}^{2}+2 \textit {\_a}}}{\textit {\_a} \left (\textit {\_a}^{2}+1\right )}d \textit {\_a} \right )+2 \textit {\_C1} \right ) x\right ]\] Mathematica raw input

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

[y(x) = 0, y(x) = RootOf(-2*ln(x)+Intat((-2*_a^2+(2*_a^3-4*_a^2+2*_a)^(1/2))/_a/
(_a^2+1),_a = _Z)+2*_C1)*x, y(x) = RootOf(-2*ln(x)-Intat((2*_a^2+(2*_a^3-4*_a^2+
2*_a)^(1/2))/_a/(_a^2+1),_a = _Z)+2*_C1)*x]