Proving that two functions involving integrals with Legendre polynomials are equal I have two functions that I expect to be equal (where $P_{2l}$ are the even Legendre Polynomials):
$$F_{2l}(x)=x\, \tanh(\pi x/2)\left|\int_0^1 u^{i x-1}P_{2l}(u)\,du\right|^2$$
$$G_{2l}(x)=\frac{1}{2\pi}\, \int_{-\infty}^\infty dt\int^1_{-1}du\frac{P_{2l}(u)e^{-i x t}}{\cosh(t)-u}$$
I checked the Taylor expansion up to fifth order for $2l=0,2,4,6,8,10$.
Do you have any ideas or tips what a good approach could look like to prove the equality analytically? Beside trying standard transformations, I have been thinking about constructing a linear differential equation in x whose solution is given by one of them and showing that the other one also solves it. In particular, the second term is just a simple Fourier transform of the given integrals. The functions seem to be analytical (!?) and in fact for $F$, I did the integral for $\Im(x)<0$ and continued analytically (for the Taylor expansion).
Do you have any other tips or ideas to approach this problem?
 A: $F_{2l}(x)$ can be calculated in closed form for $\text{Im}\ x<0$ using the integral from Gradsteyn and Ryzhik
$$
\int_0^1u^\lambda P_{2l}(u)du=\frac{(-1)^l\Gamma\left(l-\frac{\lambda}{2}\right)\Gamma\left(\frac{1}{2}+\frac{\lambda}{2}\right)}{2\Gamma\left(-\frac{\lambda}{2}\right)\Gamma\left(l+\frac{3}{2}+\frac{\lambda}{2}\right)},\quad \text{Re}\ \lambda>-1,
$$
$$
F_{2l}(x)=\frac{1}{4}x\, \tanh(\pi x/2)\left|\frac{\Gamma\left(l+\frac{1}{2}-\frac{ix}{2}\right)\Gamma\left(\frac{ix}{2}\right)}{\Gamma\left(\frac{1}{2}-\frac{ix}{2}\right)\Gamma\left(l+1-\frac{ix}{2}\right)}\right|^2=\\
\frac{1}{2}\left|\frac{\Gamma\left(l+\frac{1}{2}-\frac{ix}{2}\right)}{\Gamma\left(l+1-\frac{ix}{2}\right)}\right|^2,\quad \text{Im}\ x<0.
$$
[Reflection formula for gamma function has been used to simplify the expression above]
Since $Q_n(z)=\frac{1}{2}\int_{-1}^{1}P_n(z)\frac{dy}{z-y}$ one can simplify $G_{2l}(x)$ as follows
$$
G_{2l}(x)=\frac{1}{\pi}\, \int_{-\infty}^\infty Q_{2l}(\cosh t)e^{-ixt} dt. \tag{1}
$$
This integral converges when $|\text{Im}\ x|<2l+1$, due to the asymptotics of Legendre function of the second kind $Q_{2l}(\cosh t)\sim e^{-(2l+1)t}$,$\ t\to +\infty$.
Now let's consider the following Fourier transform
$$
I(t)=\int_{-\infty}^\infty\left|\frac{\Gamma\left(l+\frac{1}{2}-\frac{ix}{2}\right)}{\Gamma\left(l+1-\frac{ix}{2}\right)}\right|^2 e^{ixt}\ dx=\\
\int_{-\infty}^\infty\frac{\Gamma\left(l+\frac{1}{2}-\frac{ix}{2}\right)\Gamma\left(l+\frac{1}{2}+\frac{ix}{2}\right)}{\Gamma\left(l+1-\frac{ix}{2}\right)\Gamma\left(l+1+\frac{ix}{2}\right)} e^{ixt}\ dx, \quad t>0
$$
This can be calculated by contour integration as follows. Note that the only poles of the integrand in the upper half plane come from the factor $\Gamma\left(l+\frac{1}{2}+\frac{ix}{2}\right)$ in the numerator: $x_k=i(2l+k+1)$,$\ k=0,1,2,3,...$ The integrand decays as $1/|x|$ when $|x|\to+\infty$ and exponentially when $\text{Im}\ x\to +\infty$.
Since $t>0$, one obtains closing the contour by a circle of large radius in the upper half plane 
$$
I(t)=2\pi i\ \sum_{k=0}^\infty \frac{(-1)^k\Gamma\left(2l+k+1\right)}{(i/2)k!\Gamma\left(2l+\frac{3}{2}+k\right)\Gamma\left(\frac{1}{2}-k\right)} e^{-(2l+k+1)t}.
$$
[here we used that $\text{res}\ \Gamma(z)\Bigr|_{z=-m}=\frac{(-1)^m}{m!}$]
This series can be expressed through hypergeometric function:
$$
I(t)=\frac{4\sqrt{\pi}(2l)!e^{-(2l+1)t}}{\Gamma\left(2l+\frac{3}{2}\right)} \phantom{}_2F_1\left(2l+1,\frac{1}{2},2l+\frac{3}{2};e^{-2t}\right)
$$
Applying Kummer's quadratic transformation one obtains
$$
I(t)=\frac{4\sqrt{\pi}(2l)!}{\Gamma\left(2l+\frac{3}{2}\right)(2\cosh t)^{2l+1}} \phantom{}_2F_1\left(l+\frac{1}{2},l+1,2l+\frac{3}{2};\frac{1}{(\cosh t)^2}\right)=4Q_{2l}(\cosh t).
$$
 Now one can calculate $G_{2l}$ by taking inverse Fourier transform 
 $$
G_{2l}(x)=\frac{1}{2}\cdot \frac{1}{2\pi}\, \int_{-\infty}^\infty 4Q_{2l}(\cosh t)e^{-ixt} dt=\frac{1}{2}\left|\frac{\Gamma\left(l+\frac{1}{2}-\frac{ix}{2}\right)}{\Gamma\left(l+1-\frac{ix}{2}\right)}\right|^2, \quad \text{for real}\ \ x.\tag{2}
$$
 But one can analytically continue (2) to the domain $|\text{Im}\ x|<2l+1$. This means that $F_{2l}(x)=G_{2l}(x)$, for $-2l-1<\text{Im}\ x<0$.
