In my applied math class, my instructor introduced the example of two point masses, both with mass $m$, with positions $x_1(t)$ and $x_2(t)$. Newton's law gives us the differential equation
$$r'' + (2Gm)r^{-2} = 0,$$
where $r(t) : = |x_1(t) - x_2(t)|$.
My instructor told us that we can solve this diff EQ by changing variables and noting that
$$r'' = \frac{d}{dt} \frac{dr}{dt} =\frac{dv}{dt} = \frac{dv}{dr}\frac{dr}{dt},$$
so
$$v\,dv =2Gm \frac{dr}{r^2}$$
and we can integrate.
My Question:
I'm troubled by this change of variables. We are assuming that there is a function $v(r)$. Am I correct that this is a physical assumption and not a mathematical one? (For instance, if two things were oscillating with some irregularity, there would not be a well-defined $v(r)$, right?) What allows us to make that assumption here? (It seems clear that the particles will simply come toward each other and then collide, but I'm trying to be precise.)
Note that $$r'' + (2Gm)r^{-2} = 0,$$
can be written as $$r'r''=-2Gm\frac{r'}{r^2}$$
Integration gives $$\frac 1 2r'^2=2Gm r^{-1}$$ so $$rr'^2=4Gm$$ I wouldn't know what was intended after this.