\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) =-1/4\,{\frac { \left ( 4\,v \left ( v+1 \right ) \left ( \sin \left ( x \right ) \right ) ^{2}- \left ( \cos \left ( x \right ) \right ) ^{2}+2-4\,{n}^{2} \right ) y \left ( x \right ) }{ \left ( \sin \left ( x \right ) \right ) ^{2}}}=0} \]
Mathematica: cpu = 0.540069 (sec), leaf count = 42 \[ \left \{\left \{y(x)\to c_1 \sqrt [4]{\cos ^2(x)-1} P_v^n(\cos (x))+c_2 \sqrt [4]{\cos ^2(x)-1} Q_v^n(\cos (x))\right \}\right \} \]
Maple: cpu = 0.203 (sec), leaf count = 140 \[ \left \{ y \left ( x \right ) ={{\it \_C1}\sqrt [4]{2\,\cos \left ( 2\,x \right ) +2} {\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}})} \left ( {\frac {\cos \left ( 2\,x \right ) }{2}}-{\frac {1}{2}} \right ) ^{{\frac {n}{2}}}\sqrt {-2\,\cos \left ( 2\,x \right ) +2}{\frac {1}{ \sqrt {\sin \left ( 2\,x \right ) }}}}+{{\it \_C2} \left ( 2\,\cos \left ( 2\,x \right ) +2 \right ) ^{{\frac {3}{4}}} {\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}})} \left ( {\frac {\cos \left ( 2\,x \right ) }{2}}-{\frac {1}{2}} \right ) ^{{\frac {n}{2}}}\sqrt {-2\,\cos \left ( 2\,x \right ) +2}{\frac {1}{ \sqrt {\sin \left ( 2\,x \right ) }}}} \right \} \]