Simpson’s Rule Error Explained with Worked Examples

Simpson's rule with step on has error : of order , and exact for polynomials up to degree 3.

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 Simpson’s rule error means

For with two strips (): , error , below the bound . For with : , error exactly, since . For with : : zero error, as the fourth derivative of a cubic is 0.

Compared with the trapezium rule's (trapezium rule error), halving reduces Simpson's error by a factor of 16. The rule integrates the parabola through three points exactly (Lagrange interpolation, interpolation error) and, by symmetry, also cubics (Simpson's rule).

Gaussian quadrature reaches the same accuracy with fewer function evaluations (Gaussian quadrature). The fourth derivative of is (exponential derivatives) and of is 24 (the derivative of a power).

What is it used for?

Simpson's rule is far more accurate than the trapezium rule for smooth functions, with error of order h to the fourth.

How to use simpson’s rule error

  1. Bound on .
  2. Error bound .
  3. Choose (an even number of strips) to meet the tolerance.
  4. Compare with the actual error when the exact value is known.

Graph

Error bound e·h⁴/180 for Simpson's rule on ∫₀¹ eˣ dxh = 0.5: 0.0009440.050.10.150.20.250.30.350.40.450.500.00020.00040.00060.00080.001Error bound e·h⁴/180 for Simpson's rule on ∫₀¹ eˣ dxherror boundbound e·h⁴/180Graph with x from 0.05 to 0.5 and y from 0 to 0.001. Shows the curve bound e·h⁴/180; point h = 0.5: 0.000944 at (0.5, 0.000944).

Halving h reduces the bound sixteen-fold.

Worked examples

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

Example 1: e^x, actual error

Find the error of Simpson's rule for with .

Worked example
Answer
0.0005790.000579
  1. S
  2. Exact

Example 2: x⁴

Find the error of Simpson's rule for with .

Worked example
Answer
0.0083330.008333
  1. Formula

Example 3: a cubic

Find the error of Simpson's rule for with .

Worked example
Answer
00
  1. S
  2. Exact

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 = 2

S = 0.208333

h = 0.5.

Exact

0.2

1/5.

Error

0.008333 = (b − a)h⁴f⁗/180

1 × 0.0625 × 24 ÷ 180.

Exact for cubics

S = exact for ∫₀¹ x³ = 0.25

f⁗ = 0.

Word problems

Simpson’s rule is exact for cubics. Its composite error is −(b − a)h⁴ f⁗(ξ)/180, so halving h divides the error by about 16.

Apply the rule

Estimate ∫₀¹ x⁴ dx with n = 2.

  1. h0.5
  2. S0.5/3 × (0 + 4 × 0.0625 + 1)
  3. Check: 0.208333 ✓0.208333.

Actual error

Find S − exact.

  1. 0.208333 − 0.2
  2. Check: 0.008333 ✓0.008333.

Predicted error Higher

Use (b − a)h⁴f⁗/180.

  1. 1 × 0.0625 × 24 ÷ 180
  2. Check: matches ✓0.008333.

Cubic Higher

Show S is exact for ∫₀¹ x³ dx.

  1. S0.5/3 × (0 + 0.5 + 1)
  2. Check: 0.25 ✓0.25.

Common mistakes

Wrong weights

1, 2, 1 ✗

1, 4, 1 ✓

Simpson uses 1, 4, 2, 4, …, 4, 1.

Odd number of strips

n = 3 ✗

n must be even ✓

Parabolas need pairs of strips.

Using h² instead of h⁴

error ∝ h² ✗

error ∝ h⁴ ✓

Fourth-order accurate.

Dividing by 6 instead of 3

h/6 ✗

h/3 ✓

The 1/3 factor.

Exam tips

  1. h/3 [1, 4, 2, 4, …, 1].
  2. n even.
  3. Error ∝ h⁴.
  4. Exact for cubics.
  5. Compare with trapezium.

Practice questions

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

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

2.6667

2. S for ∫₀¹ x² dx, n = 2 Foundation

0.3333

3. S for ∫₀¹ x⁴ dx, n = 4 to 6 d.p. Foundation

0.200521

4. Error ratio when h halves Higher

16

5. Predicted error with n = 4: 1·0.25⁴·24/180 to 6 d.p. Higher

0.000521

6. Exact ∫₀¹ x⁴ 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

Simpson’s rule
Quadratic-arc quadrature.
Even number of strips
Required for Simpson.
Fourth derivative
f⁗.
Fourth-order accurate
Error O(h⁴).
Weights
Coefficients 1, 4, 2, 4, 1.
Composite rule
Applied to many strips.

Frequently asked questions

What is Simpson’s rule?

h/3 [f₀ + 4f₁ + 2f₂ + … + fₙ].

What is its error?

−(b − a)h⁴f⁗(ξ)/180.

When is it exact?

For polynomials up to degree 3.

How many strips?

An even number.

Which page covers the trapezium rule?

trapezium rule error.

Which page covers Gaussian quadrature?

Gaussian quadrature.

More in Numerical methods and optimisation and the formula sheets.