Trapezium Rule Error Explained with Worked Examples

The composite trapezium rule with step on has error for some in : proportional to and to the curvature of the function.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Trapezium rule error means

For with : , and the error exactly, because is constant (the trapezium rule). For with : , error , below the bound .

The rule overestimates for a convex function (positive ) because the chords lie above the curve. To guarantee error below for : gives , so strips. Halving divides the error by about four. The error formula comes from the interpolation error for a line through two points (interpolation error).

Simpson's rule has error of order (Simpson's rule error), and Gaussian quadrature is more accurate still (Gaussian quadrature). The derivative bounds use the second derivative, and the exact values come from exponential integrals.

What is it used for?

The trapezium rule error depends on how curved the function is and shrinks as the strip width squared.

How to use trapezium rule error

  1. Bound on .
  2. Error bound .
  3. Solve for or to reach a target error.
  4. Check against the actual error if the exact integral is known.

Graph

Error bound e·h²/12 for ∫₀¹ eˣ dx against the strip width hh = 0.5: 0.0566h = 0.021: 0.00010.050.10.150.20.250.30.350.40.450.500.010.020.030.040.050.06Error bound e·h²/12 for ∫₀¹ eˣ dx against the strip width hherror boundbound e·h²/12Graph with x from 0.01 to 0.5 and y from 0 to 0.06. Shows the curve bound e·h²/12; point h = 0.5: 0.0566 at (0.5, 0.0566); point h = 0.021: 0.0001 at (0.021, 0.0001).

About 48 strips are needed for an error below 0.0001.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: x² on [0, 2], h = 1

Find the error of the trapezium rule for with .

Worked example
Answer
0.33330.3333
  1. Formula

Example 2: e^x on [0, 1], h = 0.5

Find the bound on the error.

Worked example
Answer
0.05660.0566
  1. Formula

Example 3: strips needed

How many strips make the bound for less than ?

Worked example
Answer
4848
  1. h
  2. n

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

∫₀¹ x² dx, n = 4

T = 0.34375

h = 0.25.

Exact value

1/3 ≈ 0.33333

The rule overestimates (convex).

Error

0.0104 = (b − a)h² f″/12

1 × 0.0625 × 2 ÷ 12.

Halving h

error becomes a quarter

O(h²).

Word problems

For the composite trapezium rule with step h on [a, b], the error is −(b − a)h² f″(ξ)/12. Halving h divides the error by about 4.

Apply the rule

Estimate ∫₀¹ x² dx with n = 4.

  1. h0.25
  2. Interior sum0.0625 + 0.25 + 0.5625 = 0.875
  3. T0.125 × (0 + 1.75 + 1)
  4. Check: 0.34375 ✓0.34375.

Actual error

Find T − exact.

  1. 0.34375 − 0.33333
  2. Check: 0.01042 ✓0.01042.

Predicted error Higher

Use (b − a)h²f″/12.

  1. 1 × 0.0625 × 2 ÷ 12
  2. Check: matches ✓0.01042.

Halve h Higher

Predict the error with n = 8.

  1. h = 0.125
  2. Check: 0.00260 ✓0.00260.

Common mistakes

Forgetting the 2 on interior points

T = h/2 (f₀ + f₁ + … + fₙ) ✗

interior points counted twice ✓

Weights 1, 2, …, 2, 1.

Using h instead of h²

error ∝ h ✗

error ∝ h² ✓

Second-order accurate.

Wrong sign

underestimate for convex f ✗

overestimate when f″ > 0 ✓

Chords lie above the curve.

Using f instead of f″

bound with max f ✗

bound with max |f″| ✓

Curvature controls the error.

Exam tips

  1. h/2 [f₀ + 2(…) + fₙ].
  2. Error ∝ h².
  3. f″ > 0: overestimates.
  4. Halve h: error ÷ 4.
  5. Check with exact value.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. T for ∫₀¹ x dx, n = 2 Foundation

0.5

2. T for ∫₀² x² dx, n = 2 (h = 1) Foundation

3

3. Exact ∫₀² x² dx to 4 d.p. Foundation

2.6667

4. Error predicted: (2 − 0)·1²·2/12 Higher

0.3333

5. T − exact Higher

0.3333

6. h for n = 5 on [0, 1] Higher

0.2

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Trapezium rule
Area under chords.
Composite rule
Applied over many strips.
Step size (h)
(b − a)/n.
Truncation error
Error from approximation.
Convex
f″ > 0.
Strip
One trapezium.

Frequently asked questions

What is the trapezium rule error?

−(b − a)h²f″(ξ)/12.

Does it over- or underestimate?

Over for convex functions.

What happens if h halves?

Error divides by about 4.

Is it exact for lines?

Yes.

Which page covers Simpson’s rule?

Simpson’s rule error.

Which page covers the mid-ordinate rule?

mid-ordinate rule.

More in Numerical methods and optimisation and the formula sheets.