Interference happens when two or more waves overlap in space and time. In linear media, the principle of superposition applies:
the total displacement is the sum of the individual displacements:
\[
y(x,t)=y_1(x,t)+y_2(x,t).
\]
If two waves have the same frequency and wavelength and are in phase, they add constructively and the amplitude increases.
If they are out of phase by \(\pi\), they cancel destructively.
For two sinusoidal traveling waves,
\[
y_1=A_1\sin(k_1x-\omega_1 t+\phi_1),\qquad
y_2=A_2\sin(k_2x-\omega_2 t+\phi_2),
\]
where \(k_i=2\pi/\lambda_i\) and \(\omega_i=2\pi f_i\). The phases \(\phi_i\) set where crests and troughs occur.
A path difference \(\delta\) introduces an additional phase shift because a wave traveling farther accumulates more phase:
\[
\Delta\phi=k\delta.
\]
In this calculator, the path difference is applied to wave 2 by replacing \(\phi_2\to \phi_2+k_2\delta\).
Beats. When the frequencies are close, the sum produces a slow modulation of the amplitude called beats.
For the simplest case with equal amplitudes and the same wavelength, you can use a trigonometric identity:
\[
\sin(\omega_1 t)+\sin(\omega_2 t)=2\cos\!\left(\frac{\Delta\omega}{2}t\right)\sin\!\left(\bar{\omega}t\right),
\]
where \(\Delta\omega=\omega_2-\omega_1\) and \(\bar{\omega}=(\omega_1+\omega_2)/2\).
The fast oscillation is \(\sin(\bar{\omega}t)\), while the envelope is controlled by the cosine term.
The beat frequency is
\[
f_{\text{beat}}=|f_2-f_1|.
\]
For example, \(f_1=10\) Hz and \(f_2=11\) Hz give \(f_{\text{beat}}=1\) Hz, so the amplitude swells once per second.
Coherent vs incoherent sources. Beats and stable interference patterns require coherence (a stable phase relationship).
Incoherent sources have random relative phase, so the time-averaged interference term washes out.
University-level treatments include coherence length/time, spectral linewidth, and interference in partially coherent waves.
This simulator focuses on coherent sinusoidal waves and provides interactive plots plus an animation to build intuition for constructive/destructive
interference and beats.