Harmonic oscillator

The harmonic oscillator is more than a spring model. It is the leading description of a system displaced slightly from a stable equilibrium.

Approximation near equilibrium

A mass on a spring is the textbook picture, but the harmonic oscillator matters for a deeper reason. Near a stable equilibrium, a huge class of physical systems behaves approximately like a spring even when no literal spring is present.

If a smooth potential energy V(x) has a minimum at x = x₀, then V′(x₀) = 0 and, for a small displacement ξ = x − x₀, a Taylor expansion begins as V(x) ≈ V(x₀) + ½V″(x₀)ξ². Differentiating gives F ≈ −V″(x₀)ξ. The leading force is therefore proportional to displacement and points back toward equilibrium. Writing keff = V″(x₀), the local motion becomes harmonic.

This is why the same mathematics appears in vibrating molecules, crystal lattices, electrical circuits, acoustic resonators, mechanical suspensions and normal modes of much more complicated systems.

For a one-dimensional ideal oscillator, Hooke’s law is F = −kx, where x is measured from equilibrium and k is the stiffness. Newton’s second law gives:

m d²x/dt² = −kx, or d²x/dt² + ω²x = 0 with ω = √(k/m).

The minus sign is the physics. If x is positive, acceleration is negative; if x is negative, acceleration is positive. The farther the system is displaced, the stronger the restoring acceleration.

Motion, period and phase

A function whose second derivative is minus a constant times itself is a sine or cosine. The general solution is:

x(t) = A cos(ωt + φ)

A is the amplitude, ω the angular frequency and φ the phase constant fixed by the initial conditions. Ordinary frequency and period are:

f = ω/(2π) and T = 2π/ω = 2π√(m/k).

For the ideal linear oscillator, T does not depend on amplitude. That statement stops being true once the restoring force becomes noticeably nonlinear.

xva 0T/4T/23T/4T
Position, velocity and acceleration do not peak together. At a turning point, |x| and |a| are maximal while v = 0. At equilibrium, x = a = 0 and speed is maximal.
xva 0T/4T/23T/4T
Position, velocity and acceleration do not peak together. At a turning point, |x| and |a| are maximal while v = 0. At equilibrium, x = a = 0 and speed is maximal.

Differentiating the position gives v(t) = −Aω sin(ωt + φ) and a(t) = −Aω² cos(ωt + φ) = −ω²x.

At x = ±A the oscillator turns around: v = 0, while |a| is maximal. At x = 0 the restoring force and acceleration vanish for an instant, but the speed is maximal. That is why an oscillator does not stop at equilibrium: inertia carries it through.

The maximum values are vmax = Aω and amax = Aω².

Amplitude tells how far the oscillator reaches. Phase tells where in its cycle it is. Two systems can have the same A and ω yet be in completely different states at the same time because their phases differ.

In waves and coupled oscillators, phase differences determine interference, energy transfer and collective patterns. The single harmonic oscillator is therefore the seed of the mathematics used later for waves.

Imagine a point moving uniformly around a circle. Project its position onto one diameter. That projection moves as x = A cos(ωt + φ): exactly simple harmonic motion.

This picture makes phase intuitive. Two oscillators with the same frequency but different φ are like two rotating vectors separated by a fixed angle. It also explains why sine and cosine describe the same kind of motion with different choices of time origin.

Energy

For a spring oscillator, the elastic potential energy is U = ½kx² and the kinetic energy is K = ½mv². With no damping:

E = K + U = ½kA² = constant.

At the turning points, x = ±A: all the mechanical energy is potential and v = 0. At equilibrium, x = 0: U is minimum and kinetic energy is maximum. The oscillator is an energy-exchange machine whose total energy stays fixed in the ideal model.

turning pointequilibriumturning point U max · K = 0U min · K maxU max · K = 0
In the ideal model, total energy is constant. Potential and kinetic energy exchange during each cycle.

Calculation and the vertical spring

Worked calculation

A 0.50 kg mass is attached to a spring with k = 200 N m⁻¹ and oscillates with amplitude A = 0.040 m.

Angular frequency: ω = √(200/0.50) = 20 rad s⁻¹.

Period: T = 2π/20 ≈ 0.314 s.

Maximum speed: vmax = Aω = 0.040 × 20 = 0.80 m s⁻¹.

Maximum acceleration: amax = Aω² = 0.040 × 400 = 16 m s⁻².

Total energy: E = ½kA² = 0.5 × 200 × 0.040² = 0.160 J.

One model therefore predicts timing, kinematics and energy from only m, k, amplitude and initial phase.

Vertical spring

Gravity stretches a vertical spring until kxeq = mg. That changes the equilibrium position, but if displacement is measured from that new equilibrium, the equation of motion is still mξ¨ + kξ = 0.

So an ideal vertical and horizontal spring with the same m and k have the same ω = √(k/m). Gravity shifts the centre of oscillation; it does not change the small-oscillation frequency.

Pendulum and limits of the approximation

A simple pendulum obeys a restoring torque proportional to sin θ, not θ. Its exact equation is nonlinear. For small angles in radians, sin θ ≈ θ, which gives a harmonic equation and the familiar approximation:

T ≈ 2π√(L/g).

At larger amplitudes the period increases slightly. The amplitude independence of simple harmonic motion is therefore a property of the linear approximation, not a universal property of every oscillator.

The approximation fails when higher-order terms in the force or potential are no longer negligible. Then the frequency may depend on amplitude, the waveform may stop being sinusoidal, and new effects can appear.

Large-angle pendulums, strongly stretched springs and many real molecular vibrations are anharmonic. The harmonic oscillator is powerful precisely because it is the leading approximation near equilibrium—not because every oscillation is perfectly harmonic at every amplitude.

Damping and resonance

Real systems experience friction, drag or electrical resistance. A common model adds a velocity-dependent force, giving m x¨ + b x˙ + kx = 0.

With weak damping, the system still oscillates but its amplitude decays. At critical damping, it returns to equilibrium as rapidly as possible without oscillating. With stronger, overdamped motion, it returns more slowly without crossing the equilibrium repeatedly.

Those regimes explain why a tuning fork rings, a car suspension settles, and a door closer is designed not to bounce.

If an external force oscillates, the equation becomes m x¨ + b x˙ + kx = F₀ cos(ωdt). After transients die away, the oscillator responds at the driving frequency ωd.

The response becomes especially large when the drive is near the system’s natural frequency: resonance. Damping limits the peak and broadens it. Resonance is not “energy appearing from nowhere”; the drive supplies energy coherently, cycle after cycle, when the timing is favourable.

driving frequencylower dampinghigher damping
Resonance depends on damping. Lower dissipation produces a taller, narrower peak.

A lightly damped oscillator stores energy for many cycles. Its quality factor Q is large, its resonance is narrow and its free oscillations decay slowly. A strongly damped oscillator has a lower Q and a broader response.

This matters in clocks, musical instruments, sensors, radio-frequency circuits and optical cavities, where engineers may want either a very selective resonance or a deliberately non-resonant response.

Normal modes and quantum model

Plot velocity v against position x instead of both against time. For an undamped harmonic oscillator, conservation of ½mv² + ½kx² = E gives an ellipse in the x–v plane.

Damping turns that closed ellipse into an inward spiral as energy is lost. A sustained driven oscillator can approach a repeating closed orbit. Phase-space pictures therefore expose stability and energy behaviour that may be less obvious on a position-versus-time graph.

When several degrees of freedom are coupled, small motions can often be decomposed into normal modes. In each mode the whole system oscillates at one characteristic frequency with a fixed pattern.

A vibrating string, a crystal lattice and coupled pendulums all use this idea. Waves can be understood as coordinated oscillations of many degrees of freedom; in solids, quantised lattice vibrations lead to phonons.

In quantum mechanics the potential remains V(x) = ½mω²x², but energy is not continuous. The allowed levels are:

En = (n + ½)ħω, n = 0, 1, 2, …

The levels are equally spaced by ħω, and even the ground state has zero-point energy ½ħω. The particle cannot simply sit at x = 0 with exactly zero kinetic energy.

This model is central to molecular vibrations, lattice vibrations, quantum fields and many approximation methods. The classical harmonic oscillator is not replaced; it reappears as the large-scale limit of the quantum description.

Experiment and exercise

This gives an experimental test of the model rather than relying on appearance alone.

Changing the amplitude

For m = 0.80 kg and k = 50 N m⁻¹, does doubling amplitude change the ideal period? What happens to vmax and energy?

Solution

T = 2π√(m/k) ≈ 0.795 s, unchanged. vmax doubles and E = ½kA² becomes four times larger.