4.27.11 \(k (k+1) y(x)+y''(x)+\cot (x) y'(x)=0\)

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.271952 (sec), leaf count = 20

\[\{\{y(x)\to c_1 P_k(\cos (x))+c_2 Q_k(\cos (x))\}\}\]

Maple
cpu = 1.25 (sec), leaf count = 45

\[\left [y \left (x \right ) = \textit {\_C1} \hypergeom \left (\left [-\frac {k}{2}, \frac {k}{2}+\frac {1}{2}\right ], \left [\frac {1}{2}\right ], \cos ^{2}\left (x \right )\right )+\textit {\_C2} \cos \left (x \right ) \hypergeom \left (\left [\frac {k}{2}+1, \frac {1}{2}-\frac {k}{2}\right ], \left [\frac {3}{2}\right ], \cos ^{2}\left (x \right )\right )\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))

Maple raw output

[y(x) = _C1*hypergeom([-1/2*k, 1/2*k+1/2],[1/2],cos(x)^2)+_C2*cos(x)*hypergeom([
1/2*k+1, 1/2-1/2*k],[3/2],cos(x)^2)]