A periodic load is a comb of harmonics. The frequency response is a curve the comb is laid over: each harmonic is scaled by the curve's height at its own frequency. A harmonic that lands on the resonance peak can dominate the response even when its load amplitude is tiny.
1. Load, comb and filter
A periodic load of period \(T_0=2\pi/\omega_0\) has the Fourier series
$$ f(t)=c_0+\sum_{n=1}^{\infty} \left(a_n\cos n\omega_0t+b_n\sin n\omega_0t\right)=c_0+\sum_{n=1}^{\infty} A_n\sin(n\omega_0t+\theta_n),\qquad A_n=\sqrt{a_n^2+b_n^2}. $$
The square, triangular and sawtooth waves below have only sine terms (\(a_n=0\)); the half-rectified sine has a mean, a sine fundamental and cosine even harmonics.
By linearity each term produces its own steady-state response. With \(\rho_n=n\omega_0/\omega_n\) and unit stiffness,
$$ x_{ss}(t)=c_0+\sum_{n=1}^{\infty} A_n\,|H(\rho_n)|\,\sin(n\omega_0t+\theta_n-\phi_n),\qquad |H(\rho)|=\frac{1}{\sqrt{(1-\rho^2)^2+(2\zeta\rho)^2}}. $$
Geometrically (middle figure): stems at \(\omega=n\omega_0\) are the load spectrum, the grey curve is \(|H(\omega)|\), and the output stems are the products. Change \(\omega_0\) and the comb slides along the axis while the curve stays put.
Low-pass behaviour. Above resonance \(|H|\sim1/\rho^2\), so harmonics are cut quickly; the response is smoother than the load.
Mean load. The \(n=0\) term sees \(H(0)=1\): the mean load \(c_0\) gives a static deflection \(c_0/k\).
Resonant harmonic. If \(n\omega_0\approx\omega_n\), harmonic \(n\) is multiplied by up to \(1/(2\zeta)\). For a square wave with \(\omega_0\approx\omega_n/3\) the third harmonic, only one third of the fundamental in load, can dominate the motion.
Load in time (two periods)
Grey: exact waveform. Blue: sum of the first \(N\) harmonics. Notice the overshoot at jumps (Gibbs) for the square wave; it does not shrink as \(N\) grows, it only narrows.
Orange: sum of filtered harmonics. Dashed blue: the load itself, i.e. the quasi-static response. The gap between them is the dynamics.
Read-out
2. Which fundamental frequencies are dangerous?
Sweep the fundamental ratio \(r_0=\omega_0/\omega_n\) with the waveform, \(\zeta\) and \(N\) fixed. By Parseval, the RMS of the dynamic response (mean removed) is
$$ x_{\rm rms}(r_0)=\sqrt{\tfrac12\sum_{n=1}^{N}A_n^2\,|H(nr_0)|^2}. $$
A periodic load is dangerous when any of its harmonics \(n\omega_0\) sits at \(\omega_n\), that is at \(r_0=1/n\), not only when the fundamental does. Odd-only waveforms (square, triangular) have no peaks at \(r_0=1/2,\,1/4,\dots\) Click or drag on the sweep to set \(r_0\).
Response RMS versus fundamental ratio
Orange: \(x_{\rm rms}\) (log scale). Dashed: \(r_0=1/n\) for harmonics present in the waveform, labelled with \(n\) where space allows. Grey marks: \(r_0=1/n\) for harmonics the waveform lacks. Red: your \(r_0\).
The harmonics that carry the response (top 8 by response amplitude)
Share: \(A_n^2|H|^2\) divided by the sum over all kept harmonics, i.e. the fraction of the dynamic response power (mean square) carried by harmonic \(n\).
Experiments
(1) Square wave, \(\zeta=0.04\): drag \(\omega_0/\omega_n\) from 0.05 upward. Each time an odd multiple of \(\omega_0\) crosses 1, a single orange stem shoots up. (2) Press the tune button with \(n=3\): the response looks almost sinusoidal at three times the load frequency. (3) Triangular wave: the load harmonics fall as \(1/n^2\), so the response is dominated by the fundamental or by a resonant harmonic; the Gibbs effect is absent. (4) Square wave, \(\zeta=0.04\): tune \(n=3\), then reduce \(N\) to 3. The response RMS barely changes (3.887 to 3.886), because the resonant harmonic is kept and the filter removes the higher ones anyway, even though the load is badly represented. Now tune \(n=5\) with \(N=3\): the RMS drops from 2.49 to 1.05, because the truncation threw away the resonant harmonic. A truncated series is safe only if it keeps every harmonic up to and somewhat beyond \(\omega_n\). (5) Half-rectified sine: tune \(n=2\). The fundamental is far from resonance, yet the response rings at \(2\omega_0\). A square wave tuned the same way shows no peak, because it has no even harmonics.
3. Check yourself
Why is the response smoother than the load when the load harmonics lie above resonance?
Above resonance \(|H|\sim1/\rho^2\), so the harmonic at \(n\omega_0\) is cut by \(1/(n\omega_0/\omega_n)^2\). The jumps in the load are carried by the high harmonics, and these are removed first.
How many harmonics do you need for the response?
Only those up to a few times \(\omega_n\), plus any whose frequency falls near the resonance. The filter's roll-off, not the load's convergence, controls the truncation error. A slowly converging load (\(1/n\)) may need many harmonics for the load but few for the response.
Why does a sawtooth excite even harmonics but a square wave does not?
A square wave is half-wave symmetric, \(f(t+T_0/2)=-f(t)\), and that symmetry kills the even harmonics. (It is also odd about \(t=0\) and even about a quarter period, which is why it has only sine terms; neither of those alone removes even harmonics.) The sawtooth lacks that symmetry.