Wikipedia / Variational integrator
Wikipedia / Variational integrator
Variational integrators are numerical integrators for Hamiltonian systems derived from the Euler–Lagrange equations of a discretized Hamilton's principle. Variational integrators are momentum-preserving and symplectic.
Derivation of a simple variational integrator
Consider a mechanical system with a single particle degree of freedom described by the Lagrangian
is a potential. To construct a variational integrator for this system, we begin by forming the discrete Lagrangian. The discrete Lagrangian approximates the action for the system over a short time interval:
Here we have chosen to approximate the time integral using the trapezoid method, and we use a linear approximation to the trajectory,
. Different choices for the approximation to the trajectory and the time integral give different variational integrators. The order of accuracy of the integrator is controlled by the accuracy of our approximation to the action; since
our integrator will be second-order accurate.
Evolution equations for the discrete system can be derived from a stationary-action principle. The discrete action over an extended time interval is a sum of discrete Lagrangians over many sub-intervals:
, we have
. The solution is
We can write this in a simpler form if we define the discrete momenta,
and
using the second equation. This evolution scheme gives
and
This is a leapfrog integration
See also
References
E. Hairer, C. Lubich, and G. Wanner. Geometric Numerical Integration. Springer, 2002.
J. Marsden and M. West. Discrete mechanics and variational integrators. Acta Numerica, 2001, pp.357–514.