astrodynx.twobody.ufunc3

Contents

astrodynx.twobody.ufunc3#

astrodynx.twobody.ufunc3(chi, alpha)[source]#

The universal function U3

Parameters:
  • chi (ArrayLike) – The generalized anomaly.

  • alpha (DTypeLike) – The reciprocal of the semimajor axis.

Return type:

Array

Returns:

The value of the universal function U3.

Notes

The universal function U3 is defined as:

\[\begin{split} U_3(\chi, \alpha) = \begin{cases} \frac{\sqrt{\alpha} \chi - \sin(\sqrt{\alpha} \chi)}{\alpha \sqrt{\alpha}} & \alpha > 0 \\ \frac{\sqrt{-\alpha} \chi - \sinh(\sqrt{-\alpha} \chi)}{\alpha \sqrt{-\alpha}} & \alpha < 0 \\ \frac{\chi^3}{6} & \alpha = 0 \end{cases} \end{split}\]
where \(\chi\) is the generalized anomaly and \(\alpha = \frac{1}{a}\) is the reciprocal of semimajor axis.

References

Battin, 1999, pp.180.

Examples

A simple example:

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> chi = 1.0
>>> alpha = 1.0
>>> adx.twobody.ufunc3(chi, alpha)
Array(0.1585..., dtype=float32, weak_type=True)

With broadcasting:

>>> chi = jnp.array([1.0, 2.0])
>>> alpha = 1.0
>>> adx.twobody.ufunc3(chi, alpha)
Array([0.1585..., 1.0907...], dtype=float32)