The function is smooth and positive on , so the area is a definite number, but none of the usual functions gives an antiderivative to evaluate. Sampling the curve and adding weighted heights gives an estimate, and the real question is how many of its digits can be trusted. This page builds composite Simpson’s rule from parabolas through sample points. It then uses Simpson’s error bound, together with a bound on the fourth derivative, to prove that the integral equals to six decimal places.
Key terms
No elementary antiderivative
Definition The elementary functions are the functions built from polynomials, roots, exponentials, logarithms, trigonometric functions and their inverses by finitely many arithmetic operations and compositions. A function has no elementary antiderivative when none of its antiderivatives is an elementary function. A theorem of Liouville shows that is such a function, and so are and . Having no elementary antiderivative is not the same as having no antiderivative. If is continuous on an interval containing , the fundamental theorem of calculus makes an antiderivative of on that interval.
In plain words The area under from to exists and is one definite number. What is missing is a closed formula for an antiderivative, so the number has to be computed another way. The substitution does not help, because needs a factor that the integrand does not have.
Example With the factor present, the antiderivative is elementary,
Without it, the antiderivative is usually written with the error function , which gives
The error function is defined by this very integral, so the formula names the number without computing it. Its digits still have to come from an approximation.
Numerical integration
Definition Numerical integration approximates a definite integral by a weighted sum of function values
at finitely many nodes in , with weights fixed by the rule. Riemann sums, the trapezoidal rule and Simpson’s rule are rules of this kind. A numerical value is an approximation until an error bound, or another proof, says how close it is.
In plain words Sample the integrand at a few points, weight the samples and add. Rules differ in where they sample and how they weight. A digit that stays the same as a rule is refined, or two rules that agree, is a useful hint but not a proof, because both can miss the same feature between the samples.
Example On the function decreases from to , so the crudest rules, a single rectangle with the height at either end, already enclose the value,
With two subintervals of width , the trapezoidal rule joins the samples at , and by straight lines and gives
which is too small by about . The next card uses the same three samples with different weights and does far better.
Quadratic interpolant
Definition Given three points , and with , there is exactly one polynomial of degree at most whose graph passes through all three. It is called the quadratic interpolant of the points. When the nodes are equally spaced, with , its integral is
This is Simpson’s rule on a single pair of subintervals. To see the formula, put the middle node at with and write . The odd term integrates to over , so the integral is . The interpolation conditions give and , and substituting these values gives the formula.
In plain words Over two neighboring subintervals, replace the curve by the parabola through its three sample points and take the exact area under the parabola. The weights , and come from integrating that parabola. They weight the samples in the area formula and do not change the heights themselves. The weights add to , so a constant height receives the correct area .
Example For with , the samples at , and are , and , and
The integral is about , so this single parabola is off by about , more than times closer than the trapezoidal estimate from the same three samples.
Composite Simpson’s rule
Definition Let be defined on , let be an even positive integer, and set , and for . Composite Simpson’s rule applies the one-pair formula to , and so on up to , and adds the results,
The endpoints get weight , the odd-numbered nodes get weight , and the interior even-numbered nodes get weight , because each of them is the shared end of two neighboring pairs. The pattern is written for , and for it is the one-pair formula. The number of subintervals must be even so that every subinterval belongs to exactly one pair. When is continuous on , the values approach as grows through even numbers.
In plain words Cover the interval with a chain of parabola patches, one for each pair of neighboring subintervals, and add their areas. An odd number of subintervals would leave one subinterval without a partner.
Example Take the integral from the opening, whose integrand is smooth on , with and . The samples at , , , and are about , , , and . The two odd-numbered samples add to about , so
an error of about . With the same rule, carried out by a computer, gives , while a high-precision evaluation of the error function gives . The next card shows how to be sure of such digits without knowing the true value.
Simpson’s error bound
Definition Let have a continuous fourth derivative on , let be a number with for every in , and let be even with . Then composite Simpson’s rule satisfies
Since , the bound also equals .
In plain words The bound is a guarantee that holds whenever its hypotheses do, and it needs no knowledge of the true value. It shrinks like , so halving divides it by . It describes the worst case, and the actual error is often much smaller. When the fourth derivative is not continuous on the whole interval, the theorem does not apply, and the error can be far larger than the formula would suggest.
Example Write . Here , and the next card shows that is a valid bound. With ,
So the integral lies between and . Every number in that interval rounds to , so the integral equals to six decimal places. The actual error is about , far below the guarantee.
Fourth derivative bound
Definition A fourth derivative bound for on is a number with for every in , not only at the sample points. Any valid may be used in Simpson’s error bound. When is continuous on , the smallest valid choice is the maximum of on , and a larger is still correct but calls for more subintervals.
In plain words Simpson’s rule integrates every cubic polynomial exactly. On a pair of subintervals centered at , the term has integral over , and the rule also gives . So the error depends only on how far is from being a cubic near each pair, and the fourth derivative, which is for every cubic, measures that.
Example For , differentiating four times gives
On each power of is at most and , so the triangle inequality gives . This bound is quick to justify, and it is the one used above. A closer look gives the sharp bound . The fifth derivative changes sign in only at , so falls from at to about and then rises to at . To guarantee an error below , the bound calls for , while needs only .
Check yourself
- Approximate by Simpson’s rule with , and compare the actual error with Simpson’s error bound.
Show the answer
Here and the samples at , and are , and , so
The exact value is , so the error is . The fourth derivative is the constant , so and the bound is
The bound is attained exactly here, so in general it cannot be lowered.
- How many subintervals does composite Simpson’s rule need to guarantee an error below for ?
Show the answer
For the fourth derivative is , which is continuous on and largest in size at , so . With and the bound is
It is below when , that is, when . The number must also be even, so . The bound for is about , while only guarantees about . In fact and , an actual error of about .
- A classmate wants from Simpson’s rule, first with and then with together with the error bound. What goes wrong?
Show the answer
With the three subintervals cannot be grouped into pairs, so composite Simpson’s rule is not defined. It needs an even number of subintervals. With the rule applies. The samples at , , , and are , , , and , and with the weights
compared with the exact value , an error of about . The error bound cannot certify any of this. The fourth derivative is unbounded as , so it is not continuous on and no finite exists. The error also shrinks slowly. Quadrupling to and then to gives errors of about and , a factor of about each time, while for an integrand that meets the hypotheses the bound shrinks by a factor of .