Solution (source code)

= Solution

Multiplication by $(1-x^2)^k$ puts the equation in <self-adjoint differential equation>[self-adjoint form]:
$$
\boxed{
\frac d{dx}\left[(1-x^2)^{k+1}Q_k'\right]
+\lambda_k(1-x^2)^kQ_k=0
}.
$$
Multiply by $Q_k$ and integrate over $[-1,1]$. Regularity and the vanishing factor at both endpoints remove the boundary term in <integration by parts>, leaving
$$
\int_{-1}^1(1-x^2)^{k+1}(Q_k')^2\,dx
=\lambda_k\int_{-1}^1(1-x^2)^kQ_k^2\,dx.
$$
If $Q_k$ is not identically zero, the integral on the right without $\lambda_k$ is positive, whereas the left side is nonnegative. Therefore
$$
\boxed{\lambda_k\geq0}.
$$