Solution (source code)

= Solution

For <adiabatic initial conditions>, the coupled <photon-baryon fluid> begins with a coherent displacement and approximately zero initial acoustic velocity. Neglecting slowly varying gravitational driving, its effective temperature satisfies an oscillator equation with phase $kr_s$, where
$$
c_s^2=\frac1{3(1+R)},\qquad R=\frac{3\rho_b}{4\rho_\gamma},\qquad r_s(\tau_*)=\int_0^{\tau_*}c_s\,d\tau.
$$
Thus the <Sachs-Wolfe combination> has a dominant cosine phase, while the velocity has a sine phase. At last scattering, the first three temperature <Cosmic microwave background acoustic peaks> correspond approximately to $kr_s=\pi,2\pi,3\pi$: first compression, first rarefaction, and second compression of the initially displaced plasma in a potential well. Baryon inertia shifts the oscillator's equilibrium and enhances compressions relative to rarefactions, producing the familiar odd/even peak contrast. Potential decay and radiation driving alter the amplitudes, especially of the earliest peaks.

Adjacent displacement extrema differ by $\pi$, so
$$
\boxed{\Delta k=\frac\pi{r_s},\qquad
\Delta\ell\simeq\frac{\pi D_M(\tau_*)}{r_s(\tau_*)}=\frac\pi{\theta_s},\qquad
\theta_s=\frac{r_s}{D_M}.}
$$
Here $D_M$ is the transverse <comoving distance> to last scattering; in a flat model it is $\tau_0-\tau_*$. If $c_s$ is treated as constant, this reduces to $\Delta\ell\simeq\pi(\tau_0-\tau_*)/(c_s\tau_*)$. No numerical spacing is determined without a cosmological distance and sound horizon. Gravitational phase shifts, baryon loading and projection displace the exact peak locations from integer multiples of this spacing. These are primarily coherent density-plus-potential acoustic peaks; the label “Doppler peaks” does not mean the velocity term alone creates their sequence.