Solution (source code)

= Solution

Let $W=P_\ell Q_\ell'-P_\ell'Q_\ell$. Differentiation cancels the cross terms, and the <Legendre differential equation> gives
$$
\begin{aligned}
W'&=P_\ell Q_\ell''-P_\ell''Q_\ell\\
&=\frac{2x}{1-x^2}(P_\ell Q_\ell'-P_\ell'Q_\ell)=\frac{2x}{1-x^2}W.
\end{aligned}
$$
Thus $[(1-x^2)W]'=0$, so
$$
\boxed{W(x)=\frac{A_\ell}{1-x^2},}
$$
with $A_\ell$ independent of $x$ on each interval avoiding the singular endpoints. This is the <Abel identity>. Linear independence forces $A_\ell\ne0$, and its value depends on the chosen normalization of $Q_\ell$.