Section 13.4 Error estimates
How to estimate the accuracy of integration rules? Here is an empirical method which is similar to how we estimated the accuracy of differentiation rules in Section 12.1.
There is a method to determine the order of error of an approximation to some derivative of \(f\text{:}\)
- Let \(d = 0\)
- Apply the integration rule to \(f(x) = x^d\) on the interval \([0, h]\text{,}\) with the smallest possible number of evaluation points. Find the error term.
- If the error term is zero, increase \(d\) by \(1\) and return to step 2.
- Express the error as \(C \,d! \,h^{d+1}\) with an explicit constant \(C\text{.}\) Note that the factorial \(d!\) is here because it is the derivative of \(f\) of order \(d\text{,}\) which is the source of the error.
- The error bound for a single subinterval is \(C \max |f^{(d)}| h^{d+1}\text{.}\)
- When the estimate is applied on an interval \([a,b]\) with step size \(h=(b-a)/n\text{,}\) the error estimate is multiplied by \(n\text{;}\) thus the final result is \(C \max |f^{(d)}| (b-a) h^d \text{.}\)
Example 13.4.1. The error of midpoint rule.
Using the process describe above, estimate the error of the midpoint rule.
The midpoint rule is exact for \(x^0\) and \(x^1\text{.}\) But for \(\int_0^h x^2\,dx\) it predicts \(\int_0^h x^2\,dx = h^3/4\text{,}\) while the true value is \(h^3/3\text{.}\) So we stop at \(d=2\) with the error of \(h^3/12\text{,}\) which can be written as \(\dfrac{1}{24} \ 2! \ h^3\text{.}\) Therefore, the constant factor in the error formula: is \(C=1/24\text{.}\) In conclusion, the error of the midpoint rule is at most