A time-averaged bookkeeping that pins the ratio of kinetic to potential energy — from atoms to galaxies. Over a bounded orbit the running term d/dt ⟨Σ p·r⟩ averages to nothing, leaving Clausius's identity 2⟨T⟩ = −⟨Σ F·r⟩, which for a power law V ∼ rⁿ becomes ⟨T⟩ = (n/2)⟨V⟩. Rendered, not quoted.
SOURCE R. Clausius, "On a Mechanical Theorem Applicable to Heat," Phil. Mag. 40, 122–127 (1870) — he named the quantity the "virial." tandfonline / 10.1080/14786447008640370 stable DOI · natural units m=1, k=1
A point mass moves under a central force. Multiply Newton's law by r and sum: the scalar G = Σ p·r obeys dG/dt = 2T + Σ F·r, where T is kinetic energy.
For a power-law potential V(r) = c rⁿ, the radial force gives Σ F·r = −n V. Two engines run live: an inverse-square Kepler orbit (V = −1/r, n = −1) and an isotropic harmonic orbit (V = ½r², n = 2), each integrated with a symplectic velocity-Verlet step so energy does not drift.
Kinetic and potential, time-averaged — Clausius 1870. 2⟨T⟩ = −⟨Σ F·r⟩ giving ⟨T⟩ = (n/2)⟨V⟩: the bound-orbit bookkeeping that reaches from the-central-force (which supplies the conserved orbit averaged over here) outward to galaxy-mass estimates, where the same identity turns velocity dispersions into hidden mass.
A live re-check of the Kepler prediction. It recomputes ⟨T⟩ predicted from ⟨V⟩ under the current virial rule and compares it to the frozen boot value. Trip the tamper in window 6 and this badge flips red.
Two bounded orbits, natural units m=1, k=1:
Time-averaging the live trajectory. The dot traces the integrated Kepler ellipse (focus at the star); the bars accumulate the running means of T and V.
Proven, live from the integrator:
"Your averages are just ½ because you picked ½." No — the ratio is set by n, not chosen. Change the potential and the split changes: n=−1 gives ⟨T⟩=−½⟨V⟩, n=2 gives ⟨T⟩=⟨V⟩, n=1 would give ⟨T⟩=½⟨V⟩. The engine runs two different n and both land on (n/2)⟨V⟩ from independent integrations.
Force the harmonic rule onto the inverse-square case — predict ⟨T⟩=⟨V⟩ everywhere. Kepler's E=−⟨T⟩ bookkeeping then breaks; the witness in 7 catches it live.