# threebody¶

probnum.problems.zoo.diffeq.threebody(t0=0.0, tmax=17.065216560157964, y0=None)[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 = 0.012277471$$ denoting the standardized moon mass.

Parameters
• t0 – Initial time. Default is 0.0.

• tmax – Final time. Default is 17.0652165601579625588917206249 which is the period of the solution.

• y0(shape=(4, )) – Initial value. Default is [0.994, 0, 0, -2.00158510637908252240537862224].

Returns

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

Return type

InitialValueProblem

References

1

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