Euler integration

From Wikipedia, the free encyclopedia

In mathematics and computational science, Euler integration is the most basic kind of numerical integration for calculating trajectories from forces at discrete timesteps. More generally, the method is a numerical procedure for solving first-order differential equations with a given initial value.

[edit] Derivation

Euler integration is simply derived from equations for the derivatives of the position x(t) and velocity v(t) of an object. (Note a(t) is acceleration.)

a(t) = \frac{dv(t)}{dt}

and

v(t) = \frac{dx(t)}{dt}

become

v(t_0 + h) = v(t_0) + h a(t_0)\,

and

x(t_0 + h) = x(t_0) + h v(t_0)\,

[edit] Error

The magnitude of the errors arising from Euler integration can best be demonstrated by comparison to a Taylor expansion of the trajectory of an object. If we assume that a(t), v(t) and x(t) are all known exactly at a time t0, then Euler integration gives the position at time t0 + h as:

x(t_0 + h) = x(t_0) + h v(t_0). \,

In comparison, the Taylor expansion of the trajectory gives:

x(t_0 + h) = x(t_0) + h v(t_0) + \frac{1}{2}h^2 a(t_0) + O(h^3).

The error introduced by Euler integration is thus given by the difference between these equations:

-\frac{1}{2}h^2 a(t_0) + O(h^3).

For small h, the dominant error per step is proportional to h2. To solve the problem to some fixed time, the number of steps needed is proportional to 1 / h so it is to be expected that the total error at the end of the fixed time will be proportional to h (error per step times number of steps). For this reason, Euler's method is said to be first order. Even if the h2 term is removed through a common adjustment to the Euler integrator, the error still contains third-order terms in h. This makes Euler integration less accurate than Verlet integration or Runge-Kutta integration, which have smaller errors.

There are some drawbacks when considering use of this method. The error from Euler's method is quite large. In addition to this, the method can be numerically unstable, especially for stiff equations. On the positive side, Euler's method is very simple to implement.

[edit] See also