Euler–Cromer algorithm

From Wikipedia, the free encyclopedia

In mathematics, the Euler–Cromer algorithm or symplectic Euler method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator and hence it yields better results than the standard Euler method.

Contents

[edit] Setting

The Euler–Cromer algorithm can be applied to a pair of differential equations of the form

{dx \over dt} = f(t,v)
{dv \over dt} = g(t,x),

where f and g are given functions. Here, x and v may be either scalars or vectors. The equations of motion in Hamiltonian mechanics take this form if the Hamiltonian is of the form

H = T(t,v) + V(t,x). \,

The differential equations are to be solved with the initial condition

x(t_0) = x_0, \qquad v(t_0) = v_0.

[edit] The method

The Euler–Cromer algorithm produces an approximate discrete solution by iterating

v_{n+1} = v_n + f(t_n, x_n) \, \Delta t \quad
x_{n+1} = x_n + g(t_n, v_{n+1}) \, \Delta t \quad

where Δt is the time step and tn = t0 + nΔt is the time after n steps.

The difference with the standard Euler method is that the Euler–Cromer method uses vn + 1 in the equation for xn + 1, while the Euler method uses vn.

The Euler–Cromer method is a first-order integrator, just as the standard Euler method. This means that it commits a global error of the order of Δt. However, the Euler–Cromer method is a symplectic integrator, unlike the standard method. As a consequence, the Euler–Cromer method almost conserves the energy (when the Hamiltonian is time-independent). Often, the energy increases steadily when the standard Euler method is applied, making it far less accurate.

[edit] Example

The motion of a spring satisfying Hooke's law is given by

{dx \over dt} = v(t)
{dv \over dt} = -{k \over m}x. \quad

The Euler–Cromer algorithm for this equation is

v_{n+1} = v_n - {k \over m}x_n\Delta t \quad
x_{n+1} = x_n + v_{n+1} \Delta t. \quad

[edit] References