PHYS-230 · Lesson 6 of 12 · 26 min

Superposition, standing waves and sound

Because the wave equation is linear, waves pass through one another and add. Two waves running in opposite directions on a string add to a standing wave, a pattern that oscillates in place with fixed nodes. A string held at both ends, or air in a pipe, can only sustain standing waves whose wavelengths fit the boundaries, and that selection rule produces the harmonic series behind every string and wind instrument. This lesson develops standing waves on strings and in pipes, works out which harmonics a pluck or a bow excites, connects pressure and displacement in sound waves, and applies the results to beats, tuning and the design of musical instruments. PHYS-130 introduced standing waves on a string; here we go further, to the amplitudes of each harmonic and to the acoustics of air columns.

Superposition

If \(y_1\) and \(y_2\) both satisfy the wave equation, so does \(y_1 + y_2\), because derivatives of a sum are sums of derivatives. Physically, two pulses traveling toward each other on a string overlap, add their displacements while they overlap, and then emerge unchanged, as if they had passed through each other. A pulse and an inverted copy meeting head-on cancel momentarily to a flat string, but the string is still moving, and the energy reappears as kinetic energy until the pulses separate. Superposition fails only when amplitudes are large enough for the approximations of lesson 5 to break down, which is the regime of nonlinear acoustics, shock waves and breaking ocean waves.

Standing waves

Add two harmonic waves of equal amplitude traveling in opposite directions:

\[A\sin(kx - \omega t) + A\sin(kx + \omega t) = 2A\sin(kx)\cos(\omega t).\]

The result is no longer traveling. Every point oscillates in phase, with an amplitude \(2A|\sin kx|\) that depends on position. At the nodes, \(kx = n\pi\), or every half wavelength, the string never moves. Halfway between are the antinodes, where it swings most. Energy does not flow past the nodes on average: it sloshes between kinetic energy, concentrated at the antinodes when the string passes through equilibrium, and potential energy, concentrated near the nodes where the slope is greatest when the string is at its extreme.

A string of length \(L\) fixed at both ends must have nodes at \(x = 0\) and \(x = L\), so \(\sin kL = 0\), \(k_n = n\pi/L\), and

\[\lambda_n = \frac{2L}{n}, \qquad f_n = \frac{nv}{2L} = \frac{n}{2L}\sqrt{\frac{T}{\mu}}, \qquad n = 1, 2, 3, \ldots\]

The fundamental \(f_1 = v/2L\) sets the pitch; the overtones \(f_n = nf_1\) form a harmonic series. Marin Mersenne stated the dependence on length, tension and density in 1636, and the formula explains every way of tuning a string instrument: shortening the vibrating length with a finger, tightening the peg, or using a heavier string wound with wire for the bass notes. The harmonic series is the reason two notes whose fundamental frequencies are in a simple ratio, such as 2:1 or 3:2, sound consonant: many of their overtones coincide.

Left column: the first four standing wave shapes on a string fixed at both ends, with one, two, three and four loops. Right column: the first three resonances of a pipe open at both ends and of a pipe closed at one end, drawn as displacement envelopes inside the pipe outlines, with antinodes at open ends and nodes at closed ends.
Left: modes of a string fixed at both ends, \(f_n = nv/2L\). Right: displacement patterns in a pipe open at both ends (\(f_n = nv/2L\)) and a pipe closed at one end (\(f_n = nv/4L\), odd \(n\) only).

Which harmonics are excited

A real vibration is a superposition of modes. A string released from rest in a shape \(y_0(x)\) moves as

\[y(x, t) = \sum_{n=1}^\infty b_n\sin\frac{n\pi x}{L}\cos\omega_n t, \qquad b_n = \frac{2}{L}\int_0^L y_0(x)\sin\frac{n\pi x}{L}\,dx.\]

The coefficients follow from orthogonality, \(\int_0^L \sin(m\pi x/L)\sin(n\pi x/L)\,dx = \tfrac L2\delta_{mn}\), the continuous version of the mode orthogonality proved in lesson 4. Lesson 7 develops this Fourier series in general; here we use it for one important case. A string plucked at distance \(a\) from one end to height \(h\) starts as a triangle. Integrating each straight piece by parts gives

\[b_n = \frac{2hL^2}{n^2\pi^2 a(L - a)}\sin\frac{n\pi a}{L}.\]

Two consequences are audible. First, the amplitudes fall as \(1/n^2\), so a plucked string is dominated by its lower harmonics. Second, every harmonic with a node at the plucking point is missing: plucking at the center, \(a = L/2\), removes all even harmonics and gives a hollow sound, while plucking near the bridge, small \(a\), excites high harmonics strongly and gives a bright, twangy tone. Guitarists move their picking hand to change tone for exactly this reason. Since the energy of mode \(n\) is proportional to \(\omega_n^2 b_n^2 \propto 1/n^2\), the energy also falls off, but more slowly than the amplitude. A hammered piano string and a bowed violin string have different spectra again, because the initial conditions and, for the violin, the continuous driving are different.

Worked problem

Harmonics of a plucked guitar string

A 0.650 m string is plucked 0.130 m from the bridge, one fifth of its length. Which harmonics are missing, and what are the relative amplitudes of the first four?

Show solution
  1. \(b_n \propto \sin(n\pi/5)/n^2\). The sine vanishes when \(n\) is a multiple of 5, so harmonics 5, 10, 15 and so on are missing.
  2. \(\sin(36^\circ) = 0.588\), \(\sin(72^\circ) = 0.951\), \(\sin(108^\circ) = 0.951\), \(\sin(144^\circ) = 0.588\).
  3. Dividing by \(n^2\): \(0.588,\ 0.238,\ 0.106,\ 0.037\); relative to the first, \(1,\ 0.40,\ 0.18,\ 0.06\).

Answer: The fifth harmonic and its multiples are absent; the second harmonic is 40 parts in a hundred of the fundamental in amplitude. Plucking at the center instead would remove harmonics 2, 4, 6 and so on.

Sound waves: displacement and pressure

A sound wave in a pipe or in open air is longitudinal: the air moves back and forth along the direction of travel. Describe it by the displacement \(s(x, t)\) of a thin slab of air from its rest position. Where neighboring slabs move toward each other the air is compressed, and the excess pressure is \(p = -B\,\partial s/\partial x\), with \(B = \gamma_aP\) the adiabatic bulk modulus. For a harmonic wave \(s = s_0\cos(kx - \omega t)\), the pressure is \(p = Bks_0\sin(kx - \omega t)\), a quarter wavelength out of step with the displacement, with amplitude \(p_0 = Bks_0 = \rho v\omega s_0\). The intensity is

\[I = \tfrac12\rho v\omega^2s_0^2 = \frac{p_0^2}{2\rho v}.\]

The ear responds to pressure. At 1 kHz the threshold of hearing is about \(p_0 = 2.9\times10^{-5}\ \mathrm{Pa}\) in amplitude, which corresponds to air molecules oscillating through about \(10^{-11}\ \mathrm{m}\), a tenth of an atomic diameter. Because pressure and displacement are a quarter wavelength apart, a displacement node is a pressure antinode and vice versa. That is the key to pipes.

Standing waves in pipes

At a closed end the air cannot move, so the displacement has a node and the pressure an antinode. At an open end the pressure is held close to atmospheric, so the pressure has a node and the displacement an antinode. A pipe open at both ends therefore has displacement antinodes at both ends, the same pattern as a string with nodes at both ends shifted by a quarter wavelength, and its resonances are \(f_n = nv/2L\) for all \(n\): flutes and open organ pipes. A pipe closed at one end has a node at one end and an antinode at the other, so a whole number of half wavelengths plus a quarter must fit: \(L = (2m - 1)\lambda/4\), and

\[f_n = \frac{nv}{4L}, \qquad n = 1, 3, 5, \ldots\]

Its fundamental is an octave lower than that of an open pipe of the same length, and only odd harmonics are present, which gives the closed pipe its darker, hollow tone. The clarinet behaves approximately as a closed cylindrical pipe, because the reed end acts as a pressure antinode, and it famously overblows to the twelfth (three times the fundamental) rather than the octave. The oboe and saxophone have conical bores, which support all harmonics like an open pipe.

The pressure node at an open end actually sits slightly beyond the pipe, because the air just outside also moves. For a cylindrical pipe of radius \(R\) an end correction of about \(0.61R\) for an unflanged end is added to the length; organ builders and flute makers allow for it. A different kind of resonator, a cavity of volume \(V\) with a neck of area \(A\) and length \(\ell\), the Helmholtz resonator, has the air in the neck acting as a mass and the air in the cavity as a spring, giving \(f = \frac{v}{2\pi}\sqrt{A/V\ell}\). Blowing across a bottle produces this tone, and the body of a guitar has a Helmholtz resonance near 100 Hz that reinforces its low notes.

Worked problem

An organ pipe

An organ pipe closed at one end has an effective length of 0.40 m at \(20^\circ\mathrm{C}\). Find its first three resonances, and the fundamental if it were open at both ends.

Show solution
  1. Closed at one end: \(f_1 = v/4L = 343/1.60 = 214\ \mathrm{Hz}\).
  2. Only odd harmonics: \(3f_1 = 643\ \mathrm{Hz}\) and \(5f_1 = 1072\ \mathrm{Hz}\).
  3. Open at both ends: \(f_1 = v/2L = 429\ \mathrm{Hz}\), with all harmonics.

Answer: 214, 643 and 1072 Hz for the closed pipe; 429 Hz fundamental for the open one. Warmer air raises \(v\) as \(\sqrt{T}\), so wind instruments go sharp as they warm up, while string instruments go flat as their strings expand and lose tension.

Beats and tuning

Two tones of nearly equal frequency \(f_1\) and \(f_2\) superpose to

\[\cos 2\pi f_1t + \cos 2\pi f_2t = 2\cos\Big(2\pi\frac{f_1 - f_2}{2}t\Big)\cos\Big(2\pi\frac{f_1 + f_2}{2}t\Big).\]

The ear hears the average pitch with a loudness that swells and fades \(|f_1 - f_2|\) times per second, because the envelope has two maxima per period of the cosine. Tuners listen for beats to vanish when matching a string to a reference. The same happens between harmonics: if a fifth is slightly mistuned, the third harmonic of the lower note and the second harmonic of the upper note beat audibly.

Western music since about 1800 uses equal temperament, which divides the octave into 12 semitones each with frequency ratio \(2^{1/12} \approx 1.0595\), so that every key sounds equally in tune. The price is that harmonic intervals are slightly off: an equal-tempered fifth is \(2^{7/12} = 1.4983\) rather than the pure 1.5, and a major third is \(2^{4/12} = 1.2599\) rather than 1.25. A piano tuner sets the fifths to beat slowly by design. Concert pitch is defined by A4 = 440 Hz, adopted internationally in 1939 and confirmed by ISO 16 in 1955 and 1975.

Drums and plates

Two-dimensional media also have standing waves. A rectangular membrane with fixed edges has modes \(\sin(m\pi x/a)\sin(n\pi y/b)\) with frequencies \(\frac v2\sqrt{(m/a)^2 + (n/b)^2}\), which are not integer multiples of the fundamental. A circular drumhead has modes described by Bessel functions, with frequency ratios 1, 1.59, 2.14, 2.30 and so on. Because these overtones are inharmonic, most drums do not have a definite pitch; the timpani, whose air cavity and stiff head pull several modes toward harmonic ratios, is the famous exception. In 1787 Ernst Chladni sprinkled sand on bowed metal plates and saw it collect along the nodal lines, making the mode shapes visible; the method is still used to tune violin plates.

Computing harmonics and tuning

The program computes the harmonic amplitudes of a plucked string by numerical integration and compares them with the formula, finds the resonances of open and closed pipes with end corrections, counts beats, and compares equal-tempered intervals with pure ratios.

Plucked-string harmonics, pipe resonances with end corrections, beats and equal temperament
import math

L, h = 0.650, 0.004
def pluck(a):
    return lambda x: h * x / a if x < a else h * (L - x) / (L - a)

def b_numeric(f, n, steps=4000):
    dx = L / steps
    return 2 / L * sum(f((i + 0.5) * dx) * math.sin(n * math.pi * (i + 0.5) * dx / L) for i in range(steps)) * dx

def b_formula(a, n):
    return 2 * h * L * L / (n * n * math.pi**2 * a * (L - a)) * math.sin(n * math.pi * a / L)

for a in (0.130, 0.325):
    f = pluck(a)
    print(f"plucked at a = {a} m:")
    b1 = b_formula(a, 1)
    for n in range(1, 7):
        bn, bf = b_numeric(f, n), b_formula(a, n)
        z = lambda u: round(u, 8) + 0.0
        print(f"  n = {n}: numeric {z(bn*1000):+.5f} mm, formula {z(bf*1000):+.5f} mm, relative {z(bf/b1):+.3f}")

v = 343.0
R = 0.010                         # pipe radius
for Lp in (0.40, 0.60):
    open_eff = Lp + 2 * 0.61 * R
    closed_eff = Lp + 0.61 * R
    print(f"\npipe {Lp} m, radius {R} m:")
    print("  open both ends:", ", ".join(f"{n*v/(2*open_eff):.0f}" for n in (1, 2, 3)), "Hz")
    print("  closed one end:", ", ".join(f"{n*v/(4*closed_eff):.0f}" for n in (1, 3, 5)), "Hz")

f1, f2 = 440.0, 443.0
print(f"\nbeats between {f1} and {f2} Hz: {abs(f1-f2):.1f} per second")
for name, semis, pure in (("major third", 4, 5/4), ("perfect fourth", 5, 4/3), ("perfect fifth", 7, 3/2), ("octave", 12, 2.0)):
    et = 2 ** (semis / 12)
    cents = 1200 * math.log2(et / pure)
    print(f"{name:14s}: equal tempered {et:.5f}, pure {pure:.5f}, difference {cents:+.2f} cents")
Output
plucked at a = 0.13 m:
  n = 1: numeric +2.97775 mm, formula +2.97775 mm, relative +1.000
  n = 2: numeric +1.20453 mm, formula +1.20453 mm, relative +0.405
  n = 3: numeric +0.53535 mm, formula +0.53535 mm, relative +0.180
  n = 4: numeric +0.18611 mm, formula +0.18611 mm, relative +0.062
  n = 5: numeric +0.00000 mm, formula +0.00000 mm, relative +0.000
  n = 6: numeric -0.08272 mm, formula -0.08272 mm, relative -0.028
plucked at a = 0.325 m:
  n = 1: numeric +3.24228 mm, formula +3.24228 mm, relative +1.000
  n = 2: numeric +0.00000 mm, formula +0.00000 mm, relative +0.000
  n = 3: numeric -0.36025 mm, formula -0.36025 mm, relative -0.111
  n = 4: numeric +0.00000 mm, formula +0.00000 mm, relative +0.000
  n = 5: numeric +0.12969 mm, formula +0.12969 mm, relative +0.040
  n = 6: numeric +0.00000 mm, formula +0.00000 mm, relative +0.000

pipe 0.4 m, radius 0.01 m:
  open both ends: 416, 832, 1248 Hz
  closed one end: 211, 633, 1056 Hz

pipe 0.6 m, radius 0.01 m:
  open both ends: 280, 560, 840 Hz
  closed one end: 141, 424, 707 Hz

beats between 440.0 and 443.0 Hz: 3.0 per second
major third   : equal tempered 1.25992, pure 1.25000, difference +13.69 cents
perfect fourth: equal tempered 1.33484, pure 1.33333, difference +1.96 cents
perfect fifth : equal tempered 1.49831, pure 1.50000, difference -1.96 cents
octave        : equal tempered 2.00000, pure 2.00000, difference +0.00 cents

The numerical and analytic amplitudes agree to many figures, and the center pluck shows the even harmonics vanishing. With end corrections the 0.40 m closed pipe sounds slightly below the 214 Hz of the worked example. In the tuning table a cent is a hundredth of an equal-tempered semitone; the major third is about 14 cents sharp of pure, enough for a trained ear to hear, while the fifth is only 2 cents flat.

Common mistakes

  • MistakeThinking standing waves carry energy along the string.

    InsteadEqual waves in opposite directions carry equal and opposite power; energy sloshes locally but does not flow past nodes.

  • MistakeUsing \(f_n = nv/2L\) with all \(n\) for a pipe closed at one end.

    InsteadA closed pipe has \(f_n = nv/4L\) with odd \(n\) only.

  • MistakePutting a pressure node at a closed end.

    InsteadA closed end is a displacement node and a pressure antinode.

  • MistakeExpecting every harmonic of a plucked string to be present.

    InsteadHarmonics with a node at the plucking point have zero amplitude.

  • MistakeSaying the beat frequency is half the difference of the two frequencies.

    InsteadThe envelope cosine has frequency \(|f_1 - f_2|/2\), but loudness peaks twice per cycle, so we hear \(|f_1 - f_2|\) beats per second.

Summary and key terms

  • Opposite traveling waves add to standing waves \(2A\sin kx\cos\omega t\) with nodes every half wavelength.
  • A string fixed at both ends has \(f_n = nv/2L\); a plucked triangle shape has \(b_n \propto \sin(n\pi a/L)/n^2\).
  • Sound pressure leads displacement by a quarter wavelength; \(I = p_0^2/2\rho v\).
  • Open pipes have \(f_n = nv/2L\) for all \(n\); pipes closed at one end have \(f_n = nv/4L\) for odd \(n\); end corrections add about \(0.61R\) per open end.
  • Two close tones beat at \(|f_1 - f_2|\); equal temperament uses \(2^{1/12}\) per semitone.
standing wave
A pattern that oscillates in place, formed by equal waves traveling in opposite directions.
node
A point of a standing wave that does not move.
harmonic series
Frequencies that are whole-number multiples of a fundamental.
end correction
The extra effective length of a pipe because the pressure node lies just beyond an open end.
Helmholtz resonator
A cavity with a neck whose air mass and cavity stiffness make a single resonance.
equal temperament
A tuning that divides the octave into twelve equal frequency ratios.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A violin A string is 0.325 m long and tuned to 440 Hz. Find the wave speed and the third harmonic.

    Show answer

    \(v = 2Lf_1 = 286\ \mathrm{m/s}\); \(f_3 = 1320\ \mathrm{Hz}\).

  2. By what factor must the tension change to raise a string's pitch by a semitone?

    Show answer

    \(f \propto \sqrt T\), so \(T\) rises by \((2^{1/12})^2 = 1.122\), about 12 parts in a hundred.

  3. A string is plucked at its center. Which harmonics are present, and what is the amplitude of the third relative to the first?

    Show answer

    Odd harmonics only; \(b_3/b_1 = \sin(3\pi/2)/9 \div \sin(\pi/2) = -1/9\).

  4. Find the length of a closed pipe whose fundamental is 110 Hz at 343 m/s.

    Show answer

    \(L = v/4f = 0.78\ \mathrm{m}\) (minus the end correction).

  5. A sound of 80 dB at 1 kHz: find its pressure amplitude.

    Show answer

    \(I = 10^{-4}\ \mathrm{W/m^2}\), so \(p_0 = \sqrt{2\rho vI} = \sqrt{2(1.20)(343)(10^{-4})} \approx 0.29\ \mathrm{Pa}\).

  6. A 1.0 liter bottle has a neck 2.0 cm in diameter and 5.0 cm long. Estimate its Helmholtz frequency.

    Show answer

    \(A = 3.14\times10^{-4}\ \mathrm{m^2}\), \(f = \frac{343}{2\pi}\sqrt{3.14\times10^{-4}/(10^{-3}\times0.050)} \approx 137\ \mathrm{Hz}\) (end corrections lower it).

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz