advanced31 min studyLesson 321 in Mathematics

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

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 y′=f(t,y)y'=f(t,y) on a fixed finite interval, and write a one-step update as Yn+1=Ψh(tn,Yn)Y_{n+1}=\Psi_h(t_n,Y_n). The exact-start defect is the exact value one step later minus the update started from y(tn)y(t_n). An order-p method has a defect bounded by a constant times hp+1h^{p+1} 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-hph^p 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.

dn+1=y(tn+h)−Ψh(tn,y(tn)),dn+1=O(hp+1),τn+1=dn+1/h=O(hp)d_{n+1}=y(t_n+h)-\Psi_h(t_n,y(t_n)),\qquad d_{n+1}=O(h^{p+1}),\qquad\tau_{n+1}=d_{n+1}/h=O(h^p)
Here d is the unscaled local defect and τ is the divided LTE. The constants must be uniform over the interval and sufficiently small steps.↔ Scroll wide equations horizontally.

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.

∥en+1∥≤(1+Lh)∥en∥+Chp+1⟹∥en∥≤eLT∥e0∥+CL(eLT−1)hp\|e_{n+1}\|\le(1+Lh)\|e_n\|+Ch^{p+1}\quad\Longrightarrow\quad\|e_n\|\le e^{LT}\|e_0\|+\frac{C}{L}(e^{LT}-1)h^p
For L>0, nh≤T, a uniform local bound and a stable step map give this discrete Grönwall estimate. For L=0 replace (e^{LT}−1)/L by T.↔ Scroll wide equations horizontally.

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.

YN=(1−h)Nfor y′=−y, y(0)=1, Nh=1;e(1)=e−1−(1−h)1/hY_N=(1-h)^N\quad\text{for }y'=-y,\ y(0)=1,\ Nh=1;\qquad e(1)=e^{-1}-(1-h)^{1/h}
Forward Euler has a quadratic exact-start defect but only first-order global endpoint accuracy for this smooth scalar problem.↔ Scroll wide equations horizontally.

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.

  1. 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.

  2. 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.

  3. 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.

e−1−0.85e−1−0.910≈2.0936\frac{e^{-1}-0.8^5}{e^{-1}-0.9^{10}}\approx2.0936
The ratio uses errors at a common endpoint, not errors after a common number of steps.↔ Scroll wide equations horizontally.
The result

Halving the step approximately halves global error, although an isolated exact-start Euler defect scales quadratically.

Explore the model

Interactive lab

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.

Euler decay as a discrete recurrenceGradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Current readings: Position x0: 2; Objective x²/2: 2; Iteration behavior: Stable step. All parameters are adjustable with the labeled controls below.−4−202402.174.356.528.7Parameter xf(x) = x²/2n = 0
ObjectiveDiscrete iterate
Position x0
2
Objective x²/2
2
Iteration behavior
Stable step
n = 0 · t = 0 s

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.

Check your understanding

A stable order-three one-step method has exact-start defect O(h⁴). On a fixed interval with smooth data and accurate starting values, what global order is normally guaranteed?

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.

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.