Simpson's rule
Adapted from Wikipedia · Adventurer experience
Simpson's rules are ways to guess the area under a line in math. They are named after Thomas Simpson, who lived from 1710 to 1761. These rules help us find values that are important in science and engineering.
The most common rule is called Simpson's 1/3 rule, or Simpson's rule. It helps guess the area under a line between two spots. This rule works well for smooth lines.
There is also a Simpson's 3/8 rule, which uses one more spot to guess the area. This rule can be more exact for some lines. Both rules are part of a bigger group of formulas called Newton–Cotes formulas. These are used in numerical analysis to solve hard math problems.
Simpson's 1/3 rule
Simpson's 1/3 rule, also called Simpson's rule, is a way to find areas under curves. It was made by Thomas Simpson. The rule uses a smooth curve called a parabola to estimate the area. It works best for smooth functions and gives very good results.
If the function's rate of change is steady in the area between two points, then Simpson's rule can give exact answers for polynomials of degree three or less.
If the function's curve bends in a certain way between two points, then
Derivations
Quadratic interpolation
Imagine we want to find the area under a curve shaped like a parabola between two points. The middle point of this area is at x = 0.
The area under the parabola can be calculated, and by using the points where the curve meets the x-axis, we can find a simple formula. This formula leads to Simpson's 1/3 rule, which estimates the area under any curve by treating it like a parabola between three points.
Simpson's 1/3 rule estimates the area under a curve between two points by using the values at the two ends and the middle point. Because of the 1/3 in the formula, it is called Simpson's 1/3 rule.
Averaging the midpoint and the trapezoidal rules
Simpson's rule can also be built from two simpler ways of estimating areas. These are the midpoint rule and the trapezoidal rule. When we mix these two methods in a special way, we get Simpson's rule.
Another way to improve area estimates is called Romberg's method. It uses the trapezoidal rule with more points to get better results.
Undetermined coefficients
A third way to find Simpson's rule starts by guessing a formula and then finding the right numbers to make it work for simple curves. This guessing method leads to the same rule as the other methods.
Composite Simpson's 1/3 rule
If the area we want to find is small and the curve is smooth, Simpson's rule works well. But sometimes the curve changes a lot, and Simpson's rule might not be accurate. To fix this, we can break the area into smaller pieces and use Simpson's rule on each piece. Adding up these small areas gives a good estimate for the whole area. This is called the composite Simpson's 1/3 rule.
When we split the area into many small pieces, we can get very accurate results. The more pieces we use, the better the estimate, but it also takes more calculations.
The composite rule with just two pieces is the same as the simple Simpson's rule.
The error in the composite rule depends on how many pieces we use and how much the curve bends. Using more pieces reduces the error.
Sometimes, using pieces of different sizes helps, especially where the curve changes quickly. This is called the adaptive Simpson's method.
Examples
Approximating the natural logarithm of 2
We can estimate the natural logarithm of 2 by finding the area under a certain curve. Using Simpson's rule with six pieces gives a very close answer.
An application to statistics
In statistics, data that clusters around a middle value follows a certain pattern. Simpson's rule can help estimate the area under this pattern, which tells us how often values fall within certain ranges.
Approximating π
We can also use Simpson's rule to estimate π by finding the area under another curve. With six pieces, the estimate is very close to the real value of π.
Determining the number of intervals for a desired accuracy
To get a very accurate estimate of an area, we need to use many pieces in Simpson's rule. For example, to estimate the area under a sine wave with very little error, we need about 22 pieces. This is fewer pieces than another method called the Composite Trapezoidal Rule, which would need about 509 pieces for the same accuracy.
Simpson's 3/8 rule
Simpson's 3/8 rule is a way to guess the area under a curve. It is named after Thomas Simpson.
This rule fits a curved shape to four points on the curve. It is more exact than some simpler ways.
The rule divides the area into parts. It then adds up values from these parts to find the area. It is useful when you need more exact answers than simpler ways. It needs one more point than some other ways. This makes it helpful for hard math problems.
Alternative extended Simpson's rule
This is another way to use Simpson's rule to guess the size of areas under curves. Instead of looking at separate parts, this method looks at parts that overlap. The formula uses different numbers for different points on the curve to get a better guess.
Simpson's rules can also help guess the size of areas under very thin shapes. These special rules use points both inside and just outside the area being measured to make the guess better. These methods are linked to a math idea called the Euler–MacLaurin formula, which helps make these guesses even better.
Composite Simpson's rule for irregularly spaced data
When we want to find the area under a curve, sometimes the data points we have are not evenly spaced. This can happen if we missed some points or if they were unevenly collected.
To handle this, we can use a version of Simpson's rule that works with uneven intervals. If we split the area into an even number of parts, we can use a special formula to estimate the area. If there are an odd number of parts, we use the formula for the first part and then add a bit more for the last part. This helps us get a good estimate even when the data points are not evenly spread out.
Numerical stability
Simpson's Rule is good at staying stable even with small mistakes in calculations. This stability is shared by all Newton–Cotes formulas.
When using Simpson's Rule on a function over a range, small mistakes in each step add up. But these total mistakes stay small, no matter how tiny the steps become. This makes Simpson's Rule better than other methods that can go wrong easily with small changes.
Images
Related articles
This article is a child-friendly adaptation of the Wikipedia article on Simpson's rule, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.
Safekipedia