I am trying to solve this integral
$$\int_0^\pi P^m_p(\cos\theta) ~~\cos^2\theta ~~P^m_q(\cos\theta)~~\sin\theta d\theta$$ where $P$ is the Associated Legendre polynomial
I tried to solve it by the fact that
$$\cos^2\theta = \frac{2}{3}P^0_2(\cos\theta)+\frac{1}{3}$$ but this gives an integral that consists three Associated Legendre polynomial and I am not sure if this integral has straightforward solution.
This should give three terms that relate $(p,p)$, $(p,p+2)$ and $(p,p-2)$.