What would a graph of distance between two gravitational objects vs time look like? Lets say there are two objects in space that are attracted to each other, and are a distance r from each other. The gravitation force between the two objects is $$G\frac{Mm}{r^2}$$ As they accelerate, the rate at which $r$ changes increases, so the rate of change of the force increases, etc. I've heard you can keep taking the derivative of the equation and never get to distance vs time, is this true? What does the graph of distance vs time in this situation even look like?
 A: We'll start the situation with two equal masses at an initial separation of $r_0.$ The force equation is a second-degree differential equation, which would require two integrations to solve, but we can avoid one using conservation of energy:
$$\frac{1}{2}mv^2 + \frac{1}{2}mv^2 - \frac{Gm^2}{r} = -\frac{Gm^2}{r_0}$$
where $m$ is the mass of each falling object, $v$ is the velocity of each object, $G$ is the gravitational constant, $r$ is the separtion, and $r_0$ is the initial separation. The left side is the total energy of both masses as they fall towards each other, while the right side is the total energy of the system at the start (zero velocity, so only potential energy). Simplifying:
$$v^2 = Gm\left(\frac{1}{r}-\frac{1}{r_0}\right)$$
The velocity of the masses is related to the change in separation by
$$v = -\frac{1}{2}\frac{dr}{dt}.$$
The negative sign is due to the masses falling towards each other (the right mass is falling to the left and vice versa). The $1/2$ is due to both of the masses falling with equal and opposite velocity due to conservation of momentum. So,
$$v = -\frac{1}{2}\frac{dr}{dt} = \sqrt{Gm\left(\frac{1}{r}-\frac{1}{r_0}\right)}.$$
Solving
$$-\frac{1}{2\sqrt{Gm}}\frac{dr}{\sqrt{\frac{1}{r} - \frac{1}{r_0}}} = dt$$
$$-\frac{1}{2\sqrt{Gm}}dr\sqrt{\frac{rr_0}{r_0 - r}} = dt$$
$$-\frac{1}{2\sqrt{Gm}}\int_{r_0}^r dr\sqrt{\frac{rr_0}{r_0 - r}} = \int_0^t d\tau = t$$
Using the substitution $r = r_0\sin^2\theta$ and $dr = r_0 2\sin\theta\cos\theta d\theta,$
$$t = -\frac{1}{2\sqrt{Gm}}\int_{\pi/2}^{\arcsin\sqrt{r/r_0}} r_0 2\sin\theta\cos\theta\,d\theta\sqrt{\frac{r_0^2\sin^2\theta}{r_0 - r_0\sin^2\theta}}$$
$$t = -\frac{1}{\sqrt{Gm}}\int_{\pi/2}^{\arcsin\sqrt{r/r_0}} r_0 \sin\theta\cos\theta\,d\theta\sqrt{\frac{r_0\sin^2\theta}{\cos^2\theta}}$$
$$t = -\frac{1}{\sqrt{Gm}}\int_{\pi/2}^{\arcsin\sqrt{r/r_0}} r_0^{3/2} \sin\theta\cos\theta|\tan\theta|\,d\theta$$
$$t = -\frac{r_0^{3/2}}{\sqrt{Gm}}\int_{\pi/2}^{\arcsin\sqrt{r/r_0}} \sin^2\theta\,d\theta.$$
We can solve this integral by using the double-angle formula for cosine: $\cos2\theta = \cos^2\theta - \sin^2\theta = 1 - 2\sin^2\theta.$
$$t = -\frac{r_0^{3/2}}{2\sqrt{Gm}}\int_{\pi/2}^{\arcsin\sqrt{r/r_0}} (1-\cos2\theta)\,d\theta.$$
Finally, integrating yields
$$t = -\frac{r_0^{3/2}}{2\sqrt{Gm}}\left[\theta - \frac{1}{2}\sin2\theta\right]_{\pi/2}^{\arcsin{\sqrt{r/r_0}}}$$
$$t = \sqrt\frac{r_0^3}{4Gm}\left[\frac{\pi}{2} - \arcsin\sqrt{\frac{r}{r_0}} + \sqrt{\frac{r}{r_0}\left(1-\frac{r}{r_0}\right)}\right]$$
Now, this formula cannot be written as $r = f(t),$ but we can get a sense for what this form would look like by graphing. If we use $x = r/r_0$ and $y = t\sqrt\frac{4Gm}{r_0^3},$ the formula looks like this
$$y = \frac{\pi}{2} - \arcsin\sqrt x + \sqrt{x(1-x)}$$
The graph of this equation looks like this (the x-axis is separation distance, the y-axis is time):

Flip this image about the line $y=x$ so that the axes switch locations, and you have a plot of $r = f(t)$ (the x-axis is now time, the y-axis is now separation distance):

Notice that the separation distance changes very slowly at first, then changes more rapidly as the objects get closer, then becomes vertical (infinite speed) when the separation is zero and the objects collide).
A: This is not at all a simple problem, although setting up the equation of motion is not difficult.
I'm assuming from your problem statement that both objects have the same mass $m$. They're positioned on an $r$ axis, $1$ at $r=-r_0$, $2$  at $r=+r_0$, at $t=0$. The CoG of the two mass system is at $r=0$:

This set up allows to take advantage of symmetry. Both experience the same attractive force $F$, with scalar:
$$|F|=\frac{Gm^2}{(r_2-r_1)^2}\tag{1}$$
Due to symmetry (not very well drawn, sorry!):
$$r_2=-r_1$$
So with $(1)$ we get:
$$F=\frac{Gm^2}{(2r_1)^2}=\frac{Gm^2}{4r_1^2}\tag{2}$$
Now with $N2L$ and respecting the vector directions:
$$F=ma_1=\frac{Gm^2}{4r_1^2}$$
$$a_1=\frac{Gm}{4r_1^2}=\frac{\text{d}^2r_1}{\text{d}t^2}$$
$$r_1^2\frac{\text{d}^2r_1}{\text{d}t^2}=\frac{Gm}{4}$$
In ODE shorthand:
$$r_1^2\ddot{r_1}=\frac{Gm}{4}$$
This is a non-linear, second order differential equation with solution (note that $r(t)=r_1$ and $A=\frac{Gm}{4}$):

(Source)
$c_1$ and $c_2$ are two integration constants (yet to be determined from initial conditions)
Note that the solution cannot be rendered explicit in $t$: no equation of the type $r(t)=f(t)$ can be obtained.
