\[ \left (-a x^2-12 a-4\right ) \cos (x)+x^2 y''(x)-2 x y'(x)-4 y(x)-x \sin (x)=0 \] ✓ Mathematica : cpu = 0.186913 (sec), leaf count = 38
DSolve[(-4 - 12*a - a*x^2)*Cos[x] - x*Sin[x] - 4*y[x] - 2*x*Derivative[1][y][x] + x^2*Derivative[2][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to \frac {-2 a \sin (x)-a x \cos (x)-\sin (x)}{x}+c_2 x^4+\frac {c_1}{x}\right \}\right \}\] ✓ Maple : cpu = 0.061 (sec), leaf count = 29
dsolve(x^2*diff(diff(y(x),x),x)-2*x*diff(y(x),x)-4*y(x)-x*sin(x)-(a*x^2+12*a+4)*cos(x)=0,y(x))
\[y \left (x \right ) = \frac {\left (-2 a -1\right ) \sin \left (x \right )+x^{5} c_{2}-a x \cos \left (x \right )+c_{1}}{x}\]