\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) =-2\,{\frac {x{\frac {\rm d}{{\rm d}x}}y \left ( x \right ) }{{x}^{2}+1}}-{\frac { \left ( {a}^{2} \left ( {x}^{2}+1 \right ) ^{2}-n \left ( n+1 \right ) \left ( {x}^{2}+1 \right ) +{m}^{2} \right ) y \left ( x \right ) }{ \left ( {x}^{2}+1 \right ) ^{2}}}=0} \]
Mathematica: cpu = 2.299792 (sec), leaf count = 98 \[ \left \{\left \{y(x)\to \text {DifferentialRoot}\left (\{\unicode {f818},\unicode {f817}\}\unicode {f4a1}\left \{\unicode {f818}''(\unicode {f817}) \left (\unicode {f817}^2+1\right )^2+2 \unicode {f817} \unicode {f818}'(\unicode {f817}) \left (\unicode {f817}^2+1\right )+\left (a^2 \unicode {f817}^4+2 a^2 \unicode {f817}^2-n^2 \unicode {f817}^2-n \unicode {f817}^2+a^2+m^2-n^2-n\right ) \unicode {f818}(\unicode {f817})=0,\unicode {f818}(0)=c_1,\unicode {f818}'(0)=c_2\right \}\right )(x)\right \}\right \} \]
Maple: cpu = 0.187 (sec), leaf count = 96 \[ \left \{ y \left ( x \right ) ={\it \_C1}\, \left ( {x}^{2}+1 \right ) ^{{ \frac {m}{2}}}{\it HeunC} \left ( 0,-{\frac {1}{2}},m,-{\frac {{a}^{2} }{4}},{\frac {1}{4}}+{\frac {{a}^{2}}{4}}+{\frac {{m}^{2}}{4}}-{\frac {{n}^{2}}{4}}-{\frac {n}{4}},-{x}^{2} \right ) +{\it \_C2}\, \left ( {x} ^{2}+1 \right ) ^{{\frac {m}{2}}}x{\it HeunC} \left ( 0,{\frac {1}{2}},m ,-{\frac {{a}^{2}}{4}},{\frac {1}{4}}+{\frac {{a}^{2}}{4}}+{\frac {{m} ^{2}}{4}}-{\frac {{n}^{2}}{4}}-{\frac {n}{4}},-{x}^{2} \right ) \right \} \]