\[ a x y'(x)+(a-2) y(x)+\left (x^2+1\right ) y''(x)=0 \] ✓ Mathematica : cpu = 0.0274226 (sec), leaf count = 68
\[\left \{\left \{y(x)\to \left (x^2+1\right )^{\frac {1}{2}-\frac {a}{4}} \left (c_1 P_{\frac {a-4}{2}}^{\frac {a-2}{2}}(i x)+c_2 Q_{\frac {a-4}{2}}^{\frac {a-2}{2}}(i x)\right )\right \}\right \}\]
✓ Maple : cpu = 0.147 (sec), leaf count = 36
\[ \left \{ y \left ( x \right ) ={\it \_C1}\, \left ( {x}^{2}+1 \right ) ^{1-{\frac {a}{2}}}+{\it \_C2}\,{\mbox {$_2$F$_1$}(1,{\frac {a}{2}}-{\frac {1}{2}};\,{\frac {3}{2}};\,-{x}^{2})}x \right \} \]