What is the distance between two objects in space as a function of time, considering only the force of gravity? To be specific, there are no other objects to be considered and the objects in question are not rotating.

For instance, say you have two objects that are 6 million miles apart. One is 50,000 kg and the other is 200 kg. Say I want to know how much time has passed when they are 3 million miles apart. How would I go about doing that?

EDIT: Looking at the other question I am having trouble following David Z's steps in his answer. Intermediate steps would be helpful. In particular I don't see how the integration step works. I also don't understand why the initial r value, ri remains as a variable after it's derivative has been set to 0, wouldn't the integral of that derivative (i.e. the function ri) be 0 + C? I also don't see how you wind up with a term that includes 2 under a square root sign.

I can not ask for the intermediate steps on the question itself because I do not have the reputation points.

I think it probably answers my question or will once I understand it, but I am not sure.

EDIT: I can sort of understand the integration step. But it seems like he is integrating with respect to two different variables on both sides, the variables being r on the left and the derivative of r on the right. There must be something I'm missing here.

  • 2
    $\begingroup$ How close they will be when they are 3 million miles apart? Then they will simply be 3 million miles apart no? $\endgroup$ – Horus Nov 10 '15 at 5:20
  • 1
    $\begingroup$ For the inverse (time as a function of distance), physics.stackexchange.com/q/3534 $\endgroup$ – BowlOfRed Nov 10 '15 at 5:35

What you have is a system of coupled differential equations. Say the position of the masses are $m_1$ and $m_2$. The positions are $x_1(t)$ and $x_2(t)$. We'll assume that $x_1<x_2$. Note that they will stay on a line, so it suffices to consider one dimension.

Now, we use $F=mx''$ to construct our ODEs:

$$G \frac{m_1 m_2}{(x_2(t)-x_1(t))^2} = m_1 x_1''(t)$$ $$G \frac{m_1 m_2}{(x_2(t)-x_1(t))^2} = m_2 x_2''(t)$$

The process of solving these ODEs can get quite involved. I would direct you towards the Wikipedia article on the two body problem for a full answer.


The two equations of motion reduces down to one equation of motion by considering the separation $x=x_2-x_1$ and the separating acceleration $\ddot{x} = \ddot{x}_2 -\ddot{x}_1$

$$ \ddot{x} = -\frac{G (m_1+m_2)}{x^2} $$

or $ \ddot{x} = -K/x^2 $ with $K=G (m_1+m_2)$

This can be re-written as $\frac{{\rm d} \dot{x}}{{\rm d} t} =\frac{{\rm d} \dot{x}}{{\rm d} x} \frac{{\rm d} x}{{\rm d} t} =\frac{{\rm d} \dot{x}}{{\rm d} x} \dot x = -\frac{K}{x^2}$

$$ \int \dot{x} {\rm d} \dot{x} = -\int \tfrac{K}{x^2}\,{\rm d}x + C_1$$ $$ \frac{1}{2} \dot{x}^2 = C_1 + \frac{K}{x} $$

If initially the bodies are at rest, separated by $d$ then

$$ \frac{1}{2} \dot{x}^2 = -\frac{K}{d} + \frac{K}{x} $$ or $$ \dot{x} = \sqrt{\frac{2 K (d-x)}{d\, x}} $$

This has a solution for time $t$ as a function of separation $x$ of

$$ t= \sqrt{ \frac{d^3}{2 K}} \cos^{-1} \left( \sqrt{\frac{x}{d}}\right) - \sqrt{ \frac{d^2 x-d x^2}{2 K}} $$

This means the time to reach collision $x=0$ is

$$ t_C = \frac{\pi}{2}\sqrt{ \frac{d^3}{2 K}} = \frac{\pi}{2}\sqrt{ \frac{d^3}{2 G (m_1+m_2)}}$$


This is the elliptic case of the radial Kepler problem, the equation for time as a function of position is $$ t(r) = \sqrt{ \frac{d^3}{2 g} } \left( \arccos\left( \sqrt{ \frac{r}{d} } \right) + \sqrt{ \frac{r}{d} \left(1 - \frac{r}{d} \right) } \right) $$

where t is the time, r is the position, d is the initial (maximum) separation, and g=G(m1+m2).

In this case the the two masses will take 14.93 billion years to move from 6 million miles apart to 3 million miles apart, and then another 3.32 billion years to move from 3 million miles apart to zero miles apart (collision). Gravity is a very weak force.

The the solution to the inverse problem (finding the distance as a function of the time) is:

$ r(t) = d \left( y - \frac15 y^2 - \frac{3}{175} y^3 - \frac{23}{7875} y^4 - \frac{1894}{3931875} y^5 - \frac{3293}{21896875} y^6 \cdots \right) \Bigg|_{y = \frac{1}{d} \left(\frac92 g \right)^{1/3} (t_\rm{freefall}-t)^{2/3} } $

where $ t_\rm{freefall} = \frac{ \pi}{2} \sqrt{ \frac{d^3}{2g} }$, and t is the time.

For more info see my website here, and here.

  • $\begingroup$ How come the equation doesn't match in the wikipedia article? Or does it? Do I just need to tinker with the equations? Also the second one appears to match if w=1. Is w=1? en.wikipedia.org/wiki/Radial_trajectory#Elliptic_trajectory $\endgroup$ – A. Miller Nov 10 '15 at 23:08
  • $\begingroup$ In this instance w = 1/d. Notice in the wikipedia article (that I wrote), t=0 when the two bodies coincide. In this case t=0 when the two bodies are separated and motionless at a distance d. $\endgroup$ – Nick Nov 12 '15 at 0:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.