Legendre Polynomials integral

legendre polynomialsnumerical methods

I've been asked to calculate:
$$
\int_{0}^{1} P_{\ell}(x)dx,
$$

where $P_{\ell}(x)$ is a Legendre polynomial by using:

i)The generating function:
$$
\sum_{\ell=0}^{\infty}P_{\ell}(x)t^{\ell}=\frac{1}{\sqrt{1+t^{2}-2xt}}
$$

ii)The recurrence rule:
$$
xP^{\prime}_{\ell}(x)=\ell P_{\ell}(x)+P_{\ell-1}^{\prime}(x)
$$

iii)The recurrence rule:
$$
P^{\prime}_{\ell+1}(x)-P^{\prime}_{\ell-1}(x)=(2 \ell+1)P_{\ell}(x)
$$

My attempt:

Replacing in the legendre equation
$$
(1-x^{2})\frac{d^2}{dx^2}[P_{\ell}(x)]-2x\frac{d}{dx}[P_{\ell}(x)]+\ell(\ell+1)[P_{\ell}(x)]=0
$$

I get the expression
$$
\frac{d}{dx}\left[ (1-x^2) \frac{d}{dx}P_{\ell}(x)\right]+\ell(\ell+1)P_{\ell}(x)=0.
$$

Integrating the previous expression
$$
\left[(1-x^2)\frac{d}{dx}P_{\ell}(x)\right]_{0}^1=-\ell(\ell+1)\int_{0}^{1}P_{\ell}(x)dx
$$

and finally
$$
\frac{P^{\prime}_{\ell}(0)}{\ell(\ell+1)}=\int_{0}^{1}P_{\ell}(x)dx.
$$

But using Wolfram Alpha I get
$$
\int_{0}^{1}P_{\ell}(x)dx=\frac{P_{\ell-1}(0)-P_{\ell+1}(0)}{2\ell+1}.
$$

The expression is correct but mine is not, any help is welcome

Best Answer

You recurrence rule seems to be wrong. What Wiki says is link: $$ P'_{l+1}(x)=(l+1)P_l(x)+xP'_l(x). $$ Then the computation becomes straightforward $$ \int_0^1 P_l(x) = \frac{1}{l+1}\int_0^1 (l+1)P_l(x) dx \\ = \frac{1}{l+1}\int_0^1 [P'_{l+1}(x)-xP'_l(x)]dx \\ = \frac{1}{l+1}\int_0^1 P'_{l+1}(x)dx - \frac{1}{l+1}\int_0^1 xP'_l(x)dx \\ = \frac{1}{l+1} [P_{l+1}(x)]_0^1 - \frac{1}{l+1}\left([xP_l]_0^1 - \int_0^1 P_l(x)dx\right) \\ = \frac{1}{l+1}[1-P_{l+1}(0)] - \frac{1}{l+1}\left(1 - \int_0^1 P_l(x)dx\right) \\ = \frac{1}{l+1}[1-P_{l+1}(0)] - \frac{1}{l+1} + \frac{1}{l+1} \int_0^1 P_l(x)dx \\ $$ We used integration by parts. Noting $I=\int_0^1 P_l(x)dx$ and $A=1-P_{l+1}(0)$ we need to solve the equation $$ (l+1)I= A-1+I \\ lI= A-1 \\ I = (A-1)/l\\ = -P_{l+1}(0)/l $$ There is a formula for value at zero: link