Numerical Quadrature Consider the quadrature formula \[ \int _a^b w(x)f(x)\,dx=\sum _{i=1}^n \alpha _i f(\xi _i)+E, \] for the integral of \(f\) with a given positive weight function \(w(x)>0\). We would like to use \(n\) knot values \((f(\xi _i), i=1,\ldots ,n)\) to achieve the exact integral if \(f\) is a polynomial of degree up to \(2n-1\).
(a) Start from the special case \(a=-1\), \(b=1\) and \(w(x)=1\), define the orthogonal polynomials over \([-1,1]\).
(b) Use those orthogonal polynomials and polynomial division to simplify the integral. How would you pick the knots \(\xi _i\) and the weights \(\alpha _i\) such that the formula is exact (i.e., \(E=0\)) for all polynomials of degree up to \(2n-1\)? Verify that your choice works.
(c) Show that you can extend the approach to more general integrals, with arbitrary \(a<b\) and positive weight function \(w\).