Vous êtes sur la page 1sur 4

10/7/2015 6.

 Simpson's Rule

interactive mathematics   Search site
Learn math by playing with it!
 
home sitemap math interactives math blog blog sitemap about feedback

Home » Integration » 6. Simpson’s Rule

6. Simpson's Rule
by M. Bourne

In the last section, Trapezoidal Rule, we used straight lines to model a curve and learned that it was an improvement over using
rectangles for finding areas under curves because we had much less "missing" from each segment.

We seek an even better approximation for the area under a curve.

In Simpson's Rule, we will use parabolas to approximate each part of the curve. This proves to be very efficient since it's
generally more accurate than the other numerical methods we've seen. (See more about Parabolas.)

We divide the area into n equal segments of width Δx. The approximate area is given by the following.

Simpson's Rule
b Δx
Area = ∫ f (x) dx ≈ (y 0 + 4y 1 + 2y 2 + 4y 3 + 2y 4 … +4y n−1 + y n )
a 3
b−a
where Δx = .
n

Note: In Simpson's Rule, n must be EVEN.

See below how we obtain Simpson's Rule by finding the area under each parabola and adding the areas.

Memory aid
We can re­write Simpson's Rule by grouping it as follows:
b Δx
∫ f (x) dx  ≈ (y 0 + 4(y 1 + y 3 + y 5 +…) + 2(y 2 + y 4 + y 6 +…) + y n )
a 3
This gives us an easy way to remember Simpson's Rule:
b Δx
∫ f (x) dx  ≈ (FIRST + 4(sum of ODDs) + 2(sum of EVENs) + LAST)
a 3
Example using Simpson's Rule
3 dx
Approximate ∫  using Simpson's Rule with n = 4.
2 x+1
We haven't seen how to integrate this using algebraic processes yet, but we can use Simpson's Rule to get a good approximation
for the value.

Answer

Background and proof for Simpson's Rule
We aim to find the area under the following general curve.

http://www.intmath.com/integration/6­simpsons­rule.php 1/4
10/7/2015 6. Simpson's Rule

We divide it into 4 equal segments. (It must be an even number of segments for Simpson's Rule to work.)

We next construct parabolas which very nearly match the curve in each of the 4 segments. If we are given 3 points, we can pass
a unique parabola through those points.

NOTE: We don't actually need to construct these parabolas when applying Simpson's Rule. This section is just to
give you some background on why and how it works.

Let's start with the first 2 segments on the left. We take the end points, and the middle point as shown:

We can take measurements (using an overlaid grid) and observe these three points to be:

(x0 , y 0 ) = (−1.57, 1)

(x1 , y 1 ) = (−0.39, 1.62)

(x2 , y 2 ) = (0.79, 2.71)

Using these 3 points, we use the general form of a parabola, y = ax2 + bx + c, and substitute the known x­ and y ­values, as


follows.

1 = a(−1.57)2 + b(−1.57) + c

1.62 = a(−0.39)2 + b(−0.39) + c

2.71 = a(0.79)2 + b(0.79) + c


This gives us a set of 3 simultaneous equations in 3 unknowns, which we can solve using these algebraic methods. Doing so
gives us:

a = 0.17021, b = 0.85820, c = 1.92808.


So the parabola passing through those 3 points is

y = 0.170x2 + 0.858x + 1.93


Note: Of course, we are using full calculator accuracy throughout, but final results are rounded.

Here is what that parabola looks like:

We can see the parabola passes through the 3 points, and it is close to our original curve, and so it's a good approximation for the

http://www.intmath.com/integration/6­simpsons­rule.php 2/4
10/7/2015 6. Simpson's Rule
curve in that portion of the graph. As usual, the more divisions we take, the more accurate it will be.

We do the same process for the final 2 segments, and get a parabola that passes through the 3 points shown, and which looks
like this:

There are noticeable gaps between the oriignal curve and our parabolas. We only have to halve the segment size to get a much
better fit, as we can see in this next image. The parabola is almost identical to the curve.

See an applet that explores this concept here:

Riemann Sums

Proof of Simpson's Rule
We consider the area under the general parabola y = ax2 + bc + c.

For easier algebra, we start at the point (0, y 1 ), and consider the area under the parabola between x = −h and x = h, as


shown. (Note that Δx = h.)

We have:
h
∫ (ax2 + bx + c)  dx
−h

ax3 bx2 h
=[ + + cx]
3 2 −h

ah3 bh2 ah3 bh2


=( + + ch) − (− + − ch)
3 2 3 2
2ah3
= + 2ch
3
h
= (2ah2 + 6c) (getting it into a convenient form)
3
Our parabola passes through (−h, y 0 ), (0, y 1 ), and (h, y 2 ). Substituting these x­ and y ­values into the general equation of our
parabola, we get:

y 0 = ah2 − bh + c

y1 = c

y 2 = ah2 + bh + c
Solving these gives us

http://www.intmath.com/integration/6­simpsons­rule.php 3/4
10/7/2015 6. Simpson's Rule
c = y 1  (from the second line)
and

2ah2 = y 0 − 2y 1 + y 2  (by adding the first and 3rd line)
h
Substituting these into A = (2ah2 + 6c) from above, we have:
3
h h
A= (2ah2 + 6c) = (y 0 − 2y 1 + y2 + 6y 1 )
3 3
h
= (y 0 + 4y 1 + y 2 )
3
The parabola passing through the next set of 3 points will have an area of:

h
A= (y + 4y 3 + y 4 )
3 2
Adding the 2 areas, we get:

h
A= (y 0 + 4y 1 + 2y 2 + 4y 3 + y 4 )
3
Say we have 6 subintervals. We just find the areas under the 3 resulting parabolas, and add them to obtain:

h
A= [y 0 + 4y 1 + 2y 2 + 4y 3 + 2y 4 + 4y 5 + y 6 ]
3
We could keep going by creating more and more segments, and adding the areas as we go along. and we would obtain Simpson's
Rule:
b Δx
∫ f (x) dx  ≈ (y 0 + 4y 1 + 2y 2 + 4y 3 + 2y 4 … +4y n−1 + y n )
a 3

http://www.intmath.com/integration/6­simpsons­rule.php 4/4

Vous aimerez peut-être aussi