Why Compare One Step with Two Half-Steps?
Forward Euler gives a simple approximation to a solution of an initial-value problem, but a single computed value does not reveal how far it is from the true solution. Step doubling supplies a practical diagnostic: starting from the same value, compute once with step size \(h\), then compute twice with step size \(h/2\). The two results differ because the approximations respond differently to the changing slope.
The difference is useful because, for a sufficiently smooth problem and a sufficiently small step, it estimates the local error. Here “local” means the error made over this step when the starting value is treated as exact. This is not automatically an estimate of the error accumulated over many steps.
How to Compute and Interpret the Difference
Let \(f_n=f(t_n,y_n)\). The midpoint value after the first half-step is \(y_{n+1/2}=y_n+(h/2)f_n\). Evaluate the slope again at the new time and this midpoint value; the two-half-step result is
The full-step value is \(Y_1=y_n+h f(t_n,y_n)\), so subtraction gives a convenient expression for the difference:
For a smooth scalar problem, the difference estimates the local error of the two-half-step result. The one-full-step result has about twice that error, to leading order. Consequently, if the requested output is \(Y_2\), use \(|D|\) as its local error estimate; if the requested output is \(Y_1\), use \(2|D|\). The factor matters: the same difference is being used to estimate the errors of two approximations with different step sizes.
Why the Estimate Works
Assume \(f\) is sufficiently smooth near the starting point that Taylor expansions through second order have remainders of order \(h^3\). Define \(g(t,y)=f_t(t,y)+f_y(t,y)f(t,y)\). By differentiating the differential equation along its solution, \(y''(t)=g(t,y(t))\). In the following expansions, write \(g_n=g(t_n,y_n)\), and take \(y_n\) to be the exact starting value.
Taylor expansion along the solution gives \(y(t_n+h)=y_n+h f_n+(h^2/2)g_n+O(h^3)\).
Since \(Y_1=y_n+h f_n\), its error, defined as exact minus numerical, is \(y(t_n+h)-Y_1=(h^2/2)g_n+O(h^3)\).
Taylor expansion of \(f\) at the half-step point gives \(f(t_n+h/2,y_n+(h/2)f_n)=f_n+(h/2)g_n+O(h^2)\).
Substitution into its formula gives \(Y_2=y_n+h f_n+(h^2/4)g_n+O(h^3)\). Thus \(D=Y_2-Y_1=(h^2/4)g_n+O(h^3)\), while \(y(t_n+h)-Y_2=(h^2/4)g_n+O(h^3)\).
The last two expressions have the same leading term, so \(D\) estimates the refined result’s error. The full-step error has twice that leading term. This argument explains both the estimate and its limitation: the equality is approximate, with higher-order terms that can matter when the step is not small or the solution changes rapidly.
Worked Examples
Worked Example: Assessing a Step for \(y'=t\)
Suppose \(y(1)=2\), and assess a proposed step \(h=0.4\). First use one full Euler step. The initial slope is \(f(1,2)=1\), so
For two half-steps, the first step has size \(0.2\). It gives \(y=2+0.2(1)=2.2\) at \(t=1.2\). The slope there is \(f(1.2,2.2)=1.2\), so the second half-step gives
Therefore \(D=2.44-2.4=0.04\). The estimated local error is \(0.08\) for the full-step result and \(0.04\) for the two-half-step result. If the allowed local error is \(0.05\), the full-step result does not meet the estimate, while the refined result does.
Check against the exact solution: integrating \(y'=t\) from \(t=1\) gives \(y(t)=2+(t^2-1)/2\). At \(t=1.4\), this is \(2+(1.96-1)/2=2.48\). The actual errors are \(2.48-2.4=0.08\) and \(2.48-2.44=0.04\), agreeing exactly with the estimates in this example.
Worked Example: Estimating Error for \(y'=y\)
Take \(y(0)=1\) and \(h=0.2\). The full Euler step is \(Y_1=1+0.2(1)=1.2\). For the first half-step, \(y=1+0.1(1)=1.1\). The slope at that point is \(1.1\), so the second half-step gives \(Y_2=1.1+0.1(1.1)=1.21\).
The difference is \(D=1.21-1.2=0.01\). Thus the estimated local errors are \(0.02\) for the full-step result and \(0.01\) for the two-half-step result. If the tolerance is \(0.012\) and the refined value is the one to be used, its estimated error is within tolerance.
Check against the exact solution \(y(t)=e^t\). At \(t=0.2\), \(y(0.2)=e^{0.2}\approx1.221403\), rounded to six decimal places. The refined value’s actual error is approximately \(1.221403-1.21=0.011403\), and the full-step error is approximately \(1.221403-1.2=0.021403\). The estimates \(0.01\) and \(0.02\) are close, but not exact; higher-order terms account for the difference.
Worked Example: A Coupled System
For a system, apply Euler’s formula to every component using the same time step. Consider \(y_1'=y_2,\;y_2'=-y_1\), starting from \((y_1,y_2)=(1,0)\), with \(h=0.2\). One full step has initial slope \((0,-1)\), hence \(Y_1=(1,0)+0.2(0,-1)=(1,-0.2)\).
The first half-step gives \((1,0)+0.1(0,-1)=(1,-0.1)\). At this point the slope is \((-0.1,-1)\), so the second half-step gives \(Y_2=(1,-0.1)+0.1(-0.1,-1)=(0.99,-0.2)\). Therefore \(D=Y_2-Y_1=(-0.01,0)\).
Using the infinity norm, defined by \(\|(a,b)\|_\infty=\max(|a|,|b|)\), the difference has size \(0.01\). This estimates the local error of the two-half-step result; the full-step error estimate is \(0.02\). To check, the exact solution is \((\cos t,-\sin t)\). At \(t=0.2\), it is approximately \((0.980067,-0.198669)\), rounded to six decimal places. The refined-value error is approximately \((-0.009933,0.001331)\), whose infinity norm is \(0.009933\), close to \(0.01\).
Common Pitfalls and Practical Interpretation
Using the estimate for the wrong value. A common mistake is to compute \(D=0.01\) and claim that the full-step value’s error is about \(0.01\). For a first-order Euler method, the leading-order estimate for that value is \(2|D|=0.02\); \(|D|=0.01\) estimates the refined, two-half-step value instead.
Comparing runs with different starting values. The full step and both half-steps must begin from the same \(y_n\). Otherwise, their difference includes a change in starting value, and the local-error argument above does not apply as stated.
Confusing local and global error. Step doubling estimates the error generated over one step from the specified starting value. If that starting value already has error, the estimate does not measure or remove it. Errors from earlier steps can also propagate into later values, so a small one-step estimate alone does not certify small total error over a long interval.
Treating the estimate as an exact bound. The Taylor argument gives a leading-order estimate, not a guaranteed upper bound. For a small difference, the approximation can be informative; for a large difference, or a problem whose slope changes sharply within the step, the neglected higher-order terms may be significant. When checking a tolerance, state which of the two computed values will be used and compare its corresponding estimate with the tolerance.
Check Your Understanding
Use the same-starting-value rule and distinguish clearly between the full-step and refined-value estimates.
- For \(y'=y\), \(y(0)=2\), and \(h=0.1\), calculate the full Euler value, the two-half-step value, and their difference.
- If the difference has magnitude \(0.006\), what local error estimates correspond to the full-step value and the two-half-step value?
- Why must both computations start from the same value for the difference to estimate local error?
- Does a small step-doubling difference prove that the accumulated error at a much later time is small? Explain.
- For a system, what norm or componentwise comparison could be used to summarize the vector difference?