I am given a function of $\theta$ as $$f(\theta)=\ln\left(\dfrac{1+\sin\frac\theta2}{\sin\frac\theta2}\right)$$
and I am asked to express this function as a Fourier-Legendre series of the form $\sum_{n=0}^{\infty}c_np_n(\cos\theta)$.
The problem is the function seems rather complex to begin with. And moreover the series has $p_n(\cos\theta)$ .
For a simple $x$, I know that, $$c_m=\dfrac{2m+1}{2}\int_{-1}^{1}f(x)p_m(x)dx$$
I can substitute $x=\cos \theta$ and then substitute the original function $f(\theta)$ with proper new limits in integral but i have no idea on how to evaluate the integral.