\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) =-{\frac { \left ( 2\,n+1 \right ) \cos \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) }{\sin \left ( x \right ) }}- \left ( v+n+1 \right ) \left ( v-n \right ) y \left ( x \right ) =0} \]
Mathematica: cpu = 0.215027 (sec), leaf count = 46 \[ \left \{\left \{y(x)\to c_1 \left (\cos ^2(x)-1\right )^{-n/2} P_v^n(\cos (x))+c_2 \left (\cos ^2(x)-1\right )^{-n/2} Q_v^n(\cos (x))\right \}\right \} \]
Maple: cpu = 0.141 (sec), leaf count = 31 \[ \left \{ y \left ( x \right ) ={\it \_C1}\, \left ( \sin \left ( x \right ) \right ) ^{-n}{\it LegendreP} \left ( v,n,\cos \left ( x \right ) \right ) +{\it \_C2}\, \left ( \sin \left ( x \right ) \right ) ^{-n}{\it LegendreQ} \left ( v,n,\cos \left ( x \right ) \right ) \right \} \]