My friend and I have been wracking our heads with this one for the past 3 hours...
We have 2 point masses, $m$ and $M$ in a perfect world separated by radius r. Starting from rest, they both begin to accelerate towards each other. So we have the gravitational force between them as:

$$F_g ~=~ G\frac{Mm}{r^2}$$

How do we find out at what time they will collide? What we're having trouble with is this function being a function of $r$, but I have suspected it as actually a function of $t$ due to the units of $G$ being $N(m/kg)^2$. I've tried taking a number of integrals, which haven't really yielded anything useful. Any guidance? No, this is not an actual homework problem, we're just 2 math/physics/computer people who are very bored at work :)

This is partially addressed by another answer I posted, but now that I look at it there seem to be some errors in that answer. I don't have time to check it through now but I'll come back to this later.
–
David Z♦Sep 15 '11 at 18:33

Would it be sufficient if I said "express Newton's law as a differential equation in r and t, and solve it" or is the problem that you haven't seen the math yet? Second do-you-have-the-math question: are you familiar with the canonical transformation to the reduced mass form?
–
dmckee♦Sep 15 '11 at 18:41

@dmckee 1) No, I have not been able to figure the math out yet. 2) I'm not familiar with it (my advanced math only goes up to Calc 3). I'll look into it, though!
–
MGZeroSep 15 '11 at 23:39

@sevenofdiamonds: thanks for the tip, I found the same thing working with Mathematica. I want to see if I can figure out why I originally wrote what I did before I edit it though.
–
David Z♦Sep 16 '11 at 0:40

Momentum conservation ensures that the magnitude of the momenta of both masses is the same.
Does this help?

Substituting into the second equation from the first you should be able to solve for:
$$
\int_0^T dt = -\int_{r_0}^0 dr \sqrt{\frac{rr_0}{2G(M+m)(r_0-r)}} = \frac{\pi}{2\sqrt{2}}\frac{r_0^{3/2}}{\sqrt{G(M+m)}}
$$

that equation cannot be right. if the two objects are locked in stable orbit $r$ should be fixed, so its derivative in time is allowed to be zero, still the orbital momentum $p$ will be non-zero
–
lurscherSep 15 '11 at 19:16

I'm not sure you read the question. The objects start from rest and fall toward each other. They are not in stable orbit, and p is directed towards the other mass, with no tangential component.
–
ShanthSep 15 '11 at 20:08

even in that case the total derivative also depends on the time derivative of momentum $p$, which is not constant
–
lurscherSep 15 '11 at 20:39

$p$ is not constant here, it is a function of $r$ as given by the first equation, and the rate of change of $r$ depends on $p$, not $\dot{p}$.
–
ShanthSep 15 '11 at 20:42

Yep, this is the solution I used in the other answer that I linked to from my comment on the question.
–
David Z♦Sep 16 '11 at 8:40

1

Note that multiplying this by $\frac{\dot r}{r^{2}}$ and integrating with respect to time gives you the energy equation, so it's easy to show that these answers are equivalent.
–
Jerry SchirmerDec 18 '13 at 18:41

Since this old question got bumped I might as well add my own answer. In classical mechanics, two masses that interact gravitationally define a two-body problem, which follows Kepler's laws: they will orbit each other in an ellipse, and Kepler's Third Law states that
$$
n^2a^3 =\mu,
$$
where $a$ is the semi-major axis, $\mu=G(M+m)$ and $n=2\pi/T$, with $T$ the orbital period, i.e. the time taken to go from the apocentre (the point of greatest distance) to the pericentre (the point of smallest distance) and back.

Now, the case of two colliding masses is a special case: here, the ellipse becomes a line, so the semi-minor axis $b$ is zero, the apocentre is the initial distance $r_0$ and the pericentre is zero. Also, $r_0=2a$. So the masses only complete half an orbit (from apocentre to pericentre), which takes a time
$$
t = T/2 = \frac{\pi a^{3/2}}{\sqrt{\mu}} = \pi\sqrt{\frac{r_0^3}{8G(M+m)}}.
$$

This doesn't work because the acceleration is time dependent. The velocity formula invoked assumes constant acceleration. It would be true if the time averaged acceleration were used, but computing that is computing the answer.
–
sevenofdiamondsSep 15 '11 at 22:48

Unfortunately, this won't work due to the acceleration increasing as the objects come closer.
–
MGZeroSep 15 '11 at 23:38