Equation of the Day #14: The Harmonic Oscillator

The career of a young theoretical physicist consists of treating the harmonic oscillator in ever-increasing levels of abstraction.”
Sidney Coleman

One of the first physical systems students get to play with is the harmonic oscillator. An oscillator is a system with some property that varies repeatedly around a central value. This variation can be in displacement (such as a mass on a spring), voltage (like the electricity that comes out of the wall), or field strength (like the oscillations that make up light). When this variation has a fixed period, we call the motion harmonic oscillation, and the simplest harmonic oscillation is known as — you may have guessed — simple harmonic oscillation.

A simple harmonic oscillator is a system under the influence of a force proportional to the displacement of the system from equilibrium. Think of a mass on a spring; the further I pull the mass from the spring’s natural length, the more the spring pulls back, and if I push the mass so that the spring compresses, the spring will push against me. Mathematically, this is known as Hooke’s Law and can be written as

F=-k\Delta x

where F is the net force applied to the system, Δx is the displacement of the system from equilibrium, and k is some proportionality constant (often called the “spring constant”) which tells us how strongly the spring pushes or pulls given some displacement – a larger k indicates a stronger spring. If I let go of the mass when it is displaced from equilibrium, the mass will undergo oscillatory motion. What makes this “simple” is that we’re ignoring the effects of damping or driving the oscillation with an outside force.

How do we know that such a restoring force causes oscillatory motion? Utilizing Newton’s second law,

\begin{aligned} F &= ma\\ &= -kx\\ \Rightarrow \dfrac{d^2x}{dt^2} &= -\dfrac{k}{m} x \end{aligned}

The solution to this equation is sinusoidal,

x(t) = A\cos(\omega t +\phi),

where A is the amplitude of oscillation (the farthest the mass gets from equilibrium),

\omega \equiv \sqrt{\dfrac{k}{m}}

is the angular frequency of oscillation, and ϕ is the phase, which captures the initial position and velocity of the mass at time t = 0. The period is related to the angular frequency by

T=\dfrac{\tau}{\omega}

For this reason, harmonic oscillators are useful timekeepers, since they oscillate at regular, predictable intervals. This is why pendulums, coiled springs, and currents going through quartz crystals have been used as clocks. What other physical systems does this situation apply to? Well, if you like music, simple harmonic oscillation is what air undergoes when you play a wind, string, or membrane instrument. What you’re doing when you play an instrument (or sing) is forcing air, string(s), or electric charge (for electronic instruments) out of equilibrium. This causes the air, string(s), and voltage/current to oscillate, which creates a tone. Patch a bunch of these tones together in the form of chords, melodies, and harmonies, and you’ve created music. A simpler situation is blowing over a soda/pop bottle. When you blow air over the mouth of the bottle, you create an equilibrium pressure for the air above the mouth of the bottle. Air that is slightly off of this equilibrium will oscillate in and out of the bottle, producing a pure tone.


Image: Wikipedia

Now for the fun part: what happens when we enter the quantum realm? Quantum mechanics says that the energy of a bound system is quantized, and an ideal harmonic oscillator is always bound. The total energy of a harmonic oscillator is given by

\begin{aligned} E &= \dfrac{1}{2} mv^2 + \dfrac{1}{2} kx^2\\  &= \dfrac{1}{2m} \left(p^2 + (m\omega x)^2\right), \end{aligned}

where the first term is the kinetic energy, or energy of motion, and the second term is the potential energy, or energy due to location. I used the facts that p = mv and k = 2 to go from the first line to the second line. The quantum prescription says that p and x become mathematical operators, and the energy takes a role in the Schrödinger equation. For the harmonic oscillator, solving the Schrödinger equation yields the differential equation

\begin{aligned} \dfrac{\hbar}{m\omega}\dfrac{d^2\psi}{dx^2} + \left(\dfrac{2E}{\hbar\omega} - \dfrac{m\omega}{\hbar}\, x^2 \right) \psi(x) = 0 \end{aligned}

where ħ is the (reduced) Planck constant, and ψ is the quantum mechanical wave function. After solving this differential equation, the allowed energies turn out to be

E_n = \hbar\omega \left(n+\dfrac{1}{2}\right)

where n = 0, 1, 2, . . . is a nonnegative integer. Unlike the classical picture, the quantum states of the harmonic oscillator with definite energy are stationary and spread out over space, with higher energy states spread out more than lower energy states. There is a way, though, to produce an oscillating state of the quantum harmonic oscillator by preparing a superposition of pure energy states, forming what’s known as a coherent state, which actually does behave like the classical mass on a spring. It’s a weird instance of classical behavior in the quantum realm!


Classical simple harmonic oscillators compared to quantum wave functions of the simple harmonic oscillator.
Image: Wikipedia

An example of a quantum harmonic oscillator is a molecule formed by a pair of atoms. The bond between the two atoms gives rise to a roughly harmonic potential, which results in molecular vibrational states, like two quantum balls attached by a spring. Depending on the mass of the atoms and the strength of the bond, the molecule will vibrate at a specific frequency, and this frequency tells physicists and chemists about the bond-lengths of molecules and what those bonds are made up of. In fact, the quantum mechanical harmonic oscillator is a major topic of interest because the potential energy between quantum objects can often be approximated as a Hooke’s Law potential near equilibrium, even if the actual forces at play are more complex at larger separations.

Additionally, the energy structure of the harmonic oscillator predicts that energies are equally spaced by the amount ħω. This is a remarkable feature of the quantum harmonic oscillator, and it allows us to make a toy model for quantum object creation and annihilation. If we take the energy unit ħω as equal to the rest energy of a quantum object by Einstein’s E = mc2, we can think of the quantum number n as being the number of quantum objects in a system. This idea is one of the basic results of quantum field theory, which treats quantum objects as excitations of quantum fields that stretch over all of space and time. This is what the opening quote is referring to; physicists start off learning the simple harmonic oscillator as classical masses on springs or pendulums oscillating at small angles, then they upgrade to the quantum treatment and learn about its regular energy structure, and then to upgrade to the quantum field treatment where the energies are treated as a number of quantum objects arising from a omnipresent quantum field. I find it to be one of the most beautiful aspects of Nature that such a simple system recurs at multiple levels of our physical understanding of reality.

-A

Equation of the Day #13: Chaos

Chaos is complexity that arises from simplicity. Put in a clearer way, it’s when a deterministic process leads to complex results that seem unpredictable. The difference between chaos and randomness is that chaos is determined by a set of rules/equations, while randomness is not deterministic. Everyday applications of chaos include weather, the stock market, and cryptography. Chaos is why everyone (including identical twins who have the same DNA) has different fingerprints. And it’s beautiful.

How does simplicity lead to complexity? Let’s take, for instance, the physical situation of a pendulum. The equation that describes the motion of a pendulum is

\dfrac{d^2\theta}{dt^2} = -\dfrac{g}{l} \sin\theta

where θ is the angle the pendulum makes with the imaginary line perpendicular to the ground, l is the length of the pendulum, and g is the acceleration due to gravity. This leads to an oscillatory motion; for small angles, the solution of this equation can be approximated as

\theta(t) \approx A\cos\left( \sqrt{\dfrac{g}{l}} t\right)

where A is the amplitude of the swing (in radians). Very predictable. But what happens when we make a double pendulum, where we attach a pendulum to the bottom of the first pendulum?


Can you predict whether the bottom pendulum will flip over the top? (Credit: Wikimedia Commons)

It’s very hard to predict when the outer pendulum flips over the inner pendulum mass; however, the process is entirely determined by a set of equations governed by the laws of physics. And, depending on the initial angles of the two pendula, the motion will look completely different. This is how complexity derives from simplicity.

Another example of beautiful chaos is fractals. Fractals are structures that exhibit self-similarity, are determined by a simple set of rules, and have infinite complexity. An example of a fractal is the Sierpinski triangle.


(Image: Wikipedia)

The rule is simple: start with a triangle, then divide that triangle into four equal triangles. Remove the middle one. Repeat with the new solid triangles you produced. The true fractal is the limit when the number of iterations reaches infinity. Self-similarity happens as you zoom into any corner of the triangle; each corner is a smaller version of the whole (since the iterations continue infinitely). Fractals crop up everywhere, from the shapes of coastlines to plants to frost crystal formation. Basically, they’re everywhere, and they’re often very cool and beautiful.

Chaos is also used in practical applications, such as encryption. Since chaos is hard to predict unless you know the exact initial conditions of the chaotic process, a chaotic encryption scheme can be told to everyone. One example of a chaotic map to disguise data is the cat map. Each iteration is a simple matrix transformation of the pixels of an image. It’s completely deterministic, but it jumbles the image to make it look like garbage. In practice, this map is periodic, so as long as you apply the map repeatedly, you will eventually get the original image back. Another application of chaos is psuedorandom number generators (PRNGs), where a hard-to-predict initial value is manipulated chaotically to generate a “random” number. If you can manipulate the initial input values, you can predict the outcome of the PRNG. In the case of the Pokémon games, the PRNGs have been examined so thoroughly that, using a couple programs, you can capture or breed shininess/perfect stats.

So that’s the beauty of chaos. Next time you look at a bare tree toward the end of autumn or lightning in a thunderstorm, just remember that the seemingly unpredictable branches and forks are created by simple rules of nature, and bask in its complex beauty.

-A

Equation of the Day #12: 12

A while ago I stumbled across this image (which I recreated and cleaned up a bit). It’s a beautiful image. Arranged around the edge is the circle of fifths, which in music is a geometric representation of the twelve tones of the Western scale arranged so the next note is seven semitones up (going clockwise in this figure). The notes are all connected in six different ways to the other notes in the “circle,” known as intervals, which are color-coded at the bottom. I thought, “Wow, this is a really cool way to represent this geometrically. How neat!” However, I found the original website that the image came from, and it’s a pseudoscience site that talks about the fractal holographic nature of the universe. While fractals do show up in Nature a lot, and there are legitimate theories proposing that the Universe may indeed be a hologram, what their site is proposing is, to put it lightly, utter nonsense. But instead of tearing their website apart (which would be rather cathartic), I instead want to point out the cool math going on here, because that sounds more fun!

Looking at the bottom of the graphic, you’ll notice six figures. The first (in red) is a regular dodecagon, a polygon with twelve equal sides and angles. This shape is what forms the circle of fifths. The rest of the shapes in the sequence are dodecagrams, or twelve-pointed stars. The first three are stars made up of simpler regular polygons; the orange star is made up of two hexagons, the yellow is made up of three squares, and the green one is made up of four triangles. The final dodecagram (in purple) can be thought of as made up of six straight-sided digons, or line segments. These shapes point to the fact that twelve is divisible by five unique factors (not including itself): one set of twelve, two sets of six, three sets of four, four sets of three, and six sets of two! You could say that the vertices of the dodecagon finalize the set as twelve sets of one, but they’re not illustrated in this image. So really, this image has less to do with musical intervals and more to do with the number 12, which is a rather special number. It is a superior highly composite number, which makes it a good choice as a number base (a reason why feet are divided into twelve inches, for instance, or why our clocks have twelve hours on their faces).

The final dodecagram in cyan is not made up of any simpler regular polygons because the number 12 is not divisible by five. If you pick a note in the circle of fifths to start on, you’ll notice that the two cyan lines that emanate from it connect to notes that are five places away on the “circle,” hence the connection to the number 5. In fact, it would be far more appropriate to redraw this figure with a clock face.

This new image should shed some more light on what’s really going on. The dodecagrams each indicate a different map from one number to another, modulo 12. The only reason this is connected to music at all is due to the fact that a Western scale has twelve tones in it! If we used a different scale, such as a pentatonic scale (with five tones, as the name would suggest), we’d get a pentagon enclosing a pentagram. Really, this diagram can be used to connect any two elements in a set of twelve. The total number of connecting lines in this diagram, then, are

\begin{pmatrix} 12\\2 \end{pmatrix} = T_{11} = \dfrac{1}{2} (12)(11) = 66

where the notation in parentheses is “n choose 2,” and T_n is a triangular number. This figure is known in math as K_{12}, the complete graph with twelve nodes. And it’s gorgeous.

So while this doesn’t really have anything to do with music or some pseudoscientific argument for some fancy-sounding, but ultimately meaningless, view on the universe, it does exemplify the beauty of the number 12, and has a cool application to the circle of fifths.

-A