5
$\begingroup$

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?

$\endgroup$

2 Answers 2

6
$\begingroup$

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).

$\endgroup$
2
  • 3
    $\begingroup$ That's what confused me. If f is a polynomial then we don't even need quadrature rules right (since integrating polynomials is not hard)? $\endgroup$
    – aguest
    Commented Apr 30, 2014 at 14:35
  • 3
    $\begingroup$ Of course. But that's what it means anyway. :-) $\endgroup$ Commented May 1, 2014 at 9:41
4
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ @aguest also if i may had to this post: polynomials are very good at approximating continous functions so the order of precision of a formula is a very good indicator of the precision of the formula for all continous functions $\endgroup$ Commented Jan 31, 2023 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .