ODE
\[ \left (a y(x)^2+x^2+x y(x)\right ) y'(x)=a x^2+x y(x)+y(x)^2 \] ODE Classification
[[_homogeneous, `class A`], _rational, _dAlembert]
Book solution method
Homogeneous equation
Mathematica ✓
cpu = 0.0451534 (sec), leaf count = 51
\[\text {Solve}\left [\frac {1}{3} \left ((a-1) \log \left (\frac {x^2+x y(x)+y(x)^2}{x^2}\right )+(a+2) \log \left (1-\frac {y(x)}{x}\right )\right )+a \log (x)=c_1,y(x)\right ]\]
Maple ✓
cpu = 0.023 (sec), leaf count = 56
\[ \left \{ {\frac {1}{3\,a} \left ( \left ( 1-a \right ) \ln \left ( {\frac {{x}^{2}+xy \left ( x \right ) + \left ( y \left ( x \right ) \right ) ^{2}}{{x}^{2}}} \right ) + \left ( -a-2 \right ) \ln \left ( {\frac {y \left ( x \right ) -x}{x}} \right ) -3\,a \left ( {\it \_C1}+\ln \left ( x \right ) \right ) \right ) }=0 \right \} \] Mathematica raw input
DSolve[(x^2 + x*y[x] + a*y[x]^2)*y'[x] == a*x^2 + x*y[x] + y[x]^2,y[x],x]
Mathematica raw output
Solve[a*Log[x] + ((2 + a)*Log[1 - y[x]/x] + (-1 + a)*Log[(x^2 + x*y[x] + y[x]^2)
/x^2])/3 == C[1], y[x]]
Maple raw input
dsolve((x^2+x*y(x)+a*y(x)^2)*diff(y(x),x) = a*x^2+x*y(x)+y(x)^2, y(x),'implicit')
Maple raw output
1/3*((1-a)*ln((x^2+x*y(x)+y(x)^2)/x^2)+(-a-2)*ln((y(x)-x)/x)-3*a*(_C1+ln(x)))/a
= 0