I need to evaluated the following integral:
$\int_0^\pi \sin(x) \cos(x) P_l^m(\cos x) P_k^m(\cos x) \mathrm{d}x$
and I thought since a solution is known to a similar thing
$\int_0^\pi \sin(x) P_l^m(\cos x) P_k^m(\cos x) \mathrm{d}x = \frac{2(l+m)!}{(2l+1)(l-m)!}\delta_{l,k}$
maybe this is the case with an additional $\cos x$ as well.
Since $$P_l^{m}(x) = (-1)^m\ (1-x^2)^{m/2}\ \frac{d^m}{dx^m}\left(P_l(x)\right)\tag{1}$$ the second integral equals: $$ \int_{0}^{\pi/2}\cos(x)P_{l}^{m}(\sin x)P_{k}^{m}(\sin x)\,dx + \int_{0}^{\pi/2}\cos(x)P_{l}^{m}(-\sin x)P_{k}^{m}(-\sin x)\,dx $$ or: $$ \int_{0}^{1}P_{l}^{m}(x) P_{k}^{m}(x)\,dx + \int_{0}^{1}P_{l}^{m}(-x) P_{k}^{m}(-x)\,dx=\int_{-1}^{1}P_l^m(x)P_k^m(x)\,dx$$ and $$ \int_{-1}^{1}P_l^m(x) P_k^m(x)\,dx = \frac{2(l+m)!}{(2l+1)(l-m)!}\delta_{k,l}\tag{2}$$ follows from the orthogonality relation for the associated Legendre polynomials.
The first integral equals: $$ \int_{-1}^{1}|x|\, P_{l}^{m}(x)\, P_{k}^{m}(x)\,dx\tag{3}$$ and it can be computed through Gaunt's formula once we expand $|x|$ in terms of Legendre polynomials.