Solution (source code)

= Solution

Take a fixed comoving volume, whose physical volume is $V=V_*a^3$. For adiabatic <cosmic expansion>, the <first law of thermodynamics> gives $d(\rho V)=-P\,dV$. Therefore
$$
\boxed{\dot\rho+3H(\rho+P)=0},\qquad
\frac{d\rho}{d\ln a}=-3(1+w)\rho,\qquad
\rho(a)=\rho_*a^{-3(1+w)}.
$$
Spatial curvature does not change the $a^3$ scaling of a fixed comoving volume. With $C=8\pi G\rho_*/3$ and $d=1+3w$, the <Friedmann equation> becomes
$$
(aH)^2=Ca^{-d}-k,\qquad
\Omega_k=\frac{-k}{Ca^{-d}-k},\qquad
1-\Omega_k=\frac{Ca^{-d}}{Ca^{-d}-k}.
$$
Differentiating this expression, rather than dividing by $\Omega_k$ at a fixed point, yields the <cosmological density parameter flow>
$$
\boxed{\frac{d\Omega_k}{d\ln a}=(1+3w)\Omega_k(1-\Omega_k)}.
$$
This holds on an expanding branch with $H\ne0$. The spatially flat solution $\Omega_k=0$ is a fixed point. For $|\Omega_k|\ll1$, $\Omega_k\propto a^{1+3w}$. Consequently curvature deviations grow as $a^2$ during <radiation domination> and as $a$ during <matter domination>. A small present curvature therefore requires a much smaller initial deviation: this is the <Flatness problem> of a decelerating <Big Bang>. The issue applies to either sign of curvature, not just an open universe. Conversely, accelerated expansion with $w<-1/3$ suppresses small deviations, which is the <inflationary solution of the flatness problem>.