The phenomenon of beats is a wonderful demonstration of interference of sound waves. The key to producing beats, is to have two sound waves of equal amplitude, but slightly different frequencies.
For the sake of discussion, let’s consider the superposition of a 20 Hz wave with a 21 Hz wave, illustrated in magenta and red respectively in the diagram below. Are they going to interfere constructively or destructively? Both actually. Because the two waves have slightly different periods, they actually alternate between constructive and destructive interference.
As illustrated, at t = 0.0 s, the two waves are exactly in phase, constructive interference results in a wave of twice the amplitude (illustrated in blue) and LOUD sound. The two waves then progressively drift out of phase. At t = 0.5 s, the two waves are exactly in antiphase, resulting in destructive interference, zero amplitude and SILENCE. The drifting of phase relationship continues until at t = 1.0 s, when the two waves are exactly in phase again and they are back to constructive interference and LOUD sound.
This pattern repeats once every 1.0 sec, resulting in alternating loudness and softness, called beats, at a frequency of 1.0 Hz.
With a bit of logical reasoning, we can deduce that two waves of frequency f1 and f2 will result in a beating frequency of |f1-f2|.
P.S. It’s interesting to note that when the difference in the two pitches is small, our ears hear only one pitch (the averaged frequency) with beating. When the pitch difference is large enough, our ears can distinguish that the sound is composed of two pitches (with no beating). This is something our eyes can’t do: Musicians can make out the different notes that make a chord. But a painter cannot tell if a spot of yellow is monochromatic yellow or superposition of green and red.
P.P.S. Destructive interference is how noise-canceling earphones work. An anti-phase version of the ambient noise is electronically generated to superpose with the ambient noise. Amazing!