Simpson's Rule

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

1/18/23, 3:04 AM 6.

Simpson's Rule

Interactive Mathematics CHAT NOW 💬

450+ Math 5 Million+ 1200+ Articles Simplifying and


Lessons written Students Helped Written by Math Teaching Math
by Math Each Year Educators and for Over 23 Years
Professors and Enthusiasts
Teachers

Tips, tricks, lessons, and tutoring to help reduce test anxiety and move to the
top of the class.

Enter your email... SIGN UP

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.

https://www.intmath.com/integration/6-simpsons-rule.php 1/7
1/18/23, 3:04 AM 6. Simpson's Rule

Simpson's Rule
Interactive
b Mathematics CHAT NOW 💬
Area = ∫ f (x) dx ​

Δx
≈ (y 0 + 4y 1 + 2y 2 + 4y 3 + 2y 4 + … + 4y n−1 + y n )
3
​ ​ ​ ​ ​ ​ ​ ​

b−a
where Δx = ​

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 ]
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]
3
​ ​

Example using Simpson's Rule


3
dx
Approximate ∫ using Simpson's Rule with n = 4.
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

Don't miss...
There is an interactive applet where you can explore Simpson's Rule, here:

Calculus from First Principles applet

Background and proof for Simpson's Rule


We aim to find the area under the following general curve.

https://www.intmath.com/integration/6-simpsons-rule.php 2/7
1/18/23, 3:04 AM 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.)

Interactive Mathematics CHAT NOW 💬

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.
2
1 = a(−1.57) + b(−1.57) + c
2
1.62 = a(−0.39) + 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.

https://www.intmath.com/integration/6-simpsons-rule.php 3/7
1/18/23, 3:04 AM 6. Simpson's Rule
Here is what that parabola looks like:

Interactive Mathematics CHAT NOW 💬

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 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.)

https://www.intmath.com/integration/6-simpsons-rule.php 4/7
1/18/23, 3:04 AM 6. Simpson's Rule

Interactive Mathematics CHAT NOW 💬

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

−h

h
ax3 bx2
=[ + + 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

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
A= (2ah2 + 6c)
3

h
= (y 0 − 2y 1 + y2 + 6y 1 )
3
​ ​ ​ ​

h
= (y 0 + 4y 1 + y 2 )
3
​ ​ ​ ​

The parabola passing through the next set of 3 points will have an area of:

https://www.intmath.com/integration/6-simpsons-rule.php 5/7
1/18/23, 3:04 AM 6. Simpson's Rule
h
A= (y 2 + 4y 3 + y 4 )
3
​ ​ ​ ​

Interactive Mathematics
Adding the 2 areas, we get: CHAT NOW 💬
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 )
3
​ ​ ​ ​ ​ ​ ​ ​ ​

Problem Solver
Need help solving a different Calculus problem? Try the Problem Solver.

Disclaimer: IntMath.com does not guarantee the accuracy of results. Problem Solver provided by Mathway.
https://www.intmath.com/integration/6-simpsons-rule.php 6/7
1/18/23, 3:04 AM 6. Simpson's Rule

Interactive Mathematics CHAT NOW 💬

Tips, tricks, lessons, and tutoring to help reduce test anxiety and move to the
top of the class.

Enter your email... SIGN UP

Interactive Mathematics
About Us Testimonials

Tutoring Affiliate Disclaimer

Problem Solver California Privacy Policy

Contact Privacy Policy

Terms of Service

https://www.intmath.com/integration/6-simpsons-rule.php 7/7

You might also like