Pluck a guitar string, nudge a mass hanging from a spring, or give a playground swing a small push. Three completely different physical setups — different materials, different forces, different sizes — and yet if you plotted position against time for any of them, you'd get the same shape of graph: a smooth, repeating wave. That's not a coincidence, and it's not a coarse approximation either. It's a genuinely precise mathematical fact, and by the end of this topic you'll see exactly why it has to be true.
The restoring force
Everything here starts from one idea: a restoring force, a push or pull that always points back toward some equilibrium position, growing stronger the farther you get from it. The cleanest example is an ideal spring, obeying Hooke's law:
Look closely at that minus sign, because it's doing all the work. is displacement from equilibrium, and is the force the spring exerts. Whichever direction you pull the mass, the spring pulls back the other way. Push it right, the force points left. Push it left, the force points right. There's no direction you can displace the mass in that doesn't get met with a force trying to undo it.
Guessing the solution, and checking it actually works
Combine Hooke's law with Newton's second law, , and you get a genuinely new kind of equation — one where the "answer," , appears on both sides, tangled up with its own second derivative:
Rather than grinding through the general machinery for solving this, let's do something very much in the spirit of physics: guess an answer, and check whether it works. A natural guess, given that we already expect repeating, wave-like motion, is:
where is the amplitude (how far the motion reaches from equilibrium), is a phase constant that just shifts where the clock starts, and is something we're about to pin down. Differentiate twice:
Substitute that last result into :
It works — for any amplitude and any phase , as long as takes this exact value. That's the whole derivation. The guess wasn't a lucky accident; cosine (and sine) are, by definition, the functions whose second derivative is a negative multiple of themselves, which is exactly what demands.
here is the angular frequency, and it sets the period — the time for one full cycle:
Notice what's not in that formula: the amplitude. A spring oscillating through a wide swing and the same spring oscillating through a tiny swing take exactly the same time per cycle. That's a genuinely surprising, non-obvious feature of this kind of motion, and it's the reason a pendulum clock can keep steady time even as it gradually loses energy to friction and its swings shrink.
Where the energy goes, moment to moment
This is a perfect place to put the tools from work and energy back to work. The spring's potential energy is , and kinetic energy is the usual . Since no friction is acting, total mechanical energy is conserved:
At the extremes of the motion (), the mass is momentarily at rest (), so all the energy is potential: . At the instant it passes through equilibrium (), all of that energy has converted to kinetic, giving the motion its maximum speed. Sitting between those two extremes, energy sloshes continuously back and forth between the two forms, twice every cycle, while their sum never wavers.
The pendulum was secretly the same equation all along
Here's a satisfying loose end to tie off. In Lagrangian mechanics, we derived the exact equation of motion for a pendulum: . That's not the simple harmonic equation — it has in it, not itself. But for small swings, there's a classic approximation: when is small (measured in radians). Make that substitution, and the pendulum's equation collapses into:
— exactly the simple-harmonic form, with standing in for . This is precisely why a pendulum clock only keeps good time for small swings: push it through a wide arc and stops being a good approximation, the motion stops being truly sinusoidal, and the period starts to depend on amplitude after all.
Worked example
A 0.50 kg mass on a spring with spring constant 50 N/m is pulled 0.20 m from equilibrium and released from rest. Find the period of oscillation and the mass's maximum speed. (click to reveal the solution)
Setting up: released from rest at m, so this is the amplitude. We're given kg and N/m.
Angular frequency:
Period:
Maximum speed, using conservation of energy — all the energy is potential at , all of it kinetic at :
Notice that falls straight out of the energy equation once you recognize as — the same angular frequency that set the period is also, quietly, the conversion factor between amplitude and top speed.
Where this fits
This topic sits alongside work-energy as a direct application of Newton's laws to one of the most common patterns in physics: a restoring force pulling a system back toward equilibrium. We've treated it here with nothing more than and a good guess at the solution — but the same mass-on-a-spring system reappears later in the Hamiltonian mechanics topic, where its phase-space orbit turns out to be a perfect closed ellipse, and this exact equation resurfaces again, essentially unchanged, at the foundation of quantum mechanics.