---
title: Forced oscillations and resonance
heading: Pushing at the natural rhythm
eyebrow: A8 · Lesson 28 · Resonance
xp: 40
---

::: hook
Push a swing at just the right moment each time and a gentle shove builds a big arc. Drive an LC circuit at its natural frequency and its voltage climbs cycle after cycle, limited only by its losses. That's how a radio picks one station out of thousands and how a quartz crystal keeps time. Drive it slightly off frequency and something else happens: the response swells and fades in **beats**, as the drive drifts in and out of step with the circuit's own rhythm.
:::

::: play
- An undamped oscillator with natural frequency $\omega_0 = 1$ starts at rest and is driven by $\cos\omega t$. The curve is its response; the dashed curve is the envelope.
- Bring $\omega$ close to 1. The swells get taller and slower.
- The readouts give the beat period and the largest swing.
:::
:::

```sim plot
view: graph
x: t = 0..200 s
y: y = -30..30
slider: w = 0.51..1.49 step 0.02 = 0.91 rad/s
plot: (cos(w*t) - cos(t))/(1 - w^2) | label: response | samples: 4000
plot: 2/abs(1 - w^2)*abs(sin((1 - w)*t/2)) | label: envelope | dashed | color: ch2 | samples: 2000
readout: beat period = 2*pi/abs(1 - w) s | digits: 4
readout: largest swing = 2/abs(1 - w^2) | digits: 4
```

::: predict
## An undamped oscillator is driven exactly at its natural frequency. What does its amplitude do?

- [ ] Settles at a large constant value
- [x] Grows without limit, in proportion to time
- [ ] Grows exponentially
- [ ] Beats slowly

::: reveal
It grows in proportion to time: $y = \frac{t\sin\omega_0t}{2\omega_0}$ for a unit drive. Each cycle adds the same amount of energy in step with the motion, so the amplitude climbs steadily. With any damping at all, the losses grow with the amplitude and eventually balance the input, capping it near $Q$ times the static response.
:::
:::

::: nameit
## Undamped and on resonance

For $\ddot y + \omega_0^2y = F\cos\omega_0t$, the input matches the natural response, so the modification rule applies:

$$y_p = \frac{F}{2\omega_0}\,t\sin\omega_0t$$

an oscillation whose amplitude grows like $\frac{Ft}{2\omega_0}$.

## Undamped and near resonance: beats

For $\omega \ne \omega_0$, starting from rest,

$$y = \frac{F}{\omega_0^2 - \omega^2}(\cos\omega t - \cos\omega_0t) = \frac{2F}{\omega_0^2 - \omega^2}\sin\frac{(\omega_0 - \omega)t}{2}\sin\frac{(\omega_0 + \omega)t}{2}$$

a fast oscillation at the average frequency inside a slow envelope. The envelope peaks at $\frac{2F}{|\omega_0^2 - \omega^2|}$ and repeats every $\frac{2\pi}{|\omega_0 - \omega|}$, the **beat period**. Musicians tune by listening for beats to slow down.

## With damping

For $\ddot y + 2\zeta\omega_0\dot y + \omega_0^2y = F\cos\omega t$, the steady-state amplitude is

$$\frac{F}{\sqrt{(\omega_0^2 - \omega^2)^2 + (2\zeta\omega_0\omega)^2}}$$

- At $\omega = \omega_0$ it's $\frac{F}{2\zeta\omega_0^2}$: $Q = \frac{1}{2\zeta}$ times the static response $F/\omega_0^2$.
- Its peak is slightly below $\omega_0$, at $\omega_r = \omega_0\sqrt{1 - 2\zeta^2}$ (for $\zeta < 0.707$).
- The **half-power bandwidth**, where the amplitude is $\frac{1}{\sqrt 2}$ of the peak, is $\Delta\omega \approx 2\zeta\omega_0 = \frac{\omega_0}{Q}$.
- Starting from rest, the response builds up with the envelope $1 - e^{-\zeta\omega_0t}$, so a high-$Q$ resonator takes about $Q$ cycles to reach full amplitude.
:::

::: example
## $\ddot y + 4y = \cos 2t$ from rest. How big is the swing after 10 s?

::: solution
1. **Spot the resonance.** $\omega_0 = 2$ matches the drive, so
   $$y = \frac{t\sin 2t}{4}$$
2. **Amplitude at 10 s.**
   $$\frac{10}{4} = 2.5$$
   and still growing.

**Answer:** after 10 s the swing has amplitude 2.5, and it's still growing.
:::
:::

::: example
## $\ddot y + y = \cos 0.9t$ from rest. Describe the beats.

::: solution
1. **Solution from rest.**
   $$\begin{aligned} y &= \frac{\cos 0.9t - \cos t}{1 - 0.81} \\ &= \frac{2}{0.19}\sin(0.05t)\sin(0.95t) \end{aligned}$$
2. **Envelope peak.**
   $$\frac{2}{0.19} = 10.5$$
3. **Beat period.**
   $$\frac{2\pi}{0.1} = 62.8\ \text{s}$$
   during which the response swells from zero to 10.5 and back.

**Answer:** the response swells from zero to 10.5 and back every 62.8 s.
:::
:::

::: example
## A resonator with $f_0$ = 10 kHz and $\zeta$ = 0.1 is driven at $f_0$. How much larger is its response than at low frequency, and how wide is the peak?

::: solution
1. **Peak gain.** At resonance the amplitude is $\frac{1}{2\zeta} = 5$ times the low-frequency (static) response; that factor is the quality factor $Q$.
2. **Bandwidth.** The half-power bandwidth is
   $$\begin{aligned} B &= f_0/Q \\ &= 2\ \text{kHz} \end{aligned}$$
   so the response stays within 3 dB of the peak from about 9 to 11 kHz.
3. **Less damping.** Less damping would make the peak taller and narrower in proportion: $\zeta = 0.01$ gives $Q = 50$ and a 200 Hz bandwidth.

**Answer:** the response is 5 times the low-frequency response ($Q = 5$), and the peak is 2 kHz wide, from about 9 to 11 kHz.
:::
:::

::: check
given: F = 1 | 3; w0 = 2 | 5; T = 10 | 20
answer: F*T/(2*w0)
tolerance: 0.5%

## $\ddot y + \given{w0}^2y = \given{F}\cos(\given{w0}t)$ from rest. What is the amplitude of the oscillation at $t$ = {T}?

::: right
Right. $y = \frac{F}{2\omega_0}t\sin\omega_0t$, so the amplitude is $\frac{FT}{2\omega_0}$ = {answer}.
:::

::: misses
- [F*T/w0] The resonant solution has $\frac{1}{2\omega_0}$.
- [F/w0^2] That's the static response; on resonance it keeps growing.
- [any] Not yet. $y_p = \frac{F}{2\omega_0}t\sin\omega_0t$.
:::
:::

::: check
given: F = 1 | 2; w0 = 1 | 2; dw = 0.05 | 0.1
answer: 2*F/abs(w0^2 - (w0 - dw)^2)
tolerance: 0.5%

## An undamped oscillator with $\omega_0$ = {w0} is driven from rest by $\given{F}\cos\omega t$, with $\omega$ just {dw} below $\omega_0$. How large do the beats get?

::: right
Right. The envelope peaks at $\frac{2F}{|\omega_0^2 - \omega^2|}$ = {answer}.
:::

::: misses
- [F/abs(w0^2 - (w0 - dw)^2)] The two cosines can add, doubling the peak.
- [any] Not yet. $\frac{2F}{|\omega_0^2 - \omega^2|}$.
:::
:::

::: check
given: f0 = 1000 | 440; df = 2 | 5; let f1 = f0 + df
answer: 1/df
unit: s
tolerance: 0.5%

## Two tones at {f0} Hz and {f1} Hz sound together. How long is one beat (one swell and fade)?

::: right
Right. The loudness repeats at the difference frequency: $\frac{1}{\Delta f}$ = {answer}.
:::

::: misses
- [2/df] The envelope's magnitude repeats at $\Delta f$, once per swell.
- [1/f0] That's the period of the tone itself.
- [any] Not yet. One over the difference frequency.
:::
:::

::: check
given: w0 = 1000 | 5000; zeta = 0.1 | 0.3
answer: w0*sqrt(1 - 2*zeta^2)
unit: rad/s
tolerance: 0.1%

## At what driving frequency is the steady-state amplitude of a system with $\omega_0$ = {w0} rad/s and $\zeta$ = {zeta} largest?

::: right
Right. $\omega_r = \omega_0\sqrt{1 - 2\zeta^2}$ = {answer}, just below $\omega_0$.
:::

::: misses
- [w0] Damping pulls the peak slightly below $\omega_0$.
- [w0*sqrt(1 - zeta^2)] That's the free ringing frequency; the forced peak is at $\sqrt{1 - 2\zeta^2}$.
- [any] Not yet. Minimize the denominator over $\omega$.
:::
:::

::: check
given: f0 = 10 | 455; Q = 20 | 50
answer: f0/Q
unit: kHz
tolerance: 0.5%

## A tuned circuit at {f0} kHz has $Q$ = {Q}. What is its half-power bandwidth?

::: right
Right. $\Delta f = f_0/Q$ = {answer}.
:::

::: misses
- [f0*Q] Higher $Q$ means narrower: divide.
- [f0/(2*Q)] That's half the bandwidth, from the center to one edge.
- [any] Not yet. $\Delta f = f_0/Q$.
:::
:::

::: check
given: zeta = 0.05 | 0.01 | 0.1
answer: 1/(2*zeta)
tolerance: 0.5%

## A system with $\zeta$ = {zeta} is driven at its natural frequency. By what factor is its steady amplitude larger than its response to the same force held constant?

::: right
Right. $Q = \frac{1}{2\zeta}$ = {answer}.
:::

::: misses
- [1/zeta] At $\omega_0$ the damping term is $2\zeta\omega_0^2$: the factor is $\frac{1}{2\zeta}$.
- [any] Not yet. Compare $\frac{F}{2\zeta\omega_0^2}$ with $\frac{F}{\omega_0^2}$.
:::
:::

::: check
kind: parts
given: f0 = 1 | 10; z = 0.05 | 0.2

## A resonator with $f_0$ = {f0} kHz and $\zeta$ = {z} is driven at $f_0$.

::: part
answer: 1/(2*z)
tolerance: 0.5%

### How many times its static response is its amplitude?

::: misses
- [1/z] It's $\frac{1}{2\zeta}$.
- [any] $Q = \frac{1}{2\zeta}$.
:::
:::

::: part
answer: 2*z*f0
unit: kHz
tolerance: 0.5%

### What is its half-power bandwidth?

::: misses
- [any] $f_0/Q$.
:::
:::
:::

::: check
kind: derivation
vars: w = 1..5, t = 0..20

## On resonance, $\ddot y + w^2y = \cos wt$ from rest has $y = \frac{t\sin wt}{2w}$.

::: step
answer: t/(2*w)

### What is the envelope of the growing oscillation?
:::

::: step
answer: 1/(2*w)

### How fast does the envelope grow, per second?
:::

::: right
Right. Linear growth at $\frac{1}{2\omega}$: with no damping the amplitude never stops growing.
:::
:::

::: explain
## Why does driving an undamped oscillator at its natural frequency make the amplitude grow without limit, while driving it slightly off-frequency only gives beats?

::: model
At the natural frequency the drive stays in step with the motion forever, so every cycle it pushes in the direction the system is already moving and adds energy; with no losses, the amplitude climbs steadily. Slightly off-frequency, the drive slowly slips out of step: for a while it adds energy, then, half a beat period later, it's pushing against the motion and takes energy back out. The amplitude swells and fades at the difference frequency instead of growing forever.
:::
:::

::: practice

::: check
given: w0 = 1 | 3; w = 0.8 | 2
answer: 2*pi/abs(w0 - w)
unit: s
tolerance: 0.5%

## An oscillator with $\omega_0$ = {w0} rad/s is driven at {w} rad/s from rest. What is the beat period?

::: misses
- [pi/abs(w0 - w)] The envelope's magnitude repeats every $\frac{2\pi}{|\omega_0 - \omega|}$.
- [any] $\frac{2\pi}{|\omega_0 - \omega|}$.
:::
:::

::: check
given: Q = 5 | 10 | 20 | 50 | 100 | 200
answer: Q/pi
tolerance: 1%

## A resonator with $Q$ = {Q} is switched on at its natural frequency. About how many cycles does its envelope take to reach 63% of full amplitude?

::: misses
- [any] The envelope's time constant $\frac{1}{\zeta\omega_0} = \frac{2Q}{\omega_0}$, divided by the period $\frac{2\pi}{\omega_0}$.
:::
:::

::: check
given: f0 = 1 | 7.2; df = 0.1 | 0.5
answer: f0/df
tolerance: 0.5%

## A tuned circuit at {f0} MHz has a half-power bandwidth of {df} MHz. What is its $Q$?

::: misses
- [df/f0] Center over bandwidth.
- [any] $Q = f_0/\Delta f$.
:::
:::
:::
