# Two-Body Equations of Motion in an Inertial Frame¶

In this section, we will develop the equations of motion for two masses, $$m_1$$ and $$m_2$$, each affected by the other’s gravitational pull. Remember that an inertial reference frame may move with constant velocity, but it cannot rotate or accelerate.

The origin of this inertial frame of reference is arbitrary. We don’t specify where the origin of the frame is, only that the frame exists and is inertial. Finding a truly inertial reference frame can be tricky, since picking a fixed location in space is tricky. Even Newton deferred this question!

## Relative Position Vector¶

We will use capital letters to refer to coordinates in the inertial reference frame, $$X$$, $$Y$$, and $$Z$$ with unit vectors $$\uvec{I}$$, $$\uvec{J}$$, and $$\uvec{K}$$, respectively. Fig. 8 The locations of two point masses, $$m_1$$ and $$m_2$$, in an inertial reference frame

The position vectors $$\vector{R}_1$$ and $$\vector{R}_2$$ of two point masses in this reference frame are:

(13)\begin{split}\begin{aligned} \vector{R}_1 &= X_1\uvec{I} + Y_1\uvec{J} + Z_1\uvec{K}\\ \vector{R}_2 &= X_2\uvec{I} + Y_2\uvec{J} + Z_2\uvec{K} \end{aligned}\end{split}

Let $$\vector{r}$$ be the vector pointing from $$m_1$$ to $$m_2$$, which we also phrase as $$m_2$$ relative to $$m_1$$. Then:

(14)\begin{split}\begin{aligned} \vector{r} &= \vector{R}_2 - \vector{R}_1\\ \vector{r} &= \left(X_2 - X_1\right)\uvec{I} + \left(Y_2 - Y_1\right)\uvec{J} + \left(Z_2 - Z_1\right)\uvec{K} \end{aligned}\end{split}

We also define a unit vector pointing from $$m_1$$ toward $$m_2$$:

(15)$\uvec{u}_r = \frac{\vector{r}}{r}$

where $$r$$ is the magnitude of $$\vector{r}$$, or the distance between the two masses.

### Forces in the Two-Body System¶

The two masses are acted upon only by their mutual gravitational pull. $$\vector{F}_{12}$$ is the force exerted on $$m_1$$ by $$m_2$$ and $$\vector{F}_{21}$$ is the force exerted on $$m_2$$ by $$m_1$$. By Newton’s third law:

(16)$\vector{F}_{12} = -\vector{F}_{21}$

Newton’s second law says that the force is equal to the mass times the acceleration:

(17)\begin{split}\begin{aligned} \vector{F}_{12} &= m_1\ddot{\vector{R}}_1 \\ \vector{F}_{21} &= m_2\ddot{\vector{R}}_2 \end{aligned}\end{split}

where $$\ddot{\vector{R}}$$ is the absolute acceleration of the subscripted mass. Absolute means that the acceleration is taken relative to an inertial reference frame. This is important because Newton’s second law only applies for absolute accelerations.

Since the only force in this system is the gravitational attraction, the force is also equal to Newton’s law of gravitation, (1). The force of $$m_2$$ on $$m_1$$, $$F_{12}$$, points in the positive direction of $$\uvec{u}_r$$. Because of Newton’s third law, as represented by (16), the force of $$m_1$$ on $$m_2$$, $$F_{21}$$, points in the negative direction of $$\uvec{u}_r$$. This is shown in (18):

(18)\begin{split}\begin{aligned} \vector{F}_{12} &= \frac{G m_1 m_2}{r^2}\uvec{u}_r\\ \vector{F}_{21} &= -\frac{G m_1 m_2}{r^2}\uvec{u}_r \end{aligned}\end{split}

## Finding the Equations of Motion¶

Combining (17) and (18), we find:

(19)\begin{split}\begin{aligned} m_1 \ddot{\vector{R}}_1 &= \frac{G m_1 m_2}{r^2}\uvec{u}_r\\ m_2 \ddot{\vector{R}}_2 &= -\frac{G m_1 m_2}{r^2}\uvec{u}_r \end{aligned}\end{split}

Finally, we divide through by the mass on the left side of each equation and replace $$\uvec{u}_r$$ with its definition, (15) to arrive at the two-body inertial equations of motion:

(20)\begin{split}\begin{aligned} \ddot{\vector{R}}_1 &= G m_2 \frac{\vector{r}}{r^3}\\ \ddot{\vector{R}}_2 &= -G m_1 \frac{\vector{r}}{r^3} \end{aligned}\end{split}

This is a coupled, nonlinear, vector system of ordinary differential equations.

## Finding the System State as a Function of Time¶

Our goal is now to determine equations that will let us solve for the position, velocity, and acceleration of the two masses as a function of time. We split (20) into components to find the absolute acceleration of each mass:

(21)\begin{split}\begin{aligned} \ddot{X}_1 &= G m_2 \frac{X_2 - X_1}{r^3} & \ddot{Y}_1 &= G m_2 \frac{Y_2 - Y_1}{r^3} & \ddot{Z}_1 &= G m_2 \frac{Z_2 - Z_1}{r^3}\\ \ddot{X}_2 &= G m_1 \frac{X_1 - X_2}{r^3} & \ddot{Y}_2 &= G m_1 \frac{Y_1 - Y_2}{r^3} & \ddot{Z}_2 &= G m_1 \frac{Z_1 - Z_2}{r^3} \end{aligned}\end{split}

Now we have a system of six nonlinear ordinary differential equations. Since the highest order derivative in the system is the second derivative, we need 6 equations * 2nd order = 12 initial conditions to solve the problem. The most convenient set of initial conditions are the six position components and six velocity components of $$m_1$$ and $$m_2$$.

These components are called the state vector of the system. This is because when all 12 values are known, the state of the system is completely determined. This happens in two steps:

1. By using the positions, we can find all the acceleration components using (21)

2. By integrating the acceleration from step 1 and adding the known velocity components, we can find the absolute velocity

Although these steps can be done by hand, in practice it is more convenient to solve them with a computer, numerically.