ODE
\[ k (k+1) y(x)+y''(x)+\cot (x) y'(x)=0 \] ODE Classification
[[_2nd_order, _with_linear_symmetries]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.133458 (sec), leaf count = 20
\[\left \{\left \{y(x)\to c_1 P_k(\cos (x))+c_2 Q_k(\cos (x))\right \}\right \}\]
Maple ✓
cpu = 0.26 (sec), leaf count = 45
\[ \left \{ y \left ( x \right ) ={\it \_C1}\,{\mbox {$_2$F$_1$}(-{\frac {k}{2}},{\frac {1}{2}}+{\frac {k}{2}};\,{\frac {1}{2}};\, \left ( \cos \left ( x \right ) \right ) ^{2})}+{\it \_C2}\,\cos \left ( x \right ) {\mbox {$_2$F$_1$}({\frac {k}{2}}+1,{\frac {1}{2}}-{\frac {k}{2}};\,{\frac {3}{2}};\, \left ( \cos \left ( x \right ) \right ) ^{2})} \right \} \] Mathematica raw input
DSolve[k*(1 + k)*y[x] + Cot[x]*y'[x] + y''[x] == 0,y[x],x]
Mathematica raw output
{{y[x] -> C[1]*LegendreP[k, Cos[x]] + C[2]*LegendreQ[k, Cos[x]]}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+cot(x)*diff(y(x),x)+k*(k+1)*y(x) = 0, y(x),'implicit')
Maple raw output
y(x) = _C1*hypergeom([-1/2*k, 1/2+1/2*k],[1/2],cos(x)^2)+_C2*cos(x)*hypergeom([1
/2*k+1, 1/2-1/2*k],[3/2],cos(x)^2)