\[ \left (-a x^2-2\right ) y(x)+x^2 y''(x)=0 \] ✓ Mathematica : cpu = 0.0099831 (sec), leaf count = 129
DSolve[(-2 - a*x^2)*y[x] + x^2*Derivative[2][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to \frac {\sqrt {\frac {2}{\pi }} c_2 \sqrt {x} \left (i \sinh \left (\sqrt {a} x\right )-\frac {i \cosh \left (\sqrt {a} x\right )}{\sqrt {a} x}\right )}{\sqrt {-i \sqrt {a} x}}+\frac {\sqrt {\frac {2}{\pi }} c_1 \sqrt {x} \left (\frac {\sinh \left (\sqrt {a} x\right )}{\sqrt {a} x}-\cosh \left (\sqrt {a} x\right )\right )}{\sqrt {-i \sqrt {a} x}}\right \}\right \}\] ✓ Maple : cpu = 0.075 (sec), leaf count = 42
dsolve(x^2*diff(diff(y(x),x),x)-(a*x^2+2)*y(x)=0,y(x))
\[y \left (x \right ) = \frac {c_{2} \left (a x +\sqrt {a}\right ) {\mathrm e}^{-\sqrt {a}\, x}+{\mathrm e}^{\sqrt {a}\, x} c_{1} \left (a x -\sqrt {a}\right )}{x}\]