









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Simpson's Rule. Simpson's Rule is based on the fact that given any three points, you can find the equation of a quadratic through those points.
Typology: Lecture notes
1 / 17
This page cannot be seen from the preview
Don't miss anything!
In Calculus, you learned two basic ways to approximate the value of an integral:
Simpson’s Rule, named after Thomas Simpson though also used by Kepler a century before, was a way to approximate integrals without having to deal with lots of narrow rectangles (which also implies lots of decimal calculations). Its strength is that, although rectangles and trapezoids work better for linear functions, Simpson’s Rule works quite well on curves.
Simpson’s Rule is based on the fact that given any three points, you can find the equation of a quadratic through those points. For example, let’s say you had points (3, 12), (1, 5), and (5, 9). Starting with (3, 12) and using y = ax 2
This fact inspired Simpson to approximate integrals using quadratics, as follows. If you want to integrate f(x) over the interval from a to b,
Then, because quadratics are easy to integrate, you could just integrate the quadratic over the interval. It ends up being a very good approximation, but it’s also a lot of math! Fortunately, there’s a nice shortcut. It turns out that the integral of the quadratic over the interval [a, b] always comes out to 𝑏 − 𝑎 6 ∙ 𝑓 𝑎 + 4𝑓 𝑚 + 𝑓(𝑏) where f(a), f(m) and f(b) were the values of the original function at a, m, and b. You don’t need the quadratic at all.
1a. Take the integral of y = - 1.25x 2
2x 2
As you (hopefully) noticed in problem 1, Simpson’s Rule gives exactly correct answers for quadratics and cubics. For other functions, Simpson’s Rule only gives an approximation.
Like any other approximation rule, Simpson’s works best when the interval is narrow and the function values over that interval have a similar shape to the approximation device (in this case, a quadratic curve). Some function types, like exponentials, can cause problems because their shape over a broad interval is not similar enough to a quadratic. Here, the exponential is shown in red and the Simpson’s quadratic in blue.
However, this problem can be alleviated by dividing larger intervals into smaller sub- intervals over which Simpson’s Rule will continue to work well. The number of sub-intervals should depend on the width of the original interval; it makes as little sense to divide an interval of width 0.5 by 5 as it does to divide an interval of width 100 by 5.
Decide how you will divide any interval of width w into a whole number of evenly-spaced sub- intervals whose width is approximately the width you chose in problem 3.
Design a program to take integrals using Simpson’s Rule that…