Kepler's third law reads a period off an orbit. Can a SINGLE bound orbit read off the EXPONENT of the force law that made it — the −1 of gravity, the +1 of a linear pull, the +2 of a spring — from nothing but its time-averaged kinetic and potential energies?
Units: dimensionless (n = homogeneity/scaling degree of U(r) ∝ rⁿ: gravity/Kepler −1, linear +1, harmonic +2; 2⟨T⟩/⟨U⟩ is a ratio of energies, independent of mass, coupling, and orbit size)
▶ Run this simulationRead how it works
The virial theorem reads a force law's exponent off a single orbit: for U ∝ rⁿ the pure number 2⟨T⟩/⟨U⟩ equals n — recovered from a from-scratch symplectic orbit as −1.00000 for gravity (Kepler, 2⟨T⟩=−⟨U⟩), +0.9999 for a linear confining potential, +2.0000 for a harmonic spring (a slope-1 line through n_true vs n_recovered), with n NEVER plugged in. 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 invariant; the recovered n is eccentricity-INDEPENDENT (−1 across e=0…0.85), and a mixed non-power-law potential gives a non-integer, orbit-dependent ratio, so the clean integers require a pure power law (Clausius 1870)
Integrate a from-scratch central-force orbit around a fixed mass with velocity Verlet (symplectic, so total energy stays bounded over hundreds of orbits — the property that makes time-averages trustworthy). Launch from perihelion (position (r_min,0), velocity (0,v_peri), so the virial G=m·r·v starts at 0) and time-average the kinetic energy ⟨T⟩=⟨½v²⟩ and potential energy ⟨U⟩ over 300 orbits. The virial theorem predicts that for a homogeneous potential U ∝ rⁿ the pure number 2⟨T⟩/⟨U⟩ equals the exponent n. Measure it for three pure power laws — gravity U=−μ/r (n=−1, Kepler), linear U=k·r (n=+1), harmonic U=½k·r² (n=+2) — and fit a line through (n_true, n_recovered). Four controls: (A) the Kepler orbit-average identity 2⟨T⟩+⟨U⟩=0; (B) the INSTANTANEOUS pointwise ratio ⟨2T/U⟩, which is NOT the virial combination; (C) an eccentricity scan e=0…0.85; (D) a MIXED non-power-law potential U=−A/r+½Br². The integers n_true are loaded from the reference ONLY to score; the recovery sees only the trajectory's T(t) and U(t).
virial theorem 2⟨T⟩ = ⟨r·∇U⟩ = n⟨U⟩ for U∝rⁿ (Euler homogeneity); for gravity n=−1 ⇒ 2⟨T⟩=−⟨U⟩, and the orbit-averaged energies are ⟨T⟩=−E, ⟨U⟩=2E over a Kepler period
-1
2.6000e-6
0.99989
2
1
| Kind | N true | N recovered | Abs error |
|---|---|---|---|
| gravity | -1 | -1 | 2.6000e-6 |
| linear | 1 | 0.99989 | 0.00011 |
| harmonic | 2 | 2 | 9.6000e-8 |
| E | N recovered |
|---|---|
| 0 | -1 |
| 0.3 | -1 |
| 0.6 | -1 |
| 0.85 | -0.9997 |
1.1000e-6
recovered n = 2⟨T⟩/⟨U⟩ from the symplectic orbit; the true homogeneity degree is loaded from the reference only to score. All 16 derisk gates pass.
The virial theorem of Clausius (1870): for a bound orbit the virial G = Σpᵢ·rᵢ is bounded, so ⟨dG/dt⟩→0, and since dG/dt = 2T − r·∇U this gives 2⟨T⟩ = ⟨r·∇U⟩; for a homogeneous potential U∝rⁿ, Euler's theorem makes r·∇U = n·U, so 2⟨T⟩ = n⟨U⟩ and n = 2⟨T⟩/⟨U⟩. This world VALIDATES, not derives: it assumes only Newtonian dynamics (F=−∇U integrated symplectically) and recovers the potential's scaling exponent as a pure number from two time-averaged energies, with n never entering the recovery. It is non-circular on several fronts — the recovery reads only T(t),U(t); it succeeds for three independent power laws with a slope-1 fit (the perturbation prediction that the exponent tracks the force law); it is eccentricity-independent (a force-law property, not an orbit-shape coincidence); the instantaneous-ratio control shows the naive pointwise average FAILS, isolating the virial combination as the actual invariant; and the mixed-potential control shows the clean integers demand a pure power law. It is DISTINCT from ?world=kepler (which recovers the third-law scaling T²∝a³ between DIFFERENT orbits): the virial theorem is a statement about the time-average of a SINGLE orbit, and its gravitational case 2⟨T⟩=−⟨U⟩ is the foundation of the virial mass estimates that first revealed dark matter (Zwicky 1933, the Coma cluster) — a galaxy cluster's total mass is read from the time-averaged kinetic and potential energies of its members exactly as this orbit's exponent is. It does not treat self-gravitating N-body relaxation, non-closed relativistic orbits, or quantum expectation-value virials; it establishes the classical virial invariant on the cleanest possible system. The lab's first virial-theorem world.
npm run derisk -- virial (scripts/virial-derisk.mjs)scripts/oracles/virial.reference.jsonR. Clausius, 'Über einen auf die Wärme anwendbaren mechanischen Satz', Ann. Phys. 217, 124 (1870) — the virial theorem. H. Goldstein, C. Poole, J. Safko, 'Classical Mechanics' 3rd ed. §3.4. L. D. Landau & E. M. Lifshitz, 'Mechanics' §15 (2⟨T⟩=−⟨U⟩ for the Kepler problem). F. Zwicky, Helv. Phys. Acta 6, 110 (1933) — the virial mass of the Coma cluster. Reference exponents: n_gravity=−1, n_linear=+1, n_harmonic=+2.