# Finding the Fourier-Legendre series of a function

I need to find the Fourier-Legendre expansion of the function $$f(x)=(1-x^2)^{-1/2}$$.

The Fourier-Legendre expansion is $$f(x) = \sum_{n=0}^{\infty}a_nP_n(x)$$ where the coefficients of the series are $$a_n = \frac{2n+1}{2} \int_{-1}^{1} f(x)P_n(x)dx$$ for $$n\geq0$$ where $$P_n(x)$$ is the $$n^{th}$$ Legendre polynomial.

I have tried using both the Rodrigues' formula and the generating function $$g(t,x)$$, but in both cases the integrals resulting from the function $$f(x)$$ or its derivatives don't exist on the interval $$[-1,1]$$.

Using other aproach we can see that $$f(x)$$ is an even function, thus the formula can be rewritten as $$a_n =\begin{cases} (2n+1)\int_{0}^{1} f(x)P_n(x)dx & \text{if n is even} \\ 0 & \text{if n is odd} \\ \end{cases}$$

From this point, I can't find a way to simplify the integral, I've been using recurrence relations but each iteration adds more elements to the integral, and further making it more difficult. Is it possible to continue from here$$?$$

Any help will be appreciated.

• What have you tried to compute $a_0$ and $a_2$? What did you get for them? Commented Oct 3, 2019 at 0:11
• I got $a_0$ = $\pi$ and $a_2$ = $\frac{5 \pi}{8}$, I´m trying to get a general formula for $a_n$ Commented Oct 3, 2019 at 0:25

A calculation of $$a_n$$ suggests that $$a_0 = \pi/2$$ while for $$n>0$$, $$a_{2n} = \pi\frac{4n+1}{2^{4n-1}} \binom{2n-1} {n-1}^2.$$ Thus, $$a_2 = \pi\frac58$$, $$a_4 = \pi\frac{81}{128},$$ and so on. The method I used was to generate a few terms, divide out the $$\pi$$, factorize the resulting rational number, remove the $$(4n+1)/2^{4n-1}$$ factor, and look up the square root as OEIS sequence A001700.