For numerical integration, a quadrature formula
∫abf(x)dx≈i=0∑naif(xi)
is applied which is exact on Pn, i.e., for all polynomials of degree n.
Prove that such a formula is exact for all f∈P2n+1 if and only if xi,i=0,…,n, are the zeros of an orthogonal polynomial pn+1∈Pn+1 which satisfies ∫abpn+1(x)r(x)dx=0 for all r∈Pn. [You may assume that pn+1 has (n+1) distinct zeros.]