aidoesscience
aidoesscience › Virial theorem · n=2⟨T⟩/⟨U⟩
Validating · validations

Virial theorem · n = 2⟨T⟩/⟨U⟩

Kepler's third law reads a period off an orbit. Can a SINGLE orbit read off the EXPONENT of the force law that made it — the −1 of gravity, the +2 of a spring — from nothing but its time-averaged energies?

▶ Launch the interactive simulation

How the lab tests it

Integrate a from-scratch bound orbit with velocity Verlet (symplectic, energy-conserving) around a fixed central mass, and time-average the kinetic energy ⟨T⟩ and potential energy ⟨U⟩. The virial theorem says that for a homogeneous potential U ∝ rⁿ, the pure number 2⟨T⟩/⟨U⟩ equals the exponent n — never plugged in, only T(t) and U(t) are measured. Do it for three pure power laws: gravity U=−μ/r (Kepler), a linear confining U=k·r, and an isotropic oscillator U=½k·r². Controls: (i) the INSTANTANEOUS ratio 2T/U, (ii) an eccentricity scan, (iii) a MIXED non-power-law potential. ?world=virial.

What it checks

the virial theorem (Clausius 1870): 2⟨T⟩ = ⟨r·∇U⟩ = n⟨U⟩ for U∝rⁿ, so 2⟨T⟩/⟨U⟩ recovers the potential's homogeneity degree — n=−1 for gravity (the Kepler identity 2⟨T⟩=−⟨U⟩, equivalently ⟨T⟩=−E, ⟨U⟩=2E), n=+1 for the linear, n=+2 for the harmonic, each to ≤0.02 with a slope-1 line through (n_true, n_recovered). DECISIVE CONTROL: the mean of the INSTANTANEOUS ratio ⟨2T/U⟩ MISSES n (−0.82 not −1, 3.80 not 2) — only the ratio of separately time-AVERAGED energies is the virial invariant. The recovered n is INDEPENDENT of eccentricity (−1 across e=0…0.85 — it is a property of the force law, not the orbit shape), and a MIXED potential U=−A/r+½Br² gives a non-integer, orbit-DEPENDENT ratio, so the clean integers require a pure power law. The kinetic-theory sibling of Kepler's third law and the bridge from orbits to the virial mass estimates of galaxies and clusters.

This is one world in the PHS lab — 100 interactive simulations, each posing a question and measuring the answer. See the catalogued findings.