# Universal variable formulation

In orbital mechanics, the universal variable formulation is a method used to solve the two-body Kepler problem. It is a generalized form of Kepler's Equations, extending them to apply not only to elliptic orbits, but also parabolic and hyperbolic orbits. It thus is applicable to many situations in the solar system, where orbits of widely varying eccentricities are present.

## Introduction

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.[1] 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 anomaly E, 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:

$\frac{ds}{dt} = \frac{1}{r}$

where $r = r(t)$ is the time-dependent distance to the center of attraction. The fundamental equation $\frac{d^2\mathbf{r}}{dt^2} + \mu \frac{\mathbf{r}}{r^3} = \mathbf{0}$ is regularized by applying this change of variables to yield:[1]

$\frac{d^2\mathbf{r}}{ds^2} + \alpha\ \mathbf{r} = -\mathbf{P}$

where P is a constant vector and $\alpha$ is defined by

$\alpha = \frac\mu a$

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:

$\frac{d^3\mathbf r} {ds^3} + \alpha\frac{d\mathbf r} {ds} = \mathbf{0}$

The family of solutions to this differential equation[1] are written symbolically as the functions $1,\ s\ c_1(\alpha s^2),\ s^2\ c_2(\alpha s^2),$ where the functions $\ c_k(x)$, called Stumpff functions, are generalizations of sine and cosine functions. Applying this results in:[1]

$t - t_0 = r_0\ s\ c_1(\alpha s^2) + r_0 \frac{dr_0}{dt}\ s^2\ c_2(\alpha s^2) + \mu \ s^3\ c_3(\alpha s^2)$

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 $t$ to yield $s$, which in turn is used to compute the f and g functions:

\begin{align} f(s) & = 1 - \left(\frac \mu {r_0}\right) s^2 c_2(\alpha s^2), \\ g(s) & = t - t_0 - \mu s^3c_3(\alpha s^2), \\ \frac{df}{dt} & = \dot{f}(s) = -\left(\frac{\mu}{r r_0}\right)s c_1(\alpha s^2), \\ \frac{dg}{dt} & = \dot{g}(s) = 1 - \left(\frac{\mu}{r}\right)s^2c_2(\alpha s^2) \end{align}

The values of the f and g functions determine the position of the body at the time $t$:

$\mathbf{r} = \mathbf{r}_0\ f(s) + \mathbf{v}_0\ g(s)$

In addition the velocity of the body at time $t$ can be found using $\dot{f}(s)$ and $\dot{g}(s)$ as follows:

$\mathbf{v} = \mathbf{r}_0\ \dot{f}(s) + \mathbf{v}_0\ \dot{g}(s)$

where $\mathbf{r}$ and $\mathbf{v}$ are the position and velocity respectively at time $t$, and $\mathbf{r}_0$ and $\mathbf{v}_0$ are the position and velocity, respectively, at arbitrary initial time $t_0$.

## References

1. ^ a b c d Danby, J. M. A. (1988), Fundamentals of Celestial Mechanics, Willman-Bell