A Ferris wheel seen side-on
Imagine watching a Ferris wheel at night from far away, exactly side-on. The lights on the cars go round in circles, but from the side each light just seems to go up and down. It pauses at the top, moves fastest through the middle, pauses again at the bottom.
That up-and-down motion is simple harmonic motion, or SHM for short. A mass on a spring does it, a pendulum swinging through a small angle does it, a point on a guitar string does it, at least approximately. Why should "a circle seen from the side" turn up all over nature?
And here's an even stranger fact: link several rotating circles together and you can draw a square-cornered wave, or a wave shaped like the teeth of a saw. Add up round things and get something square. Behind these two surprises lies a story of about four hundred years that runs through pendulum clocks, a great quarrel over vibrating strings, the flow of heat, and the prediction of tides. Let's take the machine apart.
The shadow of a circle
Take a point going round a circle of radius , times a second. Seen from the side, its height moves back and forth between and . Now record that height with a pen on a strip of paper that moves sideways at a steady speed. The trace is a sine wave. The graph on the right of the screen is exactly that record, with older parts further right.
Take a point going round a circle of radius with angular velocity . If its angle at is , its angle at time is , and it sits at . Seen from the side, its height is
the equation of SHM. The velocity and acceleration can be read off the circle too. A point in uniform circular motion always moves at speed , along the tangent, and always accelerates toward the center with magnitude . This is called the centripetal acceleration. From the side you see only the vertical parts of these.
Differentiating with respect to time gives the same result. With the velocity and acceleration arrows switched on, you can see the vertical part of each arrow on the circle reappear as the arrow at the pen.
Why is SHM everywhere?
The acceleration always points opposite to the displacement and is proportional to it. That's the signature of SHM. Turn it around: anything whose acceleration has the form oscillates harmonically. Put a spring force into Newton's law and you get ; matching it with tells you a mass on a spring oscillates with and period .
So why is SHM everywhere? Here's the answer to our opening question. Near a stable equilibrium, almost any force becomes "pull back in proportion to the displacement". Draw the potential energy : the equilibrium sits at the bottom of a valley, and if you zoom in far enough, the bottom of any smooth valley looks like a parabola, , just as the round Earth looks flat under your feet. The force is minus the slope, . The spring Robert Hooke described in 1678, "as the extension, so the force", is not a special spring; it is the stand-in for every small oscillation. To be honest, this holds only for small swings. Swing harder and the valley stops looking like a parabola, and the period starts to depend on the amplitude.
SHM turns up all over mechanics. For small amplitudes both pendulums and springs obey , so their period doesn't depend on the amplitude.
SHM itself starts with the pendulum. From about 1602 Galileo found that a pendulum's period hardly depends on the size of the swing or the weight of the bob, and grows as the square root of the length. The story that a lamp swinging in Pisa Cathedral gave him the idea comes from his biographer Vincenzo Viviani. But this holds only for small swings. Christiaan Huygens, who built the first pendulum clock in 1656, showed in 1673 that a bob guided along a cycloid instead of a circular arc keeps the same period at any amplitude. Pendulum clocks cut timekeeping errors from about fifteen minutes a day to about fifteen seconds. Hooke announced his spring law in 1676 as a scrambled string of letters and revealed it in 1678.
It also leads straight to waves. If each point of a medium does SHM a little later than its neighbor, a wave travels: says the phase of the oscillation at position lags by . Add two sine waves of nearby frequency and the amplitude changes slowly: beats. Try disks at 0.5 Hz and 0.6 Hz here and you'll see them.
Adding round things to get a square
With two or more disks, picture a mechanical gadget. From the point on the first disk, run a horizontal bar, and sit the center of the second disk on that bar. The whole second disk now moves up and down with the first point, so the height of the point on the second disk is "height of the first point + height within the second circle". Stack as many stages as you like: the height of the final pen is the sum of the heights contributed by each disk.
You can also see the same thing as rotating arrows, called phasors, joined head to tail; switch between the two pictures with "View" in the panel. The pen height is the same either way.
With disks the pen height is . Now the main event. Almost any wave with period can be written as a sum of sine waves with frequencies , a Fourier series. A square wave of amplitude , with , is
Adding sine waves became a real question in the eighteenth-century quarrel over vibrating strings. In 1747 d'Alembert wrote down the wave equation for a string, and Euler argued that any shape you could draw without lifting your pen should be an allowed starting shape. In 1753 Daniel Bernoulli claimed that every vibration of a string is a sum of a fundamental sine wave and its harmonics, though he didn't know how to find the coefficients: a right answer with no working shown, which convinces nobody. Neither d'Alembert nor Euler believed sums of sines were that general. Can smooth waves add up to a corner? The argument spilled over into the question of what a "function" even is.
Pulling out the coefficients
The answer came from heat. Joseph Fourier had gone with Napoleon's expedition to Egypt and later, as prefect of the Isère department in Grenoble, studied how heat spreads through solids. In a memoir read in Paris in December 1807 he wrote temperature distributions as sums of trigonometric functions and showed how to extract the coefficients. Lagrange and Laplace objected to such expansions. Fourier won the Institute's 1811 prize, but the report complained of a lack of rigor, and his book The Analytical Theory of Heat appeared only in 1822. Dirichlet gave the first proper proof of convergence in 1829, and Georg Cantor began with trigonometric series before going on to create set theory. Adding circles reshaped mathematics itself.
How do we find the size of each disk, the coefficients? The key is that two sine waves of different frequency, multiplied together and averaged over a period, give zero. Writing a bar for the average over one period,
Why? The product-to-sum identity explains it. Over a whole period a cosine spends as much time positive as negative, so it averages to zero; only when does survive, leaving an average of .
So multiply the wave by and average: every component except the th drops out, and the coefficient comes out as . Try it on the square wave, for and for . This step uses calculus: an average over a period is an integral divided by . The integral of over the second half is minus its integral over the first half, which you can check for yourself, so the half contributes exactly as much as the half:
Since is for odd and for even , we get for odd and zero for even : exactly the coefficients above. The sawtooth and triangle waves yield to the same method. Side by side:
| Wave | Fourier series () | Coefficients fall like | Shape |
|---|---|---|---|
| Square | has jumps | ||
| Sawtooth | has jumps | ||
| Triangle | corners but no jumps |
Waves with jumps have coefficients that shrink only like , so building a sharp step takes many terms. The triangle has no jumps, its coefficients shrink like , and a few terms already give a good shape. The smoother the shape, the less it needs high frequencies.
To be honest, next to a jump the sum never quite settles down. Right beside the jump there's an overshoot of about 9% of the jump height; add more terms and it gets narrower, but not lower. This is the Gibbs phenomenon. "The infinite sum equals the function" and "the worst error of the partial sums goes to zero" turn out to be different statements.
From tide machines to the inner ear
Others built the addition into machines. In 1872–1873 William Thomson, better known as Lord Kelvin, made a tide predictor in which one chain, running over and under pulleys, added up the up-and-down motions of many tidal components, much like the disks here. Machines of this kind helped predict the tides for the 1944 Normandy landings and kept working until computers took over in the 1960s and 1970s. In 1898 Albert Michelson and Samuel Stratton built an 80-element machine for adding and analyzing waves. That year Michelson also wrote to Nature questioning what the Fourier series of a sawtooth wave converges to, sparking an argument with the mathematician A. E. H. Love. J. Willard Gibbs joined in and, in an 1899 letter, described the overshoot that never goes away; hence the name Gibbs phenomenon. It's often said that Michelson's machine drew the overshoot and started it all, but its plots were reportedly not good enough to show it clearly. And the effect had already been worked out in 1848 by the English mathematician Henry Wilbraham, whose paper went largely unnoticed.
Kelvin's idea is still alive, too. The tide is treated as a sum of many components with periods tied to the motions of the Moon and Sun, and today's tide tables are still computed that way: the Japan Meteorological Agency, for example, computes its predicted tides from the amplitudes and phases of 60 components. The pulleys have simply been replaced by computer arithmetic.
Why do a violin and a flute sound different when both play 440 Hz? A large part of the answer is that they contain different amounts of the whole-number multiples of 440 Hz, the harmonics. Some electronic instruments even build sounds by adding sine waves together, a method called additive synthesis.
Even the electricity in your home is SHM: the mains voltage oscillates sinusoidally. In Japan it does so at 50 Hz in the east and 60 Hz in the west, because in the late nineteenth century Tokyo's electric light company bought 50 Hz generators from Germany while Osaka's bought 60 Hz generators from the United States, and the split has lasted ever since. Sharing power between the two halves of the country still requires frequency converter stations. The distorted currents drawn by motors and electronics are analyzed as harmonics, multiples of 50 or 60 Hz.
Taking signals apart into frequencies happens all around us. MP3 and JPEG split sound and images into frequency components and drop the ones we're unlikely to notice. MRI scanners build cross-sectional images by sorting the signals from the body by frequency.
Your own body does a version of this. In the cochlea of your inner ear, a membrane vibrates most strongly near its entrance for high pitches and farther in for low ones, so the ear sorts incoming sound roughly by frequency before it reaches the brain. That sorting plays a large part in letting you pick out the separate notes of a chord.
Fourier invented his series to solve a heat problem, and the same tool now handles heat and diffusion, the wave functions of quantum mechanics, and image processing. The image-frequency simulation takes the same idea into two dimensions.
Drawing with circles
So far we have watched only the height of the pen, the vertical part. What path does the tip of the joined rotating vectors itself follow across the plane? Write a point of the plane as the complex number . A point going round a circle of radius is then , and the joined tip is a sum of circles whose frequencies are whole-number multiples of :
Circles with negative turn clockwise. In fact even simple harmonic motion along a straight line is such a sum: , two equal circles turning in opposite directions.
For a shape that closes after one round, , divide the outline into equally spaced points . The coefficients are then
the discrete Fourier transform. It is the same trick as multiplying by and averaging: multiply by , average, and only circle survives. The "Heart" in this simulation is the curve , and the eight circles with draw it exactly. The "Five-pointed star" has corners, so however many circles you add, the corners stay slightly rounded. Its coefficients shrink roughly as . And because the star lands on itself when turned by 72°, only every fifth circle is used: . Without the clockwise circles, there would be no star.
Building complicated motion out of circles is a very old idea. Hipparchus in ancient Greece and Ptolemy in the second century described the puzzling paths of the planets with circles riding on circles, called epicycles. Their Earth-centered universe was later abandoned, but the mathematical part, that enough rotating circles can reproduce complicated periodic motion, was sound.
Turn the disks yourself
- The simulation opens with the square-wave preset and N = 4 terms. Compare the solid trace, which is the sum, with the purple dashed line, which is the target square wave.
- Move "Number of terms (disks)" from 1 up to 8. Does the overshoot near the corners shrink, or just get narrower?
- Predict, then check: set "Preset" to "Triangle wave (Fourier series)". Even N = 2 looks quite triangular. Explain the difference from the square wave using the coefficients.
- Choose "SHM (one disk: A = 5 cm, ω = 1.5 rad/s)" and look at the blue velocity and orange acceleration arrows. When the point is at the top of the circle, what are the velocity and acceleration of the pen? Compare "Acceleration " with " (compare with )".
- Drag a rotating point to change its radius and angle. The radius is the amplitude and the angle is the phase.
- Set "Preset" to "Beats (1.0 Hz and 1.2 Hz)". There are only two disks, yet the trace swells and fades every 5 seconds. Why 5 seconds? Explain it from the difference between the two frequencies. Do the half-wave, full-wave and pulse-train presets also approach their targets as you add disks?
- Set "Preset" to "Heart (drawn by the tip)". The view switches to "Trace the path of the tip of the rotating vectors", and the tip of eight circles draws a heart; the graph on the right records the tip's height. Lower "Number of terms ": how does the shape fall apart? With "Five-pointed star (drawn by the tip)", pick the disks one by one under "Disk to edit" and count how many turn clockwise, that is, have a negative frequency.
The fine print: the spacing and arrangement of the disks are chosen for clarity and have no physical meaning. With many disks, everything is scaled down to fit. The velocity and acceleration arrows are scaled so that, on the circle, each is as long as the radius.
A spare part for every wave
Uniform circular motion seen side-on is SHM, , and its acceleration is . Add several SHMs and you get waves of many shapes; a periodic wave is a sum of sine waves at whole-number multiples of one frequency, a Fourier series, and each coefficient can be pulled out by multiplying and averaging. Near a jump, though, an overshoot of about 9% of the jump remains however many terms you add.
The idea of SHM and of adding it up made pendulum clocks accurate, forced mathematicians to ask what a function is, and now runs tide tables and the compression of every song and photo on your phone. SHM matters because it is the common shape of every small oscillation, and because almost any periodic wave can be built from it, like a universal spare part.
A last puzzle: if two disks turn at 1 Hz and Hz, whose ratio is not a fraction, the sum never repeats exactly. Is there still any sense in which you could call it "periodic"?
Sources and further reading
- Joseph Fourier (MacTutor History of Mathematics, University of St Andrews)
- Georg Cantor (MacTutor History of Mathematics, University of St Andrews)
- Albert A. Michelson (Henri Poincaré Papers, Archives Henri Poincaré)
- N. Ciblak, "Resolution of the 300-Year-Old Vibrating String Controversy" (arXiv, 2018; historical section)
- Explanation of tide tables (Japan Meteorological Agency, in Japanese)
Further reading (encyclopedia):