Good Vibrations: The Simple Harmonic Oscillator

Physical Attraction
12 min readNov 18, 2017

Get a long piece of string with something tied to the end of it. A pair of headphones will do, if you let the earbuds dangle down. A plug or charger is also pretty good as long as you’re not too worried about the wires. Okay, now, let it dangle down with the “bob” under its own weight. Move the bob a little bit — so that the string makes an angle of about ten degrees to the vertical. Let it go, and watch it oscillate, back and forth. Congratulations: you are now essentially watching most of what we know about classical physics unfold before you. A vast chunk of our knowledge about the physics of the world around us comes back, time and time again, to this. Simple. System.

Wikimedia Commons image of the simple pendulum

This might seem like an exaggeration. But it’s less of an exaggeration than you might think. The system you’re watching swing back and forth is called a “harmonic oscillator”, and there are huge areas of physics that are dedicated to modelling everything as simple harmonic oscillators — from the motion of stars in galaxies, to the interactions between atoms in a crystal, to the current that flows in circuits. The motion of a harmonic oscillator obeys a simple equation. This equation is everywhere: it determines so much of the world around us that every physics student is sick to death of it after a year or so. Then, after two years, they grow to love it, because they realize there’s a really good reason why we keep using the harmonic oscillator equation. Quite simply: we know how vibrators work. We’re very familiar with that.

A key thing to understand about physics, I think, is that physics *explains* the things we see in the Universe, by finding mathematical models that represent the intricate complexities of reality. These models can be made to be astonishingly accurate — accurate enough to launch a rocket from Earth that lands on the Moon, or Mars, or intercepts a comet like we saw with the Rosetta probe recently. But they are just equations that do a pretty good job of describing reality; they are models. How good your model is; it’s a bit like the resolution on your camera. A low-resolution camera discards a lot of information, and gives you a blurry picture of what’s going on. A high-resolution camera stores a lot of data, and you might be able to see things on smaller scales. But, for a lot of purposes, low-resolution is good enough. If you’re stood on the train tracks, you don’t need a high-res camera that can tell you “Wow, that’s a Virgin Pendolino heading towards me at 100mph.” You just need to get out of the way. And it turns out that the harmonic oscillator is a really good model for a lot of systems we find in nature.

Physics is the expanding brain meme. There are layers of complexity to your models.

To understand why, imagine you have a ball at the bottom of a round basin — maybe like a tennis ball in a sink. If you slide the tennis ball a small way from the centre, it’s going to oscillate around the centre, back and forth — and, providing you don’t move it too far, these oscillations will be harmonic oscillations, just like our pendulum, or a weight on the end of a slinky spring. And it turns out that a lot of things in nature are like balls at the bottom of a sink; we say that they’re “sat in a potential well”, which is a fancy way of saying the same thing. Systems tend to relax, and they tend to rearrange themselves, if they can, so that they have the minimum energy: I feel like this is one of the most relatable principles of physics, because, you know: same. Call it a “laziness principle” if you like. If you knock your glass off a desk, it will flump down to the floor, where it has less gravitational potential energy. It’s fallen deeper and deeper into Earth’s “gravitational potential well”.

The quadratic approximation for a potential well. https://chem.libretexts.org/Textbook_Maps/Physical_and_Theoretical_Chemistry_Textbook_Maps/Map%3A_Physical_Chemistry_(McQuarrie_and_Simon)/13%3A_Molecular_Spectroscopy/13-05._Overtones_Are_Observed_in_Vibrational_Spectra; shared under Creative Commons licence.

The same is true for atoms in a crystal, or in most substances really. They feel forces from the atoms that are around them, because of the electromagnetic force, and so they are also in potential wells. And the system tends to rearrange itself so that as many atoms as possible are in the bottoms of its potential well, because that minimises energy. What happens if you give the atoms a smack? (Steady on!) You set off a chain of vibrations — all of the atoms will start oscillating in their potential wells, just like the pendulum, or the tennis-ball in the sink — and this flows through the material, like a sound wave. But, providing you don’t smack too hard, the motions of the atoms will look like a harmonic oscillator. You can see this time and time again in physics. If you squint hard enough, if you disturb things just a little bit, loads of things look like harmonic oscillators. So we spend a lot of time studying these systems.

I remember a class we had once where our distinguished professor — a very-well respected man — was talking about this subject, only in quantum mechanics. This guy is probably the most intelligent physicist any of us have ever met: so when he says “Imagine, for a second, that I put a certain amount of energy into a vibrator…” we all had to try not to laugh. Without knowing it, he’d come up with a pretty forward chat-up line.

My contribution was:

“Hey, baby, let’s go to the dancefloor so that we can execute simple harmonic transverse oscillations together.”

Which, you know, has never worked on anyone. But now you can imagine what that might look like. It really is basically my one type of dance-move. Bizarre, unsettling, repetitive oscillations. If you’re going to go to clubbing, conservation of energy is important, especially when they haven’t played Dexy’s Midnight Runners yet.

So what does this all-important equation I’ve been blathering about look like? Here, I can hear the chorus of well-trained physics students from across the land. LIGHT THE BEACONS!

Via the excellent Hyperphysics — http://hydrogen.physik.uni-wuppertal.de/hyperphysics/hyperphysics/hbase/oscdr.html

Okay, so, what does that mean? If we break it down term by term, it’s basically a force equation. It’s a differential equation, which means that we’re dealing with quantities that are changing in time. X is the position of the oscillator, and physicists use dots to mean “rate of change with time.” So x dot is how quickly position changes with time — that’s your speed, technically velocity. And x double dot is how quickly velocity changes with time — that’s your acceleration.

Newton’s Second Law says that things accelerate based on how hard, and in what direction, you push them. Those are the forces that act on the object. The first part of the equation, x double dot — that’s the acceleration. The next part, gamma x dot — that’s what we call the damping force. You can see it depends on how fast our oscillator is going. This might be friction, for the ball in the sink, or air resistance, for a pendulum. This term is what slows the oscillations down and eventually means, after a long time, things settle back to be stationary again. If there’s no damping, the system will oscillate forever. The next part, omega squared x — that’s what we call the “restoring force”. You can see that it’s proportional to the position, so what does that mean? This is the force that actually causes oscillations. And, for harmonic oscillations, the force that pulls you back has to be bigger the further away from the centre you get. This makes sense — for our tennis-ball in the sink, if you pull it further from the centre, gravity pulls it back to the centre more quickly. The same is true of the pendulum, and everything else. Imagine the atoms in the crystal. The more you push them towards each other, the more violently they’ll repel. So we can see that there’s a restoring force there, too.

Okay, so, why omega squared? Well, it turns out that this term basically tells you the frequency of the oscillations — how quickly they’ll happen. This is really, really remarkable; but it’s just a mathematical fact from solving the equations. Imagine pulling that ball a tiny distance from the centre and watching it oscillate. Those oscillations take as long as the oscillations that are a much bigger distance from the centre. The distances the ball has to travel are greater, but the speeds are also higher, and these effects cancel out exactly!

Just one more term to go — F(t). This takes into account any other forces that might be acting on the oscillator.

Imagine you’re pushing a child on a swing. (Hopefully the child knows you well, and is not alarmed. Please don’t try this at home unless you have a friendly child.) This is another harmonic oscillator. The damping forces are air resistance, and maybe friction where the swing connects to the frame. The restoring force is gravity — the weight of the child and swing pulling it back down to a happy equilibrium where the swing hangs straight down. But F(t) — that’s you! You’re giving the kid a push, and that’s a force that depends on time, so it’s attached to our equation.

Tiny, joyful physicist

If you’re rubbish at swings, you’ll wait until the kid is at the peak of the swing, and waltz forward and try to push the kid when they’re at their maximum height away from you; it won’t work, they’ll fly back and smash you in the face, and then probably laugh while you crawl around in the dirt. Kids can be so cruel.

If you’re *good* at swings, you’ll wait until the kid is as close to you as possible — when they’ve just stopped, even — and then push. That way, your driving force is adding to that of gravity, and you’re putting energy into the system. The kid will swing higher and higher, and either start laughing or screaming, depending on how brave they are. (I was a screamer.)

Thinking about the energy for a second: we know that energy cannot be created or destroyed, only changed into different forms. Ignoring friction for a second, which changes some energy into heat, the main thing that’s going on is that gravitational energy is changing into kinetic (movement) energy. When the kid is at the peak of the swing, all of the energy is in gravitational form, and it’s being used to drag the kid as far from Earth’s gravity as possible. When the kid is at the bottom, they’ll be moving quickest; all the energy is in the form of the speed they have as they whiz through. So, when you add energy to the system with your pushes, you’re increasing the total amount of energy. This means that the kid will reach a higher peak, but also, when they’re at the bottom, they’ll be travelling faster.

There’s a fun mathematical consequence to this equation. If there’s no damping, and if you time that driving force just right, there’s no limit to how much energy you can put into the system. (If there is damping, eventually, it will take energy out as fast as you put in.) This “perfect timing” is called a resonance, and it can have amazing consequences. For a start, because you’re always putting energy in, the amplitudes and speeds of vibrations can become massive. The classic example everyone loves to use is suspension bridge disasters — although the most famous one might not actually be a proper resonance. One that probably was — the Broughton suspension bridge — was in Salford in the 1820s. One day, some soldiers were walking across the bridge, and they realized it was vibrating beneath their feet. The bridge was acting like a harmonic oscillator. According to reports, the soldiers found this a “pleasing sensation” — I mean, okay, I guess it’s lonely in the barracks — and they all started walking in time with the vibration, to “humour it by the manner in which they stepped.” Obviously it’s lonelier than I thought; when you’re trying to get with a bridge, things are bad.

Everything is fine

You can probably appreciate that driving the system at its natural frequency was a really bad idea. The bridge started vibrating with higher and higher amplitudes, with all the lonely soldiers driving it with more and more energy, until… something snapped, and the bridge collapsed. Luckily, none of the soldiers died, but if they’d had a bit more physics knowledge, they could have avoided various injuries. After that, it was army policy to break step when walking along bridges. Physics 101: don’t flirt with a bridge.

The idea of natural frequencies at which things can vibrate is obviously fundamental to music. A guitar string, for example, has a lot of frequencies it likes to vibrate at. But they’re all multiples of a fundamental frequency — and that frequency is set by the length of the string. That’s why the frequency of sound you get from a guitar changes when you tighten or loosen the string; unless you’re me playing Going To Georgia by The Mountain Goats in which case you snap all of the strings out of a mix of enthusiasm and incompetence.


Physicists call these types of oscillations — all the different ways that a string can vibrate — “normal modes”. You can imagine what a normal mode might look like by thinking about a string that’s tied down at both ends.

The first normal mode is the simplest possible way you can have both ends of the string fixed in place. You pluck the string, in the centre, and it vibrates so that it just has a single hump, one peak. So when it’s at its fullest extent, it looks like a shallow hill.

Via Open University

The second normal mode, you have two humps, and the string at maximum displacement forms an S –type shape, or a sine wave. Kind of like a shallow hill, and then a shallow valley next to it, a peak and a trough. Note that this means that, as the string vibrates, there’s one point in the middle that never moves, and we call that a node.

And so on, adding more peaks and troughs with each more complicated normal mode that vibrates at a different frequency.

And, if there’s some energy in a normal mode for a system, we say that the normal mode is excited. Which gives rise to another vibrate-y chat-up line:

“Hey, baby, you excite all of my normal modes.”

And this normal mode analysis is really useful. Because what is a normal mode? It’s actually just all the molecules that make up the string, or whatever, vibrating like little harmonic oscillators at the same frequency. And these are the solutions you get. And it turns out that almost any kind of vibration — any kind of periodic motion, that repeats itself — can be written as a big sum over lots of these normal modes. So, once you understand that, you can decompose any type of oscillation into lots and lots of vibrators, and lots and lots of simple systems that we can understand and solve. And you can work out how the oscillation is going to change in time like this. For example, you can break down any sound — whether it’s Nicki Minaj or Beethoven’s Fifth or birdsong — into its normal modes, into sine waves. It’s just a different mix of the same, fundamental sounds. And in a similar way, you can break down lots of physics into sums of different harmonic oscillations. You can break down loads of really complicated waves into their normal mode components. And that lets you solve all kinds of different systems with the same basic mathematics.

cf. for example: https://www.projectrhea.org/rhea/index.php/Fourier_analysis_in_Music

There’s another really good reason physicists grow to love the harmonic oscillator equation. In some ways, it’s the only equation we can actually solve.

Okay, that’s a bit of an exaggeration. But lots of other equations in nature require computers to solve them properly — because they don’t have solutions that we’re really familiar with; the equations and functions that come from them aren’t the ones we’re used to. But the simple harmonic oscillator has a simple solution: it’s just a sine wave, like the trigonometric functions you might remember from school. We know this function, mathematically, incredibly well. Every physicist and mathematician can sketch it and tell you all kinds of facts about its properties. Whenever we see it, it makes us very happy.

And, in a lot of ways, it’s remarkable just how far you can get with it. You could teach for hours and hours upon end about all kinds of systems that basically reduce down to this one equation, in some way or another. The motions of atoms and the motions of stars. There are many ways in which they’re different, but — if you squint a bit — there are many ways in which they can all look the same. It’s comforting.

You can listen to episodes of my show, including this one, here:
www.physicspodcast.com

--

--