A common problem in orbital mechanics is the following: given a body in an orbit and a time t0, find the position of the body at any other given time t. For elliptical orbits with a reasonably small eccentricity, solving Kepler's Equation by methods like Newton's method gives adequate results. However, as the orbit becomes more and more eccentric, the numerical iteration may start to converge slowly or not at all. Furthermore, Kepler's equation cannot be applied to parabolic and hyperbolic orbits, since it specifically is tailored to elliptic orbits.
Derivation
Although equations similar to Kepler's equation can be derived for parabolic and hyperbolic orbits, it is more convenient to introduce a new independent variable to take the place of the eccentric anomalyE, and having a single equation that can be solved regardless of the eccentricity of the orbit. The new variable s is defined by the following differential equation: where is the time-dependent distance to the center of attraction. The fundamental equation is regularized by applying this change of variables to yield: where P is a constantvector and is defined by The equation is the same as the equation for the harmonic oscillator, a well-known equation in both physics and mathematics. Taking the derivative again, we get a third-degree differential equation: The family of solutions to this differential equation are written symbolically as the functions where the functions, called Stumpff functions, are generalizations of sine and cosine functions. Applying this results in: which is the universal variable formulation of Kepler's Equation. This equation can now be solved numerically using a root-finding algorithm such as Newton's method or Laguerre's method for a given time to yield, which in turn is used to compute the f and g functions: The values of the f and g functionsdetermine the position of the body at the time : In addition the velocity of the body at time can be found using and as follows: where and are the position and velocity respectively at time, and and are the position and velocity, respectively, at arbitrary initial time.