We investigate analytically the dynamics of a trapped, quasi-one-dimensional Bose-Einstein condensate subject to resonant and nonresonant periodic modulation of the transverse confinement. The dynamics of the condensate is described variationally through a set of coupled ordinary differential equations, and the period of the excited waves is determined analytically using a Mathieu-type analysis. For a modulation frequency equal to that of the radial confinement we show that the predicted period of the resonant wave is in agreement with the existing experimental results. Finally, we present a detailed comparison between the resonant waves and the Faraday waves that emerge outside of resonance.