# How to calculate the derivative of scale factor as a function of conformal time from the solution of Friedmann equation

For the flat geometry of lamda CDM model, the solution for Friedmann equation is

$$a(t) = \left\{ \frac{Ω_{m,0}}{Ω_{Λ,0}} \sinh^2 \left[\frac{3}{2} \sqrt{Ω_{Λ,0}} H_0(t - t_0)\right] \right\}^{1/3},$$

here the scale factor $$a$$ is a function of cosmic time, at today $$a(t) = 1$$, t = 13.7 GY, $$\eta = 47.7$$ GY and the expression for $$t_0$$ is given by: $$t_0 = \frac{2}{3 H_0 \sqrt{Ω_{Λ,0}}} \sinh^{-1}\sqrt{\frac{Ω_{m,0}}{Ω_{Λ,0}}}.$$ How can I get the derivative of scale factor, $$a$$ as a function of conformal time, i.e., how can I numerically calculate $$\dot a(\eta)$$ from the above expression? The relation between scale factor $$a$$ and conformal time $$\eta$$ is given by, $$\eta(t)=\int\frac{dt}{a(t)}.$$

Edit 1: For lamda CDM model the Friedmann equation can be written as, $$\frac{da(t)}{dt} = H_0 a(t) \sqrt{\frac{\Omega_{m,0}}{a(t)^3} + \Omega_{Λ,0}}$$ and the conformal time can be written as $$\frac{d\eta}{dt} = \frac{1}{a(t)}$$.

• What is that $t_0$ supposed to represent, and how did you get that expression for it? It should be zero. – G. Smith Mar 20 at 0:46
• Conformal time is not measured in light-years. A light-year is a unit of distance. – G. Smith Mar 20 at 0:55
• In the equation of $t_0$ you can consider $\Omega_{\Lambda,0}=0.7$, $\Omega_{m,0}=0.3$ and $H_0 = 0.067$ per GY. Sorry, the unit of conformal time will be GY. @G. Smith and I have found the expression of $t_0$ from this book [amazon.com/… – Photon Mar 20 at 1:01
• Actually, I want to integrate from today to big bang. So, do I need to use the expression of $t_0$ here? @G. Smith – Photon Mar 20 at 1:04
• I have edited my question (please see the Edit: 1 segment). Is it possible to find $\dot a(\eta)$ numerically from that equations without the expression of $t_0$? @G. Smith – Photon Mar 20 at 1:17

You've asked how to do it numerically because, as we've already discussed in your previous question, there is no analytic formula for $$a(\eta)$$.

The numeric approach just uses numerical differentiation. Basically you just approximate the derivative as $$\Delta a/\Delta\eta$$ using a small finite interval.

Using your numbers for the constants, we have

$$a=0.753947\sinh^{2/3}{(0.0840843\,t)}$$

where $$t$$ is gigayears since the Big Bang. (You've already agreed that $$t_0$$ should be 0, not what you wrote.)

To get the conformal time $$\eta$$ corresponding to any cosmological time $$t$$, numerically integrate $$1/a$$ from 0 to $$t$$. I use the $$\mathbf{NIntegrate}$$ function in Mathematica to do this.

Pick some coordinate time, say $$t_1=10$$. Calculate the scale factor at this time, $$a_1=0.725268$$, and the corresponding conformal time, $$\eta_1=44.1803$$.

Now calculate the scale factor and conformal time at a slightly later cosmological time, say $$t_2=10.01$$. You get $$a_2=0.725860$$ and $$\eta_2=44.1941$$.

Now calculate $$\Delta a=a_2-a_1=0.000592479$$ and $$\Delta\eta=\eta_2-\eta_1=0.0137824$$.

Divide them to get $$\Delta a/\Delta\eta=0.0429882$$ when $$\eta=44.1803$$. This should be a good approximation to the derivative $$da/d\eta$$ at that conformal time. You can try a smaller time interval; it shouldn't change much. If you use too small a time interval, you may need to use a program that can do high-precision arithmetic because you will be subtracting numbers that are almost equal.

Repeat for lots of other cosmological times, and you will have plenty of points to plot $$da/d\eta$$ vs. $$\eta$$. For example, I made this plot by doing this for cosmological times between 0 and 15, in steps of 0.1, using 0.01 as the finite time interval for approximating the derivative. The horizontal axis is $$\eta$$ and the vertical axis is $$da/d\eta$$.

The fact that $$da/d\eta$$ isn't quite zero at $$\eta=0$$, as it should be, is because of the numerical approximation. It would probably be closer to zero if I used a smaller time interval and high-precision arithmetic.

There are fancier ways to do numerical differentiation, which you can read about in the Wikipedia article. The approach I’ve described is the simplest version.

Using the analytic formulas I provided in the previous question would also let you parametrically plot this very accurately, without having a formula for $$a(\eta)$$.