Einstein–Boltzmann Evolution
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal additional columns.
Scrollable figure. Use Left and Right arrow keys to inspect hidden content.
Linear cosmological observables are obtained by evolving gravity, fluids, and particle phase-space distributions as one constrained system. The Einstein equations determine the metric potentials from stress–energy moments; the Boltzmann equation transports each distribution and generates those moments. This page derives the hierarchy, explains its controlled approximations, and gives a small reproducible closure test. It does not substitute that test for a production Boltzmann code. The displayed equations treat linear scalar modes on a spatially flat FLRW background; vector and tensor hierarchies, second-order sources, and nonlinear evolution lie outside the scope of this page.
Helpful background. The Einstein equation and relativistic matter introduce the constraints and stress–energy sources. Formulations of general relativity explains gauge and constraint monitoring; the cosmology overview locates the background history; and PDEs and Green functions provides Fourier and evolution methods. The coupled gravitational equations are derived in Linearized Einstein and Conservation Equations.
From phase space to moments
Section titled “From phase space to moments”Use Newtonian gauge,
and the Fourier convention . For a species with comoving momentum magnitude , direction , and , write . The first-order kinetic equation is
where the geodesic equation supplies the gravitational redshift terms and the right side is the collision operator. The exact phase-space derivative also contains . It does not contribute at this order because is isotropic and the change of direction is already first order. For a massless, collisionless species, integrate over and define a brightness perturbation by
In this convention it obeys
Expand its angular dependence as
Orthogonality of the Legendre polynomials and then turn one transport equation into neighboring moment equations. With the Ma–Bertschinger normalization,
and
Here is particle anisotropic shear, not the metric used earlier in the chapter. For a massless neutrino species, ; a massive species retains the dependence instead of closing on one momentum-integrated hierarchy. Ma and Bertschinger derive the phase-space equation in Ma and Bertschinger 1995, §5.1, printed pp. 14–16, eqs. (33)–(41) (Open PDF) and the massless-neutrino normalization and hierarchy in Ma and Bertschinger 1995, §5.3, printed pp. 17–18, eqs. (44)–(51) (Open PDF).
Photons, baryons, dark matter, and gravity
Section titled “Photons, baryons, dark matter, and gravity”Photons have the same free-streaming left side, but Thomson scattering couples their intensity and polarization multipoles to electrons. Define the positive conformal opacity
Here is the physical free-electron number density, so is a conformal-time scattering rate. Suppressing the polarization hierarchy only to display the low moments, define for a linear blackbody temperature perturbation. Then
The Newtonian-gauge density and velocity equations are
The photon quadrupole is not simply damped at the rate : Thomson scattering mixes it with the linear-polarization brightness multipoles . In the same normalization,
The hierarchy must be evolved alongside these equations; the quadrupole source shows why an intensity-only hierarchy is not a closed model of CMB polarization.
The opposite photon and baryon drag terms conserve total momentum. To see the cancellation, multiply the photon velocity equation by and the baryon velocity equation by : their collision terms are equal and opposite. A complete calculation also evolves photon polarization, free-streaming neutrinos, massive-species momentum bins, ionization and baryon temperature, and any declared interactions. The total density, momentum, pressure, and anisotropic stress moments feed the Einstein constraints and evolution equations from the preceding page, closing the system. Initial amplitudes must satisfy those constraints and correspond to a declared adiabatic or isocurvature basis. The displayed baryon closure treats baryons and electrons as one nonrelativistic fluid, retains the scalar pressure perturbation , and neglects baryon anisotropic stress.
The cold-dark-matter limit is derived in Ma and Bertschinger 1995, §5.2, printed p. 16, eqs. (42)–(43) (Open PDF).
The full photon–baryon hierarchy and collision terms are given in Ma and Bertschinger 1995, §§5.5–5.7, printed pp. 21–25, eqs. (61)–(75) (Open PDF).
Tight coupling, stiffness, and closure
Section titled “Tight coupling, stiffness, and closure”Before recombination, . The direct equations are stiff: an explicit or otherwise nonstiff solver must resolve the short collision time for stability, even though the desired mode evolves much more slowly. An implicit stiff integrator can avoid that stability restriction, while a tight-coupling expansion instead evolves the common photon–baryon motion and expands the slip and photon quadrupole in and . It is an asymptotic regime, not an identity: switching to the explicit hierarchy must occur where both descriptions overlap, and observables must be stable when the switch threshold and approximation order are varied.
Free streaming creates an infinite angular hierarchy. At , simply setting reflects power back toward low multipoles. For a source-free spherical-Bessel stream, , the exact recurrence suggests
This is far better than a hard wall in that benchmark, but time-dependent metric sources and a small make it only an approximation. Production solvers combine controlled tight-coupling, fluid, streaming, and stiff-integration regimes. Blas, Lesgourgues, and Tram give the full tight-coupling equations and switch comparisons in Blas, Lesgourgues, and Tram 2011, §2.1, printed pp. 4–5, and §§2.5–2.7, pp. 9–13 (Open PDF), the ultra-relativistic-fluid and radiation-streaming approximations in Blas, Lesgourgues, and Tram 2011, §3, pp. 13–19, and §4, pp. 19–25 (Open PDF), and the stiff integrator and hierarchy derivation in Blas, Lesgourgues, and Tram 2011, Appendices A–B, pp. 28–34 (Open PDF).
For current physical context, the Particle Data Group summarizes production CMB codes in Scott and Smoot 2026, §29.5, printed p. 6 (official PDF) and the driven photon–baryon acoustic picture in Scott and Smoot 2026, §29.5.2, printed pp. 7–8 (official PDF).
A reproducible closure benchmark
Section titled “A reproducible closure benchmark”The repository benchmark uses deterministic binary64 RK4 under Node.js 24.18.0 on Darwin arm64. It uses the JavaScript standard library only, with no external packages or dependencies. Its first case takes the zero-baryon-loading tight-coupling limit, sets the metric forcing to zero, and uses . It therefore solves the deliberately stripped acoustic equation
with , , , , and . Since in the source-free moment normalization, the initial dipole is . The tabulated final-state error is
Five refinements give:
| Steps | State error | Maximum invariant error | Observed order |
|---|---|---|---|
| 24 | — | ||
| 48 | |||
| 96 | |||
| 192 | |||
| 384 |
The state error converges at fourth order. The independently monitored invariant is
and the table reports over accepted time steps, including the finest-grid value.
The second case evolves the source-free hierarchy from to with , , and exact . Here the reported norm is , not a full-hierarchy norm:
| Steps | Hard-cutoff | Recurrence | Recurrence order |
|---|---|---|---|
| 32 | — | ||
| 64 | |||
| 128 | |||
| 256 | |||
| 512 |
The recurrence error again approaches fourth order. The hard closure instead plateaus: its finest monopole–dipole polar amplitude is times the exact value and its polar-angle error is rad. The recurrence gives amplitude ratio and angle error rad.
Download the MIT-licensed standard-library benchmark, then reproduce the calculation with the standalone download-and-run recipe:
curl -fL https://blackhole.org/code/cosmology/cosmology-benchmarks.mjs -o cosmology-benchmarks.mjsnode cosmology-benchmarks.mjs --case boltzmannThese are unit tests for integration order, normalization, an invariant, and closure reflection. They contain no recombination history, metric feedback, polarization, massive particles, or observable spectra. No CLASS executable or current source release was run here. CLASS I documents the module pipeline and its input and precision files in Lesgourgues 2011, §3.4, printed pp. 13–14 (Open PDF). The cited CLASS method papers support the discussion; any future numerical comparison must additionally pin and retain the exact code commit, input and precision files, gauge and output settings, compiler environment, and executable or source hash. Any larger executable system must retain that complete record together with its convergence and truncation checks.
The principal failure modes are inconsistent gauge normalization or initial constraints, stiff drag outside tight coupling, a switch made without an overlap test, too small , closure reflection, phase error, and mistaking this solution-matched boundary test for evidence about a sourced production hierarchy. Recombination, metric forcing, arbitrary angular initial data, and transfer functions require independent sensitivity and convergence tests.
Exercises
Section titled “Exercises”Starting from the source-free transport equation , derive the moment hierarchy and show why solves it.
Solution
Insert the Legendre series and use
Projecting onto gives
For , the spherical-Bessel derivative identity
makes the right side equal to . Thus the stream solves every member of the infinite hierarchy. Truncating it with violates the recurrence unless that omitted multipole happens to vanish, explaining the reflected error.
References
Section titled “References”- Blas, D., J. Lesgourgues, and T. Tram, “The Cosmic Linear Anisotropy Solving System (CLASS) II: Approximation Schemes,” Journal of Cosmology and Astroparticle Physics 2011(07), 034 (2011), DOI, Open PDF.
- Lesgourgues, J., “The Cosmic Linear Anisotropy Solving System (CLASS) I: Overview,” arXiv:1104.2932v2 (2011), Open PDF.
- Ma, C.-P., and E. Bertschinger, “Cosmological Perturbation Theory in the Synchronous and Conformal Newtonian Gauges,” The Astrophysical Journal 455, 7–25 (1995), DOI, Open PDF.
- Scott, D., and G. F. Smoot, “Cosmic Microwave Background,” in F. Takahashi et al. (Particle Data Group), Review of Particle Physics, International Journal of Modern Physics A 41, 2630011 (2026), Official PDF.