We investigate SU(2) gauge theory in a constant chromomagnetic field i
n three dimensions both in the continuum and on the lattice. Using a v
ariational method to stabilize the unstable modes, we evaluate the vac
uum energy density in the one-loop approximation. We compare our theor
etical results with the outcomes of the numerical simulations.