Numerical ODEs · Definition

Local and global error

numerical methodsnumerical odes

Before you start you need to know

When approximating a differential equation step by step, each step introduces a small mistake. Measuring how these mistakes accumulate tells you whether a method is reliable.

Definition

The local error is the difference between the exact ODE solution over one step and the method's approximation starting from the exact value.

\[e_{n+1}=y(t_{n+1})-y_{n+1}\]

If Euler's method has local error of order \(O(h^2)\), the global error is usually of order \(O(h)\), one power less, because the local error accumulates over about \(1/h\) steps. This relation is the basis of convergence analysis.

Consider \(y'=y\), \(y(0)=1\), with \(h=0.1\). After the first Euler step we get \(y_1=1.1\), while \(y(0.1)=e^{0.1}\approx1.10517\), so the local error is about \(0.00517\).

A typical mistake is confusing local with global error and assuming that a method with small local error must have an equally small global error. The global error also depends on the stability of the method.

Think about it

Why can a method with a small local error still have a large global error?

Because local errors accumulate and propagate at each step, and the method's stability can amplify them.

Exercises 10

References

  • Richard L. Burden, J. Douglas Faires, Annette M. Burden, Numerical Analysis, 10th edition, Cengage Learning, 2016.
  • Lloyd N. Trefethen, David Bau III, Numerical Linear Algebra, 1st edition, SIAM, 1997.