← Back to Calculus

Simpson's rule

Simpson's rule can be used to approximate integrals too difficult for us to solve. It works by first splitting the interval into strips of equal width, h. These strips are then split into pairs, each of which has three ordinates. A parabola is then drawn to pass through the three heights of the ordinates and the area under the parabola is used to estimate the area of the two strips. This is repeated for every strip.

Multiplications of the heights are due to repetitions of shared heights between pairs of strips.

b∫af(x) dx≈h3[f(x0) + 4f(x1) + 2f(x2) + 4f(x3) + ⋯ + f(xn)]
or
b∫af(x) dx≈h3[ ends + 4(odds) + 2(evens) ]
1∫0e−x² dx
1041/211

The blue line represents the integral whilst the dashed purple line shows the parabolas formed by Simpson's rule, each spanning between three ordinates.

Strips
exact area
0.74682
approximation
0.74718
percentage error
0.048%

Below you can see an image of the parabola Simpson's rule creates without the function. y = 0 represents the curve's current y value. This shows how the parabolas fluctuate above and below the function.

0.03480−0.034801/21−0.008680.00903
Deeper Thought

Upon first inspection, it is quite easy to assume the two areas either side of y=0 are equal and would therefore cancel out, meaning Simpson's rule gives an exact answer. This however is not the case - which you can see when taking the second diagram in context of the first diagram. For example, when using two strips, you can see that the rule gives a parabola on one side of the turning point (which would be at x=0). Therefore the area between the function and the created parabolas would only be equal if the function was a straight line (just think about it.)

For me, it was also essential to realise that the parabolas formed are the only possible parabolas - pulling parts of the parabola down to try and get the areas to cancel would not be possible as the second derivative of the parabola (the rate of change of the gradient) must be constant, so only one parabola is possible for three given points and you can not move the parabolas formed around to get the areas between them and the curve to cancel. This is why Simpson's rule is only an approximation. It's best to think about this for yourself, your brain is much more capable than my words.