Integrating legendre polymial in terms of cosx I was solving a problem in physics and got stuck at this integral:
$$\int_0^\pi P_l(\cos\theta)\sin(\theta)\text{d}\theta$$
How can I compute this integral in terms of $l$? I can find the integral for a given $l$ like 2 by substituting $P_2(\cos\theta)$. And In general, how can I integrate 
$$\int_0^\pi f(\theta) P_l(\cos\theta)\sin(\theta)\text{d}\theta$$
 A: First step: Make a change of variables to $x=cos(\theta)$. Then you will get $\int_{-1}^{1} P_l(x) dx$
Step two: Think of the the integral as $\int_{-1}^1 P_l P_0 dx$. Then there are formulas (sort've like orthogonality relations) which tell you how to integrate the product of two Legendre polynomials. here. At the link it also gives formulas for integrating the product of two legendre polynomials when multiplied by $x$ or $x^2$. I am not sure how to do it for a general function but I suspect that may suffice if you are doing quantum mechanics.
A: For the first integral, make a simple substitution:
$$x = \cos \theta$$
$$dx = -\sin \theta d \theta $$
$$\theta = \{0, \pi \} \implies x = \{1, -1\}$$
and rewrite the integral as:
$$
\int_{-1}^1 P_l(x) dx
$$
If we use the property that the Legendre polynomials are orthogonal, with
$$ \int_{-1}^1 P_l(x) P_m(x) = \frac{2}{2 m + 1} \delta_{m l}
$$
as well as
$$ P_0(x) = 1$$
Then we find that the first integral is $0$ for all choices of $l$ except $l=0$, for which the value is $2$. That is,
$$
\int_0^\pi P_l(\cos \theta) \sin \theta d \theta = 2 \delta_{l 0}.
$$
For the second integral, make the same substitution to get
$$
\int_0^\pi f(\theta) P_l(\cos \theta) \sin \theta d \theta =\int_{-1}^1 f(\cos^{-1}(x)) P_l(x) dx.
$$
That's pretty much as general as you can get, without knowing the form of $f$.
