2.1416   ODE No. 1416

\[ y''(x)=(n-v) (n+v+1) y(x)-(2 n+1) \cot (x) y'(x) \] Mathematica : cpu = 0.112591 (sec), leaf count = 46

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

\[\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.224 (sec), leaf count = 26

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

\[y \left (x \right ) = \sin \left (x \right )^{-n} \left (\operatorname {LegendreP}\left (v , n , \cos \left (x \right )\right ) c_{1}+\operatorname {LegendreQ}\left (v , n , \cos \left (x \right )\right ) c_{2}\right )\]