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.0820612 (sec), leaf count = 37
\[\text {Solve}\left [(b-a) \log (x)+c_1+\frac {x}{y(x)}=a \log \left (\frac {y(x)}{x}\right )+\frac {y(x)}{x},y(x)\right ]\]
Maple ✓
cpu = 0.018 (sec), leaf count = 49
\[ \left \{ {\frac {1}{ \left ( a-b \right ) xy \left ( x \right ) } \left ( -a\ln \left ( {\frac {y \left ( x \right ) }{x}} \right ) xy \left ( x \right ) - \left ( y \left ( x \right ) \right ) ^{2}+{x}^{2} \right ) }-\ln \left ( x \right ) -{\it \_C1}=0 \right \} \] 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),'implicit')
Maple raw output
(-a*ln(y(x)/x)*x*y(x)-y(x)^2+x^2)/(a-b)/x/y(x)-ln(x)-_C1 = 0