Solution (source code)

= Solution

Set $P=\gamma p$, so $T=P+C$, and for $k_y\ne0$ put $q=ik_y\xi_y$. This variable can be chosen freely. The minimized transverse-displacement energy from part (c) has <density>
$$
C|q|^2-\frac{|\rho g\xi_z+Cq|^2}{P+C}
+(Ck_y^2-g\rho')|\xi_z|^2.
$$
Complete the square in $q$ to obtain
$$
\boxed{\frac{CP}{P+C}\left|q-\frac{\rho g}{P}\xi_z\right|^2
+\left[Ck_y^2-g\rho'-\frac{\rho^2g^2}{P}\right]|\xi_z|^2.}
$$
This identity also applies at a zero of $B$, where $C=0$ and the first square contributes nothing. If $-(\ln\rho)'\ge\rho g/P$ everywhere, every term is nonnegative, including the <pressure> and transverse-tension terms removed earlier. Thus no nonzero along-field wavenumber gives an unstable trial.

For the converse, suppose the strict reverse inequality holds at an interior point. On a sufficiently small closed interval around it, $-g\rho'-\rho^2g^2/P$ is uniformly negative and $C$ is bounded. Choose a sufficiently small but nonzero $|k_y|$ so that addition of $Ck_y^2$ keeps it negative there. Choose a smooth supported $\xi_z$ in that interval and set $q=\rho g\xi_z/P$, making the first square vanish. This determines a finite $\xi_y=q/(ik_y)$. Finally choose $\xi_x$ by part (c) with sufficiently large finite $|k_x|$; its remaining tension energy can be made smaller than the strict negative margin. All displacements vanish near the boundaries. The full energy is therefore negative.

We have proved the <long-wavelength undular magnetic buoyancy criterion>:
$$
\boxed{\text{instability for some }k_y\ne0\quad\Longleftrightarrow\quad
-\frac{d\ln\rho}{dz}<\frac{\rho g}{\gamma p}\text{ somewhere}.}
$$
Under the assumed absence of interchange instability, the new unstable range is $\rho g/(\gamma p+C)\le-(\ln\rho)'<\rho g/(\gamma p)$. Along-field motion allows material to drain and removes <magnetic pressure> from the limiting buoyancy stiffness, while tension at nonzero $k_y$ remains stabilizing. The statement is about existence of an allowed nonzero wavenumber; a fixed prescribed $k_y$ retains the term $Ck_y^2$, and a finite imposed periodic length could exclude the required long wavelengths.