Quadrature Rule "is exact for polynomials of degree n"

5.1k Views Asked by At

Could someone kindly explain what "a quadrature rule is exact for polynomials of degree n" means?

Here is what I understand about numerical (Newton-Cotes) quadrature rules: Suppose we want to integrate f(x) on the interval [a,b] but it is hard. Hence, one way to do it numerically is to approximate f(x) with a polynomial of degree n and then integrate the polynomial. For Newton-Cotes formulas, we already know (n+1) nodes, so we can interpolate those nodes using Lagrange basis and get the polynomial interpolant of f(x).

Then, the book (Numerical Analysis by Suli and Mayers) says on page 205 that "the Newton-Cotes formula is exact for all polynomials of degree n" if n is odd. <-- What does this statement really mean?

2

There are 2 best solutions below

2
On

It means that in the case where $f$ is such a polynomial, the formula gives the exact value of the integral of $f$ (and not just an approximation).

1
On

Addressing a question in the comment to Hans' answer:

If f is a polynomial then we don't even need quadrature rules right (since integrating polynomials is not hard)?

Integrating polynomials is not hard if you have them represented as sum of monomials, i.e. when your polynomial

$$p(x)=\sum_{n=0}^N p_n x^n,$$

and you know all your $p_n$. But what if you have e.g. polynomials $a, b, c$ of varying degrees, and need to integrate $f(x)=a(b(c(x)))$ over some interval? It's easy to see that $f$ is still a polynomial, its degree is product of degrees of $a$, $b$ and $c$, but you don't know its coefficients right away. To integrate analytically you'd have to expand $a(b(c(x)))$. You'd have to use multinomial formula, which will result in large expressions, prone to numerical errors while calculating to numbers.

Using a quadrature rule which is exact for polynomials of the degree you need you can get the answer easily, just sampling your polynomial in the points required by the method — without all that symbolic complication. So if all what you need is a numerical approximation of your integral, you're much better off using e.g. Newton-Cotes or Gauss quadrature rule rather than doing term-by-term integration.