We use a variational ansatz to derive a closed dynamics involving only the
monopole and quadrupole shape degrees of freedom of the condensate, which i
s a generalization of the work of Perez-Garcia and collaborators. Taking th
e limit of small oscillations around the equilibrium configuration, we calc
ulate the excitation energies of the low-lying even-parity states of the co
ndensate. In this limit, the diagonal and non-diagonal quadrupole degrees o
f freedom are decoupled. For the diagonal elements, our results agree exact
ly with those of Perez-Garcia and collaborators. For the non-diagonal eleme
nts we obtain analytical expressions for the excitation energies which are
valid for any trap geometry and any particle number and that agree, in the
Thomas-Fermi limit and for axially symmetric traps, with Stringari's result
s. For negative scattering lengths we show that the collapsing state is the
breathing mode, independent of the trap geometry.