\[ y''(x)=\frac {2 x y'(x)}{x^2-1}-\frac {y(x) \left (\left (x^2-1\right ) x^2 (a-n) (a+n+1)+2 a x^2+n (n+1) \left (x^2-1\right )\right )}{x^2 \left (x^2-1\right )} \] ✗ Mathematica : cpu = 8.48271 (sec), leaf count = 0
DSolve[Derivative[2][y][x] == -(((2*a*x^2 + n*(1 + n)*(-1 + x^2) + (a - n)*(1 + a + n)*x^2*(-1 + x^2))*y[x])/(x^2*(-1 + x^2))) + (2*x*Derivative[1][y][x])/(-1 + x^2),y[x],x]
, DifferentialRoot result
\[\left \{\left \{y(x)\to (x)\right \}\right \}\]
✓ Maple : cpu = 0.201 (sec), leaf count = 109
dsolve(x^2*(x^2-1)*diff(diff(y(x),x),x)-2*x^3*diff(y(x),x)-((a-n)*(a+n+1)*x^2*(x^2-1)+2*a*x^2+n*(n+1)*(x^2-1))*y(x),y(x))
\[y \left (x \right ) = c_{1} \HeunC \left (0, -n -\frac {1}{2}, -2, -\frac {1}{4} a^{2}+\frac {1}{4} n^{2}-\frac {1}{4} a +\frac {1}{4} n , -\frac {1}{4} n^{2}-\frac {1}{4} n +\frac {3}{4}+\frac {1}{4} a^{2}-\frac {1}{4} a , x^{2}\right ) x^{-n}+c_{2} \HeunC \left (0, n +\frac {1}{2}, -2, -\frac {1}{4} a^{2}+\frac {1}{4} n^{2}-\frac {1}{4} a +\frac {1}{4} n , -\frac {1}{4} n^{2}-\frac {1}{4} n +\frac {3}{4}+\frac {1}{4} a^{2}-\frac {1}{4} a , x^{2}\right ) x^{n +1}\]