The lattice Boltzmann equation has been used successfully used to simulate
nearly incompressible flows using an isothermal equation of state, but
much less work has been done to determine stable implementations for other
equations of state. The commonly used nine velocity lattice Boltzmann
equation supports three non-hydrodynamic or "ghost'' modes in addition to
the macroscopic density, momentum, and stress modes. The equilibrium value
of one non-hydrodynamic mode is not constrained by the continuum equations
at Navier-Stokes order in the Chapman-Enskog expansion. Instead, we show
that it must be chosen to eliminate a high wavenumber instability. For
general barotropic equations of state the resulting stable equilibria do
not coincide with a truncated expansion in Hermite polynomials, and need
not be positive or even sign-definite as one would expect from arguments
based on entropy extremisation. An alternative approach tries to suppress
the instability by enhancing the damping the non-hydrodynamic modes using
a collision operator with multiple relaxation times instead of the common
single relaxation time BGK collision operator. However, the resulting
scheme fails to converge to the correct incompressible limit if the
non-hydrodynamic relaxation times are fixed in lattice units. Instead we
show that they must scale with the Mach number in the same way as the
stress relaxation time.