# threebody¶

probnum.diffeq.threebody(timespan, initrv, params=0.012277471)[source]

Initial value problem (IVP) based on a three-body problem.

Let the initial conditions be $$y = (y_1, y_2, \dot{y}_1, \dot{y}_2)^T$$. This function implements the second-order three-body problem as a system of first-order ODEs, which is defined as follows: 1

$\begin{split}f(t, y) = \begin{pmatrix} \dot{y_1} \\ \dot{y_2} \\ y_1 + 2 \dot{y}_2 - \frac{(1 - \mu) (y_1 + \mu)}{d_1} - \frac{\mu (y_1 - (1 - \mu))}{d_2} \\ y_2 - 2 \dot{y}_1 - \frac{(1 - \mu) y_2}{d_1} - \frac{\mu y_2}{d_2} \end{pmatrix}\end{split}$

with

$\begin{split}d_1 &= ((y_1 + \mu)^2 + y_2^2)^{\frac{3}{2}} \\ d_2 &= ((y_1 - (1 - \mu))^2 + y_2^2)^{\frac{3}{2}}\end{split}$

and a constant parameter $$\mu$$ denoting the standardized moon mass. Default is $$\mu = 0.012277471$$.

Parameters
• timespan ((float, float)) – Time span of IVP.

• initrv (RandomVariable,) – (shape=(4, )) – Vector-valued RandomVariable that describes the belief over the initial value. Usually it is a Constant (noise-free) or Normal (noisy) Random Variable with $$4$$-dimensional mean vector and $$4 \times 4$$-dimensional covariance matrix. To replicate “classical” initial values use the Constant distribution.

• params ((float), optional) – Parameter $$\mu$$ for the three-body problem Default is $$\mu = 0.012277471$$.

Returns

IVP object describing a three-body problem IVP with the prescribed configuration.

Return type

IVP

References

1

Hairer, E., Norsett, S. and Wanner, G.. Solving Ordinary Differential Equations I. Springer Series in Computational Mathematics, 1993.