Back to the on-screen lesson ·

Degree of exactness

What a quadrature rule actually promises, how the promise is verified monomial by monomial, and the counting argument that caps every rule with $n$ points at degree $2n - 1$.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to determine a rule's degree of exactness, explain why testing monomials suffices, connect the degree to the error term and to polynomial approximation, and prove the ceiling that no rule with a given number of points can pass.

2. What you already know

You can apply the trapezoid, midpoint and Simpson rules and their composite versions, and you have met their error formulas. This lesson asks the question behind those formulas: what exactly does a rule promise, and what is the most any rule of its size could promise?

3. The words this lesson uses

A quadrature rule is a sum $\sum_i w_i f(x_i)$ standing in for an integral; the $x_i$ are its nodes and the $w_i$ its weights. Its degree of exactness is the largest $d$ such that it integrates every polynomial of degree $d$ with no error. A rule is interpolatory when its weights are the integrals of the Lagrange basis functions for its nodes.

4. What a rule promises, and the most it could

The degree of exactness of a rule is the largest $d$ for which it integrates every polynomial of degree $d$ exactly. Because both the integral and the rule are linear in $f$, testing the monomials $1, x, x^{2}, \ldots$ in turn settles it, and the degree is one below the first failure. That first failure also names the derivative in the error term: a rule exact through degree $d$ has an error proportional to $f^{(d+1)}$. The reason the number matters is a bridge to approximation theory: if $p$ is any polynomial of degree $d$, the rule integrates it exactly, so the whole error comes from $f - p$ — and it is bounded by the length of the interval times the sum of the weight sizes times $\|f - p\|_\infty$. A rule is as good as polynomials are at approximating the integrand, and no better. That also bounds the whole subject. An $n$-point rule has $n$ nodes and $n$ weights, $2n$ numbers, so it can satisfy at most $2n$ exactness conditions: degree $2n - 1$. The bound is sharp in the other direction too — $\prod_i (x - x_i)^{2}$ has degree $2n$, is positive, and every rule returns zero for it — so no $n$-point rule, however constructed, exceeds $2n - 1$.

Another way: steps

  1. Check the weights sum to the interval length.
  2. Test successive monomials until one fails.
  3. The degree is one below the first failure; the error there fixes the error constant.
  4. Compare with $2n - 1$ to see how much of the available freedom the rule used.

Another way: example

The trapezoid rule on $[-1, 1]$: weights $1, 1$ at $\pm 1$. For $f = 1$ it gives $2$, correct. For $f = x$ it gives $0$, correct. For $f = x^{2}$ it gives $2$ against the true $\tfrac23$ — wrong, so the degree of exactness is $1$, and the error term involves $f''$.

5. The mistake to watch for

Degree of exactness is read as a measure of accuracy. It is a statement about polynomials only, and it reaches a general integrand through one further step: how well polynomials of that degree approximate it. For a function with a corner, a pole near the interval, or an endpoint singularity, that step supplies nothing, and a rule of degree nineteen can be worse than the trapezoid rule. The second half of the mistake is assuming a higher degree is always better. High-order Newton-Cotes rules have negative weights, which turn rounding errors into a growing sum, and are not used at all.

6. Simpson's free degree

  1. Simpson on $[-1, 1]$: $\tfrac13(f(-1) + 4f(0) + f(1))$. For $f = x^{2}$: $\tfrac13(1 + 0 + 1) = \tfrac23$, exact.

    The parabola it integrates.

  2. For $f = x^{3}$: $\tfrac13(-1 + 0 + 1) = 0$, and the true value is $0$ too.

    Free, by symmetry.

  3. For $f = x^{4}$: $\tfrac23$ against $\tfrac25$. Degree of exactness $3$.

    The first failure.

7. The ceiling, checked

  1. Any two-point rule: try $p(x) = (x - x_1)^{2}(x - x_2)^{2}$, degree four.

    Positive except at two points.

  2. Its integral is positive; the rule returns $0$.

    So degree four is impossible.

  3. Degree $3$ is therefore the ceiling for two points, and the two-point Gauss rule attains it.

    Sharp.

8. Your turn: the degree of exactness of the midpoint rule on $[-1, 1]$

  1. The rule is $2f(0)$: one node, weight $2$.

  2. For $f = 1$ it gives $2$, exact; for $f = x$ it gives $0$, exact.

  3. Your turn: work this step out. Its working is at the end of the packet.

    For $f = x^{2}$ it gives $0$ against $\tfrac23$ — so the degree is $1$, which is the one-point ceiling $2n - 1$ attained.

9. Guided practice

Simpson's rule on $[-3, 3]$ is $\dfrac{3}{3}\left(f(-3) + 4f(0) + f(3)\right)$. Apply it to $f(x) = x^{4}$ and give the error, as a fraction if it is not whole.

Answer:

10. Guided practice

Give the degree of exactness of the Gauss-Legendre rule with $3$, $4$ and $5$ points.

PointsDegree of exactness
$3$ points3
$4$ points4
$5$ points5

11. Practice

Match each quadrature rule to its degree of exactness.

Degree $1$, from two fixed endpointsDegree $1$, from a single fixed pointDegree $3$, from three fixed pointsDegree $3$, from two points the rule chose itself
The trapezoid rule
The midpoint rule
Simpson's rule
The two-point Gauss rule

12. Practice

Put the five steps of establishing a rule's degree of exactness into order.

Number the steps in order (write the number in the box):

13. Somewhere new

A quadrature rule $\sum_{i=1}^{4} w_i f(x_i)$ may choose its nodes as well as its weights. How many numbers is it free to choose?

Answer:

14. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

15. Test question

Select every statement that follows from a rule having degree of exactness $d$.

This task has no paper form; do it on a device.

16. What you can do now

You can find and interpret a degree of exactness and state the ceiling for a given number of points. Say in your own words why a high degree of exactness does not promise an accurate answer.

Working for the steps left to you

8. Your turn: the degree of exactness of the midpoint rule on $[-1, 1]$, step 3