How to use Simpson’s rule to approximate an integral
When we can evaluate a function but its integral is harder to find, Simpson’s rule gives us another way to estimate it. It fits a parabola across every pair of subintervals. That pairing is why we start with an even number of subintervals.
Divide the interval and assign the weights
For an even , use the width and sample at . The two endpoints have weight , interior odd indices have weight , and interior even indices have weight . Multiply the weighted sum by .
Approximate the integral of an exponential
With , the width is and the multiplier is . Put the five sample points in order so the weights go with the right values.
| Sample point | Weight | Function value |
|---|---|---|
That is the four-subinterval estimate. A finer partition gives a different estimate, so the number of subintervals is part of the answer.