\[ \boxed { {x}^{2}{\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) -2\,x{\frac {\rm d}{{\rm d}x}}y \left ( x \right ) + \left ( {a}^{2}{x}^{2}+2 \right ) y \left ( x \right ) =0} \]
Mathematica: cpu = 0.040005 (sec), leaf count = 53 \[ \left \{\left \{y(x)\to c_1 x e^{-\sqrt {-a^2} x}+\frac {c_2 x e^{\sqrt {-a^2} x}}{2 \sqrt {-a^2}}\right \}\right \} \]
Maple: cpu = 0.016 (sec), leaf count = 19 \[ \left \{ y \left ( x \right ) ={\it \_C1}\,x\sin \left ( ax \right ) +{ \it \_C2}\,x\cos \left ( ax \right ) \right \} \]