Integrals from sampled values
A finite-element load integral and a numerical integral both turn function values into a number. A rule can be exact for some functions yet miss features between its sample points. We derive finite error bounds under explicit smoothness assumptions and show why agreement between two grids is not a certificate by itself.
Let , be an integer, , and . For , put and write .
Definition 5.1.1
(Composite trapezoid rule)
With the uniform nodes , the composite trapezoid rule is
It integrates exactly the piecewise linear interpolant of at the nodes.
Theorem 5.1.2
(A composite trapezoid bound)
Under these hypotheses,
Proof
(Integrate the linear interpolation remainder)
On one panel , let be the line interpolating at its endpoints. For every in the panel, the interpolation remainder gives for some in the panel. The integral of is the panel trapezoid. Taking absolute values and integrating the quadratic bound gives at most error on that panel. Summing errors yields .
Worked example 5.1.3
(The trapezoid bound is attained by a quadratic)
Take on and , so and . Then , while , so the error is . The theorem gives : the bound holds with equality. For a quadratic, is constant and the remainder has one sign on every panel, so no cancellation is lost in the absolute values. The constant therefore cannot be improved.
Refinement and a fourth-order rule
Compute the trapezoid sum again using the half-width panels.
Definition 5.1.4
(Composite Simpson rule)
The composite Simpson rule is
On each original width- panel , algebra gives the Simpson expression .
It integrates every polynomial of degree at most three exactly, which can be checked using powers about the panel midpoint.
Theorem 5.1.5
(A fourth-derivative bound)
If in addition and , then
This bound is valid but not claimed to be the sharpest constant.
Proof
(Subtract the cubic Taylor polynomial)
On each panel expand to degree three about its midpoint. The remainder obeys . The Simpson rule and the integral agree on the cubic Taylor polynomial. The absolute contribution of the remainder to the integral is at most ; the contribution to the positive-weight Simpson sum is at most , since the midpoint remainder is zero. Their sum is . Summing the panels proves the bound.
Proof X-ray
Two error terms and the zero midpoint
Cubic exactness is used once: subtracting the Taylor cubic about the midpoint leaves the panel error equal to with . Without a bound on this says nothing, since an arbitrary function need not be close to any cubic. The two terms are then bounded separately. The integral term uses and gives . The rule term needs positive weights, so that is at most the weights times at the nodes. Here the heaviest weight sits at , where , so only the endpoint weights meet the value , giving . Adding the two terms instead of seeking cancellation is why the constant is valid but not claimed sharp. Throughout, is the width of an original Simpson panel, not the half-width of its two trapezoid subpanels.
The fourth-power example tests the Simpson bound on a function for which it is not exact.
Worked example 5.1.6
(Integrating a fourth power)
For on with , the exact integral is , while and . Thus . Its absolute error is . Here and , so the proved bound is , safely above the actual error.
Common mistake
(Inserting the half-width into the Simpson bound)
evaluates at points spaced apart, and it is tempting to put that spacing into the bound. For on with , using would give , which is smaller than the actual error : the resulting statement is false. The proof bounds each original panel of width , and there must be the panel width.
Worked example 5.1.7
(Simpson's rule on a square root)
Take on , so . Here is unbounded near , so neither theorem applies. Direct computation gives
with errors about , and . Each halving of divides the error by about , not by . Convergence still occurs, but the fourth-order rate is a consequence of the smoothness hypothesis, and here the rate is governed by the singular behavior at .
A warning about observed agreement
A common refinement indicator compares with . It may be informative under additional asymptotic assumptions, but a zero difference does not prove the integral is correct.
Counterexample mode
A smooth function invisible at sampled nodes
On , take . It vanishes at , so . Yet direct integration gives . All three approximations agree while their error is nonzero; the polynomial is smooth. A genuine a priori bound requires a valid derivative bound, not just the observed difference.
A smaller improves these exact-arithmetic bounds for a fixed smooth function with a fixed derivative bound. It does not by itself bound floating-point roundoff, ensure a derivative bound is known, or justify applying the same rates to a nonsmooth integrand. In finite-element assembly, quadrature also changes the discrete load or bilinear form; solver residual and quadrature error are distinct.
Exercises
Quick check
(For on , find , and .)
Use .
Solution · Answer
, , and , equal to the exact integral.
Quick check
(For on , verify the error and the bound.)
Compute and first.
Solution · Answer
, , so the error is ; gives bound .
Quick check
(What happens to the proven Simpson bound if is halved while and are fixed?)
The bound is proportional to .
Solution · Answer
The bound is divided by ; this is a bound, not a claim that the actual error has that exact ratio.
Quick check
(Why can not alone certify exact integration?)
Look for a smooth function that vanishes at every node used.
Solution · Answer
The smooth polynomial vanishes at all sampled nodes , so , but its integral is .
Further reading
MIT OpenCourseWare, Numerical Analysis Chapter 3 discusses interpolation and composite quadrature.