4.13.37 \(\left (a y(x)^2+x^2+x y(x)\right ) y'(x)=a x^2+x y(x)+y(x)^2\)

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.554055 (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.369 (sec), leaf count = 282

\[\left [y \left (x \right ) = {\mathrm e}^{-\frac {3 \textit {\_C1} a +\RootOf \left ({\mathrm e}^{\textit {\_Z}} {\mathrm e}^{\frac {6 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {2 a \textit {\_Z}}{a +2}} x^{\frac {6 a}{a +2}}-3 \,{\mathrm e}^{\frac {6 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {2 a \textit {\_Z}}{a +2}} x^{\frac {6 a}{a +2}}-3 \,{\mathrm e}^{\frac {\textit {\_Z}}{a +2}} {\mathrm e}^{\frac {3 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {a \textit {\_Z}}{a +2}} x^{\frac {3 a}{a +2}}-{\mathrm e}^{\frac {2 \textit {\_Z}}{a +2}}\right ) a +3 a \ln \left (x \right )-\RootOf \left ({\mathrm e}^{\textit {\_Z}} {\mathrm e}^{\frac {6 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {2 a \textit {\_Z}}{a +2}} x^{\frac {6 a}{a +2}}-3 \,{\mathrm e}^{\frac {6 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {2 a \textit {\_Z}}{a +2}} x^{\frac {6 a}{a +2}}-3 \,{\mathrm e}^{\frac {\textit {\_Z}}{a +2}} {\mathrm e}^{\frac {3 \textit {\_C1} a}{a +2}} {\mathrm e}^{\frac {a \textit {\_Z}}{a +2}} x^{\frac {3 a}{a +2}}-{\mathrm e}^{\frac {2 \textit {\_Z}}{a +2}}\right )}{a +2}} x +x\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))

Maple raw output

[y(x) = exp(-(3*_C1*a+RootOf(exp(_Z)*exp(1/(a+2)*_C1*a)^6*exp(1/(a+2)*a*_Z)^2*(x
^(1/(a+2)*a))^6-3*exp(1/(a+2)*_C1*a)^6*exp(1/(a+2)*a*_Z)^2*(x^(1/(a+2)*a))^6-3*e
xp(1/(a+2)*_Z)*exp(1/(a+2)*_C1*a)^3*exp(1/(a+2)*a*_Z)*(x^(1/(a+2)*a))^3-exp(1/(a
+2)*_Z)^2)*a+3*a*ln(x)-RootOf(exp(_Z)*exp(1/(a+2)*_C1*a)^6*exp(1/(a+2)*a*_Z)^2*(
x^(1/(a+2)*a))^6-3*exp(1/(a+2)*_C1*a)^6*exp(1/(a+2)*a*_Z)^2*(x^(1/(a+2)*a))^6-3*
exp(1/(a+2)*_Z)*exp(1/(a+2)*_C1*a)^3*exp(1/(a+2)*a*_Z)*(x^(1/(a+2)*a))^3-exp(1/(
a+2)*_Z)^2))/(a+2))*x+x]