ODE
\[ x \left (a x y(x)+x^2+y(x)^2\right ) y'(x)=y(x) \left (b x y(x)+x^2+y(x)^2\right ) \] ODE Classification
[[_homogeneous, `class A`], _rational, _dAlembert]
Book solution method
Homogeneous equation
Mathematica ✓
cpu = 0.567899 (sec), leaf count = 37
\[\text {Solve}\left [(b-a) \log (x)+\frac {x}{y(x)}+c_1=a \log \left (\frac {y(x)}{x}\right )+\frac {y(x)}{x},y(x)\right ]\]
Maple ✓
cpu = 0.306 (sec), leaf count = 43
\[[y \left (x \right ) = {\mathrm e}^{\RootOf \left ({\mathrm e}^{\textit {\_Z}} a \ln \left (x \right )-\ln \left (x \right ) b \,{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{\textit {\_Z}} \textit {\_C1} a -\textit {\_C1} b \,{\mathrm e}^{\textit {\_Z}}+\textit {\_Z} a \,{\mathrm e}^{\textit {\_Z}}+{\mathrm e}^{2 \textit {\_Z}}-1\right )} x]\] Mathematica raw input
DSolve[x*(x^2 + a*x*y[x] + y[x]^2)*y'[x] == y[x]*(x^2 + b*x*y[x] + y[x]^2),y[x],x]
Mathematica raw output
Solve[C[1] + (-a + b)*Log[x] + x/y[x] == a*Log[y[x]/x] + y[x]/x, y[x]]
Maple raw input
dsolve(x*(x^2+a*x*y(x)+y(x)^2)*diff(y(x),x) = (x^2+b*x*y(x)+y(x)^2)*y(x), y(x))
Maple raw output
[y(x) = exp(RootOf(exp(_Z)*a*ln(x)-ln(x)*b*exp(_Z)+exp(_Z)*_C1*a-_C1*b*exp(_Z)+_
Z*a*exp(_Z)+exp(_Z)^2-1))*x]