Numerical Methods for ODEs

the global error

If you walk to a destination by a sequence of slightly-off compass headings, each individual heading is only a touch wrong, but those small errors pile up over the whole journey. The global error of an ODE solver is the gap between the true solution and the numerical one at the END of the march — not the slip of any single step, but the total accumulated discrepancy after all the stepping is done.

Formally, the global error at time t_n is e_n = y(t_n) - y_n, the difference between the exact solution and the computed value at that grid point. It is built from two things: the fresh local truncation error introduced at each step, and the way earlier errors are propagated (and sometimes amplified) by the subsequent steps. The remarkable and reassuring result is that, for a stable method, these do NOT simply add up to disaster: the global error is one power of h LARGER than the local error, not the local error times the huge number of steps. For forward Euler, local error O(h^2) over about 1/h steps yields global error O(h) — first order. The intuition: you commit about (T/h) errors of size O(h^2), and (T/h)*h^2 = O(h).

Global error is the number you actually care about, and its scaling with h is exactly the ORDER of the method. A p-th order method has global error O(h^p): halving h shrinks the final error by 2^p (a factor of 16 for the fourth-order RK4). The honesty here: this clean scaling holds only when the method is STABLE — if errors are amplified instead of merely propagated (an unstable step size, a stiff problem with an explicit method), the global error can grow without bound even though each local error is tiny. Consistency alone is not enough; consistency plus zero-stability is what guarantees the global error vanishes as h -> 0.

Solve y' = y to t = 1 by forward Euler. With h = 0.1 the answer is 2.594 (error 0.124); with h = 0.05 it is 2.653 (error 0.065); with h = 0.025 it is 2.685 (error 0.033). Each halving of h roughly halves the error — the unmistakable O(h) signature of a first-order method. RK4 on the same problem would cut the error by 16 with each halving.

Global error scales as h^p; the exponent p is the method's order.

The neat 'global = local times number of steps' picture assumes stability. On a stiff problem with an over-large explicit step, earlier errors are amplified, not just carried, and the global error can explode while every local error stays minuscule — order analysis is meaningless once a method is unstable.

Also called
accumulated errortotal error累積誤差整體誤差