Suppose we have a continuous differential equation : y' = f(t,y), \qquad y(t_0) = y_0, \qquad t \geq t_0 and we wish to compute an approximation y_n of the true solution y(t_n) at discrete time steps t_1,t_2,\ldots,t_N . For simplicity, assume the time steps are equally spaced: : h = t_n - t_{n-1}, \qquad n=1,2,\ldots,N. Suppose we compute the sequence y_n with a one-step method of the form : y_n = y_{n-1} + h A(t_{n-1}, y_{n-1}, h, f). The function A is called the
increment function, and can be interpreted as an estimate of the slope \frac{y(t_n)-y(t_{n-1})}{h} .
Local truncation error The
local truncation error \tau_n is the error that our increment function, A , causes during a single iteration, assuming perfect knowledge of the true solution at the previous iteration. More formally, the local truncation error, \tau_n , at step n is computed from the difference between the left- and the right-hand side of the equation for the increment y_n \approx y_{n-1} + h A(t_{n-1}, y_{n-1}, h, f) : : \tau_n = y(t_n) - y(t_{n-1}) - h A(t_{n-1}, y(t_{n-1}), h, f). The numerical method is
consistent if the local truncation error is o(h) (this means that for every \varepsilon > 0 there exists an H such that |\tau_n| for all h ; see
little-o notation). If the increment function A is continuous, then the method is consistent
if, and only if, A(t,y,0,f) = f(t,y) . Furthermore, we say that the numerical method has
order p if for any sufficiently smooth solution of the
initial value problem, the local truncation error is O(h^{p+1}) (meaning that there exist constants C and H such that |\tau_n| for all h ).
Global truncation error The
global truncation error is the accumulation of the
local truncation error over all of the iterations, assuming perfect knowledge of the true solution at the initial time step. More formally, the global truncation error, e_n , at time t_n is defined by: : \begin{align} e_n &= y(t_n) - y_n \\ &= y(t_n) - \Big( y_0 + h A(t_0,y_0,h,f) + h A(t_1,y_1,h,f) + \cdots + h A(t_{n-1},y_{n-1},h,f) \Big). \end{align} The numerical method is
convergent if global truncation error goes to zero as the step size goes to zero; in other words, the numerical solution converges to the exact solution: \lim_{h\to0} \max_n |e_n| = 0 . == Relationship between local and global truncation errors ==