4.12.14 \(x (x-a y(x)) y'(x)=y(x) (y(x)-a x)\)

ODE
\[ x (x-a y(x)) y'(x)=y(x) (y(x)-a x) \] ODE Classification

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

Book solution method
Homogeneous equation

Mathematica
cpu = 0.389064 (sec), leaf count = 34

\[\text {Solve}\left [(a-1) \log \left (1-\frac {y(x)}{x}\right )+(a+1) \log (x)+\log \left (\frac {y(x)}{x}\right )=c_1,y(x)\right ]\]

Maple
cpu = 0.336 (sec), leaf count = 97

\[[y \left (x \right ) = {\mathrm e}^{-\textit {\_C1} a -a \ln \left (x \right )-\RootOf \left (x \,{\mathrm e}^{\textit {\_C1} a} x^{a} {\mathrm e}^{a \textit {\_Z}} {\mathrm e}^{\textit {\_C1}} {\mathrm e}^{\textit {\_Z}}+x \,{\mathrm e}^{\textit {\_C1} a} x^{a} {\mathrm e}^{a \textit {\_Z}} {\mathrm e}^{\textit {\_C1}}-{\mathrm e}^{\textit {\_Z}}\right ) a -\textit {\_C1} +\RootOf \left (x \,{\mathrm e}^{\textit {\_C1} a} x^{a} {\mathrm e}^{a \textit {\_Z}} {\mathrm e}^{\textit {\_C1}} {\mathrm e}^{\textit {\_Z}}+x \,{\mathrm e}^{\textit {\_C1} a} x^{a} {\mathrm e}^{a \textit {\_Z}} {\mathrm e}^{\textit {\_C1}}-{\mathrm e}^{\textit {\_Z}}\right )}]\] Mathematica raw input

DSolve[x*(x - a*y[x])*y'[x] == y[x]*(-(a*x) + y[x]),y[x],x]

Mathematica raw output

Solve[(1 + a)*Log[x] + Log[y[x]/x] + (-1 + a)*Log[1 - y[x]/x] == C[1], y[x]]

Maple raw input

dsolve(x*(x-a*y(x))*diff(y(x),x) = y(x)*(y(x)-a*x), y(x))

Maple raw output

[y(x) = exp(-_C1*a-a*ln(x)-RootOf(x*exp(_C1*a)*x^a*exp(a*_Z)*exp(_C1)*exp(_Z)+x*
exp(_C1*a)*x^a*exp(a*_Z)*exp(_C1)-exp(_Z))*a-_C1+RootOf(x*exp(_C1*a)*x^a*exp(a*_
Z)*exp(_C1)*exp(_Z)+x*exp(_C1*a)*x^a*exp(a*_Z)*exp(_C1)-exp(_Z)))]