- Why is numerical integration necessary in the first place?
- Where do these formulas come from (especially Simpson’s Rule)?
- How can I do all of these formulas quickly?
- Is there a reason why the Midpoint Rule is better than the Trapezoid Rule?
- Is there a reason why both the Midpoint Rule and the Trapezoid Rule converge quadratically?
- Is there a reason why Simpson’s Rule converges like the fourth power of the number of subintervals?
where is the number of subintervals and is the width of each subinterval, so that .
For this special case, the true area under the curve on the subinterval will be
In the above, the shorthand can be formally defined, but here we’ll just take it to mean “terms that have a factor of or higher that we’re too lazy to write out.” Since is supposed to be a small number, these terms will small in magnitude and thus can be safely ignored. I wrote the above formula to include terms up to and including because I’ll need this later in this series of posts. For now, looking only at the Trapezoid Rule, it will suffice to write this integral as
Once again, this is a little bit overkill for the present purposes, but we’ll need this formula later in this series of posts. Truncating somewhat earlier, we find that the Trapezoid Rule for this subinterval gives
Subtracting from the actual integral, the error in this approximation will be equal to
In other words, like the Midpoint Rule, both of the first two terms and cancel perfectly, leaving us with a local error on the order of . We also recall, from the previous post in this series that the local error from the Midpoint Rule was . In other words, while both the Midpoint Rule and Trapezoid Rule have local errors on the order of , we expect the error in the Midpoint Rule to be about half of the error from the Trapezoid Rule.