The simple harmonic oscillator
The puzzle: the clock that ignores how hard you push it¶
Around 1602, Galileo timed the swinging bronze lamp in the cathedral of Pisa against his own pulse and noticed something absurd: as the swing died down from wide arcs to small ones, the time per swing did not change. Push a child’s swing hard or gently — the round trip takes the same time. Pendulum clocks kept civilisation’s time for three centuries on exactly this absurdity.
It gets stranger. Hang a mass on a spring: same behaviour. The vibration of a CO molecule, the sloshing of charge in an LC circuit, a tuning fork, a building swaying in wind — one curve, , everywhere, with a period that refuses to care how big the motion is.
The answer to the second question is one Taylor expansion, and it is the reason this module — the smallest physical system in the course — is the foundation for everything up to and including the laser.
Predict before you calculate¶
Commit to an answer for each of these before running anything. Write them down.
A mass on a spring is pulled to instead of and released. The period — longer, shorter, or the same? The maximum speed — how does it change?
You double the mass at fixed spring. Does the oscillation speed up or slow down, and by what factor?
Where in the cycle is the mass moving fastest — at the ends of its swing, at the centre, or somewhere in between? Where is it accelerating hardest?
Over one cycle, the total mechanical energy: constant, oscillating at the period, or oscillating at twice the period?
Explore the model¶
The laboratory notebook for this module animates the mass, and beside it draws the three curves the course will ask you to see as one thing: position and velocity in time, the kinetic/potential energy exchange, and the trajectory in phase space — the plane of , where the whole motion is a single ellipse traced clockwise.
A mass on a spring beside its own graphs. Left: the physical motion. Middle: and
, a quarter period out of step. Right: the energy, sloshing between kinetic and
potential twice per cycle while the total stays flat. The animation is generated by the same
wavelab.oscillators code you can run and read.
The same motion as a single point moving through phase space . The orbit is an ellipse — constant energy — traced clockwise; larger amplitudes give larger, geometrically similar ellipses traversed in the same period.
Run the laboratory now, then come back. Three things are worth doing before you read on:
Double the release amplitude and measure the period from the plot. Then double the mass and measure it again.
Watch the energy panel through one full cycle and count how many times the kinetic energy peaks.
Release the mass from with a small initial velocity and watch what changes in the phase-space ellipse.
Derive the result¶
System. A mass on a spring of stiffness ; measures displacement from equilibrium.
The equation of motion. Hooke’s law gives the restoring force , so Newton’s second law reads
The solution. The unique solution with initial position and initial velocity is
as you can check by substitution — and, in phasor language, this is the arrow of module 00 with length and angle , rotating at .
The isochronism. Everything the puzzle asked is now visible in one place: the angular frequency contains the mass and the stiffness — and not the amplitude. Doubling the release amplitude doubles the distance the mass must cover, but the restoring force at every stage of the journey is also doubled, and the two effects cancel exactly. That cancellation is special to the linear force law: it is not a property of oscillation in general, but of .
Velocity and the quarter-cycle lag. Differentiating, : the speed is largest as the mass crosses the centre, zero at the turning points — velocity runs a quarter cycle ahead of position.
Energy. The kinetic and potential energies are
whose sum is constant, , while each half oscillates — note, via and — at twice the natural frequency: the kinetic energy peaks twice per swing, once for each crossing of the centre. In phase space the constant energy is the ellipse .
Universality. Why is this one system everywhere? Take any potential with a stable equilibrium at and Taylor-expand:
The linear term vanishes because is an equilibrium; the constant is irrelevant; and what remains, close enough to , is a spring with .
Verify computationally¶
Deriving a formula and trusting it are different things. The laboratory checks the results numerically, and each check is also a test in the project’s test suite, so the claims on this page cannot silently rot.
1. The closed form. The velocity-Verlet integration of against : at a thousand steps per period the two agree to better than one part in 103 over twenty periods.
2. Energy conservation. Over one hundred periods the integrator’s energy error stays bounded, oscillating with relative amplitude — it does not drift.
3. Isochronism, measured. Fit the period at release amplitudes spanning a factor of ten: the fitted periods agree within the fit uncertainty.
4. A noisy measurement. The laboratory’s final experiment treats the simulation as apparatus: Gaussian noise is added to the trajectory, a cosine is fitted, and the natural frequency is recovered as \wnat_{\text{fit}} \pm \sigma — agreeing with within three standard errors, across eight independent seeds. Not : . That habit is the course’s measurement culture, and it starts here.
Transfer the idea¶
The pendulum. For small angles, turns the pendulum equation into an oscillator equation with — no mass, which is its own famous surprise.
The LC circuit. Charge on a capacitor discharging through an inductor obeys : the same equation with , . Electrical resonance is this module with the symbols renamed.
Molecular vibrations. The bond of CO near its equilibrium length is a valley; at its bottom sets infrared absorption frequencies — how astronomers identify molecules they will never touch.
Phonons and the quantum oscillator. Crystals are lattices of coupled oscillators (module 06 makes this literal), and the quantum harmonic oscillator — energy levels — inherits every structure built here.
Check your understanding¶
A mass on a spring is pulled twice as far from equilibrium as before and released. What happens to the period of the oscillation?
A. It is unchanged — the period does not depend on amplitude. B. It doubles — the mass has twice the distance to cover. C. It halves — the larger force whips the mass around faster. D. It grows by a factor sqrt(2).
Check your answer
Correct answer: A — It is unchanged — the period does not depend on amplitude.
A. Right: omega0 = sqrt(k/m) contains no amplitude. The mass has twice as far to travel, but the restoring force is doubled at every stage of the journey, and the two effects cancel exactly. This cancellation is special to the linear force law.
B. It does have twice the distance — and twice the force everywhere along the way, hence proportionally higher speeds. For F = -kx the cancellation is exact. (For a pendulum at large angles it is not, and the period does grow.)
C. You kept the stronger force but dropped the longer path. Both effects are present, and for a linear spring they cancel identically, leaving the period exactly as it was.
D. This would follow if the period scaled as the square root of the distance, as in free fall. An oscillator is not free fall: the force grows with displacement, and the amplitude drops out of the period entirely.
The mass on a spring is replaced by one four times heavier, same spring, same release point. What happens to the period?
A. It doubles. B. It quadruples. C. It is unchanged — period is a property of the spring alone. D. It halves — more mass means more momentum through the bottom of the swing.
Check your answer
Correct answer: A — It doubles.
A. T = 2 pi sqrt(m/k), so four times the mass gives twice the period. Heavier means more sluggish: the same force produces less acceleration, and every stage of the cycle takes longer by sqrt(4) = 2.
B. The period scales as the square root of the mass, not linearly: inertia enters through a = F/m inside a cycle whose length also readjusts. sqrt(4) = 2, so the period doubles.
C. The spring sets only half the story. The period is set by the tug-of-war between stiffness (which speeds the return) and inertia (which resists it): T = 2 pi sqrt(m/k) contains both.
D. At the same amplitude the heavier mass moves more slowly, not faster: it carries more inertia for the same restoring force. The period grows with mass; it does not shrink.
At which point in its cycle does an oscillating mass move fastest, and at which is its acceleration largest?
A. Fastest at the equilibrium point; largest acceleration at the turning points. B. Fastest at the turning points, where the force on it is biggest. C. Both speed and acceleration are largest at the equilibrium point. D. The speed is the same everywhere; only the direction changes.
Check your answer
Correct answer: A — Fastest at the equilibrium point; largest acceleration at the turning points.
A. Right, and the two answers deliberately sit at opposite ends: speed peaks where all the energy is kinetic (x = 0, zero force), acceleration peaks where the spring is most stretched (x = +/-A, zero speed). Velocity runs a quarter cycle ahead of position.
B. This confuses force with speed. At the turning points the force is indeed largest — but the mass is momentarily at rest there; that is what “turning point” means. Big force means big acceleration, and the speed it builds peaks a quarter cycle later, at the centre.
C. Speed, yes; acceleration, no. At equilibrium the spring is unstretched, so the force — and with it the acceleration — is exactly zero there, even as the mass flies through at top speed.
D. That describes uniform circular motion, not oscillation along a line. Here the mass repeatedly stops at the extremes and is fastest at the centre — the speed varies between zero and omega0 times the amplitude.
Over one full cycle of an undamped oscillator, how do the kinetic energy K, the potential energy U, and the total E = K + U behave?
A. K and U each oscillate at twice the natural frequency; E stays exactly constant. B. All three oscillate together at the natural frequency. C. K and U oscillate at the natural frequency; E is constant. D. E slowly decreases as it is shared back and forth between K and U.
Check your answer
Correct answer: A — K and U each oscillate at twice the natural frequency; E stays exactly constant.
A. Right. K goes as sin^2 and U as cos^2 of (omega0 t + phi): each peaks twice per cycle — kinetic at each centre crossing, potential at each extreme — while their sum is pinned at (1/2) k A^2. A constant built from two oscillating parts.
B. If E oscillated, energy would have to flow somewhere outside the mass-spring system — but there is no damping and no drive. The exchange is entirely internal, K against U, and their sum cannot move.
C. E is constant, but check the rate of the exchange: the mass passes through the centre (K maximal) twice per cycle, once in each direction. sin^2 and cos^2 repeat at twice the base frequency.
D. Sharing is not spending. Converting kinetic energy to potential and back is lossless in this model; decrease requires a dissipative force, which is module 02’s damping term, absent here.
A cart of mass 0.5 kg on a spring of stiffness 8.0 N/m is struck at its equilibrium position, giving it velocity 0.20 m/s. What amplitude (in metres) does the oscillation reach?
Check your answer
Correct answer: 0.05 (± 0.005)
omega0 = sqrt(8.0/0.5) = 4.0 rad/s, and starting from x0 = 0 the amplitude is A = v0/omega0 = 0.20/4.0 = 0.05 m. All the initial energy is kinetic; A is where the spring has absorbed it all.
Why do systems as different as molecules, bridges and circuits all oscillate harmonically when slightly disturbed?
A. Near any stable equilibrium, the potential energy is approximately parabolic — its Taylor expansion starts with the squared term. B. Because most physical systems literally contain a spring or an elastic element. C. They do not — each system merely happens to be well fitted by a cosine. D. Because energy conservation forces all bounded motion to be sinusoidal.
Check your answer
Correct answer: A — Near any stable equilibrium, the potential energy is approximately parabolic — its Taylor expansion starts with the squared term.
A. Exactly. At an equilibrium the linear term of U(x) vanishes, so the first surviving term is (1/2) U’‘(x_e) x^2 — a spring with k = U’'(x_e), whatever the underlying mechanism. Every smooth valley is a parabola at its bottom.
B. An LC circuit contains no elastic material at all, yet oscillates harmonically. The universality is mathematical — a property of stable equilibria of smooth potentials — not a fact about springs as hardware.
C. The agreement is derived, not coincidental: expand any smooth potential about a stable minimum and the harmonic term dominates for small displacements. The cosine is a consequence, with a stated regime of validity.
D. Energy conservation bounds the motion but does not shape it: a large-angle pendulum conserves energy and is visibly not sinusoidal. Sinusoidal motion needs the linear restoring force, which only the small-displacement limit supplies.
Exam-style problems for this module — the ones worth doing with a pen — are collected in the problem set.
Explain it in your own words¶
Answer in a few sentences each. These are the questions that reveal whether the ideas landed; no number will save you.
Explain to a ten-year-old on a swing why pumping higher does not change how long each swing takes — and name the hidden assumption that eventually breaks for very high swings.
A student says: “The mass moves fastest at the ends of the swing, because that is where the force is biggest.” Untangle the two ideas this sentence confuses.
Why does the kinetic energy peak twice per cycle, while the position peaks once?
Your phone’s accelerometer, a bridge, and a caesium atom in an atomic clock are all oscillators. In one sentence each: what is the “spring”, and what is the “mass”?
Advanced: when the parabola fails¶
The pendulum’s confession. The exact pendulum period grows with amplitude:
At the correction is under — Galileo’s pulse stood no chance — but at the period is longer by about . Isochronism was always an approximation; the laboratory’s final exploration integrates the exact pendulum and lets you watch the approximation die. Historical footnote: Huygens knew, and built cycloidal cheeks into his clocks to make the period exactly amplitude-free — the first perturbation correction in engineering history.
Anharmonicity as a frontier. Keep the cubic term the Taylor expansion discarded and the oscillation’s frequency begins to depend on amplitude, harmonics of appear in the motion, and neighbouring oscillators can exchange energy in new ways. That is not a defect: thermal expansion of solids, the workings of an optical frequency comb, and the entire subject of nonlinear optics (module 51) live in those discarded terms.
Two conserved pictures. The energy ellipse of this module is the case of a deep pattern: phase-space orbits of conservative systems foliate into nested invariant curves. When modules 06–07 couple many oscillators, the ellipse becomes a torus and the normal-mode transformation is the change of coordinates that untangles it — the classical shadow of what quantum mechanics will call diagonalising the Hamiltonian.