### Truncation error (Numerical integration)

Truncation errors in numerical integration are of two kinds:

• local truncation errors – the error caused by one iteration, and
• global truncation errors – the cumulative error caused by many iterations.

## Definitions

Suppose we have a continuous differential equation

$y\text{'} = f\left(t,y\right), \qquad y\left(t_0\right) = y_0, \qquad t \geq t_0$

and we wish to compute an approximation $y_n$ of the true solution $y\left(t_n\right)$ at discrete time steps $t_1,t_2,\ldots,t_N$. For simplicity, assume the time steps are equally spaced:

$h = t_n - t_\left\{n-1\right\}, \qquad n=1,2,\ldots,N.$

Suppose we compute the sequence $y_n$ with a one-step method of the form

$y_n = y_\left\{n-1\right\} + h A\left(t_\left\{n-1\right\}, y_\left\{n-1\right\}, h, f\right).$

The function $A$ is called the increment function, and can be interpreted as an estimate of the slope of $y_n$.

### 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 $y_n = y_\left\{n-1\right\} + h A\left(t_\left\{n-1\right\}, y_\left\{n-1\right\}, h, f\right)$:

$\tau_n = y\left(t_n\right) - y\left(t_\left\{n-1\right\}\right) - h A\left(t_\left\{n-1\right\}, y\left(t_\left\{n-1\right\}\right), h, f\right).$

The numerical method is consistent if the local truncation error is $o\left(h\right)$ (this means that for every $\varepsilon > 0$ there exists an $H$ such that $|\tau_n| < \varepsilon h$ for all $h < H$; see big O notation). If the increment function $A$ is differentiable, then the method is consistent if, and only if, $A\left(t,y,0,f\right) = f\left(t,y\right)$.

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\left(h^\left\{p+1\right\}\right)$ (meaning that there exist constants $C$ and $H$ such that $|\tau_n| < Ch^\left\{p+1\right\}$ for all $h < 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_\left\{h\to0\right\} \max_n |e_n| = 0$.

## Relationship between local and global truncation errors

Sometimes it is possible to calculate an upper bound on the global truncation error, if we already know the local truncation error. This requires our increment function be sufficiently well-behaved.

The global truncation error satisfies the recurrence relation:

$e_\left\{n+1\right\} = e_n + h \Big\left( A\left(t_n, y\left(t_n\right), h, f\right) - A\left(t_n, y_n, h, f\right) \Big\right) + \tau_\left\{n+1\right\}.$

This follows immediately from the definitions. Now assume that the increment function is Lipschitz continuous in the second argument, that is, there exists a constant $L$ such that for all $t$ and $y_1$ and $y_2$, we have:

$| A\left(t,y_1,h,f\right) - A\left(t,y_2,h,f\right) | \le L |y_1-y_2|.$

Then the global error satisfies the bound

$| e_n | \le \frac\left\{\max_j \tau_j\right\}\left\{hL\right\} \left\left( \mathrm\left\{e\right\}^\left\{L\left(t_n-t_0\right)\right\} - 1 \right\right).$

It follows from the above bound for the global error that if the function $f$ in the differential equation is continuous in the first argument and Lipschitz continuous in the second argument (the condition from the Picard–Lindelöf theorem), and the increment function $A$ is continuous in all arguments and Lipschitz continuous in the second argument, then the global error tends to zero as the step size $h$ approaches zero (in other words, the numerical method converges to the exact solution).

## Extension to linear multistep methods

Now consider a linear multistep method, given by the formula

\begin\left\{align\right\}

& y_{n+s} + a_{s-1} y_{n+s-1} + a_{s-2} y_{n+s-2} + \cdots + a_0 y_n \\ & \qquad {} = h \bigl( b_s f(t_{n+s},y_{n+s}) + b_{s-1} f(t_{n+s-1},y_{n+s-1}) + \cdots + b_0 f(t_n,y_n) \bigr), \end{align} Thus, the next value for the numerical solution is computed according to

$y_\left\{n+s\right\} = - \sum_\left\{k=0\right\}^\left\{s-1\right\} a_\left\{n+k\right\} y_\left\{n+k\right\} + h \sum_\left\{k=0\right\}^s b_k f\left(t_\left\{n+k\right\}, y_\left\{n+k\right\}\right).$

The next iterate of a linear multistep method depends on the previous s iterates. Thus, in the definition for the local truncation error, it is now assumed that the previous s iterates all correspond to the exact solution:

$\tau_n = y\left(t_\left\{n+s\right\}\right) + \sum_\left\{k=0\right\}^\left\{s-1\right\} a_\left\{n+k\right\} y\left(t_\left\{n+k\right\}\right) - h \sum_\left\{k=0\right\}^s b_k f\left(t_\left\{n+k\right\}, y\left(t_\left\{n+k\right\}\right)\right).$

Again, the method is consistent if $\tau_n = o\left(h\right)$ and it has order p if $\tau_n = O\left(h^\left\{p+1\right\}\right)$. The definition of the global truncation error is also unchanged.

The relation between local and global truncation errors is slightly different than in the simpler setting of one-step methods. For linear multistep methods, an additional concept called zero-stability is needed to explain the relation between local and global truncation errors. Linear multistep methods that satisfy the condition of zero-stability have the same relation between local and global errors as one-step methods. In other words, if a linear multistep method is zero-stable and consistent, then it converges. And if a linear multistep method is zero-stable and has local error $\tau_n = O\left(h^\left\{p+1\right\}\right)$, then its global error satisfies $e_n = O\left(h^p\right)$.