Shahar said:
V = √2 * √G*M/r2-G*M/r1
I can't find any function of time.
As mentioned, you'll need higher level math to determine when the objects collide. Alternate methods for determining velocity versus position:
$$a = \frac{d^{2}r}{dt^{2}}=-\frac{2GM}{r^{2}}$$
Method 1, multiply both sides by v = dr/dt:
$$\frac{d^{2}r}{dt^{2}}\frac{dr}{dt}=-\frac{2GM}{r^{2}}\frac{dr}{dt}$$
$$\frac{dv}{dt} \ v =-\frac{2GM}{r^{2}}\frac{dr}{dt}$$
integrate both sides:
$$\frac{1}{2}v^2 = \frac{GM}{r}-\frac{GM}{r_0}$$
Method 2, use chain rule (v as a function of r, r as a function of t, a = v'(r) r'(t))
$$\frac{dv}{dr}\frac{dr}{dt} = -\frac{2GM}{r^{2}}$$
$$dv \ v = -\frac{2GM}{r^{2}}{dr}$$
integrate both sides:
$$\frac{1}{2}v^2 = \frac{GM}{r}-\frac{GM}{r_0}$$
using - G M / r
0 as the constant of integration since v = 0 when r = r
0
$$v = dr/dt = -\sqrt{\frac{2 \ G \ M}{r} - \frac{2 \ G \ M}{r_0}} = -\sqrt{\frac{2 \ G \ M \ (r_0 \ - \ r)}{r_0 \ r}} = -\sqrt{\frac{2 \ G \ M}{r_0}}\sqrt{\frac{r_0 \ - \ r}{r}}$$
This basically matches the answer shown in post #3. To get time you'd have to integrate:
$$-\sqrt{\frac{r_0}{2 \ G \ M}}\sqrt{\frac{r}{r_0 \ - \ r}} \ dr = dt$$
The left side is complicated:
http://www.wolframalpha.com/input/?i=integral+-+sqrt(r0+/+(2+G+M))+sqrt(r+/+(r0-r))+dr