Long-wavelength undular magnetic buoyancy criterion (source code)

= Long-wavelength undular magnetic buoyancy criterion
{title2=$-\frac{d\ln\rho}{dz}<\frac{\rho g}{\gamma p}$}

At nonzero along-field wavenumber, put $q=ik_y\xi_y$, $P=\gamma p$ and $C=B^2/\mu_0$. After <pressure> minimization the energy <density> completes to $CP/(P+C)|q-\rho g\xi_z/P|^2+[Ck_y^2-g\rho'-\rho^2g^2/P]|\xi_z|^2$. Choosing the square to vanish and then taking a sufficiently small nonzero $k_y$ gives negative energy exactly when the displayed strict criterion holds somewhere. A fixed prescribed wavenumber retains the stabilizing $Ck_y^2$ tension term; the criterion asserts existence of an allowed nonzero wavenumber. The associated along-field displacement lets material drain while <magnetic flux> bends.