Solution (source code)

= Solution

Linearizing about the conductive state gives
$$
\nabla^2\psi'=-R\theta'_x,\qquad \theta'_t+\psi'_x=\nabla^2\theta'.
$$
The perturbations vanish at $z=0,1$. For a <normal mode> with vertical dependence $\sin(n\pi z)$, put $q=k^2+n^2\pi^2$. The two modal equations are $-q\widehat\psi=-ikR\widehat\theta$ and $s\widehat\theta+ik\widehat\psi=-q\widehat\theta$. Eliminating $\widehat\psi$ gives
$$
\boxed{s=\frac{k^2R}{k^2+n^2\pi^2}-(k^2+n^2\pi^2).}
$$
Neutrality requires $R=(k^2+n^2\pi^2)^2/k^2$. The <arithmetic-geometric mean inequality> bounds this below by $4n^2\pi^2$, with equality at $k=n\pi$. The first unstable vertical mode is therefore $n=1$, giving
$$
\boxed{R_c=4\pi^2,\qquad k_c=\pi,\qquad \text{horizontal wavelength}=2.}
$$
The wavelength statement applies at the first onset. At a general larger $R$, maximizing the <growth rate> within a fixed vertical mode gives $k^2=n\pi\sqrt R-n^2\pi^2$, so its preferred wavelength need not remain exactly two. This is the <onset of convection in a horizontal Darcy layer>.