= Solution
Let $\ell_j$ be the <Lagrange interpolation polynomial> for the roots $\omega_j$, and define
$$
A_j=\int_{-1}^1\ell_j(x)r(x)\,dx.
$$
For $\deg Q\leq2n-1$, <polynomial division> gives $Q=SP_n+R$ with $\deg S,\deg R<n$. Orthogonality kills the first term, while interpolation gives $R=\sum_jR(\omega_j)\ell_j$. Therefore
$$
\int Qr=\sum_jA_jQ(\omega_j).
$$
Taking $Q=\ell_j$ proves uniqueness. Taking $Q=\ell_j^2$ also shows
$$
A_j=\int\ell_j^2r>0,
\qquad
\sum_jA_j=\int r.
$$
This is <Gaussian quadrature>.
Back to article page