# Integral involving even order Legendre polynomials

Let $$a>1$$. We want to evaluate the integral $$\begin{equation*} \int_{-1}^1 \frac{P_{2n}(\xi)\,d\xi}{\sqrt{a^2-\xi^2}} \end{equation*}$$ Mathematica is able to evaluate special cases for various $$n$$, but does not give an answer for arbitrary $$n$$. From the special cases, we see that the integral is always of the form $$\begin{equation*} A_{1n}(a)\sqrt{a^2-1}+A_{2n}(a)\csc^{-1}(a), \end{equation*}$$ where $$A_{1n}(a)$$ and $$A_{2n}(a)$$ are polynomials in $$a$$. So the question is:

Starting from the Rodriguez formula for $$P_n(\xi)$$ or using any other method, is it possible to determine the polynomials $$A_{1n}(a)$$ and $$A_{2n}(a)$$.

Incidentally, the result for this integral for $$a=1$$ is known, and is given by $$\begin{equation*} \frac{\pi^2}{\left[\Gamma\left(\frac{1}{2}-n\right)\Gamma(n+1)\right]^2}. \end{equation*}$$

• It seems like the mathematica package Rubi rulebasedintegration.org can calculate the integral that results from the generating function of that sequence but trying to find the series coefficients after calculating the integral seems to lead to a complicated reccurence formula. In any case, here is the generating function that I found using mathematica ($F$ is the ellipticF function) Dec 9, 2023 at 4:37
• $$\frac{2 \sqrt{1-\frac{1}{a^2}} a \left(\sqrt{\frac{1}{-2 a t+t^2+1}} \left(F\left(\sin ^{-1}\left(\frac{\sqrt{1+\frac{1}{a}}}{\sqrt{2}}\right)|-\frac{4 a t}{t^2-2 a t+1}\right)-F\left(\csc ^{-1}\left(\frac{\sqrt{2}}{\sqrt{\frac{a-1}{a}}}\right)|-\frac{4 a t}{t^2-2 a t+1}\right)\right)+\sqrt{\frac{1}{2 a t+t^2+1}} \left(F\left(\sin ^{-1}\left(\frac{\sqrt{1+\frac{1}{a}}}{\sqrt{2}}\right)|\frac{4 a t}{t^2+2 a t+1}\right)-F\left(\csc ^{-1}\left(\frac{\sqrt{2}}{\sqrt{\frac{a-1}{a}}}\right)|\frac{4 a t}{t^2+2 a t+1}\right)\right)\right)}{\sqrt{a^2-1}}$$ Dec 9, 2023 at 4:37
• @userrandrand Thanks for your answer and also introducing me to this new package `rulebasedintegration' which I was not aware of. By using the incomplete beta function, I was able to reduce the double summation in Robert's answer to a single summation. See my answer below. The motivation behind this problem is to be able to express the function as a Fourier-Legendre series.
– Jog
Dec 10, 2023 at 5:43
• Rubi is quite good, here is one old mathematica stack exchange answer that mentions it mathematica.stackexchange.com/a/32939/86543. You can find other posts about it here mathematica.stackexchange.com/… Dec 10, 2023 at 17:34
• I think Rubi still has some way to go before it can catch up with Mathematica. Try the following integral from Pipes book on Applied Maths. Int[Cosh[ax]/Cosh[Pix],{x,0,Infinity}] Rubi is unable to integrate, but Mathematica can evaluate much more complicated expressions than these .
– Jog
Dec 11, 2023 at 4:53

Actually there's nothing very special about $$P_{2n}$$, it's just that $$P_{2n}$$ is an even polynomial.

Let's let

$$I_k = \int_{-1}^1 \frac{\xi^{2k} d\xi}{\sqrt{a^2 - \xi^2}} = 2\int_{0}^1 \frac{\xi^{2k} d\xi}{\sqrt{a^2 - \xi^2}}$$

Further, let's take $$b = 1/a$$ and change variables to $$t = b\xi$$. Now we have

$$I_k = 2 b^{-2k} \int_0^b \frac{t^{2k}\; dt}{\sqrt{1-t^2}}$$

where $$0 \le b \le 1$$. It is "well-known" that

$$\int_0^b \frac{t^{2k}\; dt}{\sqrt{1-t^2}} = \frac{(2k-1)(2k-3) \cdots 1}{(2k)(2k-2)\cdots 2}\arcsin(b) - \sum_{i=1}^k \frac{(2k-1)(2k-3)\cdots (2i+1)}{(2k)(2k-2) \cdots (2i)} b^{2i-1} \sqrt{1-b^2}$$

and then if $$P_{2m}(\xi) = \sum_{k=0}^{m} a_k \xi^{2k}$$, your integral is $$\sum_{k=0}^m a_k I_k$$.

Thanks to Robert's answer, I was able to derive the following explicit expression: $$\begin{equation*} \int_{-1}^1\frac{P_{2n}(\xi)\,d\xi}{\sqrt{a^2-\xi^2}}=\sum_{k=1}^{n+1} \frac{4^na^{2(k-1)}B_{1/a^2}\left(k-\frac{1}{2},\frac{1}{2}\right)\Gamma\left(n+k-\frac{1}{2}\right)} {\Gamma(2k-1)\Gamma\left(k-n-\frac{1}{2}\right)\Gamma(2n-2k+3)}, \end{equation*}$$ where $$B_z(a,b)$$ denotes the incomplete $$\beta$$ function. For $$a=1$$, the above expression reduces to $$\begin{equation*} \int_{-1}^1\frac{P_{2n}(\xi)\,d\xi}{\sqrt{1-\xi^2}}=\left(\frac{\Gamma\left(n+\frac{1}{2}\right)}{\Gamma(n+1)}\right)^2. \end{equation*}$$

The above results along with the orthogonality of the Legendre polynomials allows one to express $$1/\sqrt{a^2-\xi^2}$$ as a Fourier-Legendre series!