For an isolated smooth mass distribution with spherical symmetry, assemble each shell at radius against the Newtonian gravitational potential of its interior mass. The spherical shell theorem gives
Assume finite total mass, finite binding energy and no central point-mass self-energy, so vanishes at both endpoints. Integration by parts then gives
For example, near a regular center guarantees the central boundary condition, while finite total mass guarantees the one at infinity. A divergent central binding energy would fall outside this formula's finite-energy hypotheses.
For the discrete system use the centre of mass frame, let be the particle number, and write . The printed in the particle-count factor and the subsequent must be understood consistently as . Define
By Newton's second law, differentiation gives
Each pair contributes
Therefore the exact dynamical virial theorem is . In a stationary statistical state, or on a bounded-motion time average for which the mean vanishes, it becomes
There is no external pressure, tidal field or boundary work in this isolated point-particle derivation. For a time-averaged system, the following and gravitational radius refer to that same averaged binding energy.
Using and , virial equilibrium gives
This is the three-dimensional mean squared speed about the centre of mass. For an isotropic system each one-dimensional velocity dispersion squared is one third of it.
Set the Newtonian gravitational potential to zero at infinity and exclude each particle's own field. The local escape velocity in the instantaneous frozen potential obeys , where . Since every pair occurs twice, . Averaging over the identical particles proves the gravitational rms escape and collapse speeds relation
An actual encounter in a changing potential can exchange energy, so this is the usual local escape-speed definition, not a claim about every many-body trajectory.
Finally, dissipation-free collapse from rest at infinite separation has total energy zero. Conservation of energy at the specified binding energy therefore gives , twice the equilibrium kinetic energy at the same . Hence
This mean squared speed includes coherent infall; a local random velocity dispersion after subtracting the infall velocity need not obey that ratio.