---
title: "Thermalization, chemical-potential and Compton distortions"
description: "Derive the temperature, chemical-potential and Compton shapes, the energy each carries, and when an energy release leaves each one."
canonical_url: "https://sandboxphysics.com/stories/cosmic-transparency/thermalization-mu-and-y/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/cosmic-transparency/thermalization-mu-and-y/"
last_modified: "2026-11-12"
---

[How the universe became transparent](https://sandboxphysics.com/stories/cosmic-transparency/)

# Thermalization, chemical-potential and Compton distortions

Sandbox Physics · 2026-11-12

Energy added to the background light leaves one of three shapes, depending on when it arrives. Before about redshift two million, collisions rebuild a blackbody that is simply hotter. Between that and a few times ten thousand, photons are shuffled in frequency but not created, leaving a chemical-potential shape with a photon shortage at low frequency. Later still, hot electrons scatter photons upwards without settling, leaving a Compton shape. Each shape carries a fixed share of energy, so a measured amplitude converts into an energy release.

Read [Optical depth and the visibility function](https://sandboxphysics.com/stories/cosmic-transparency/optical-depth-and-the-visibility-function/) first. You will use derivatives, integration by parts and series. The aims are to derive the three shapes from small changes of a blackbody, compute how much energy and how many photons each carries, and turn a release into the amplitudes shown in the Lab.

## Occupation number and the temperature shape

Measure frequency by $x=h\nu/k_{\mathrm B}T$, where $T$ is the photon temperature at the same time. Expansion lowers $\nu$ and $T$ together, so $x$ for a given photon does not change. The number of photons per quantum state is the occupation number $n(x)$; for a blackbody

$$
n_{\mathrm{pl}}(x)=\frac{1}{\mathrm e^x-1}.
$$

Today's intensity is $I_\nu=I_0x^3n$, with $I_0=2(k_{\mathrm B}T_0)^3/(hc)^2=2.70\times10^{5}\,\mathrm{kJy\,sr^{-1}}$ for $T_0=2.7255\,\mathrm K$. One kilojansky per steradian is $10^{-23}\,\mathrm{W\,m^{-2}\,Hz^{-1}\,sr^{-1}}$, and $x=1$ is $56.8\,\mathrm{GHz}$ today.

A blackbody at a slightly higher temperature $T(1+\Theta)$ has $n_{\mathrm{pl}}(x/(1+\Theta))$. To first order in $\Theta$ the change is $-\Theta x\,\mathrm dn_{\mathrm{pl}}/\mathrm dx$, so

$$
\Delta I_\nu=I_0\,\Theta\,G(x),\qquad G(x)=\frac{x^4\mathrm e^x}{(\mathrm e^x-1)^2}.
$$

## The Compton shape from hot electrons

When electrons are much hotter than the photons, scattering gives photons a small average kick upwards in energy while keeping their number. For a blackbody hit by a small amount of such scattering, the Kompaneets equation reduces to

$$
\Delta n=\frac{y}{x^2}\frac{\mathrm d}{\mathrm dx}\left(x^4\frac{\mathrm dn_{\mathrm{pl}}}{\mathrm dx}\right).
$$

The dimensionless $y$ is the electron temperature, in units of the electron rest energy, times the scattering rate, added up over time. Carrying out the derivative gives $\Delta I_\nu=I_0\,y\,Y(x)$ with

$$
Y(x)=G(x)\left(x\coth\frac{x}{2}-4\right).
$$

$Y$ is negative below $x=3.830$ and positive above it, so the spectrum dims below $217.5\,\mathrm{GHz}$ and brightens above. In the saved [kernel checks](https://sandboxphysics.com/stories/cosmic-transparency/materials/kernel-checks.json) a finite-difference evaluation of the bracket in the Kompaneets operator, applied to the Planck function, agrees with this closed form to within $1.7\times10^{-7}$ of its peak.

## The chemical-potential shape

When photons share energy fully but cannot change their number, they settle into a Bose–Einstein spectrum, $n=1/(\mathrm e^{x+\mu}-1)$. The chemical potential $\mu$ measures the photon shortage. To first order,

$$
\Delta n=-\mu\frac{\mathrm e^x}{(\mathrm e^x-1)^2}=-\frac{\mu}{x}\,\frac{G(x)}{x^3}.
$$

This alone changes the photon number. The real spectrum has the extra energy but the original number of photons, so it also has a slightly higher temperature. Choose $\Theta$ so that the total number change vanishes. Integrals of the form $\int x^n/(\mathrm e^x-1)\,\mathrm dx$ give $\Theta=\mu/\beta$ with $\beta=3\zeta(3)/\zeta(2)=2.1923$, where $\zeta$ is the Riemann zeta function. The result is

$$
\Delta I_\nu=I_0\,\mu\,M(x),\qquad M(x)=G(x)\left(\frac{1}{\beta}-\frac{1}{x}\right).
$$

$M$ changes sign at $x=\beta$, which is $124.5\,\mathrm{GHz}$. The kernel checks also perturb the full Bose–Einstein spectrum numerically, with its temperature fixed by number conservation, and recover $M$ to within $6.6\times10^{-5}$ of the peak.

## How much energy each shape carries

Photon number is proportional to $\int x^2n\,\mathrm dx$ and energy to $\int x^3n\,\mathrm dx$. Divide each moment of the change by the same moment of the blackbody. The table lists Simpson-rule values from the kernel checks.

**Table 4.1** Fractional energy and number carried by each unit shape.

| Shape | Energy over blackbody energy | Number over blackbody number |
| --- | --- | --- |
| $G$ | $4.0000$ | $3.0000$ |
| $Y$ | $4.0000$ | $4\times10^{-9}$ |
| $M$ | $0.71395$ | $4\times10^{-5}$ |

So $\Delta\rho/\rho_\gamma=4\Theta$ for a temperature shift, $4y$ for the Compton shape and $0.714\mu$ for the chemical-potential shape. Inverting the last gives $\mu=1.4007\,\Delta\rho/\rho_\gamma$. That is the coefficient $1.401$ quoted in the literature, here recovered from the shape itself. [Chluba, 2013, section 2](https://arxiv.org/abs/1304.6120v2) The number entries for $Y$ and $M$ should be zero; what remains is the integration error.

## When each shape forms

Three processes compete. Double Compton scattering and bremsstrahlung create photons, mostly at low frequency. Compton scattering moves photons in frequency. Expansion sets the time available. Early on all three keep up and a blackbody returns. The surviving fraction of a distortion released at $z$ is

$$
\mathcal J(z)=\exp\!\left[-\left(\frac{z}{z_{\mathrm{th}}}\right)^{5/2}\right],
$$

with $z_{\mathrm{th}}=1.97\times10^{6}$ for this background, from the scaling written in CLASS v3.3.4. [CLASS v3.3.4 source](https://github.com/lesgourg/class_public/tree/v3.3.4) The model then splits the surviving energy with Chluba's least-squares fits to the full calculation, $\mathcal J_\mu=1-\exp[-((1+z)/5.8\times10^{4})^{1.88}]$ and $\mathcal J_y=[1+((1+z)/6\times10^{4})^{2.58}]^{-1}$:

$$
\mu\simeq1.401\int\mathcal J\mathcal J_\mu\frac{\mathrm d(\Delta\rho/\rho_\gamma)}{\mathrm dz}\mathrm dz,\qquad y\simeq\frac14\int\mathcal J_y\frac{\mathrm d(\Delta\rho/\rho_\gamma)}{\mathrm dz}\mathrm dz.
$$

The remaining $1-\mathcal J$ becomes a temperature shift, $\Theta=\frac14\int(1-\mathcal J)\,\mathrm d(\Delta\rho/\rho_\gamma)$. Chluba describes this split as good to about 10 to 30 per cent. [Chluba, 2013, equations 5 and 6](https://arxiv.org/abs/1304.6120v2) There is one more thing to watch. The paper states that the energy in this approximation is at most the energy released, with up to 16 per cent missing into a residual. Yet with the fits as printed, $\mathcal J_\mu+\mathcal J_y$ reaches $1.15$ near $z=5\times10^{4}$. We have not resolved this. The Lab uses the printed fits, so near that redshift its $\mu$ and $y$ together can overstate the distortion energy by up to 15 per cent. The tutorial [Comparing Saha, a three-level atom and a frozen CLASS reference](https://sandboxphysics.com/stories/cosmic-transparency/compare-recombination-codes/) compares them with the Green's functions shipped with CLASS.

## Worked example: a release at redshift 200,000

Release $\Delta\rho/\rho_\gamma=3\times10^{-5}$ centred on $z=2\times10^{5}$, about 19 years after the start in this background. There $\mathcal J=0.9967$, $\mathcal J_\mu=1.0000$ and $\mathcal J_y=0.043$. For a sharp release,

$$
\mu\simeq1.401\times3\times10^{-5}\times0.9967=4.19\times10^{-5},\qquad y\simeq\frac{3\times10^{-5}\times0.043}{4}=3.2\times10^{-7}.
$$

The model spreads the release over a width of $0.15$ in $\ln(1+z)$ and gives $\mu=4.19\times10^{-5}$ and $y=3.43\times10^{-7}$. The intensity change is $I_0\mu M$: $-5.6\,\mathrm{kJy\,sr^{-1}}$ at $60\,\mathrm{GHz}$ and $+12.1\,\mathrm{kJy\,sr^{-1}}$ at $300\,\mathrm{GHz}$, on a background of about $2\times10^{5}\,\mathrm{kJy\,sr^{-1}}$. That $\mu$ is below the FIRAS 95 per cent limit of $9\times10^{-5}$. [Fixsen and colleagues, 1996, abstract](https://arxiv.org/abs/astro-ph/9605054)

**Table 4.2** Saved model cases, each with a width of $0.15$ in $\ln(1+z)$.

| Centre redshift | Release | $\mu$ | $y$ | $\Theta$ |
| --- | --- | --- | --- | --- |
| $3\times10^{6}$ | $1\times10^{-5}$ | $1.08\times10^{-6}$ | $1.1\times10^{-10}$ | $2.31\times10^{-6}$ |
| $2\times10^{5}$ | $3\times10^{-5}$ | $4.19\times10^{-5}$ | $3.43\times10^{-7}$ | $2.63\times10^{-8}$ |
| $1.5\times10^{4}$ | $2\times10^{-5}$ | $2.20\times10^{-6}$ | $4.85\times10^{-6}$ | $2.7\times10^{-11}$ |

## Lab tasks

Open the [recombination Lab](https://sandboxphysics.com/labs/recombination-spectral-distortions/). The spectrum chart shows the residual left after refitting the temperature.

1. Start from the Bose–Einstein distortion preset and drag the release to earlier times. Predict at what redshift the residual falls to half its height, then check against Exercise 4.
2. Drag the release down to redshift 15,000. Watch the zero crossing move from $124.5$ towards $217.5\,\mathrm{GHz}$ and explain why.
3. At redshift 50,000, read $\mu$ and $y$ from the readouts and convert both back into energy with Table 4.1. Do they add to more than the release? Use the previous section to explain.

## Exercises

1. Integrate by parts to show that $\int x^3\,\Theta x(-\mathrm dn_{\mathrm{pl}}/\mathrm dx)\,\mathrm dx=4\Theta\int x^3n_{\mathrm{pl}}\,\mathrm dx$.
2. Using the Kompaneets form of $\Delta n$, show that the Compton shape keeps the photon number and adds $4y$ times the blackbody energy.
3. Show that $M$ vanishes at $x=\beta$ and convert that to a frequency today.
4. At what redshift does $\mathcal J$ fall to one half?

Answers

1. Integrating by parts, $-\int x^4\,\mathrm dn_{\mathrm{pl}}=-[x^4n_{\mathrm{pl}}]_0^\infty+4\int x^3n_{\mathrm{pl}}\,\mathrm dx$. The boundary term vanishes at both ends, leaving $4\Theta$ times the blackbody energy. The same steps with $x^2$ give $3\Theta$ for the number.
2. The number change is $y\int\mathrm d(x^4n_{\mathrm{pl}}')$, which is a boundary term and vanishes. The energy change is $y\int x\,\mathrm d(x^4n_{\mathrm{pl}}')=-y\int x^4n_{\mathrm{pl}}'\,\mathrm dx=4y\int x^3n_{\mathrm{pl}}\,\mathrm dx$, using Exercise 1.
3. The bracket $1/\beta-1/x$ vanishes at $x=\beta=2.1923$. Multiplying by $56.79\,\mathrm{GHz}$ gives $124.5\,\mathrm{GHz}$.
4. Set $(z/z_{\mathrm{th}})^{5/2}=\ln2$, so $z=z_{\mathrm{th}}(\ln2)^{2/5}=0.864z_{\mathrm{th}}\simeq1.70\times10^{6}$.

## Sources

1. [Chluba, 2013, section 2](https://arxiv.org/abs/1304.6120v2)
2. [CLASS v3.3.4 source](https://github.com/lesgourg/class_public/tree/v3.3.4)
3. [Fixsen and colleagues, 1996, abstract](https://arxiv.org/abs/astro-ph/9605054)

## Keep reading

How the universe became transparent · Reading path

### From a blackbody to limits on hidden energy

1. [Article **What can tiny departures from a perfect blackbody record?**](https://sandboxphysics.com/stories/cosmic-transparency/a-nearly-perfect-blackbody/)
2. [Article **Saha balance and the recombination bottleneck**](https://sandboxphysics.com/stories/cosmic-transparency/saha-and-the-recombination-bottleneck/)
3. [Article **Optical depth and the visibility function**](https://sandboxphysics.com/stories/cosmic-transparency/optical-depth-and-the-visibility-function/)
4. [You are here **Thermalization, chemical-potential and Compton distortions**](https://sandboxphysics.com/stories/cosmic-transparency/thermalization-mu-and-y/)
5. [Article **Comparing Saha, a three-level atom and a frozen CLASS reference**](https://sandboxphysics.com/stories/cosmic-transparency/compare-recombination-codes/)
6. [Article **How to read the decaying dark matter limits of Lucca and colleagues**](https://sandboxphysics.com/stories/cosmic-transparency/reading-energy-injection-limits/)
