I have the integral, $$I=\int_{-1}^1 dx P'_m(x) P'_n(x).$$ I tried using $$P_m'(x)=-(m+1)\frac{xP_m(x)-P_{m+1}(x)}{x^2-1},$$ but that yields, $$I=\int_{-1}^1\bigg(\frac{x^2P_mP_n}{(x^2-1)^2}+\frac{P_{m+1}P_{n+1}}{(x^2-1)^2}-\frac{xP_mP_{n+1}}{(x^2-1)^2}-\frac{xP_{m+1}P_n}{(x^2-1)^2}\bigg),$$ which did not seem particularly convenient to me either. Alternatively, using integration by parts, along with $(1-x^2)P''_m-2xP'_m+m(m+1)P_m=0$ $$I=P'_mP_n\big\vert_{-1}^1-\int_{-1}^1 dx P_n P''_m=P'_mP_n\big\vert_{-1}^1-\int_{-1}^1\bigg(\frac{2xP_nP'_m}{1-x^2}-m(m+1)\frac{P_nP_m}{1-x^2}\bigg).$$ Stuck either way. Lastly, I tried using the associated Legendre polynomials to cast the original integral as, $$\int_{-1}^1 dx\frac{P_m^1P_n^1}{1-x^2},$$ which I could not find.
I guess the only way out might be to use the Rodrigues formula and churn through all the terms?
Addendum: A brute force evaluation on Mathematica, of both the last expression in terms of the associated Legendre functions, and the initial expression, seems to yield $$I=\int_{-1}^1 dx P'_m(x) P'_n(x)=\int_{-1}^1 dx\frac{P_m^1P_n^1}{1-x^2}=\begin{cases}&k(k+1),\quad k=\mathrm{min}(m,n);\quad m,n \text{ both odd or even}\\&0;\quad \text{otherwise}\end{cases}$$