The collapse time of a closed cavity that is initially at rest in an incompressible, inviscid fluid of density ρ and ambient pressurep∞has the form\[ t_1 = \{\rho/(p_{\infty} - p_c)\}^{\frac{1}{2}}\ell, \]wherepcis the internal pressure, which is assumed to remain constant during collapse, and [ell ] is a length that depends only on the geometry of the cavity. A variational formulation of the dynamical problem is constructed from Jacobi's statement of the principle of least action. A single-degree-of-freedom approximation is developed from the similarity hypothesis that the cavity collapses through a family of similar surfaces with volume as the generalized co-ordinate. Two-degree-of-freedom approximations are given for both prolate and oblate spheroidal cavities and are used to obtain error estimates for the similarity approximation (approximately 2% for the limiting case of a needle-like, prolate spheroid and approximately ½ % for a disk-like, oblate spheroid). A perturbation analysis is developed for an approximately spherical cavity, which is found to have the same collapse time as a spherical cavity of equal volume within a factor 1 +O(e4), whereeis a representative eccentricity. A first-order correction for surface tension is obtained.