Skip to main content
Sandbox Physics
Dark energy or modified gravity

How distances record the expansion

Sandbox Physics ·

In a flat universe, the comoving distance accumulates the inverse expansion rate along the light path. The Hubble distance instead uses the expansion rate at one redshift. Supernova brightness and the acoustic ruler constrain these distances after calibration. Once the expansion is fixed, the separate perturbation response to gravity does not enter either distance.

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 aa, equal to one today. The physical separation between two points at fixed comoving coordinates grows in proportion to aa. Light emitted when the scale factor was aa arrives stretched by the factor 1/a1/a, which defines the redshift:

1+z=1a.1+z=\frac{1}{a}.

The expansion rate is the fractional growth of the scale factor per unit time, H=a˙/aH=\dot a/a, with present value H0H_0. Write H0=100 h km s−1 Mpc−1H_0=100\,h\,\mathrm{km\,s^{-1}\,Mpc^{-1}}. The distance light covers in one Hubble time, c/H0c/H_0, is the natural unit of length: for h=0.68h=0.68 it is 4408.7 Mpc4408.7\,\mathrm{Mpc}.

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\Omega_{\mathrm m} for the present matter fraction. Matter is diluted by volume, so its density falls as a−3a^{-3}. Neglect radiation, which matters only far earlier than the redshifts used here. Then

E2(a)≡H2(a)H02=Ωma−3+(1−Ωm)ρDE(a)ρDE(1).E^2(a)\equiv\frac{H^2(a)}{H_0^2}=\Omega_{\mathrm m}a^{-3}+(1-\Omega_{\mathrm m})\frac{\rho_{\mathrm{DE}}(a)}{\rho_{\mathrm{DE}}(1)}.

The second term is dark energy. Flatness fixes its present weight to 1−Ωm1-\Omega_{\mathrm m}. Weinberg and White, PDG Review of Particle Physics 2025, §28.1

How the dark-energy density changes

For a fluid with pressure pp and mass density ρ\rho, the energy change in an expanding volume is the negative of its pressure times the volume change. Negative pressure reverses the sign of that work. Energy conservation in an expanding universe gives

dln⁡ρdln⁡a=−3(1+w),w≡pρc2.\frac{\mathrm d\ln\rho}{\mathrm d\ln a}=-3(1+w),\qquad w\equiv\frac{p}{\rho c^2}.

Matter has w=0w=0 and recovers ρ∝a−3\rho\propto a^{-3}. A cosmological constant has w=−1w=-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)w(a)=w_0+w_a(1-a). Here w0w_0 is today's value and waw_a measures how much it differed in the past. DESI DR2 BAO results, 2025

Integrate from today, a=1a=1, back to aa:

ln⁡ρDE(a)ρDE(1)=−3∫1a1+w0+wa(1−a′)a′ da′=−3(1+w0+wa)ln⁡a−3wa(1−a).\ln\frac{\rho_{\mathrm{DE}}(a)}{\rho_{\mathrm{DE}}(1)}=-3\int_1^a\frac{1+w_0+w_a(1-a')}{a'}\,\mathrm da'=-3(1+w_0+w_a)\ln a-3w_a(1-a).

So the dark-energy term in the expansion rate is

ρDE(a)ρDE(1)=a−3(1+w0+wa) e−3wa(1−a).\frac{\rho_{\mathrm{DE}}(a)}{\rho_{\mathrm{DE}}(1)}=a^{-3(1+w_0+w_a)}\,\mathrm e^{-3w_a(1-a)}.

During an interval with w>−1w>-1, the density decreases as the universe expands. It is higher at the earlier end of that interval. When w<−1w<-1 the density grows as the universe expands, which is called phantom behaviour. The Lab uses exactly this background, with Ωm=0.31\Omega_{\mathrm m}=0.31 unless you change it.

From the expansion rate to distances

A light ray moving toward us covers the comoving distance c dt/ac\,\mathrm dt/a in a short time dt\mathrm dt. Since dz=−da/a2\mathrm dz=-\mathrm da/a^2 and da=aH dt\mathrm da=aH\,\mathrm dt, the forward-time distance element is −c dz/H-c\,\mathrm dz/H. Redshift falls as we follow the ray toward the observer. Reversing the integration limits gives

DM(z)=cH0∫0zdz′E(z′).D_{\mathrm M}(z)=\frac{c}{H_0}\int_0^z\frac{\mathrm dz'}{E(z')}.

In a flat universe this is also the transverse comoving distance. An object of comoving size rr at redshift zz spans the angle r/DMr/D_{\mathrm M}. A second distance measures separations along the line of sight: a small redshift interval Δz\Delta z corresponds to the comoving length DH ΔzD_{\mathrm H}\,\Delta z, with

DH(z)=cH(z).D_{\mathrm H}(z)=\frac{c}{H(z)}.

Galaxy surveys measure the baryon acoustic scale rdr_{\mathrm d} across the sky and along the line of sight, which yields DM/rdD_{\mathrm M}/r_{\mathrm d} and DH/rdD_{\mathrm H}/r_{\mathrm d}. Supernovae measure the luminosity distance (1+z)DM(1+z)D_{\mathrm M} up to an overall calibration. The dimensionless background enters through E(z)E(z). The absolute distances also need H0H_0, and the BAO ratios depend on the ruler length rdr_{\mathrm d}.

A check you can do exactly

In a universe of matter only, Ωm=1\Omega_{\mathrm m}=1 and E=(1+z)3/2E=(1+z)^{3/2}. The integral has a closed form:

DM(z)=2cH0(1−11+z).D_{\mathrm M}(z)=\frac{2c}{H_0}\left(1-\frac{1}{\sqrt{1+z}}\right).

At z=1z=1 this is 0.585786 c/H00.585786\,c/H_0. 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\Omega_{\mathrm m}=0.31, h=0.68h=0.68 and a cosmological constant. At z=0.5z=0.5 the scale factor is 2/32/3, and

E2=0.31×1.53+0.69=1.73625,E=1.3177.E^2=0.31\times1.5^3+0.69=1.73625,\qquad E=1.3177.

Numerical integration of 1/E1/E from zero to one half gives DM=0.4395 c/H0≃1938 MpcD_{\mathrm M}=0.4395\,c/H_0\simeq1938\,\mathrm{Mpc}. The line-of-sight distance is DH=c/(H0E)=3346 MpcD_{\mathrm H}=c/(H_0E)=3346\,\mathrm{Mpc}. Prescribe an acoustic scale of 147 Mpc147\,\mathrm{Mpc} for the example. It then spans about 147/1938=0.0759147/1938=0.0759 radians, or 4.3 degrees on the sky in the small-angle approximation.

Now let dark energy have w0=−0.9w_0=-0.9 and wa=0w_a=0. Its density at z=0.5z=0.5 is 1.50.3=1.1291.5^{0.3}=1.129 times today's, so E=1.3511E=1.3511 is larger and every element of the integral is smaller. The distance falls to 0.4326 c/H00.4326\,c/H_0, 1.6% shorter. The same ruler would look 1.6% larger.

Finally take the crossing model that resembles the DESI preference, w0=−0.752w_0=-0.752 and wa=−0.86w_a=-0.86. Today ww sits above minus one; at z=0.5z=0.5 it is already −1.039-1.039. The distances are shorter than the cosmological-constant case by 2.3% at z=0.5z=0.5, 1.8% at z=1z=1 and 1.0% at z=2z=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 μ\mu, does not enter, and neither does the bending of light.

This has a precise consequence. Differentiate the comoving distance: dDM/dz=c/H(z)\mathrm dD_{\mathrm M}/\mathrm dz=c/H(z). If two flat models predict the same DM(z)D_{\mathrm M}(z) at every redshift, they have the same H(z)H(z), and therefore the same DHD_{\mathrm H} and the same luminosity distance. This inference assumes an exactly known, continuously sampled comoving distance in the flat model. Real surveys constrain it at finite redshifts and with uncertainties.

A modified theory of gravity also produces some expansion history. If its expansion can be represented by the flat Friedmann equation with the assumed matter density and a positive effective dark-energy density, that density defines an effective w(a)w(a). The linear form used in the Lab describes only some such histories. 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

  1. 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=1z=1 and z=2z=2. The ratio is about 0.984 at z=0.5z=0.5 and stays near 0.980 beyond z=1z=1. Explain why it stops changing once dark energy no longer dominates.
  2. Choose Same expansion, stronger pull. The growth curves separate, yet the distance ratio stays at one at every redshift. Use the formula for DMD_{\mathrm M} to say why.
  3. Drag waw_a 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.5z=0.5.

Exercises

  1. Show from the conservation law that w=−1w=-1 gives a constant density, and that w=−1/3w=-1/3 gives a density falling as a−2a^{-2}.
  2. In the matter-only universe, compute DMD_{\mathrm M} at z=3z=3 in units of c/H0c/H_0 and in megaparsecs for h=0.68h=0.68.
  3. Explain, without integrating, why w0=−0.9w_0=-0.9 makes the distance to z=0.5z=0.5 shorter than a cosmological constant does.
  4. 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?
Answers

For the first exercise, dln⁡ρ/dln⁡a=−3(1+w)\mathrm d\ln\rho/\mathrm d\ln a=-3(1+w) vanishes when w=−1w=-1, so ρ\rho is constant. With w=−1/3w=-1/3 the slope is −2-2, so ρ∝a−2\rho\propto a^{-2}.

For the second, 1/4=1/21/\sqrt{4}=1/2, so DM=2(1−1/2)=1D_{\mathrm M}=2(1-1/2)=1 in units of c/H0c/H_0. That is 4409 Mpc4409\,\mathrm{Mpc} for h=0.68h=0.68.

For the third, w>−1w>-1 means the dark-energy density was larger in the past, by the factor (1+z)3(1+w)(1+z)^{3(1+w)} for constant ww. A larger density means a larger expansion rate at every intermediate redshift, so each element dz/E\mathrm 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.

Sources

  1. Weinberg and White, PDG Review of Particle Physics 2025, §28.1
  2. DESI DR2 BAO results, 2025
  3. Zumalacárregui et al. 2017, hi_class

Keep reading

What this page links to directly

See this series on the content map →

Dark energy or modified gravity · Reading path

Distances, growth, lensing and stability

  1. ArticleCan the same expansion come with different gravity?
  2. You are hereHow distances record the expansion
  3. ArticleHow growth and lensing feel gravity
  4. ArticleModified gravity in four functions, and when it is stable
  5. ArticleRecompute the expansion and growth grid
  6. ArticleReading the DESI 2024 modified-gravity paper
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy