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

ODE
\[ a x+x y'(x)^2-2 y(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 \(y\)

Mathematica
cpu = 0.237673 (sec), leaf count = 151

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

Maple
cpu = 0.117 (sec), leaf count = 33

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

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

Mathematica raw output

{{y[x] -> -((Sqrt[a]*x*Tan[C[1] - I*Log[x]])/Sqrt[Sec[C[1] - I*Log[x]]^2])}, {y[
x] -> (Sqrt[a]*x*Tan[C[1] - I*Log[x]])/Sqrt[Sec[C[1] - I*Log[x]]^2]}, {y[x] -> -
((Sqrt[a]*x*Tan[C[1] + I*Log[x]])/Sqrt[Sec[C[1] + I*Log[x]]^2])}, {y[x] -> (Sqrt
[a]*x*Tan[C[1] + I*Log[x]])/Sqrt[Sec[C[1] + I*Log[x]]^2]}}

Maple raw input

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

Maple raw output

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