In the mathematical field of numerical ordinary differential equations, a geometric integrator is a numerical method that preserves geometric properties of the exact flow of a differential equation.
We can motivate the study of geometric integrators by considering the motion of a pendulum.
Assume that we have a pendulum whose bob has mass and whose rod is massless of length . Take the acceleration due to gravity to be . Denote by the angular displacement of the rod from the vertical, and by the pendulum's momentum. The Hamiltonian of the system, the sum of its kinetic and potential energies, is