  We propose, using the example of the O(4) sigma model, a general method for
solving integrable two dimensional relativistic sigma models in a finite size
periodic box. Our starting point is the so-called Y-system, which is equivalent
to the thermodynamic Bethe ansatz equations of Yang and Yang. It is derived
from the Zamolodchikov scattering theory in the cross channel, for virtual
particles along the non-compact direction of the space-time cylinder. The
method is based on the integrable Hirota dynamics that follows from the
Y-system. The outcome is a nonlinear integral equation for a single complex
function, valid for an arbitrary quantum state and accompanied by the finite
size analogue of Bethe equations. It is close in spirit to the Destri-deVega
(DdV) equation. We present the numerical data for the energy of various states
as a function of the size, and derive the general Luscher-type formulas for the
finite size corrections. We also re-derive by our method the DdV equation for
the SU(2) chiral Gross-Neveu model.
