ODE No. 1430

\[ y''(x)=-\left (y(x) \csc ^2(x) \left (v (v+1) \sin ^2(x)-n^2\right )\right )-\cot (x) y'(x) \] Mathematica : cpu = 0.370555 (sec), leaf count = 22

DSolve[Derivative[2][y][x] == -(Csc[x]^2*(-n^2 + v*(1 + v)*Sin[x]^2)*y[x]) - Cot[x]*Derivative[1][y][x],y[x],x]
 

\[\{\{y(x)\to c_1 P_v^n(\cos (x))+c_2 Q_v^n(\cos (x))\}\}\] Maple : cpu = 0.27 (sec), leaf count = 85

dsolve(diff(diff(y(x),x),x) = -1/sin(x)*cos(x)*diff(y(x),x)-(v*(v+1)*sin(x)^2-n^2)/sin(x)^2*y(x),y(x))
 

\[y \left (x \right ) = \left (\frac {\cos \left (2 x \right )}{2}-\frac {1}{2}\right )^{\frac {n}{2}} \left (\sqrt {\cos \left (2 x \right )+1}\, \hypergeom \left (\left [1+\frac {v}{2}+\frac {n}{2}, \frac {1}{2}-\frac {v}{2}+\frac {n}{2}\right ], \left [\frac {3}{2}\right ], \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) c_{2}+\hypergeom \left (\left [-\frac {v}{2}+\frac {n}{2}, \frac {1}{2}+\frac {v}{2}+\frac {n}{2}\right ], \left [\frac {1}{2}\right ], \frac {\cos \left (2 x \right )}{2}+\frac {1}{2}\right ) c_{1}\right )\]