Error bounds for midpoint, trapezoidal, and Simpson’s rules

A numerical integration rule gives us an approximation, but the approximation alone doesn’t say how close we are. An error bound gives us a guarantee before we know the exact integral. We’ll find the derivative bound that goes into each formula, then use Simpson’s rule to choose a number of subintervals.

The three error bound formulas

Let a < b and divide [a, b] into n equal subintervals. If I is the exact integral and Q is an approximation, the absolute error is |I − Q|. The formulas below give upper bounds on that error.

Composite rules on equal subintervals
RuleBound on absolute errorWhat K bounds
MidpointK(b-a)324n2|f″(x)|
TrapezoidalK(b-a)312n2|f″(x)|
Simpson’sK(b-a)5180n4|f⁽⁴⁾(x)|

Use these bounds when the required derivative is continuous on the interval and K bounds its absolute value throughout the interval. Simpson’s rule also requires n to be even. A large bound does not tell us the actual error is large; it gives a weaker guarantee.

How to find K

Differentiate twice for midpoint or trapezoidal, and four times for Simpson’s. Then find the maximum of the derivative’s absolute value on [a, b], or choose any safe upper bound. Depending on the function, that can mean checking interior extrema as well as endpoints.

Example: Bound the Simpson’s rule error for n = 4

Consider the integral of e raised to x² from 0 to 1. With n = 4, the Simpson bound becomes

|ES|≤K180(4)4=K46080

To find K, use the product and chain rules until we have the fourth derivative.

f′(x)=2xex2f′′(x)=(2+4x2)ex2f′′′(x)=(12x+8x3)ex2f(4)(x)=(12+48x2+16x4)ex2

On [0, 1], both factors in the fourth derivative are positive and nondecreasing, so the largest absolute value occurs at x = 1. That gives K = (12 + 48 + 16)e = 76e.

|ES|≤76e46080<0.0045

How many subintervals guarantee the requested accuracy?

For an error of at most 0.00001, set the upper bound itself less than or equal to 0.00001 and solve for n.

76e180n4≤0.00001
n≥76e0.00184≈18.41

The first even integer that meets the bound is 20. That is the smallest allowed n guaranteed by this bound; an approximation with fewer intervals could still happen to meet the tolerance.

Example: Compare the bound with the actual error

For the integral of x⁴ from 0 to 1, two subintervals have width 12. Simpson’s rule uses f(0), f(12), and f(1) with weights 1, 4, and 1.

S2=16(0+4·116+1)=524

The fourth derivative is constantly 24, so the bound is

|ES|≤24180(2)4=1120

This integral can also be evaluated exactly: it equals 15. The actual absolute error is |15-524|=1120, so the bound is attained in this example.