- 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?
In this post, we consider the global error when integrating on the interval instead of a subinterval . The logic is almost a perfect copy-and-paste from the analysis used for the Midpoint Rule. The total error when approximating will be the sum of the errors for the integrals over , , through . Therefore, the total error will be
.So that this formula doesn’t appear completely mystical, this actually matches the numerical observations that we made earlier. The figure below shows the left-endpoint approximations to for different numbers of subintervals. If we take and , then the error should be approximately equal to
,which, as expected, is close to the actual error of . Let , so that the error becomes
,where is the average of the . Clearly, this average is somewhere between the smallest and the largest of the . Since is a continuous function, that means that there must be some value of between and — and therefore between and — so that by the Intermediate Value Theorem. We conclude that the error can be written as
,Finally, since is the length of one subinterval, we see that is the total length of the interval . Therefore,
,where the constant is determined by , , and . In other words, for the special case , we have established that the error from the Trapezoid Rule is approximately quadratic in — without resorting to the generalized mean-value theorem and confirming the numerical observations we made earlier.