# Integrating multiple products of order 1 Legendre functions

I would like a closed form expression for the integrals of some products like the following:

$$\int_{-1}^1 P^1_j P^1_k P^1_l P^1_m dx$$

and

$$\int_{-1}^1 P^0_j P^0_k P^1_l P^1_m dx,$$

where $$P^0_j(x)$$ and $$P^1_j(x)$$ are Legendre polynomials and order 1 associated Legendre functions, respectively. From an answer to another question on this site (Legendre Polynomials Triple Product), I know of the following relationship for Legendre polynomials (i.e. order 0 functions):

$$P^0_kP^0_l=\sum_{m=|k-l|}^{k+l}\pmatrix{k & l & m \\ 0 & 0 & 0}^2(2m+1)P^0_m,$$

where the Wigner $$3-j$$ coefficients $$\pmatrix{k & l & m \\ 0 & 0 & 0}$$ are specified in the above link.

Does anyone know of any analogous relationships for products like $$P^0_kP^1_l$$ and $$P^1_kP^1_l$$, or have any advice as to how go about deriving them? I'm trying to find some by using e.g. $$P^1_j=\sqrt{1-x^2}\frac{dP^0_j}{dx}$$, but it's not easy. Any help would be greatly appreciated!

I actually found the answer so I may as well share it: The relevant paper is called "The overlap integral of three associated Legendre polynomials", by Shi-hai Dong and R.Lemus (2002). The expression is given for products of general lengths containing general order Legendre functions and can be easily written down for the above cases. For instance:

$$\int_{-1}^1 P^1_j P^1_k P^1_l P^1_m dx=16\sqrt{j(j+1)k(k+1)l(l+1)m(m+1)}\sum_\alpha \sum_\beta \sum_\gamma G^{jk\alpha}_{11}G^{\alpha l\beta}_{21}G^{\beta m\gamma}_{31}\times\sqrt{\frac{(\gamma-4)!}{(\gamma+4)!}}\frac{((1+(-1)^\gamma)\Gamma\left(\frac{\gamma}{2}\right)\Gamma\left(\frac{\gamma+5}{2}\right)}{\left(\frac{\gamma-4}{2}\right)!\Gamma\left(\frac{\gamma+3}{2}\right)}$$

where I've defined

$$G^{abc}_{de}=(-1)^e(2c+1)\begin{pmatrix} a & b & c \\ 0 & 0 & 0 \end{pmatrix}\begin{pmatrix} a & b & c\\ d & e & -d-e \end{pmatrix}$$

in terms of Wigner $$3-j$$ symbols. Note that $$G^{abc}_{de}$$ is zero unless 1) $$|a-b|\leq c\leq a+b$$, 2) $$c\geq d+e$$, and 3) $$a+b+c$$ is even. Note also that the factor of $$\left(\frac{\gamma-4}{2}\right)!$$ is no problem for odd $$\gamma$$, because the numerator vanishes if $$\gamma$$ is odd.

The other integral can be written out similarly.