Skip to main content

Section 17.2 Estimating error by using two step sizes

A practical way to estimate the error of some method of integration is to use it twice with two different step sizes, and compare the results. Typically, one compares the computations with steps \(h\) and \(h/2\text{.}\) Say, the first computation resulted in \(A_1\) and the second, more accurate, in \(A_2\text{.}\) If the exact value is \(E\text{,}\) then we expect \(|A_1-E|\approx 2^d|A_2-E|\) where \(d\) is the order of accuracy of the method. By the triangle inequality,

\begin{equation*} |A_1-A_2| \ge |A_1-E| - |A_2-E| \approx (2^d-1) |A_2-E| \end{equation*}

which gives us an idea of the error involved in \(A_2\) (the more accurate approximation):

\begin{equation} |A_2-E| \lessapprox \frac{|A_1-A_2|}{2^d-1} \label{eq-error-estimate-comparison}\tag{17.2.1} \end{equation}

where the symbol \(\lessapprox\) means the error is bounded by something like the right hand side. We do not assert this is an exact inequality, because the relation involving \(2^d\) is only approximate.

Let us return to Example 17.1.1 where Simpson's method with \(h=4\) was used to get an approximation \(A_1 = 96.9618\text{.}\) Reducing the step size to \(h=2\) we get a second approximation:

\begin{equation*} A_2 = \frac{2}{3}(f(1) + 4f(3) + 2f(5) + 4f(7) + f(9)) \approx 96.8176 \end{equation*}

Since Simpson's rule has order \(d=4\text{,}\) the error of second approximation can be estimated by (17.2.1) as follows:

\begin{equation*} |A_2-E| \lessapprox \frac{|A_1-A_2|}{15} = 0.0096 \end{equation*}

Recalling that the exact value is \(E = 96.8\text{,}\) we see that \(|A_2-E| = 0.0176\text{.}\) So our error estimate, while not rigorous, is much closer to reality than the theoretical estimate (17.1.1).