# Ordinary Differential Equations used in Cosmology

I'm just reading over some Cosmology notes and there is a little ODE solve that I am not quite understanding.

I have an equation of the form:

$$\ddot{R}=-\frac{GM}{R^{2}}$$

Integrating gives:

$$\dot{R}^{2}=+\frac{2GM}{R}+C$$

The notes are essentially saying that this can be solved with a parameter $\theta$: Could anyone run through the method for solving ODE's such as this.

In terms of density this can be written as:

$$\dot{R}^{2}=\frac{4\pi{G}}{3}\rho_{0}R$$

• Minor, but I think you're missing a factor of $1/2$ on the LHS of your second equation. – Chappers Nov 27 '15 at 13:01
• Thank you. I negelected the factor of two from $2GM$ which comes from the half on the LHS. Apologies. – Michael Roberts Nov 27 '15 at 13:03

## 1 Answer

(This integral also comes up in the brachistochrone problem, by the way.)

Rearranging it into an integrable form gives $$\frac{\sqrt{R}}{\sqrt{-2GM/C-R}} \dot{R} = \sqrt{-C},$$ so set $K=-2GM/C$. Integrating both sides, $$\int_0^R \frac{\sqrt{r}}{\sqrt{K-r}} \, dr = \sqrt{-C}t.$$ Doing the substitution $r=K(1-u^2)$, so $dr=-2Ku\, du$ the integral simplifies to $$\int_{\sqrt{1+r/K}}^1 \frac{\sqrt{K}\sqrt{1-u^2}}{\sqrt{Ku^2}} 2u K \, du = 2K \int_{\sqrt{1+r/K}}^1 \sqrt{1-u^2} \, du,$$ where I have chosen the sign for $\sqrt{1+r/K}$ that gives a positive $t$, for obvious reasons. But this is the area under the circle of radius $K$, between the vertical lines $u=0$ and $u=\sqrt{1+r/K}=:U$; some simple geometry shows that we can find this as $$\sqrt{-C}t = K \left(- U\sqrt{1-U^2}+\arccos{U} \right),$$ i.e. the difference of a sector and a triangle, and if we then make the substitution $\theta=2\arccos{U}$ (i.e. twice the angle from the horizontal axis to the radius through $(U,\sqrt{1-U^2})$), this simplifies to $$t=\frac{K}{2\sqrt{-C}}(\theta-\sin{\theta});$$ inverting the equation for $r$ then gives $$r=\frac{K}{2}(1-\cos{\theta}),$$ and you can then check that the relationships between $K,A,B,C,GM$ all work out. There's probably a nicer way to derive this with the $A$ and $B$, but this is basically how the actual calculation works.

• Hi @chappers. Many thanks for your considered response. This is a very heavy derivation. I applaud you. I was wondering, I've added the equation in a form relating to density. Could you show me the solution for that, in terms of density, time and $R$ if you know how. – Michael Roberts Nov 27 '15 at 14:29
• @Chappers, to address your last comment: using some physical reasoning, you can do the following. In the phase plane $(R,\dot{R})$, the orbit we're after is closed. I think the idea is to reparametrise time $t \to t(\theta)$ such that the orbit becomes a circle around a point $A$ through the origin, in the new, rescaled phase space $(r,\frac{\text{d}r}{\text{d} \theta})$, in such a way that it can be parametrised as $r = A(1-\cos\theta)$, $r' = A \sin \theta$. Using the circle property $r^2 + r'^2 = A^2$ and the original ODE (inverting the derivative of $t$ to $\theta$), the solution follows. – Frits Veerman Nov 27 '15 at 14:53
• @MichaelRoberts Sorry, but I'm not familiar with the terminology involved in that field. I recommend that you ask a new question, so someone else is more likely to be able to help you. – Chappers Nov 27 '15 at 14:58
• @FritsVeerman Yes, I can see how the last few lines of that derivation work, but the real trick there is deriving the parametrisation! It'd be nice to see how that bit goes, if you can sort it out and post a summary. (Although, is it obvious that $r'$ will be the same when $r=0$ again? How do we know that the orbit in phase space (rather than just real space) is closed?) – Chappers Nov 27 '15 at 15:01
• @Chappers: You're right, there is absolutely no reason to believe the orbit is closed -- it isn't, unless you compactify the phase plane to a Riemann sphere. I was thinking of Keplerian orbits, but there the underlying mechanics are slightly different -- this would just be two masses attracted towards each other. The only argument would then be that at impact (both for positive and negative time), the velocity would be infinite, so the 'orbit' of $r(t)$ would resemble a half-circle -- and go from there. My bad. – Frits Veerman Nov 27 '15 at 15:34