  We derive the Layzer-Irvine equation in the presence of a homogeneous (or
quasi-homogeneous) dark energy component with an arbitrary equation of state.
We extend the Layzer-Irvine equation to homogeneous and isotropic universes
with an arbitrary number of dimensions and obtain the corresponding virial
relation for sufficiently relaxed objects. We find analogous equations
describing the dynamics of cosmic string loops and other p-branes of arbitrary
dimensionality, discussing the corresponding relativistic and non-relativistic
limits. Finally, we generalize the Layzer-Irvine equation to account for a
non-minimal interaction between dark matter and dark energy, discussing its
practical use as a signature of such an interaction.
