# Re-arranging and integrating a Generating Function of Legendre Polynomials

I have a generating function of Legendre Polynomials given by: $$G(x,r)= \sum_{n=0}^\infty P_n(x)r^n = (1-2rx +r^2)^{-1/2}$$

My problem is that I'm asked to find $$\int_{-1}^1P_n(x)dx$$ but all I have is $$P_n(x)r^n$$, I'm not sure how to (essentially) remove the $$r^n$$ so that I have what I need.

I can work out the integral myself I would just like to know how to get from $$P_n(x)r^n$$ to $$P_n(x)$$.

One method I thought of was to define some $$C_n$$ so that:

$$\int_{-1}^1P_n(x)dx=C_n$$

Then I could integrate both sides but I got confused as to what would be in the $$(...)$$

$$\sum_n C_nr^n=\int_{-1}^1(...)dx$$

Any help would be much appreciated

Since $$\int_{-1}^1 G(x,r) \;dx = 2$$ it follows that $$\int_{-1}^1 P_n(x)\;dx = \begin{cases} 2 \qquad \text{if } n = 0 \\ 0 \qquad \text{otherwise} \end{cases}$$
• Oh, I didn't realise it was that simple. Did you get that by using the fact that both $|x| <=1$ and $|r| <=1$? Or is it a general rule that the integration between 1 and -1 of a generating function is equal to 2? Commented May 18, 2021 at 14:15
• Or did you just integrate $G(x,r)$? When i Integrate $G(x,r)dx$ I get $2/r$, in my question it says that $|r|<1$ (I made a mistake in my previous comment) Commented May 18, 2021 at 14:21
• @CharlieP Just integrate $G(x,r)$ with respect to $x$ from $-1$ to $1$. The result is $2$, with no dependency on $r$. Commented May 18, 2021 at 14:41
• Yep, I realised it after I sent the comment that you integrated $G(x,r)$ I just had a small-brain moment. Thanks for the help Commented May 18, 2021 at 14:49