Start here: drag the mass (or press Pull 0.2 m and release) and watch the graphs below draw its motion. Then change the mass, stiffness or damping and see how the period in Live results changes.

Displacement x(t)

Velocity v(t)

Phase portrait

Energy KE · PE · total

Resonance curve

1. Simple harmonic motion

Why it matters: anything that wobbles, swings or vibrates (a guitar string, a car on its springs, a tall building in the wind) follows the same few equations. Notation: a dot means rate of change with time, so $\dot x$ is velocity and $\ddot x$ is acceleration; $\omega$ (omega) is angular frequency in rad/s, with $\omega = 2\pi f$.

An oscillator has a stable equilibrium and a restoring force that pulls it back. If the force is proportional to the displacement (Hooke's law, $F = -kx$), Newton's second law gives the SHM equation:

$$m\ddot x = -kx \quad\Longrightarrow\quad \ddot x = -\omega_0^2 x, \qquad \omega_0 = \sqrt{\frac{k}{m}}$$

Its solution is a sinusoid whose frequency does not depend on the amplitude (the motion is isochronous):

$$\begin{gathered}x(t) = A\cos(\omega_0 t + \phi), \qquad v(t) = -A\omega_0\sin(\omega_0 t + \phi)\\ T = \frac{2\pi}{\omega_0} = 2\pi\sqrt{\frac{m}{k}}, \qquad f = \frac{1}{T}\end{gathered}$$

Energy sloshes between kinetic and potential, with a constant total $E = \tfrac12 kA^2 = \tfrac12 m v_{max}^2$, so $v_{max} = A\omega_0$. In the phase portrait ($x$ against $v$) undamped SHM traces an ellipse; damping turns it into an inward spiral.

Vertical springs. Hanging a mass stretches the spring by $mg/k$ to a new equilibrium. Measured from that equilibrium, the motion is identical SHM with the same $\omega_0$: gravity only shifts the centre. (The lab's potential energy for the vertical spring is measured from that equilibrium, combining spring and gravitational terms.)

2. The pendulum: exact and small-angle

For a bob of mass $m$ on a light rod of length $L$, the torque about the pivot gives

$$\ddot\theta = -\frac{g}{L}\sin\theta - \frac{b}{m}\dot\theta$$

This is nonlinear. For small angles $\sin\theta \approx \theta$ (θ in radians), which turns it into SHM with

$$T_0 = 2\pi\sqrt{\frac{L}{g}}$$

The exact period grows with amplitude $\theta_0$. It can be written with the complete elliptic integral $K$, or computed quickly using the arithmetic–geometric mean (which is what the lab uses), and has a useful series:

$$\begin{gathered}T = \frac{2\pi\sqrt{L/g}}{\operatorname{AGM}\!\left(1,\cos\frac{\theta_0}{2}\right)} = 4\sqrt{\frac{L}{g}}\,K\!\left(\sin\tfrac{\theta_0}{2}\right)\\ T \approx T_0\left(1 + \frac{\theta_0^2}{16} + \frac{11\,\theta_0^4}{3072} + \dots\right)\end{gathered}$$

The small-angle formula is 1% too short at about 23° and 5% too short at about 50°. Switch on the ghost pendulum in the lab to watch the two drift apart.

3. Damping

A velocity-proportional drag $-b\dot x$ (a good model for a dashpot or viscous fluid) gives

$$\ddot x + 2\zeta\omega_0\dot x + \omega_0^2 x = 0, \qquad \zeta = \frac{b}{2\sqrt{km}} = \frac{b}{b_c}, \qquad Q = \frac{1}{2\zeta}$$

The single number $\zeta$ (zeta, the damping ratio) tells you which kind of motion you get:

  • Underdamped ($\zeta < 1$): oscillates at $\omega_d = \omega_0\sqrt{1-\zeta^2}$ inside a decaying envelope $Ae^{-\zeta\omega_0 t}$.
  • Critically damped ($\zeta = 1$, $b = b_c = 2\sqrt{km}$): returns to equilibrium fastest without overshooting.
  • Overdamped ($\zeta > 1$): returns without oscillating, but more slowly than critical.

The quality factor $Q$ is roughly the number of radians of oscillation for the energy to fall by a factor $e$; equivalently $Q \approx 2\pi \times$ (energy stored)/(energy lost per cycle) for light damping.

4. Driven oscillations and resonance

Add a periodic force $F_0\cos\omega_d t$. After the transient decays, the system oscillates at the driving frequency with amplitude and phase lag

$$\begin{gathered}A(\omega_d) = \frac{F_0/m}{\sqrt{(\omega_0^2-\omega_d^2)^2 + (2\zeta\omega_0\omega_d)^2}}\\ \tan\delta = \frac{2\zeta\omega_0\omega_d}{\omega_0^2-\omega_d^2}\end{gathered}$$

The amplitude peaks at $\omega_r = \omega_0\sqrt{1-2\zeta^2}$ (just below $\omega_0$), where $A_{max} = \dfrac{F_0}{2m\zeta\omega_0^2\sqrt{1-\zeta^2}}$. For light damping the peak is about $Q$ times the static deflection $F_0/k$, and its width at half power is $\Delta\omega \approx \omega_0/Q$. At resonance the displacement lags the force by 90°, so the force is in phase with the velocity and pumps in energy most efficiently.

5. Coupled oscillators and normal modes

Two equal masses joined to walls by springs $k$ and to each other by $k_c$:

$$\begin{gathered}m\ddot x_1 = -kx_1 - k_c(x_1 - x_2)\\ m\ddot x_2 = -kx_2 - k_c(x_2 - x_1)\end{gathered}$$

Trying $x_i = a_i\cos\omega t$ gives an eigenvalue problem with two normal modes, patterns in which everything moves at one frequency:

$$\begin{gathered}\text{in phase } (a_1 = a_2): \quad \omega_1 = \sqrt{k/m}\\ \text{opposite } (a_1 = -a_2): \quad \omega_2 = \sqrt{(k + 2k_c)/m}\end{gathered}$$

Any motion is a superposition of the two. Displacing just one mass excites both equally, and energy flows back and forth between the masses with beat period $T_{beat} = 2\pi/(\omega_2-\omega_1)$. In the $x_1$–$x_2$ plot a pure mode is a straight line along a diagonal.

6. Chaos: the double pendulum

A pendulum hanging from a pendulum has two degrees of freedom and strongly nonlinear coupling. Its equations (solved in the lab with RK4) are deterministic, yet for large energies nearby starting points separate roughly exponentially, $|\delta\theta| \sim \delta_0 e^{\lambda t}$, where $\lambda$ is the largest Lyapunov exponent. The twin pendulum starts just 0.001 rad away: watch the separation plot climb in a straight line on its logarithmic axis, then saturate. At small amplitudes the system is almost linear and the twins stay together: chaos needs enough energy.

Numerical notes. All modes are integrated with fourth-order Runge–Kutta at 1.2 kHz. Watch the total energy in the undamped double pendulum: it stays constant to a tiny fraction of a percent, which is a good check on the integrator. Masses are point masses on massless rods; springs are massless and ideal.

Example 1: a mass on a spring

A 0.50 kg mass on a spring with $k = 50$ N/m is pulled 0.10 m and released (no damping).

  1. $\omega_0 = \sqrt{50/0.5} = 10.0$ rad/s, so $f = 10/2\pi = 1.59$ Hz and $T = 0.628$ s.
  2. Maximum speed $v_{max} = A\omega_0 = 0.10 \times 10 = 1.00$ m/s, at the equilibrium position.
  3. Total energy $E = \tfrac12 kA^2 = \tfrac12(50)(0.10)^2 = 0.25$ J $= \tfrac12(0.5)(1.00)^2$. ✓
  4. Critical damping would need $b_c = 2\sqrt{km} = 2\sqrt{25} = 10$ kg/s.

Example 2: when is the small-angle formula good enough?

A 1.00 m pendulum on Earth is released from 60°.

  1. Small-angle period: $T_0 = 2\pi\sqrt{1.00/9.81} = 2.006$ s.
  2. Exact: $\cos 30^\circ = 0.8660$, and $\operatorname{AGM}(1, 0.8660) = 0.9318$, so $T = 2.006/0.9318 = 2.153$ s.
  3. The series gives $T_0(1 + 1.047^2/16 + 11(1.047)^4/3072) = 2.006 \times 1.0728 = 2.152$ s, already close.
  4. So at 60° the true period is 7.3% longer than the small-angle formula predicts. After five swings the ghost pendulum is about a third of a cycle ahead.

Example 3: damping and resonance

$m = 1.0$ kg, $k = 20$ N/m, $b = 1.0$ kg/s, driven by $F_0 = 1.0$ N.

  1. $\omega_0 = \sqrt{20} = 4.472$ rad/s; $\zeta = 1/(2\sqrt{20}) = 0.112$; $Q = 1/(2\zeta) = 4.47$.
  2. Free (undriven) oscillation frequency $\omega_d = \omega_0\sqrt{1-\zeta^2} = 4.444$ rad/s; the amplitude halves every $\ln 2/(b/2m) = 1.39$ s.
  3. Resonance peak at $\omega_r = \omega_0\sqrt{1-2\zeta^2} = 4.416$ rad/s.
  4. Peak amplitude $A_{max} = \dfrac{1.0}{2(1.0)(0.112)(20)\sqrt{1-0.0125}} = 0.225$ m, which is 4.5 times the static deflection $F_0/k = 0.05$ m (close to $Q$).

Example 4: beats between coupled oscillators

Two 1.0 kg masses, outer springs $k = 20$ N/m, coupling $k_c = 2.0$ N/m. Mass 1 is pushed, mass 2 is at rest.

  1. $\omega_1 = \sqrt{20/1} = 4.472$ rad/s; $\omega_2 = \sqrt{(20 + 4)/1} = 4.899$ rad/s.
  2. Beat period $T_{beat} = 2\pi/(4.899 - 4.472) = 14.7$ s: after 7.4 s mass 1 is (momentarily) still and mass 2 has all the energy.
  3. A weaker coupling gives slower energy exchange; with $k_c = 0$ there is no exchange at all.

Challenges are checked automatically while the lab runs.

Open experiments

  1. Isochronism. In Spring mode, pull the mass by 0.05 m and then 0.4 m. Does the period change? Now try the pendulum at 10° and 120°.
  2. Q from the plot. Set an underdamped spring and count the oscillations until the amplitude falls to about 4% ($e^{-\pi}$). That count is roughly $Q$.
  3. Phase lag. In Driven mode compare the displacement with the driving force (dashed) below, at and above resonance. The lag goes from about 0° to 90° to 180°.
  4. Gravity and the pendulum. Time a 1 m pendulum on Earth, the Moon and Mars. Use $T_0 = 2\pi\sqrt{L/g}$ to work back to each $g$.

Oscillations in the real world

Tacoma Narrows Bridge, 1940

Often wrongly given as a textbook case of resonance. The deck was not driven by a periodic force at its natural frequency: a fairly steady wind of about 19 m/s produced aeroelastic flutter, a self-excited torsional oscillation in which the twisting deck changed the aerodynamic forces in a way that fed energy into the motion (effectively negative damping). Modern bridges are wind-tunnel tested for flutter.

London Millennium Bridge, 2000

On opening day the footbridge swayed sideways. Pedestrians adjusted their gait to the small lateral motion, which synchronised their footfalls and increased the push: a feedback effect. It was fixed by fitting viscous dampers and tuned mass dampers, raising the damping rather than changing the structure's stiffness.

Tuned mass dampers

Taipei 101 hangs a steel ball of about 660 tonnes near its top. It is a second oscillator tuned near the building's sway frequency, a coupled-oscillator system: the damper swings out of phase with the building and its dashpots remove energy.

Car suspension

Shock absorbers add damping to the spring-on-wheel system. Passenger cars are deliberately underdamped, typically $\zeta \approx 0.2$–$0.4$, as a compromise between comfort and road holding. Worn dampers lower $\zeta$ and the car keeps bouncing after a speed bump.

Clocks and crystals

A pendulum clock relies on small-amplitude isochronism: a 0.994 m "seconds pendulum" has $T = 2$ s on Earth. Quartz watches use a crystal tuning fork at 32 768 Hz with $Q$ in the tens of thousands, so its frequency is very sharply defined.

Earthquakes and buildings

In the 1985 Mexico City earthquake, soft lake-bed sediments amplified ground shaking with periods near 2 s. Buildings of roughly 6 to 15 storeys, whose natural periods were close to that, suffered most: a destructive case of near-resonant driving.