\[ y''(x)=-\frac {y(x) \left (4 a x^2 (a-n)-\left (x^2-1\right ) (2 a+(v-n) (n+v+1))\right )}{\left (x^2-1\right )^2}-\frac {2 x (-2 a+n+1) y'(x)}{x^2-1} \] ✓ Mathematica : cpu = 0.0325643 (sec), leaf count = 54
DSolve[Derivative[2][y][x] == -(((4*a*(a - n)*x^2 - (2*a + (-n + v)*(1 + n + v))*(-1 + x^2))*y[x])/(-1 + x^2)^2) - (2*(1 - 2*a + n)*x*Derivative[1][y][x])/(-1 + x^2),y[x],x]
\[\left \{\left \{y(x)\to c_1 \left (x^2-1\right )^{\frac {1}{2} (2 a-n)} P_v^n(x)+c_2 \left (x^2-1\right )^{\frac {1}{2} (2 a-n)} Q_v^n(x)\right \}\right \}\] ✓ Maple : cpu = 0.059 (sec), leaf count = 29
dsolve(diff(diff(y(x),x),x) = -2*x/(x^2-1)*(n+1-2*a)*diff(y(x),x)-(4*a*x^2*(a-n)-(x^2-1)*(2*a+(v-n)*(v+n+1)))/(x^2-1)^2*y(x),y(x))
\[y \left (x \right ) = \left (x^{2}-1\right )^{a -\frac {n}{2}} \left (\LegendreQ \left (v , n , x\right ) c_{2}+\LegendreP \left (v , n , x\right ) c_{1}\right )\]