Oscillatory Systems

The Harmonic Oscillator

The harmonic oscillator is one of the central models in physics. It describes any system in which a displacement from equilibrium produces a restoring force proportional to that displacement. A mass attached to a spring is the simplest example, but the same mathematics appears in small oscillations of pendulums, vibrations of molecules, electrical circuits, waves, and even quantum mechanics.

Consider a mass \(m\) attached to a spring of spring constant \(k\), moving horizontally on a frictionless surface. We choose the equilibrium position to be \(x_{\text{eq}} = 0\), so the displacement from equilibrium is simply \(x(t)\).


mass on spring

By Hooke's law, the spring force is proportional to the displacement and points back toward equilibrium:

$$ \vec{F}_s = -kx \hat{x} $$

Newton's second law is

$$ \vec{F}_{net} = \frac{d\vec{p}}{dt} = m \vec{a} $$

and so we have

$$ m \frac{d^2x}{dt^2} = - k x $$ $$ \frac{d^2x}{dt^2} + \frac{k}{m} x = 0 $$

Or in dot notation

$$ \ddot{x} + \frac{k}{m}x = 0 $$

We define the angular frequency \( \omega \) by

$$ \omega = \sqrt{\frac{k}{m}} $$

Thus the equation of motion becomes

$$ \ddot{x} + \omega^2 x = 0 $$

This is a second-order differential equation, so its general solution contains two independent constants. Physically, those constants are fixed by the initial position and initial velocity of the oscillator.

The general solution is

$$ x(t) = A\cos(\omega t) + B\sin(\omega t) $$

Differentiating gives the velocity:

$$ \dot{x}(t) = -A\omega\sin(\omega t) + B\omega\cos(\omega t) $$

Initial Condition 1: Released From Rest

Suppose the oscillator starts at \(x_0\) with zero initial velocity:

$$ x(0) = x_0 $$ $$ \dot{x}(0) = 0 $$

Substituting into the general solution gives

$$ A = x_0 $$ $$ B = 0 $$

Hence

$$ x(t) = x_0\cos(\omega t) $$ $$ \dot{x}(t) = -x_0\omega\sin(\omega t) $$

The oscillator begins at maximum displacement, where its velocity is zero. It then accelerates back toward equilibrium, where its speed is largest.

The maximum speed occurs when the acceleration is zero:

$$ \ddot{x}(t) = -x_0\omega^2\cos(\omega t) = 0 $$

This occurs when

$$ \omega t = \frac{(2n+1)\pi}{2} $$ $$ t = \frac{(2n+1)\pi}{2\omega} $$

At these times,

$$ |\dot{x}(t)|_{\max} = x_0\omega $$

Initial Condition 2: Starting From Equilibrium

Now suppose the oscillator begins at equilibrium but is given an initial velocity \(v_0\):

$$ x(0) = 0 $$ $$ \dot{x}(0) = v_0 $$

Substituting into the general solution gives

$$ A = 0 $$ $$ B = \frac{v_0}{\omega} $$

Hence

$$ x(t) = \frac{v_0}{\omega}\sin(\omega t) $$ $$ \dot{x}(t) = v_0\cos(\omega t) $$

Here the mass starts at the equilibrium position, where the restoring force is zero, but it has maximum speed. The spring then slows the mass down until it reaches its largest displacement.

The maximum displacement is reached when

$$ t = \frac{(2n+1)\pi}{2\omega} $$

while the maximum speed occurs when

$$ t = \frac{n\pi}{\omega} $$

Amplitude and Phase

The two initial-condition examples become identical motions if their amplitudes are chosen to be equal. In that case they differ only by a shift in the time origin. If we choose the amplitude in the first example be \( \displaystyle x_0 = \frac{v_0}{\omega} \) and shift the time axis by a phase \( \displaystyle \frac{\pi}{2 \omega} \), \( \, \displaystyle t \to t - \frac{\pi}{2 \omega} \):

$$ x(t) = \frac{v_0}{\omega} \cos \left(\omega \left(t - \frac{\pi}{2 \omega} \right) \right) = \frac{v_0}{\omega} \cos \left(\omega t - \frac{\pi}{2} \right) = \frac{v_0}{\omega} \sin(\omega t) $$ $$ \dot{x}(t) = - v_0 \sin \left(\omega \left(t - \frac{\pi}{2 \omega} \right) \right) = - v_0 \sin \left(\omega t - \frac{\pi}{2} \right)= v_0 \cos(\omega t) $$

Which is exactly the result obtained in the second example. Therefore, every solution of a one-dimensional frictionless harmonic oscillator can be completely specified by an amplitude \(A\) and a phase \(\delta\). Hence a general harmonic oscillator can be written as

$$ x(t) = A\cos(\omega t - \delta) $$ $$ \dot{x}(t) = -A\omega\sin(\omega t - \delta) $$

The amplitude \(A\) determines how far the oscillator moves from equilibrium, while the phase \(\delta\) determines where in the oscillation the motion begins.

Using the angle subtraction identity,

$$ x(t) = A\cos(\omega t)\cos\delta + A\sin(\omega t)\sin\delta $$

so we may rewrite the solution as

$$ x(t) = A_1\cos(\omega t) + A_2\sin(\omega t) $$

where

$$ A_1 = A\cos\delta $$ $$ A_2 = A\sin\delta $$

Complex Form of the Harmonic Oscillator

It is often useful to describe harmonic motion using complex exponentials. The equation

$$ \ddot{x} + \omega^2 x = 0 $$

has the complex solutions

$$ e^{i\omega t} $$ $$ e^{-i\omega t} $$

Therefore the general complex form is

$$ x(t) = c_1 e^{i\omega t} + c_2 e^{-i\omega t} $$

Using Euler's formula,

$$ e^{i\theta} = \cos\theta + i\sin\theta $$

we can recover the real sine and cosine solutions:

$$ \cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2} $$ $$ \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i} $$

Since the physical displacement \(x(t)\) is real, the complex constants must combine in such a way that the imaginary parts cancel. To see how we recover the trigonometric form of the general solution click here.

The amplitude-phase form can also be written as

$$ x(t) = A\cos(\omega t - \delta) $$ $$ x(t) = \operatorname{Re}\left(A e^{i(\omega t - \delta)}\right) $$

If we define

$$ c(t) = A e^{i(\omega t - \delta)} $$ $$ c(0) = A e^{-i\delta} $$

then

$$ c(t) = c(0) e^{i\omega t} $$ $$ x(t) = \operatorname{Re}(c(t)) = \operatorname{Re}\left(c(0) e^{i\omega t}\right) $$

Geometrically, \(c(t)\) describes uniform circular motion in the complex plane. The real displacement \(x(t)\) is the projection of that circular motion onto the real axis, it describes the harmonic ascillation in 1D.

To see the energy considerations of the 1D frictionless harmonic oscillator click here.