  We consider two regimes where a trapped Bose gas behaves as a one-dimensional
system. In the first one the Bose gas is microscopically described by 3D mean
field theory, but the trap is so elongated that it behaves as a 1D gas with
respect to low frequency collective modes. In the second regime we assume that
the 1D gas is truly 1D and that it is properly described by the Lieb-Liniger
model. In both regimes we find the frequency of the lowest compressional mode
by solving the hydrodynamic equations. This is done by making use of a method
which allows to find analytical or quasi-analytical solutions of these
equations for a large class of models approaching very closely the actual
equation of state of the Bose gas. We find an excellent agreement with the
recent results of Menotti and Stringari obtained from a sum rule approach.
