\[ y''(x)=y(x) \csc ^2(x) \left (-\left (v (v+1) \sin ^2(x)-n^2\right )\right )-\cot (x) y'(x) \] ✓ Mathematica : cpu = 0.453229 (sec), leaf count = 22
\[\left \{\left \{y(x)\to c_1 P_v^n(\cos (x))+c_2 Q_v^n(\cos (x))\right \}\right \}\]
✓ Maple : cpu = 0.349 (sec), leaf count = 122
\[ \left \{ y \left ( x \right ) ={{\it \_C1}\,\sin \left ( 2\,x \right ) \left ( {\frac {\cos \left ( 2\,x \right ) }{2}}-{\frac {1}{2}} \right ) ^{{\frac {n}{2}}}{\mbox {$_2$F$_1$}(1+{\frac {v}{2}}+{\frac {n}{2}},{\frac {1}{2}}-{\frac {v}{2}}+{\frac {n}{2}};\,{\frac {3}{2}};\,{\frac {\cos \left ( 2\,x \right ) }{2}}+{\frac {1}{2}})}{\frac {1}{\sqrt {1-\cos \left ( 2\,x \right ) }}}}+{{\it \_C2}{\mbox {$_2$F$_1$}(-{\frac {v}{2}}+{\frac {n}{2}},{\frac {1}{2}}+{\frac {v}{2}}+{\frac {n}{2}};\,{\frac {1}{2}};\,{\frac {\cos \left ( 2\,x \right ) }{2}}+{\frac {1}{2}})}\sqrt {-2\,\cos \left ( 2\,x \right ) +2} \left ( {\frac {\cos \left ( 2\,x \right ) }{2}}-{\frac {1}{2}} \right ) ^{{\frac {n}{2}}}{\frac {1}{\sqrt {1-\cos \left ( 2\,x \right ) }}}} \right \} \]