Solution (source code)

= Solution

The <Jeans wavenumber> in physical coordinates is $k_J=\sqrt{4\pi G\rho}/c_s$. With wavelength defined as $2\pi/k$, the <Jeans length> is
$$
\boxed{\lambda_J=\frac{2\pi}{k_J}
=c_s\sqrt{\frac{\pi}{G\rho}}.}
$$
Pressure opposes gravitational growth on physical wavelengths shorter than this; on longer wavelengths the gravitational term wins. Expansion also provides the damping term $2H\dot\delta$, so the actual growth is not generally the exponential growth of a static medium.

For the pressure-free, spatially flat matter solution, $H=2/(3t)$ and the <Friedmann equation> gives $\rho=1/(6\pi Gt^2)$. The perturbation equation becomes
$$
\ddot\delta_k+\frac4{3t}\dot\delta_k-\frac2{3t^2}\delta_k=0.
$$
Substituting $\delta_k=t^\nu$ gives $3\nu^2+\nu-2=(3\nu-2)(\nu+1)=0$. Thus
$$
\boxed{\delta_k(t)=A_k t^{2/3}+B_k t^{-1}.}
$$
The growing mode scales as $a(t)$ and permits the formation of structure; the decaying mode becomes negligible at late times. This is a linear result, valid while the density contrast remains small.