Physics · Introductory

Standing wave modes

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A standing wave forms when two identical waves travel in opposite directions and interfere, producing fixed points of zero motion (nodes) and points of maximum motion (antinodes). When the medium has fixed boundaries, only certain wavelengths fit, so only discrete modes called harmonics are allowed.

Intuition

Pluck a guitar string and it cannot vibrate in just any shape. Its ends are pinned, so they must be nodes. Waves bounce back and forth between the ends, and only those whose half-wavelengths fit a whole number of times into the string reinforce themselves. Other wavelengths cancel out after a few reflections. The allowed shapes are the modes: one big arc (fundamental), two arcs with a node in the middle (second harmonic), three arcs, and so on. Each extra arc adds a node and raises the frequency by the same step. The same idea explains organ pipes, microwave cavities, and even electron waves in atoms.

Key equations

y(x,t)=2Asin⁡(kx)cos⁡(ωt)
(1)

Sum of two opposite-travelling waves gives a standing wave: fixed spatial shape sin(kx) oscillating in time.

λn=2Ln,n=1,2,3,…
(2)

Allowed wavelengths for a string of length L fixed at both ends.

fn=nv2L=nf1
(3)

Allowed frequencies are whole-number multiples of the fundamental.

v=T/μ
(4)

Wave speed on a string with tension T and mass per length μ.

Derivation

  1. Take two waves of equal amplitude: y1 = A sin(kx - wt) moving right and y2 = A sin(kx + wt) moving left.
  2. Add them using sin(a)+sin(b)=2 sin((a+b)/2) cos((a-b)/2).
  3. This gives y = 2A sin(kx) cos(wt): every point oscillates in time with the same phase, amplitude set by sin(kx).
  4. Nodes occur where sin⁡(kx)=0, i.e. x=0,λ/2,λ,...
  5. Fixed ends require y=0 at x=0 (automatically true) and at x=L, so sin(kL)=0.
  6. Thus kL=nπ, and with k=2π/λ we get λ=2L/n.
  7. Using f=v/λ gives fn=nv/(2L).

Worked example

Problem

A guitar string of length 0.65 m has tension 80 N and mass per length 0.0010 kg/m. Find the fundamental frequency and the third harmonic.

  1. Wave speed: v=T/μ=80/0.0010=80000≈283 m/s.
  2. Fundamental: f1 = v/(2L) = 283/(2 × 0.65) = 283/1.30 ≈ 218 Hz.
  3. Third harmonic: f3 = 3 f1 ≈ 653 Hz.

Answer f1 ≈ 218 Hz; f3 ≈ 653 Hz

Common mistakes

  • Thinking the nodes are where the wave is traveling; in fact a standing wave transports no net energy along the string.
  • Saying the fundamental has wavelength L; it is 2L (half a wavelength fits).
  • Counting the end points as antinodes for a string fixed at both ends; they are nodes.
  • Forgetting that open-closed pipes only allow odd harmonics, unlike strings fixed at both ends.
  • Believing frequency changes with amplitude; modes depend on v and L, not on how hard you pluck.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(68 lines)
import sys
import numpy as np
from manim import *
from blocks import *

L = 1.0


def mode(n, x, t=0.0):
    """Standing wave on a string fixed at both ends: sin(n pi x / L) cos(omega_n t)."""
    return np.sin(n * np.pi * x / L) * np.cos(n * np.pi * t)


def nodes(n):
    """Node positions (including both ends) of mode n."""
    return [k * L / n for k in range(n + 1)]


class Main(Scene):
    def construct(self):
        self.camera.background_color = "#111118"
        # title
        TitleCard(self, "Standing wave modes", "String fixed at both ends")
        # three modes drawn as static envelopes, stacked vertically
        colors = [C_MAIN, C_ACCENT, C_GOOD]
        groups = VGroup()
        for n in (1, 2, 3):
            ax = Axes(x_range=[0, 1, 0.5], y_range=[-1.2, 1.2, 1],
                      x_length=6, y_length=1.3,
                      axis_config={"color": C_DIM, "include_tip": False})
            env = ax.plot(lambda x, n=n: mode(n, x), x_range=[0, 1], color=colors[n - 1],
                          use_smoothing=False)
            lab = Text(f"n = {n}", font_size=26, color=colors[n - 1])
            lab.next_to(ax, LEFT, buff=0.4)
            dots = VGroup(*[Dot(ax.c2p(x, 0), color=C_BAD, radius=0.07) for x in nodes(n)])
            groups.add(VGroup(ax, env, lab, dots))
        groups.arrange(DOWN, buff=0.3).move_to([0, -0.1, 0])
        groups.shift(LEFT * 1.5)
        for g in groups:
            self.play(Create(g[0]), Create(g[1]), FadeIn(g[2]), run_time=1.0)
            self.play(FadeIn(g[3]), run_time=0.4)
        # formula on the right
        eq = MathTex(r"f_n = \frac{n\,v}{2L}", font_size=40).to_edge(RIGHT, buff=0.8).shift(UP * 0.5)
        note = Text("red dots: nodes", font_size=24, color=C_BAD).next_to(eq, DOWN, buff=0.4)
        self.play(Write(eq), FadeIn(note))
        # animate the vibration of all three modes with a time tracker
        t = ValueTracker(0.0)
        moving = VGroup()
        for n, g in zip((1, 2, 3), groups):
            ax = g[0]
            moving.add(always_redraw(lambda ax=ax, n=n: ax.plot(
                lambda x: mode(n, x, t.get_value()),
                x_range=[0, 1], color=WHITE, stroke_width=3, use_smoothing=False)))
        self.add(moving)
        self.play(t.animate.set_value(2.0), run_time=6, rate_func=linear)
        StepCaption(self, "Mode n has n half-waves and n-1 interior nodes.")
        self.wait(1.5)


if __name__ == "__main__" and "--selftest" in sys.argv:
    xs = np.linspace(0, L, 801)
    for n in (1, 2, 3, 4):
        assert abs(mode(n, 0.0)) < 1e-12 and abs(mode(n, L)) < 1e-9
        assert len(nodes(n)) == n + 1
        assert all(abs(mode(n, x)) < 1e-9 for x in nodes(n))
        assert abs(np.max(np.abs(mode(n, xs))) - 1) < 1e-6
    assert abs(mode(1, 0.5) - 1) < 1e-12
    print("ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.