Technopedia

The technologist’s encyclopedia

Harmonic Oscillator

The harmonic oscillator is the simplest system that oscillates: a mass on a linear spring, or any system whose restoring force is proportional to displacement. It is the baseline model from which all other oscillatory behavior is built. It is relevant to clocks, molecular vibrations, LC circuits, and as the local approximation near any stable equilibrium. See Oscillations and Waves for the broader context and categorization.

The harmonic oscillator is the reference point for every other oscillation type: adding dissipation gives Damped oscillations, adding an external force gives Driven oscillations, and nonlinear restoring forces give Nonlinear oscillations.

m k equilibrium x

Authoritative sources

Equation of motion

mx¨+kx=0m\ddot{x} + kx = 0

General solution: x(t)=Acos⁡(ωt+ϕ)x(t) = A\cos(\omega t + \phi), where ω=k/m\omega = \sqrt{k/m}, T=2π/ω=2πm/kT = 2\pi/\omega = 2\pi\sqrt{m/k}, f=1/Tf = 1/T.

Complex exponential form. The solution is equivalently x(t)=Re⁡ ⁣[Aeiωt]x(t) = \operatorname{Re}\!\bigl[A e^{i\omega t}\bigr], or x(t)=12(Aeiωt+A∗e−iωt)x(t) = \tfrac{1}{2}\bigl(Ae^{i\omega t} + A^* e^{-i\omega t}\bigr). This form is used in coupled oscillations, wave propagation, and Fourier analysis.

Amplitude and phase from initial conditions. Given x(0)=x0x(0) = x_0 and x˙(0)=v0\dot{x}(0) = v_0:

A=x02+(v0ω)2,ϕ=−arctan⁡ ⁣(v0ω x0)A = \sqrt{x_0^2 + \left(\frac{v_0}{\omega}\right)^2}, \qquad \phi = -\arctan\!\left(\frac{v_0}{\omega\, x_0}\right)

(with the quadrant of ϕ\phi determined by the signs of x0x_0 and v0v_0).

Details

The equation is second-order, linear, and homogeneous. Two initial conditions (x(0)x(0) and x˙(0)\dot{x}(0)) determine AA and ϕ\phi. The solution can also be written as x(t)=C1cos⁡(ωt)+C2sin⁡(ωt)x(t) = C_1\cos(\omega t) + C_2\sin(\omega t).

Energy. Total mechanical energy is conserved:

E=12mx˙2+12kx2=12kA2E = \tfrac{1}{2}m\dot{x}^2 + \tfrac{1}{2}kx^2 = \tfrac{1}{2}kA^2

Energy oscillates between kinetic (maximum at x=0x = 0) and potential (maximum at x=±Ax = \pm A) at twice the oscillation frequency.

Phase space. The trajectory in the (x,x˙)(x, \dot{x}) plane is an ellipse: (x/A)2+(x˙/(ωA))2=1(x/A)^2 + (\dot{x}/(\omega A))^2 = 1. All orbits are closed, confirming periodicity.

x ẋ A ωA

Universality. Any system near a stable equilibrium has a quadratic potential V(x)≈V0+12k(x−x0)2V(x) \approx V_0 + \tfrac{1}{2}k(x-x_0)^2, so the harmonic oscillator is the universal local model. See Dynamics for the general equilibrium analysis.

Authoritative source for this section: Landau & Lifshitz, Mechanics, §21: Free oscillations in one dimension

Example problem

A mass m=2m = 2 kg is attached to a spring with k=50k = 50 N/m. At t=0t = 0 it is at x0=0.1x_0 = 0.1 m with velocity v0=0.5v_0 = 0.5 m/s. Find AA and ϕ\phi.

Solution

ω=50/2=5\omega = \sqrt{50/2} = 5 rad/s.

A=0.12+(0.5/5)2=0.01+0.01=0.02≈0.141A = \sqrt{0.1^2 + (0.5/5)^2} = \sqrt{0.01 + 0.01} = \sqrt{0.02} \approx 0.141 m.

ϕ=−arctan⁡(0.5/(5×0.1))=−arctan⁡(1)=−π/4\phi = -\arctan(0.5/(5 \times 0.1)) = -\arctan(1) = -\pi/4 rad.

Isochronism and cross-domain examples

The period T=2πm/kT = 2\pi\sqrt{m/k} is independent of amplitude—this is the defining property of harmonic motion (isochronism). It depends only on the system’s inertia and stiffness, not on how far the mass is displaced.

Details

Isochronism is a direct consequence of linearity: the restoring force is proportional to displacement, so the effective stiffness the mass feels is the same at every point of the trajectory. In nonlinear oscillators the period depends on amplitude (see Nonlinear oscillations).

Cross-domain examples of the harmonic oscillator:

L Pendulum L LC circuit Torsional

Authoritative source for this section: OpenStax University Physics Volume 1, §15.1: Simple Harmonic Motion

Example problem

A simple pendulum has a period of 2 s on Earth (g=9.8g = 9.8 m/s²). What is its length? What would its period be on the Moon (gmoon=1.62g_{\text{moon}} = 1.62 m/s²)?

Solution

L=gT2/(4π2)=9.8×4/(4π2)=39.2/39.48≈0.993L = gT^2/(4\pi^2) = 9.8 \times 4 / (4\pi^2) = 39.2 / 39.48 \approx 0.993 m.

On the Moon: Tmoon=2πL/gmoon=2π0.993/1.62≈2π×0.782≈4.91T_{\text{moon}} = 2\pi\sqrt{L/g_{\text{moon}}} = 2\pi\sqrt{0.993/1.62} \approx 2\pi \times 0.782 \approx 4.91 s.

Superposition

Because the equation is linear, any linear combination of solutions is also a solution:

x(t)=A1cos⁡(ωt)+A2sin⁡(ωt)=Acos⁡(ωt+ϕ)x(t) = A_1\cos(\omega t) + A_2\sin(\omega t) = A\cos(\omega t + \phi)

Concrete example. Let x1=2cos⁡(3t)x_1 = 2\cos(3t) and x2=cos⁡(3t+π/2)=−sin⁡(3t)x_2 = \cos(3t + \pi/2) = -\sin(3t). Their sum is:

x=2cos⁡(3t)−sin⁡(3t)=5 cos⁡ ⁣(3t+arctan⁡12)x = 2\cos(3t) - \sin(3t) = \sqrt{5}\,\cos\!\left(3t + \arctan\tfrac{1}{2}\right)

so A=5≈2.24A = \sqrt{5} \approx 2.24 and ϕ≈0.464\phi \approx 0.464 rad.

t x x₁ x₂ x
Details

Superposition is the foundation for Coupled oscillations (normal modes) and Wave propagation (Fourier decomposition). It fails for Nonlinear oscillations, where modes interact.

The complex exponential form makes superposition especially transparent: if x1=Re⁡[A1eiωt]x_1 = \operatorname{Re}[A_1 e^{i\omega t}] and x2=Re⁡[A2eiωt]x_2 = \operatorname{Re}[A_2 e^{i\omega t}], then x1+x2=Re⁡[(A1+A2)eiωt]x_1 + x_2 = \operatorname{Re}[(A_1 + A_2)e^{i\omega t}]. Adding phasors in the complex plane is equivalent to adding sinusoids in time.

Authoritative source for this section: Landau & Lifshitz, Mechanics, §21: Free oscillations in one dimension

Example problem

Two oscillators with the same frequency ω=4\omega = 4 rad/s have displacements x1=3cos⁡(4t)x_1 = 3\cos(4t) and x2=4cos⁡(4t+π/2)x_2 = 4\cos(4t + \pi/2). Find the amplitude and phase of their sum.

Solution

x2=4cos⁡(4t+π/2)=−4sin⁡(4t)x_2 = 4\cos(4t + \pi/2) = -4\sin(4t).

x=3cos⁡(4t)−4sin⁡(4t)x = 3\cos(4t) - 4\sin(4t).

A=32+42=5A = \sqrt{3^2 + 4^2} = 5.

ϕ=−arctan⁡(4/3)≈−0.927\phi = -\arctan(4/3) \approx -0.927 rad.

So x=5cos⁡(4t−0.927)x = 5\cos(4t - 0.927).

Quizz

Problem: A 0.5 kg mass is attached to a spring with k=200k = 200 N/m. It is pulled 3 cm from equilibrium and released from rest. Find the period, the maximum speed, the total energy, and the complex amplitude AeiϕAe^{i\phi}.

Solution
  • ω=k/m=200/0.5=20\omega = \sqrt{k/m} = \sqrt{200/0.5} = 20 rad/s.
  • Period: T=2π/ω=2π/20≈0.314T = 2\pi/\omega = 2\pi/20 \approx 0.314 s.
  • Initial conditions: x0=0.03x_0 = 0.03 m, v0=0v_0 = 0.
  • Amplitude: A=x02+(v0/ω)2=x0=0.03A = \sqrt{x_0^2 + (v_0/\omega)^2} = x_0 = 0.03 m.
  • Phase: ϕ=−arctan⁡(0)=0\phi = -\arctan(0) = 0.
  • Maximum speed: vmax⁡=Aω=0.03×20=0.6v_{\max} = A\omega = 0.03 \times 20 = 0.6 m/s.
  • Total energy: E=12kA2=12(200)(0.03)2=0.09E = \tfrac{1}{2}kA^2 = \tfrac{1}{2}(200)(0.03)^2 = 0.09 J.
  • Complex amplitude: Aeiϕ=0.03⋅ei⋅0=0.03Ae^{i\phi} = 0.03 \cdot e^{i \cdot 0} = 0.03.