// Workers AI · dad joke modeWhat did the Stumpff function say? "I'm rooted in math.
In celestial mechanics, the Stumpff functions were developed by Karl Stumpff for analyzing trajectories and orbits using the universal variable formulation.[1][2][3] They are defined by the alternating series:
- for
Like the sine, cosine, and exponential functions, Stumpff functions are well-behaved entire functions : Their series converge absolutely for any finite argument
Stumpff functions are useful for working with surface launch trajectories, and boosts from closed orbits to escape trajectories, since formulas for spacecraft trajectories using them smoothly meld from conventional closed orbits (circles and ellipses, eccentricity e : 0 ≤ e < 1 ) to open orbits (parabolas and hyperbolas, ( e ≥ 1 ), with no singularities and no imaginary numbers arising in the expressions as the launch vehicle gains speed to escape velocity and beyond. (The same advantage occurs in reverse, as a spacecraft decelerates from an arrival trajectory to go into a closed orbit around its destination, or descends to a planet's surface from a stable orbit.)
Relations to circular and hyperbolic trigononometric functions
[edit]By comparing the Taylor series expansion of the trigonometric functions sin and cos with and a relationship can be found. For
Similarly, by comparing with the expansion of the hyperbolic functions sinh and cosh we find for
Circular orbits and elliptical orbits use sine and cosine relations, and hyperbolic orbits use the sinh and cosh relations. Parabolic orbits (marginal escape orbits) formulas are a special in-between case.
Note that , the sine cardinal function; and similarly for sinh as the hyperbolic sine cardinal, sinhc.
By definition
.
Therefore:
Recursion
[edit]For higher-order Stumpff functions needed for both ordinary trajectories and for perturbation theory, one can use the recurrence relation:
- for
or when
- for
Using this recursion, the two further Stumpff functions needed for the universal variable formulation are:
Software implementation
[edit]By the small-angle approximation, both and are close to 1 for small , as are their hyperbolic counterparts and ; is also close to 1 for . Subtracting these from 1 is vulnerable to catastrophic cancellation.
For the partial sum of the power series of can be evaluated as a polynomial without severe loss of precision.
However the larger the more terms are required to achieve a given accuracy.
If then only the one constant term of the polynomial is required, where is the machine epsilon.
The subtraction can be calculated without cancellation as the versine function:
although this only gains significant precision for .
Similarly:
A precise software implementation will blend these techniques in appropriate ranges based on a numerical analysis of the function and the machine's arithmetic precision.
Relations to other functions
[edit]The Stumpff functions can be expressed in terms of the Mittag-Leffler function:
References
[edit]- ↑ Karl Stumpff (1956). Himmelsmechanik [Celestial Mechanics] (in German). Deutscher Verlag der Wissenschaften.
- ↑ Danby, J.M.A. (1988). Fundamentals of Celestial Mechanics (revised ed.). Willman–Bell. ISBN 9780023271403.
- ↑ Stiefel, Eduard; Scheifele, Gerhard (1971). Linear and Regular Celestial Mechanics: Perturbed two-body motion, numerical methods, canonical theory. Springer-Verlag. ISBN 978-0-38705119-2.