Abstract
Simulating the dynamics of the Sun–Earth–Moon system
with a standard algorithm yields a dramatically
wrong solution, predicting that the Moon is ejected
from its orbit. In contrast, a well chosen algorithm
with the same initial data yields the correct behavior.
We explain the main ideas of how the evolution of
the solar system can be computed over long times
by taking advantage of so-called geometric numerical
methods. Short sample codes are provided for the
Sun–Earth–Moon system.