ODE
\[ (a x+2) y(x)+x y'(x)+x=0 \] ODE Classification
[_linear]
Book solution method
Linear ODE
Mathematica ✓
cpu = 0.0121552 (sec), leaf count = 37
\[\left \{\left \{y(x)\to \frac {c_1 e^{-a x}-\frac {a^2 x^2-2 a x+2}{a^3}}{x^2}\right \}\right \}\]
Maple ✓
cpu = 0.011 (sec), leaf count = 36
\[ \left \{ y \left ( x \right ) =-{a}^{-1}+2\,{\frac {1}{{a}^{2}x}}-2\,{\frac {1}{{a}^{3}{x}^{2}}}+{\frac {{{\rm e}^{-ax}}{\it \_C1}}{{x}^{2}}} \right \} \] Mathematica raw input
DSolve[x + (2 + a*x)*y[x] + x*y'[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> (-((2 - 2*a*x + a^2*x^2)/a^3) + C[1]/E^(a*x))/x^2}}
Maple raw input
dsolve(x*diff(y(x),x)+x+(a*x+2)*y(x) = 0, y(x),'implicit')
Maple raw output
y(x) = -1/a+2/a^2/x-2/a^3/x^2+exp(-a*x)/x^2*_C1