Harmonic Oscillator: Springs, Damping, and Resonance

simulator beginner ~8 min
Loading simulation...
f ≈ 0.71 Hz — simple harmonic motion

With m = 1 kg and k = 20 N/m, the natural frequency is about 0.71 Hz (period ≈ 1.40 s). Light damping (b = 0.5) causes the amplitude to decay exponentially while the frequency remains nearly unchanged.

Formula

Equation of motion: m*x'' + b*x' + k*x = 0
Natural frequency: ω₀ = sqrt(k/m), f = ω₀/(2π)
Damped solution: x(t) = A₀ * exp(-bt/(2m)) * cos(ω_d * t) where ω_d = sqrt(Math.pow(ω₀, 2) - Math.pow(b/(2*m), 2))

The Most Important Model in Physics

The harmonic oscillator — a mass on a spring — is arguably the single most important model in all of physics. Not because springs are particularly interesting, but because virtually every stable system in the universe behaves like a harmonic oscillator when displaced slightly from equilibrium. Atoms in a crystal, electrons in an antenna, photons in a cavity, even the spacetime fabric of gravitational waves — all are described by the same equation: F = -kx.

Anatomy of Oscillation

Pull the mass, release it, and watch it swing back and forth. The spring stores potential energy (½kx²) as it stretches, then converts it to kinetic energy (½mv²) as the mass swings through the center. In the absence of friction, this energy exchange continues forever at a frequency determined solely by √(k/m). Heavier masses oscillate slower; stiffer springs oscillate faster.

Damping: Energy Leaks Away

Real oscillators always lose energy to friction, air resistance, or internal material deformation. Mathematically, we model this as a damping force proportional to velocity: F = -bv. The result is exponential amplitude decay — each swing is slightly smaller than the last. The damping ratio ζ determines whether the system oscillates (underdamped), returns without oscillation (overdamped), or returns as fast as possible (critically damped).

From Springs to Everything

The harmonic oscillator equation appears everywhere because of a deep mathematical fact: any smooth potential energy function looks parabolic near its minimum (Taylor's theorem). So any small displacement from any stable equilibrium produces a restoring force proportional to displacement — Hooke's Law emerges universally. This is why the quantum harmonic oscillator is the starting point for quantum field theory.

FAQ

What is simple harmonic motion?

Simple harmonic motion (SHM) occurs when a restoring force is proportional to displacement: F = -kx. The result is sinusoidal oscillation at a frequency determined only by the spring constant k and mass m: f = (1/2π)√(k/m). SHM is the foundation of wave physics, acoustics, and quantum mechanics.

What is damping and how does it affect oscillation?

Damping is energy loss due to friction or resistance, modeled as a force proportional to velocity: F_damp = -bv. It causes amplitude to decay exponentially. The damping ratio ζ = b/(2√(km)) determines behavior: underdamped (ζ < 1) oscillates with decay, critically damped (ζ = 1) returns fastest without oscillation, overdamped (ζ > 1) returns slowly.

Why is the harmonic oscillator so important in physics?

Nearly every stable equilibrium in physics can be approximated as a harmonic oscillator for small displacements (Taylor expansion). This makes it the universal model for vibrating atoms, electromagnetic waves, quantum fields, electrical circuits (LC), pendulums, and molecular bonds.

What happens at resonance?

When an external driving force matches the system's natural frequency, energy input accumulates constructively, causing amplitude to grow dramatically. In an undamped system, amplitude grows without bound. In reality, damping limits the peak amplitude. Resonance explains bridge collapses, musical instruments, and radio tuning.

Sources

Embed

<iframe src="https://homo-deus.com/lab/classical-mechanics/spring-oscillator/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub