Everyone 'knows' a driven oscillator resonates at its natural frequency — but where does the displacement-amplitude peak of ẍ + γẋ + ω₀²x = f₀cos(ωt) actually sit, what tracks the damping law ω_r = √(ω₀² − γ²/2), and which observables (phase lag, velocity amplitude) mark ω₀ itself independent of damping?
Units: dimensionless (ω_r/ω₀ at Q = ω₀/γ = 4; exactly √(1 − γ²/(2ω₀²)) = √(31/32))
▶ Run this simulationRead how it works
The driven oscillator does NOT resonate at its natural frequency: a raw RK4 of ẍ = −ω₀²x − γẋ + f₀cos(ωt+ψ) with a lock-in readout — no Lorentzian, no ω_r = √(ω₀²−γ²/2), no A(ω)/φ(ω) closed form in the recovery path — returns the displacement-peak downshift as the fully internal ratio ω̂_r/ω̂₀ = 0.984250983957 ± 3.8e-11 vs the exact √(31/32) = 0.984250984251 at Q = 4 (rel 3.0e-10, 12 seeds), tracks ω_r² = ω₀² − γ²/2 across Q = 10 → 1 to ≤ 3.0e-10 with the law's slope fitted at −0.4999999997, while the two damping-INDEPENDENT markers sit exactly at ω₀ — the φ = π/2 phase crossing to 6e-11 for every γ and the velocity-amplitude peak to 3.1e-10 even at Q = 1 where the displacement peak is 29% below; the naive rival 'the peak sits at the natural frequency' is off by 41.4% at Q = 1 while the same peak-finder recovers the velocity peak AT ω₀ to 3.1e-10, and under 2% measurement noise the cubic-vertex ensemble lands 0.84 SE from the known
Generator = the module's verbatim dynamics: RK4 of ẍ = −ω₀²x − γẋ + f₀cos(ωt+ψ) (ResonanceModule._integrate; ω₀ = 2, γ = 0.5, Q = 4, m = 1). Readout = the module's lock-in: settle 80 s (e^(−γt/2) ⇒ transient ~2e-9), then quadratures ∫x·cos(ωt+ψ) and ∫x·sin(ωt+ψ) over 32 EXACT drive periods — dt is snapped so one period is an integer number of RK4 steps, making the Riemann quadrature of the periodic steady state spectrally accurate (without the snap, fractional-period leftover injects ~1e-5 A(ω) jitter that buries every estimator: the headline degrades 2e-10 → 2e-6). Estimators: peak located as the bisected ZERO OF THE CENTRAL-DIFFERENCE DERIVATIVE of measured A(ω) at h = 0.08, 0.04, 0.02, double-Richardson-extrapolated (defeats the Lorentzian's flat top + skew; a bare quadratic vertex is biased −6.5e-4 even in a ±0.06 window); ω̂₀ = bisection of measured φ(ω) − π/2; headline = ω̂_r/ω̂₀, both frequencies measured, nothing external enters. √(1−γ²/(2ω₀²)) appears ONLY in the scorer (scripts/oracles/resonance.reference.json). Gates: (A) 12-seed headline (random drive phase, random x₀,v₀ ∈ [−2,2]) rel < 5e-9, SE < 1e-9; (B) 2% Gaussian measurement noise, 12 seeds, 9-point ±0.06 grid, CUBIC vertex (skew-absorbing), rel < 2e-4; (C) γ-sweep {0.2 … 2.0} vs √(1−γ²/8) point by point rel < 3e-9; (D) LS fit ω̂_r² vs γ²: slope −1/2 rel < 5e-9, intercept ω₀² rel < 3e-9; (E) φ = π/2 crossing at ω₀ for EVERY γ, max |ω̂₀−ω₀| < 1e-9; (F) velocity peak AT ω₀ at γ = 0.5 and 2.0, < 5e-9; (G) A_max vs f₀/(γ√(ω₀²−γ²/4)) rel < 1e-8; (H) half-power width vs closed form rel < 1e-8; (I) rival 'peak at ω₀' off ≥ 25% at Q = 1 with the velocity control < 1e-6; (J) mesh: A_max dt-halving error ratio ≥ 8 (RK4); (K) steady-state power balance ⟨f₀cosωt·ẋ⟩ = ⟨γẋ²⟩ rel < 1e-8; (L) module mirror pins the four on-screen numbers; (M) tamper self-test.
Displacement resonance of ẍ + γẋ + ω₀²x = f₀cos(ωt) peaks at ω_r = √(ω₀² − γ²/2) = ω₀√(1 − 1/(2Q²)) with height f₀/(γ√(ω₀²−γ²/4)); the phase lag crosses π/2 exactly at ω₀ and the velocity amplitude peaks exactly at ω₀, both for every damping (L&L Mechanics §26; French ch. 4).
3.8000e-11
18/18 pass in 16.4 s (science gates A–M + module-honesty certificate N–R); tamper ⇒ exit 1 with the recovery unchanged
The textbook driven-damped-oscillator response (Landau & Lifshitz Mechanics §26; French, Vibrations and Waves ch. 4): steady state A(ω) = f₀/√((ω₀²−ω²)² + γ²ω²), φ = atan2(γω, ω₀²−ω²), displacement peak at √(ω₀²−γ²/2), velocity peak and φ = π/2 at ω₀ exactly. Non-circular because none of those closed forms exist in the recovery path: the generator only integrates the equation of motion step by step, the readout only multiplies the trajectory by cos/sin of the drive clock and averages, and both headline frequencies are measured — the peak from a finite-difference derivative zero of the measured curve, ω₀ from where the measured phase crosses π/2 — so their ratio is a pure measurement that the scorer alone compares to √(31/32). The e^(iωt) ansatz, the Lorentzian, and the peak-location formula are exactly what the sim is asked to rediscover, and does to 3e-10.
The module's on-screen A_max reads 1.00 vs the true 1.008 (−1.15%: its 4-period lock-in window is NOT an integer number of steps at dt = 1/240 and its 16 s settle leaves a ~2% transient at measurement start), and its FWHM Q reads 3.7 vs the exact half-power 3.873 (−4.3%: linear interpolation of the crossings on the coarse 12-point ω grid) and vs ω₀/γ = 4 (−7.4%: the finite-Q gap between the FWHM estimate and Q itself). Both are display-path systematics, quantified by the verbatim module mirror (gate L, bands ±0.15%) — the module honestly prints measured vs theory side by side on screen.
HUD scrape-verified 4/4 after the live 12-point sweep completes (~2 min): 'peak ω_r 1.97 / theory 1.97 · A_max 1.00 / 1.01 · Q 3.7 / 4.0 · ω at φ=90° 2.00 / ω₀ 2.0' — exactly the mirror's predicted displays (1.967726, 0.996258, 3.705, 1.999409).
npm run derisk -- resonance (scripts/resonance-derisk.mjs)scripts/oracles/resonance.reference.jsonL.D. Landau & E.M. Lifshitz, 'Mechanics', 3rd ed. (1976), §26 — forced oscillations under friction, amplitude maximal at ω² = ω₀² − 2λ² (2λ = γ). A.P. French, 'Vibrations and Waves' (1971), ch. 4 — displacement resonance at ω₀√(1−1/(2Q²)), velocity resonance at ω₀, phase lag π/2 at ω₀. R.P. Feynman, Lectures on Physics I, ch. 23 'Resonance'.