Local and global truncation error
Separate a single exact-start defect from accumulated trajectory error and derive the assumptions behind order claims.
On this page
The question for today
What you’ll understand
- Define exact-start local defect without confusing two LTE conventions.
- Derive a finite-time global bound using stability and consistency.
- Check convergence rates at a common physical endpoint.
A time-stepping method repeatedly makes a small approximation, then uses the approximate result as the next starting value. The error of one step started from the exact solution is therefore different from the error after many computed steps. Understanding that distinction makes an order statement meaningful. It also explains why a small residual, a finely drawn curve, or a tiny error estimate at the last step cannot alone certify the accuracy of a complete simulated trajectory.
Choose a local-error convention explicitly
Consider on a fixed finite interval, and write a one-step update as . The exact-start defect is the exact value one step later minus the update started from . An order-p method has a defect bounded by a constant times when the solution and vector field have the required derivatives. Some texts divide this defect by h and call the result local truncation error, giving an order- quantity. Both conventions are legitimate, but their exponents differ.
For forward Euler, Taylor expansion of the exact solution shows that the leading defect is half the step squared times the second derivative. The derivative is taken along the solution, so for a nonautonomous equation it includes both explicit time dependence and state dependence. A nonsmooth forcing or a discontinuity invalidates the same Taylor estimate across that point. Splitting the integration at a known discontinuity is often more meaningful than applying a smooth-order formula to a step that crosses it.
Propagation connects local to global accuracy
Let global error be the exact solution minus the numerical value at the same time. Add and subtract the numerical update started from the exact current state. This decomposes the next error into a fresh local defect plus the propagated previous error. Suppose the step map is Lipschitz in its starting value with factor at most one plus L times h, and the defect is uniformly bounded. Repeating the inequality yields a geometric sum rather than a simple assertion that all errors cancel.
Over a fixed interval the number of equal steps grows like one divided by h. Consequently an order-h-to-the-p-plus-one defect usually produces order-h-to-the-p global accuracy, provided the propagation bound and starting accuracy hold uniformly. The error constant may depend strongly on the interval length and the differential equation. This theorem does not promise a useful bound for arbitrarily long simulations or near a singular solution. It also does not remove the separate restriction imposed by numerical stability on a stiff problem.
A convergence experiment keeps the question fixed
To measure global order, compare numerical solutions at the same physical final time while reducing the step. Comparing the same step index after halving h compares different physical times and can create a misleading ratio. If the exact solution is available, calculate the endpoint errors directly. Otherwise a three-grid comparison can estimate the leading convergence rate, assuming a nonzero leading error term, sufficiently small steps, and a trustworthy finest solution. Agreement between two coarse runs can also be accidental.
Roundoff and algebraic-solver errors eventually limit the refinement experiment. A smaller step introduces more arithmetic and may increase the accumulated effect of floating-point noise. An implicit method solved to a fixed loose tolerance can plateau before its nominal discretization order appears. Report the interval, norm, initial data, method, step sequence, and reference accuracy. Those details turn a convergence plot from a visual impression into a reproducible argument about a particular calculation.
Work it through
One physical endpoint, two meshes
Integrate y′=−y, y(0)=1, to time one with forward Euler using h=0.2 and h=0.1. Compare the endpoint errors.
Five steps of size 0.2 give Y₅=0.8⁵=0.32768. The exact endpoint is exp(−1)≈0.3678794412, so the error is about 0.0401994412.
Ten steps of size 0.1 give Y₁₀=0.9¹⁰≈0.3486784401, with endpoint error about 0.0192010011. Both values describe the same physical time.
The coarse-to-fine error ratio is about 2.0936. It approaches two as the mesh is refined further, as expected for first-order global convergence; it need not equal two on a finite coarse mesh.
Halving the step approximately halves global error, although an isolated exact-start Euler defect scales quadratically.
The living notebook
Explore the model
Interactive lab · optimization
Euler decay as a discrete recurrence
Pause and Reset, then set η=0.2 and x₀=1. Predict x₅ and press Step five times. Interpret iteration n as physical ODE time nη for y′=−y; the instrument's playback seconds are a separate animation clock. For a fresh comparison, Reset, set η=0.1 and x₀=1, and Step ten times.
- Position x0
- 2
- Objective x²/2
- 2
- Iteration behavior
- Stable step
Gradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forThe values are 0.32768 and approximately 0.348678 at the same interpreted ODE time one. The lab computes this Euler-equivalent recurrence only; it does not plot a general integration-error estimate.
Pause & reason
Check your understanding
Your turn
Try it yourself
For a method with uniform step-map bound 1+2h, exact initial data, and local defect at most 3h³, apply the displayed bound at T=1. What does halving h predict about the bound?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use p=2, C=3, L=2. The exponential factor is independent of h on this fixed interval.
Compare with the solution
The global error is bounded by (3/2)(exp(2)−1)h², approximately 9.583584h². At h=0.1 this bound is approximately 0.09583584; at h=0.05 it is approximately 0.02395896. The bound decreases by a factor four. This is a guaranteed upper bound under the assumptions, not a claim that the actual error equals either number.
Keep the idea
Take it with you
- State whether local truncation error includes division by h.
- Local order becomes global order only with uniform propagation control and accurate starts.
- Refinement comparisons must use the same physical endpoint and a specified norm.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.