Theory of the N-Body Problem
June 9, 1996
gained while it was moving toward it. Without Jupiter being in the right place, the probe
didn't even have enough energy for its orbit to reach Jupiters' distance from the Sun. After
the slingshot effect, it now has enough energy to leave the solar system.
Errors in implementing programs are inevitable, but it might be hoped that with
thorough testing, all serious programming errors can be eliminated. However, the nature
of the N-body problem is such that it can be surprisingly hard to distinguish programming
bugs from the unavoidable discretization and rounding errors. During the course of devel-
oping XStar, I found numerous bugs that did not have a significant impact
the step size
was small enough. As a result, most bugs simply made a given ODE integration method
appear to be less efficient than it should be. The number of bugs that were found only after
making very careful comparisons between the results of the different methods lead me to
believe that there probably still are some unknown bugs in at least some of the ODE inte-
gration methods implemented in XStar. Besides the possibility of unknown bugs, there are
even a few known bugs that I haven't bothered to fix.
It is therefore important to realize that when two integration methods are com-
pared, the comparison is really between two implementations of the methods with any
number of bugs in either one. This comparison, therefore, can't be the final judge of which
method is better, merely which implementation is better.
Path of space probe
FIGURE 18. An example of the sling shot effect
This document is best viewed as n-body.pdf because the translation to html was buggy.