# Integral of Legendre polynomials $P_n(\cos\theta)$

Given the Legendre polynomial $P_n(\cos\theta)$, I would like to calculate the integral:

$$\int_{\frac{\pi}{2}-a}^{\frac{\pi}{2}+a}\,\,P_n(\cos\theta)\sin\theta \,\,d\theta$$

where $a\in[0,\frac{\pi}{2}]$. Any suggestion on how to proceed? If $a=\frac{\pi}{2}$, is it possible to find a closed solution?

• If $a=\pi/2$, the integral is $2\delta_{n0}$. – Felix Marin Jul 12 '16 at 0:46

Considering the problem of the antiderivative $$I_n=\int P_n(\cos\theta)\sin\theta \,\,d\theta$$ changing variable $x=\cos(\theta)$, you have $$I_n=-\int P_n(x)\,dx$$ If you look here, you will notice that $$I_n=-\frac{P_{n+1}(x)-P_{n-1}(x)}{2 n+1}$$