ODE
\[ x^2 y''(x)+x y'(x)-y(x)=a x^2 \] ODE Classification
[[_2nd_order, _exact, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.0139472 (sec), leaf count = 41
\[\left \{\left \{y(x)\to \frac {2 a x^3+3 \left (c_1 \left (x^2+1\right )+i c_2 \left (x^2-1\right )\right )}{6 x}\right \}\right \}\]
Maple ✓
cpu = 0.019 (sec), leaf count = 19
\[ \left \{ y \left ( x \right ) =x{\it \_C2}+{\frac {a{x}^{2}}{3}}+{\frac {{\it \_C1}}{x}} \right \} \] Mathematica raw input
DSolve[-y[x] + x*y'[x] + x^2*y''[x] == a*x^2,y[x],x]
Mathematica raw output
{{y[x] -> (2*a*x^3 + 3*((1 + x^2)*C[1] + I*(-1 + x^2)*C[2]))/(6*x)}}
Maple raw input
dsolve(x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-y(x) = a*x^2, y(x),'implicit')
Maple raw output
y(x) = x*_C2+1/3*a*x^2+1/x*_C1