Convergence, consistency and order

Local and global truncation errors, the definition of convergence and consistency, theoretical orders of the one-step methods and how to estimate the order numerically, with or without an exact solution.

Errors in the numerical solution

When an infinite process (the full Taylor expansion, the exact integral) is replaced by a finite one, each step commits a local truncation error Lk(h)L_k(h). The global truncation error accumulates the NN local errors:

L(h)=1hmax1kNLk(h)L(h)=\frac{1}{h}\max_{1\le k\le N}|L_k(h)|
The global error loses one power of hh with respect to the local one: accumulating N1/hN\propto 1/h steps multiplies by that factor.

To this error one adds the round-off error of finite arithmetic. If the exact solution is known, the total error at each node is ek=y(tk)yke_k=y(t_k)-y_k.

Convergence and consistency

Consistency looks at a single step; convergence, at the whole process. For a consistent method to converge, stability is also needed: errors must not be amplified as they propagate, which can fail with large steps even for consistent methods, as the Euler stability exercise shows.

Theoretical orders

MethodLocal errorGlobal error (order)
EulerO(h2)\mathcal{O}(h^2)O(h)\mathcal{O}(h)
Euler implícitoO(h2)\mathcal{O}(h^2)O(h)\mathcal{O}(h)
HeunO(h3)\mathcal{O}(h^3)O(h2)\mathcal{O}(h^2)
RK4O(h5)\mathcal{O}(h^5)O(h4)\mathcal{O}(h^4)
Orders of the one-step methods (with yy sufficiently smooth).

Numerical estimation of the order

If the exact solution is known, compute the maximum error EN=max1kNy(tk)ykE_N=\max_{1\le k\le N}|y(t_k)-y_k| for several values of NN, doubling each time. The order appears as the limit of the logarithmic ratio:

orden    log2 ⁣(EN/2EN)\text{orden}\;\approx\;\log_2\!\left(\frac{E_{N/2}}{E_N}\right)

If the exact solution is unknown, compare two consecutive discrete solutions: the one with NN subintervals against the one with 2N2N evaluated at the same nodes, εN=maxkyk(N)y2k(2N)\varepsilon_N=\max_k\bigl|y^{(N)}_k-y^{(2N)}_{2k}\bigr|, and apply the same logarithmic ratio to the εN\varepsilon_N. The order estimation exercise applies both techniques to Euler, Heun and RK4.