Appearance
2.1 — Simple Harmonic Motion
Pull a mass hanging on a spring downwards and let go. It rises, overshoots, falls back, overshoots again, and keeps going. Pluck a guitar string and it does the same thing five hundred times a second. Set a pendulum swinging and it does it once a second. Cool a crystal to near absolute zero and its atoms are still doing it, billions of times a second, and Chapter 7.4 will show they never stop.
These look like four unrelated things. They are one thing, because they all satisfy the same differential equation, and that equation has exactly one shape of solution. This chapter derives the equation, solves it completely, and then shows how much of physics turns out to be a special case of it.
The condition that produces oscillation
Anything that oscillates needs two ingredients, and only two.
A stable equilibrium. A position where the net force is zero, and which the system returns towards when disturbed. In the language of Chapter 1.6, a minimum in the potential energy curve.
A restoring force that grows with displacement. Push it further away and it pulls back harder.
The simplest possible version of that second condition is that the force is directly proportional to the displacement:
\boxed{F = -kx}
Read aloud: the force equals minus k times x. The minus sign is the whole physical content — it says the force points opposite to the displacement, back towards x = 0. Pull the mass right and the force is left; push it left and the force is right. k is the stiffness, in newtons per metre.
This is Hooke's law, published by Robert Hooke in 1678 as the anagram ceiiinosssttuv, which unscrambles to ut tensio, sic vis — "as the extension, so the force". He published it as an anagram to claim priority while he worked out what it was good for, which was a common and slightly absurd practice at the time.
Any motion produced by a force of this form is called simple harmonic motion, and the word "simple" is earning its place: it means the proportionality is exact, with no x^2 or x^3 terms.
The equation, and why its solution has to be a sine
Apply Newton's second law:
ma = -kx
Since a = d^2x/dt^2:
m\frac{d^2x}{dt^2} = -kx
\boxed{\frac{d^2x}{dt^2} = -\frac{k}{m}x}
This is the equation of simple harmonic motion, and read as an English sentence it says: find a function whose second derivative is the function itself, turned upside down and scaled.
That question almost answers itself. Which functions come back to themselves after two differentiations, with a sign flip? Differentiate \sin and you get \cos; differentiate \cos and you get -\sin. Two differentiations and you are back where you started with a minus sign. Nothing else in elementary mathematics does that except sine, cosine, and combinations of them — which is why every simple harmonic oscillator in the universe moves in a sine wave, regardless of what it is made of.
Define
\omega = \sqrt{\frac{k}{m}}
so the equation becomes the compact
\frac{d^2x}{dt^2} = -\omega^2x
Verify the solution rather than accepting it. Propose
x(t) = A\sin(\omega t+\phi)
Differentiate once, using the chain rule so the inner \omega comes out:
v = \frac{dx}{dt} = A\omega\cos(\omega t+\phi)
Differentiate again:
a = \frac{dv}{dt} = -A\omega^2\sin(\omega t+\phi)
The last expression is -\omega^2 times the original A\sin(\omega t+\phi), which is -\omega^2x. It satisfies the equation exactly, for any values of A and \phi. Since a second-order differential equation needs exactly two free constants, this is the complete solution and there are no others.

That picture is the shortest way to remember every formula below. SHM is the projection of uniform circular motion onto a diameter. The circle has radius A and angular speed \omega; the shadow's position is A\sin(\omega t + \phi), its speed is the shadow of the circular speed A\omega, and its acceleration is the shadow of the centripetal acceleration A\omega^2. Every factor of \omega in the results below is that circle turning.
What the three constants mean
A — the amplitude. The furthest the oscillator ever gets from equilibrium. Set by how hard you started it, and not by the system.
\omega — the angular frequency, in radians per second. Set entirely by the system: \omega = \sqrt{k/m} and nothing else. Related to the everyday quantities by
T = \frac{2\pi}{\omega}, \qquad f = \frac{1}{T} = \frac{\omega}{2\pi}
T is the period, the seconds per full cycle, and f is the frequency, cycles per second, measured in hertz.
\phi — the phase constant, in radians. Where in the cycle the clock was started. Release the mass from full displacement and \phi = \pi/2, so the solution reads as a cosine; give it a push from the middle and \phi = 0.
The single most important consequence
\boxed{T = 2\pi\sqrt{\frac{m}{k}}}
The period does not depend on the amplitude. Pull the mass 1 cm and it takes exactly as long per cycle as when pulled 10 cm. That is not obvious — with a bigger pull it has ten times as far to travel, but it also feels ten times the force, so it moves ten times faster, and the two effects cancel exactly.
That property has a name, isochronism, and it is the reason clocks work at all. A pendulum clock keeps time even as its swing slowly dies down, because a smaller swing takes the same time as a larger one. Galileo noticed it in 1602, allegedly while watching a lamp swing in Pisa cathedral and timing it against his own pulse. Christiaan Huygens turned it into the first pendulum clock in 1656, and overnight the best clocks in the world went from losing fifteen minutes a day to losing fifteen seconds.
Speed, acceleration and energy
Maximum speed is at the centre, where \cos = 1:
v_{\max} = A\omega
Maximum acceleration is at the extremes, where \sin = \pm1:
a_{\max} = A\omega^2
Note where each one peaks: the oscillator is fastest exactly where the force is zero, and momentarily still exactly where the force is largest. Those two facts are the whole reason it overshoots and keeps going instead of settling.
Speed as a function of position, which is more useful than speed as a function of time because it does not need you to know where in the cycle you are. Start from the two expressions:
x = A\sin(\omega t+\phi), \qquad v = A\omega\cos(\omega t+\phi)
Rearrange each to isolate the trigonometric function, then use \sin^2+\cos^2 = 1:
\left(\frac{x}{A}\right)^2 + \left(\frac{v}{A\omega}\right)^2 = 1
Multiply through by A^2\omega^2:
\omega^2x^2 + v^2 = A^2\omega^2
\boxed{v = \omega\sqrt{A^2-x^2}}
At the centre, x = 0, giving v = A\omega ✓. At the extremes, x = \pm A, giving v = 0 ✓.
Energy
Kinetic:
K = \tfrac12mv^2 = \tfrac12m\omega^2(A^2-x^2) = \tfrac12k(A^2-x^2)
using m\omega^2 = k, which follows directly from \omega^2 = k/m.
Potential, from Chapter 1.6:
U = \tfrac12kx^2
Total:
E = K+U = \tfrac12k(A^2-x^2) + \tfrac12kx^2 = \boxed{\tfrac12kA^2}
The x cancels completely. The total energy is constant and depends only on the amplitude, squared. Double the amplitude and you need four times the energy. That is why a loud sound carries four times the energy of one at half the amplitude, and why earthquake magnitudes are logarithmic — the energy range is enormous.
The energy sloshes back and forth between the two forms twice per cycle: all kinetic at the centre, all potential at the extremes, and in between a mixture. Because both K and U involve squares, each of them oscillates at twice the frequency of the motion itself.
The average of each over a full cycle is \tfrac14kA^2, exactly half the total. That equal sharing between kinetic and potential energy is not a coincidence of this system; it is a general result for any potential proportional to the square of the displacement, and Chapter 3.2 turns it into the equipartition theorem, which is what tells you the specific heat of a gas.
The pendulum, and the approximation everyone forgets
A mass on a string of length \ell, displaced by angle \theta. The restoring force is the component of gravity along the arc:
F = -mg\sin\theta
The arc length is s = \ell\theta, so:
m\frac{d^2s}{dt^2} = -mg\sin\theta \quad\Longrightarrow\quad \ell\frac{d^2\theta}{dt^2} = -g\sin\theta
This is not simple harmonic motion. The restoring force goes as \sin\theta, not as \theta, so it is not proportional to the displacement and none of the results above apply.
The escape is the small-angle approximation. The Taylor series for sine (Volume II, Chapter 5.8) is
\sin\theta = \theta - \frac{\theta^3}{6} + \frac{\theta^5}{120} - \cdots
so for small \theta measured in radians, \sin\theta \approx \theta, and the error is about \theta^3/6.
How small is small? At 10° = 0.1745 rad, \sin\theta = 0.1736 — an error of 0.5%. At 30° = 0.5236 rad, \sin\theta = 0.5, an error of 4.7%. At 90° the "approximation" is off by 57%.
Making it, the equation becomes:
\frac{d^2\theta}{dt^2} = -\frac{g}{\ell}\theta
which is exactly the SHM equation with \omega^2 = g/\ell:
\boxed{T = 2\pi\sqrt{\frac{\ell}{g}}}
This is the formula Chapter 1.1 guessed from dimensional analysis alone, and the 2\pi that dimensional analysis could not supply has now been derived.
The mass is absent. A lead bob and a cork bob on identical strings swing at identical rates, because a heavier bob feels a proportionally larger restoring force — the same cancellation as in free fall.
Amplitude is absent, but only because we threw it away. The true period does depend slightly on amplitude:
T = 2\pi\sqrt{\frac{\ell}{g}}\left(1 + \frac{1}{16}\theta_0^2 + \frac{11}{3072}\theta_0^4 + \cdots\right)
At a swing of 10° that correction is 0.19%, which over a day is 165 seconds — utterly unacceptable for a clock. Pendulum clocks are therefore built with tiny swings, typically 2° or less, where the correction falls to 0.008%. Huygens knew about this and tried to solve it exactly by making the bob swing along a cycloid rather than a circle, which is genuinely isochronous at any amplitude; the mechanism introduced more friction than it saved in error, and clockmakers went back to small swings instead.
Where else the same equation turns up
Here is the reason this chapter matters more than a chapter about springs should.
Any system sitting in a potential energy minimum obeys this equation for small displacements, whatever its actual potential looks like. The proof is a Taylor expansion (Volume II, Chapter 5.8). Expand U(x) about a minimum at x_0:
U(x) = U(x_0) + U'(x_0)(x-x_0) + \tfrac12U''(x_0)(x-x_0)^2 + \cdots
The first term is a constant, and constants in potential energy never matter. The second term contains U'(x_0), which is zero because x_0 is a minimum — that is what "minimum" means. So the first surviving term is the third one:
U(x) \approx \tfrac12U''(x_0)(x-x_0)^2
Which is \tfrac12kx'^2 with k = U''(x_0). Every potential energy minimum looks like a parabola if you zoom in far enough, so every small oscillation about any stable equilibrium is simple harmonic. The system does not get a choice.
This is why the same equation and the same \sqrt{\text{stiffness}/\text{inertia}} pattern describes:
| System | Restoring effect | Frequency |
|---|---|---|
| Mass on a spring | Spring stiffness | \sqrt{k/m} |
| Pendulum | Gravity along the arc | \sqrt{g/\ell} |
| Floating object bobbing | Buoyancy | \sqrt{\rho gA/m} |
| Liquid in a U-tube | Weight of the level difference | \sqrt{2g/L} |
| LC circuit | Capacitor voltage | 1/\sqrt{LC} |
| Atoms in a crystal | Interatomic bond | \sqrt{k_{\text{bond}}/m_{\text{atom}}} |
| Molecular vibration | Chemical bond | \sqrt{k/\mu} |
The electrical one in that list is worth pausing on. An inductor and a capacitor connected together obey
L\frac{d^2q}{dt^2} = -\frac{q}{C}
which is character for character the same equation with charge in place of position, inductance in place of mass and 1/C in place of stiffness. Nothing is oscillating mechanically at all — and yet everything derived here applies unchanged. Volume III, Chapter 1.6 works that circuit out in full, and it is the reason a radio can be tuned.
Worked example: a mass on a spring
A 0.50 kg mass on a spring of stiffness 200\ \text{N/m} is pulled 8.0 cm from rest and released. Find the period, the maximum speed, the maximum acceleration, the total energy, and the speed when it is 4.0 cm from the centre.
\omega = \sqrt{\frac{k}{m}} = \sqrt{\frac{200}{0.50}} = \sqrt{400} = 20.0\ \text{rad/s}
T = \frac{2\pi}{\omega} = \frac{6.283}{20.0} = 0.314\ \text{s}, \qquad f = \frac{1}{0.314} = 3.18\ \text{Hz}
Released from rest at maximum displacement, so A = 0.080 m.
v_{\max} = A\omega = 0.080\times20.0 = 1.60\ \text{m/s}
a_{\max} = A\omega^2 = 0.080\times400 = 32.0\ \text{m/s}^2
That acceleration is 3.3 times g, from a spring you could stretch with two fingers.
E = \tfrac12kA^2 = \tfrac12\times200\times0.0064 = 0.64\ \text{J}
At x = 0.040 m:
v = \omega\sqrt{A^2-x^2} = 20.0\sqrt{0.0064-0.0016} = 20.0\sqrt{0.0048} = 20.0\times0.0693 = 1.39\ \text{m/s}
Worth noticing: at half the amplitude the speed is still 87% of maximum, not 50%. The speed–position relationship is an ellipse, not a straight line, so the oscillator spends most of its time near the extremes moving slowly and flashes through the middle. That is why a photograph of a vibrating string with a long exposure shows bright edges and a dim centre.
Worked example: the vertical spring, and where gravity goes
Hang a mass on a spring so it stretches by x_0 and sits still. Now pull it down further and release. Does gravity change the period?
At the new equilibrium, the spring force balances the weight:
kx_0 = mg \quad\Longrightarrow\quad x_0 = \frac{mg}{k}
Now displace by a further y below this new equilibrium. The total spring stretch is x_0+y, so the net force is:
F = mg - k(x_0+y) = mg - kx_0 - ky = mg - mg - ky = -ky
Gravity cancels completely. The motion is SHM about the new equilibrium with exactly the same \omega = \sqrt{k/m} as a horizontal spring. Gravity moved the equilibrium point and changed nothing else.
This is a general fact: a constant force added to a harmonic system shifts the equilibrium and leaves the frequency alone. It is why a guitar string's pitch does not change when you turn the guitar upside down, and why a mass on a spring keeps time identically on the Moon while a pendulum there runs 2.4 times slower.
Where this shows up in your life
A quartz watch keeps time with a tiny tuning-fork-shaped crystal of quartz cut to oscillate at exactly 2^{15} = 32\,768 Hz. That number is chosen so that fifteen successive halvings by a digital counter give exactly one pulse per second. Quartz is used because it is piezoelectric — squeezing it produces a voltage and applying a voltage squeezes it — so the same crystal can be both driven and read electrically. The mechanical oscillation is exactly the SHM of this chapter, and it is stable to a few parts per million, which is a few seconds per month.
Car suspension is a mass on a spring, deliberately built with a low \omega — around 1 Hz, matching the frequency of comfortable walking — because that is the frequency the human body tolerates best. Getting it near 4 or 5 Hz makes passengers seasick regardless of how smooth the road is.
And every molecule you are made of is a set of coupled harmonic oscillators. A carbon–oxygen bond vibrates around 5\times10^{13} Hz, which is exactly the frequency of infrared light — which is why carbon dioxide absorbs infrared, why it is a greenhouse gas, and why an infrared spectrometer can identify a compound from the frequencies it swallows. Chapter 3.7 and Chapter 8 return to this, and Chapter 7.4 shows what happens when the oscillator is small enough that quantum mechanics takes over.
What the next chapter fixes
Every oscillation here runs forever with constant amplitude, and nothing does. Real oscillators lose energy and die away, and if you push them at the right rate they grow instead — sometimes catastrophically. Chapter 2.2 adds damping and driving, derives the resonance curve, and explains why a wine glass shatters at one particular note while every other note does nothing at all.