Slowly tighten the spring under a swinging mass and both its energy and its frequency climb. Is ANYTHING conserved — and is it the same quantity Bohr quantized?
▶ Launch the interactive simulationIntegrate a from-scratch 1-D oscillator H = ½p² + ½k(t)x² (unit mass, ω=√k) with velocity Verlet (symplectic), and SLOWLY ramp the stiffness k from k₀=1 to k₁=4. Read the action J = E/ω — equivalently the phase-space area (1/2π)∮p dq — straight off the trajectory's energy and frequency, and track the ratio R = J_final/J_initial. Compare four ways of changing the well: a slow linear ramp, a scan of ramp durations τ, an instantaneous SUDDEN step, and a smooth ramp; plus a geometric shoelace measurement of the enclosed phase-space area and a slow up-then-down round trip. ?world=adiabatic.
the adiabatic invariance of the action (Ehrenfest 1916): J = (1/2π)∮p dq is conserved to all orders in the slowness when the potential is changed slowly, even though E and ω individually change. SLOW RAMP: R = J_final/J_initial = 1.000 to ≤5e-4 — while the energy RISES by the full frequency ratio E_final/E_initial = √(k₁/k₀) = 2.0 (the oscillator gains energy as the well tightens), so the conserved quantity is manifestly NOT the energy but the phase-space AREA. PERTURBATION: |R−1| falls monotonically with the ramp duration τ as a clean power law ~τ⁻² (the slowest ramp is >1000× more invariant than the fastest) — slower ⇒ more adiabatic. DECISIVE CONTROL: an instantaneous SUDDEN step of the same endpoints does NOT conserve J — phase-averaged R = (k₀+k₁)/(2k₀)/√(k₁/k₀) = 1.25 ≠ 1, a deviation 10⁵× the slow ramp's — so slowness is essential, not incidental. GEOMETRIC: the action read as the shoelace phase-space area ∮p dx/2π equals E/ω to 2e-8 — the invariant IS the enclosed area, exactly the ∮p dq that Bohr and Sommerfeld quantized (∮p dq = nh), which is why quantum numbers survive slow perturbations (the quantum adiabatic theorem). The classical-mechanics bridge from the oscillator (?world=resonance, ?world=coupled) and the virial theorem (?world=virial) to old quantum theory (?world=qwell, ?world=hydrogen); R=1 is never plugged in — only E(t), ω(t) are measured.