Simple Harmonic Motion

Pull a mass hanging on a spring down a little and let go: it bobs up and down, up and down, settling into a steady rhythm. Give a pendulum a small push and it swings to and fro with the same clockwork regularity. Pluck a guitar string, watch a buoy nod in the swell, feel a tuning fork hum, picture an atom jiggling in a crystal — all of them do the same thing: they wobble back and forth about a resting point, over and over, at their own fixed beat.

That shared rhythm is not a coincidence. An enormous family of oscillations obey one tidy law, and once you know it you can predict the whole motion — its shape, its speed, its timing — from a single equation. That law is simple harmonic motion (SHM), and it is the backbone of everything that vibrates, resonates or keeps time, from a wristwatch to a radio aerial.

The one condition that defines SHM

Take a mass sitting at its resting position — the equilibrium, where the forces balance and it is happy to stay put. Nudge it away and something pulls it back. That pull is the restoring force, and the crucial question is: how hard does it pull as you move further out?

For a mass on a spring the answer is Hooke's law: the force is proportional to how far you have stretched it, F = -k x. The minus sign is the whole story — pull the mass to the right (positive x) and the force points left, back towards the middle; push it left and the force points right. The force always opposes the displacement.

Feed that into Newton's second law F = ma and divide by the mass:

ma = -kx \quad\Longrightarrow\quad a = -\frac{k}{m}\,x.

The acceleration is proportional to the displacement and points the opposite way. We bundle the positive constant k/m into a single symbol \omega^2 (you will see in a moment why a square), and arrive at the defining relation of all simple harmonic motion:

a = -\omega^2 x.

Read it as a sentence: the acceleration is proportional to the displacement from equilibrium, and always directed back towards it. Any object whose acceleration obeys this — a spring, a pendulum at small angles, a floating cork — moves with simple harmonic motion. Anything else does not. This single line is the test.

What that condition forces the motion to look like

The relation a = -\omega^2 x is a differential equation: it says the acceleration (the second rate of change of position) is minus a constant times the position itself. We need a function whose second derivative is minus itself — and the cosine does exactly that. The solution, for a mass released from rest at displacement A, is a pure cosine wave:

x = A\cos(\omega t).

Here A is the amplitude — the furthest the object ever strays from the middle — and \omega is the angular frequency in radians per second, which fixes how quickly the cycle repeats. Now differentiate to get the velocity and acceleration (the derivative of \cos is -\sin, and each derivative brings down a factor of \omega):

v = \frac{\mathrm{d}x}{\mathrm{d}t} = -A\omega\sin(\omega t), a = \frac{\mathrm{d}v}{\mathrm{d}t} = -A\omega^2\cos(\omega t) = -\omega^2 x.

The acceleration came back as -\omega^2 x — exactly the condition we started from, which is the check that x = A\cos(\omega t) really is the motion. (And there is the reason for the square: each derivative pulls out an \omega, so the acceleration carries \omega^2.)

Look at where each quantity peaks. The velocity -A\omega\sin(\omega t) is biggest when \sin is \pm 1 — which happens as the object flashes through the centre, so the speed is greatest at equilibrium, where x = 0. The acceleration -A\omega^2\cos(\omega t) is biggest when \cos is \pm 1 — at the extremes, the turning points where the object is momentarily still. So speed and acceleration are exactly out of step: at the middle it is racing but not accelerating; at the ends it is stopped but yanked back hardest.

An object moves with simple harmonic motion when its acceleration obeys the defining condition below. Everything else follows from it (taking the object released from rest at amplitude A):

The startling result: the timing ignores the amplitude

Notice what is missing from T = 2\pi/\omega: the amplitude A. The period — how long one full swing takes — depends only on \omega, which for a spring is set by k and m, and for a pendulum by its length. It does not depend on how far the object swings.

This is genuinely surprising. Pull the spring down a long way and it has further to travel — but it also moves faster (bigger restoring force, bigger acceleration), and the two effects cancel exactly. A big swing and a tiny swing take the same time. A motion whose period is independent of amplitude like this is called isochronous (Greek for "equal time"), and it is precisely why a swinging weight can keep time: a pendulum clock does not speed up or slow down as its swing gradually dies away.

See it move

On the right is the displacement graph x = A\cos(\omega t); on the left a mass rides up and down its track at exactly the graph's current height. Drag the amplitude slider and the wave grows taller (the dashed lines mark \pm A) — but watch the spacing of the peaks stay put: a bigger amplitude does not change the period. Now drag the angular frequency \omega: the peaks bunch up and the period T = 2\pi/\omega shrinks. Slide time to walk the mass through its cycle, and note how it moves fastest sweeping through the middle and freezes for an instant at each end.

Two everyday harmonic oscillators

The same \omega shows up in two systems you will meet constantly. For a mass on a spring, \omega^2 = k/m, so

T = 2\pi\sqrt{\frac{m}{k}}.

A heavier mass swings more slowly (bigger m, longer T); a stiffer spring swings faster (bigger k, shorter T). For a simple pendulum of length L, the restoring force from gravity gives \omega^2 = g/L, so

T = 2\pi\sqrt{\frac{L}{g}}.

Remarkably, the pendulum's period depends on neither the mass of the bob nor (for small swings) the amplitude — only on its length and on gravity. Lengthen the pendulum and it ticks more slowly; that is exactly how a grandfather clock is regulated.

It looks like a heavier bob ought to swing differently — but it doesn't, and the reason is the same one that makes all objects fall together. Gravity pulls harder on a heavier bob (more restoring force), yet a heavier bob is also harder to accelerate (more inertia), and the two scale with mass in lockstep. In \omega^2 = g/L the mass has cancelled right out, just as it does in free fall. So a lead pendulum and a cork pendulum of the same length keep the very same time — Galileo's insight about falling bodies, wearing a different hat.

Worked examples

Example 1 — a mass on a spring. A 0.5\ \text{kg} mass on a spring of constant k = 200\ \text{N/m} is pulled A = 0.05\ \text{m} from rest and released. Find its angular frequency, period, maximum speed and maximum acceleration.

\omega = \sqrt{\frac{k}{m}} = \sqrt{\frac{200}{0.5}} = \sqrt{400} = 20\ \text{rad/s}. T = \frac{2\pi}{\omega} = \frac{2\pi}{20} \approx 0.31\ \text{s}. v_{\max} = \omega A = 20 \times 0.05 = 1\ \text{m/s}, \qquad a_{\max} = \omega^2 A = 400 \times 0.05 = 20\ \text{m/s}^2.

The maximum speed happens as it whips through the middle; the maximum acceleration happens at the two ends, where a = -\omega^2 x = -400 \times (\pm 0.05) = \mp 20\ \text{m/s}^2.

Example 2 — a pendulum. How long is a pendulum that takes T = 2.0\ \text{s} for a complete swing (a "seconds pendulum"), taking g = 9.8\ \text{m/s}^2? Rearrange T = 2\pi\sqrt{L/g} for L:

L = g\left(\frac{T}{2\pi}\right)^2 = 9.8 \times \left(\frac{2.0}{2\pi}\right)^2 \approx 9.8 \times 0.101 \approx 0.99\ \text{m}.

Almost exactly one metre — which is why old clocks stand about that tall.

Example 3 — reading off displacement, velocity and acceleration. An oscillator has A = 0.1\ \text{m} and \omega = 5\ \text{rad/s}, starting at the amplitude. Where is it, and how fast is it going, a quarter of a period later — at \omega t = \tfrac{\pi}{2}?

x = A\cos\!\left(\tfrac{\pi}{2}\right) = 0.1 \times 0 = 0\ \text{m} \quad(\text{it is at the centre}), v = -A\omega\sin\!\left(\tfrac{\pi}{2}\right) = -0.1 \times 5 \times 1 = -0.5\ \text{m/s} \quad(=\ -v_{\max}, \text{ moving back through the middle}), a = -\omega^2 x = -25 \times 0 = 0\ \text{m/s}^2.

Exactly as promised: at the centre the speed is at its maximum (v_{\max} = \omega A = 0.5\ \text{m/s}) while the acceleration has dropped to zero. Half a period later it will be at the far extreme, momentarily still, with acceleration back at its peak a_{\max} = \omega^2 A = 2.5\ \text{m/s}^2.

Energy sloshing back and forth

An oscillator is a bucket brigade for energy. At the extremes the mass is momentarily at rest, so its kinetic energy is zero, but it is stretched furthest, so the stored (potential) energy is at its greatest. As it accelerates back towards the middle, that potential energy is poured into kinetic energy, reaching a maximum kinetic energy at the centre, where the speed is v_{\max} = \omega A and the potential energy is zero. Then it overshoots, trading kinetic back into potential as it climbs to the far extreme.

For a spring the total is fixed:

E = \tfrac{1}{2}k A^2 = \underbrace{\tfrac{1}{2}m v^2}_{\text{kinetic}} + \underbrace{\tfrac{1}{2}k x^2}_{\text{potential}} = \text{constant}.

The two forms trade places twice every cycle, but (ignoring friction) their sum never changes. Since the maximum kinetic energy \tfrac{1}{2}m v_{\max}^2 equals the maximum potential energy \tfrac{1}{2}k A^2, and the energy goes as A^2, doubling the amplitude stores four times the energy — even though, remarkably, it still takes exactly the same time to swing.

Four traps that catch out nearly every student:

The story goes that in 1583, a bored teenaged Galileo sat in the cathedral of Pisa and watched a great bronze lamp swinging on its chain in the draught. Having no watch, he timed its swings against his own pulse — and was astonished to find that as the swings slowly died away and got shorter, each one still took the same time. The lamp was isochronous. That single observation, that a pendulum's period ignores its amplitude, is the seed of every pendulum clock that followed, and of the whole idea of using a natural oscillation to measure time.

The consequence is beautiful: any two pendulums of the same length keep the same time, whatever they are made of and however hard you push them. It is why a rack of grandfather clocks with identical pendulums all tick in agreement, and why the "seconds pendulum" — just under a metre long, one swing per second — became a standard of time long before the quartz crystal in your phone (itself just a tiny lump of silica oscillating in simple harmonic motion, thirty-two thousand times a second).