Every cosmological distance is an integral of the inverse expansion rate over redshift. Supernova brightness and the baryon acoustic ruler therefore measure one function, the expansion rate at each redshift, and nothing else. This chapter builds that function for evolving dark energy, turns it into distances and shows why gravity's strength never enters.
Read Can the same expansion come with different gravity? first. You need exponentials, logarithms and the idea of an integral as a sum of small pieces. The aims are to derive the expansion rate of a flat universe with evolving dark energy, compute two kinds of distance by hand and read the distance chart in the Lab.
Scale factor, redshift and expansion rate
Describe the expansion by a scale factor a, equal to one today. Every comoving separation grows in proportion to a. Light emitted when the scale factor was a arrives stretched by the factor 1/a, which defines the redshift:
1+z=a1.
The expansion rate is the fractional growth of the scale factor per unit time, H=a˙/a, with present value H0. Write H0=100hkms−1Mpc−1. The distance light covers in one Hubble time, c/H0, is the natural unit of length: for h=0.68 it is 4408.7Mpc.
For a spatially flat universe the Friedmann equation ties the expansion rate to the total energy density. Divide every density by today's critical density and write Ωm for the present matter fraction. Matter is diluted by volume, so its density falls as a−3. Neglect radiation, which matters only far earlier than the redshifts used here. Then
A fluid with pressure p and density ρ loses energy as it does work on the expanding volume. Energy conservation in an expanding universe gives
dlnadlnρ=−3(1+w),w≡ρc2p.
Matter has w=0 and recovers ρ∝a−3. A cosmological constant has w=−1, and its density does not change at all. DESI and many other analyses describe evolving dark energy by a straight line in the scale factor, w(a)=w0+wa(1−a). Here w0 is today's value and wa measures how much it differed in the past. DESI DR2 BAO results, 2025
When w>−1 in the past the density was larger than today, because going back in time compresses it. When w<−1 the density grows as the universe expands, which is called phantom behaviour. The Lab uses exactly this background, with Ωm=0.31 unless you change it.
From the expansion rate to distances
A light ray moving toward us covers the comoving distance cdt/a in a short time dt. Since dz=−da/a2 and da=aHdt, that element equals cdz/H. Adding up the elements from the source to us gives the comoving distance
DM(z)=H0c∫0zE(z′)dz′.
In a flat universe this is also the transverse comoving distance. An object of comoving size r at redshift z spans the angle r/DM. A second distance measures separations along the line of sight: a small redshift interval Δz corresponds to the comoving length DHΔz, with
DH(z)=H(z)c.
Galaxy surveys measure the baryon acoustic scale rd across the sky and along the line of sight, which yields DM/rd and DH/rd. Supernovae measure the luminosity distance (1+z)DM up to an overall calibration. Every one of these numbers is built from E(z).
A check you can do exactly
In a universe of matter only, Ωm=1 and E=(1+z)3/2. The integral has a closed form:
DM(z)=H02c(1−1+z1).
At z=1 this is 0.585786c/H0. The numerical integrator behind the Lab reproduces that value to ten decimal places, which is one of the independent checks recorded with the course data.
Worked example: the same redshift in three universes
Take Ωm=0.31, h=0.68 and a cosmological constant. At z=0.5 the scale factor is 2/3, and
E2=0.31×1.53+0.69=1.73625,E=1.3177.
Numerical integration of 1/E from zero to one half gives DM=0.4395c/H0≃1938Mpc. The line-of-sight distance is DH=c/(H0E)=3346Mpc. Prescribe an acoustic scale of 147Mpc for the example. It then spans 147/1938=0.0759 radians, about 4.3 degrees on the sky.
Now let dark energy have w0=−0.9 and wa=0. Its density at z=0.5 is 1.50.3=1.129 times today's, so E=1.3511 is larger and every element of the integral is smaller. The distance falls to 0.4326c/H0, 1.6% shorter. The same ruler would look 1.6% larger.
Finally take the crossing model that resembles the DESI preference, w0=−0.752 and wa=−0.86. Today w sits above minus one; at z=0.5 it is already −1.039. The distances are shorter than the cosmological-constant case by 2.3% at z=0.5, 1.8% at z=1 and 1.0% at z=2. Shifts of a few percent spread over a range of redshift are exactly what current surveys can detect.
Why the strength of gravity never appears
Look again at the two distance formulas. They contain the expansion rate and nothing else. The response of matter to gravity, which later chapters call μ, does not enter, and neither does the bending of light.
This has a precise consequence. Differentiate the comoving distance: dDM/dz=c/H(z). If two flat models predict the same DM(z) at every redshift, they have the same H(z), and therefore the same DH and the same luminosity distance. Distances fix the expansion history completely, and the expansion history is all they fix.
A modified theory of gravity also produces some expansion history. Whatever it is, it can be written as an effective w(a) in the formula above. Cosmology codes such as hi_class use that freedom: they let you choose the background and the gravitational response as separate inputs. Zumalacárregui et al. 2017, hi_class
Lab tasks
Choose the preset Changing dark energy, Einstein gravity. Read the distance ratio to the cosmological-constant model at the probe shell, then drag the shell to z=1 and z=2. The ratio is about 0.984 at z=0.5 and stays near 0.980 beyond z=1. Explain why it stops changing once dark energy no longer dominates.
Choose Same expansion, stronger pull. The growth curves separate, yet the distance ratio stays at one at every redshift. Use the formula for DM to say why.
Drag wa while watching the tick marks on the light cone. The ticks of your universe move against the faint cosmological-constant ticks. Find a setting that shortens distances by about 2% at z=0.5.
Exercises
Show from the conservation law that w=−1 gives a constant density, and that w=−1/3 gives a density falling as a−2.
In the matter-only universe, compute DM at z=3 in units of c/H0 and in megaparsecs for h=0.68.
Explain, without integrating, why w0=−0.9 makes the distance to z=0.5 shorter than a cosmological constant does.
A colleague claims that a supernova sample and a BAO sample that agree on the expansion history together test general relativity. What do they actually test?
AnswersShow the answer
For the first exercise, dlnρ/dlna=−3(1+w) vanishes when w=−1, so ρ is constant. With w=−1/3 the slope is −2, so ρ∝a−2.
For the second, 1/4=1/2, so DM=2(1−1/2)=1 in units of c/H0. That is 4409Mpc for h=0.68.
For the third, w>−1 means the dark-energy density was larger in the past, by the factor (1+z)3(1+w) for constant w. A larger density means a larger expansion rate at every intermediate redshift, so each element dz/E of the distance integral is smaller.
For the fourth, they test whether one expansion history fits both kinds of distance, including the calibration of the ruler and the supernova brightness. They test the background, not the law of gravity. A modified theory with the same expansion history passes both. Testing gravity needs growth or lensing, which the next chapter introduces.