A classic model for resonance is the driven, damped harmonic oscillator. For a mass–spring system of mass \(m\) driven by a periodic force,
the equation of motion can be written as
\[
x'' + 2\gamma x' + \omega_0^2 x = \frac{F_0}{m}\cos(\omega t),
\]
where \(\omega_0\) is the natural (undamped) angular frequency, \(\gamma\) is the damping coefficient (units \(1/\text{s}\)),
\(F_0\) is the driving force amplitude, and \(\omega\) is the driving angular frequency. The term \(2\gamma x'\) models linear viscous damping.
The total response is the sum of a transient part (which decays away due to damping) and a steady-state part (which oscillates at the
driving frequency). After enough time, the steady-state dominates. A standard form for the steady-state solution is
\[
x(t)=A(\omega)\cos\!\big(\omega t-\delta(\omega)\big),
\]
where \(A(\omega)\) is the frequency-dependent amplitude and \(\delta(\omega)\) is the phase lag of the displacement relative to the driving force.
This calculator focuses on those steady-state quantities.
Amplitude response. Solving the forced-oscillation equation yields the amplitude
\[
A(\omega)=\frac{F_0/m}{\sqrt{(\omega_0^2-\omega^2)^2+(2\gamma\omega)^2}}.
\]
The denominator combines two effects: the “stiffness detuning” term \(\omega_0^2-\omega^2\) and the damping term \(2\gamma\omega\).
When \(\gamma\) is small, \(A(\omega)\) has a sharp peak near resonance. Damping broadens the resonance curve and lowers the maximum amplitude.
Phase lag. The steady-state displacement does not generally move in phase with the driving force.
The phase lag can be written as
\[
\delta(\omega)=\tan^{-1}\!\left(\frac{2\gamma\omega}{\omega_0^2-\omega^2}\right).
\]
Numerically, it is best computed using
\[
\delta(\omega)=\operatorname{atan2}\!\big(2\gamma\omega,\ \omega_0^2-\omega^2\big)
\]
which automatically places \(\delta\) in the correct quadrant. Physically:
at low frequency (\(\omega\ll\omega_0\)), the system follows the drive and \(\delta\approx 0\);
near resonance, \(\delta\approx \tfrac{\pi}{2}\);
at high frequency (\(\omega\gg\omega_0\)), the response is almost opposite the drive and \(\delta\to\pi\).
Resonance and peak frequency. For a lightly damped oscillator, the amplitude peak occurs close to \(\omega_0\).
A more accurate peak location (for the standard viscous damping model above) is
\[
\omega_{\text{res}}\approx \sqrt{\omega_0^2-2\gamma^2},
\]
provided the expression under the square root is positive. If damping is very strong, the amplitude curve flattens and a sharp resonance is not present.
This calculator reports \(\omega_{\text{res}}\) when it is real and uses it to estimate the peak amplitude \(A_{\max}=A(\omega_{\text{res}})\).
Quality factor. A common measure of “sharpness” of resonance is the quality factor
\[
Q=\frac{\omega_0}{2\gamma}.
\]
Large \(Q\) means low damping and a narrow resonance peak (typical of tuned circuits or high-quality mechanical oscillators).
Smaller \(Q\) corresponds to heavier damping and a broader, lower peak. In applications, \(Q\) relates to bandwidth and energy loss per cycle.
Resonance explains phenomena from “tuned radio” selection (electrical resonance) to vibration isolation and structural dynamics (mechanical resonance).
Engineers often design \(\gamma\) to control peak amplitudes, and tune \(\omega_0\) so the resonance occurs (or does not occur) in a desired range.
University-level extensions include driven response with arbitrary forcing, complex impedance methods, and transient/steady-state decomposition in detail.