---
title: The Helmholtz equation in rectangles
heading: Modes of membranes, waveguides, cavities and rooms
eyebrow: A12 · Lesson 40 · The Helmholtz equation
xp: 40
---

::: hook
When a wave problem settles into a single frequency, writing $u = \psi(x, y, z)e^{j\omega t}$ turns the wave equation $u_{tt} = c^2\nabla^2u$ into the **Helmholtz equation**, $\nabla^2\psi + k^2\psi = 0$ with $k = \omega/c$. In a box, separation of variables solves it with a product of sines or cosines, one per direction, and the allowed values of k come out as a sum of squares. That single result gives the cutoff frequencies of a rectangular waveguide, the resonances of a microwave cavity, the boomy notes of a small room and the overtones of a rectangular drum.
:::

::: play
- The shading is mode (m, n) of a square membrane fixed at its edges: $\psi = \sin m\pi x\,\sin n\pi y$. The lines are the nodal lines, where it never moves.
- Step m and n. Each index counts half-wavelengths across one direction.
- The readout gives the mode's frequency relative to the fundamental (1, 1). Modes (1, 2) and (2, 1) share a frequency: in a square, swapping the indices changes the pattern but not the pitch.
:::

```sim plot
view: flow
x: x = 0..1
y: y = 0..1
slider: m = 1..4 step 1 = 1
slider: n = 1..4 step 1 = 2
shade: sin(m*pi*x)*sin(n*pi*y) | contours: 8
readout: frequency over the fundamental = sqrt((m^2 + n^2)/2) | digits: 4
```

::: predict
## A rectangular waveguide is 22.86 mm wide and 10.16 mm tall (WR-90). Below what frequency does it carry nothing at all?

- [ ] 3.3 GHz
- [x] 6.6 GHz
- [ ] 13.1 GHz
- [ ] 14.8 GHz

::: reveal
About 6.56 GHz. The lowest mode, TE₁₀, has half a wavelength across the wide wall, so it cuts off where $\lambda = 2a = 45.7$ mm, at $f = c/2a$. 13.1 GHz is where the next mode, TE₂₀, starts, and 14.8 GHz is TE₀₁'s cutoff, set by the narrow wall. Between 6.56 and 13.1 GHz the guide carries one mode only.
:::
:::

::: nameit
## Separation in a box

In a rectangle $0 < x < a$, $0 < y < b$ with $\psi = 0$ on the edges, try $\psi = X(x)Y(y)$. Then $\frac{X''}{X} + \frac{Y''}{Y} = -k^2$, each ratio is a constant, and the edge conditions give

$$\psi_{mn} = \sin\frac{m\pi x}{a}\sin\frac{n\pi y}{b}, \qquad k_{mn}^2 = \left(\frac{m\pi}{a}\right)^2 + \left(\frac{n\pi}{b}\right)^2,$$

with m, n = 1, 2, … . The frequencies are $f_{mn} = \frac c2\sqrt{\frac{m^2}{a^2} + \frac{n^2}{b^2}}$. In three dimensions a third term joins the sum.

## Which functions, which indices

- **Fixed edges** ($\psi = 0$, Dirichlet), like a membrane's rim: sines, indices from 1.
- **Rigid or insulated walls** ($\partial\psi/\partial n = 0$, Neumann), like sound pressure at a hard wall: cosines, indices from 0. The (0, 0, 0) mode is the uniform pressure, at zero frequency.
- **Electromagnetic fields** in a metal box: the tangential E must vanish, which gives sines in some components and cosines in others. One index can be 0, but a mode with two zero indices has no field at all.

## Waveguides

A guide uniform along z carries $\psi(x, y)e^{-j\beta z}$, so $\beta^2 = k^2 - k_c^2$, where $k_c$ is the cross-section's Helmholtz eigenvalue. A mode propagates only above its cutoff $f_c = \frac{ck_c}{2\pi}$; for a rectangle, $f_{c,mn} = \frac c2\sqrt{\frac{m^2}{a^2} + \frac{n^2}{b^2}}$, and TE₁₀ at $\frac{c}{2a}$ is the lowest.

## Counting modes

At high frequency the number of modes below f grows like the volume times $f^3$ (**Weyl's law**): about $\frac{4\pi Vf^3}{3c^3}$ for sound, and twice that, $\frac{8\pi Vf^3}{3c^3}$, for electromagnetic waves with their two polarizations. Below a few modes the count is lumpy and individual modes dominate, which is why small rooms boom at particular notes.
:::

::: example
## Find the single-mode band of WR-90 waveguide, 22.86 × 10.16 mm.

::: solution
1. **The TE₁₀ cutoff.** With c = 3.00 × 10⁸ m/s:
   $$\begin{aligned} f_{c,10} &= \frac{c}{2a} \\ &= \frac{3 \times 10^8}{0.04572}\ \text{Hz} \\ &= 6.56\ \text{GHz} \end{aligned}$$
2. **The next two cutoffs.**
   $$\begin{aligned} f_{c,20} &= \frac ca \\ &= 13.12\ \text{GHz} \\ f_{c,01} &= \frac{c}{2b} \\ &= 14.76\ \text{GHz} \end{aligned}$$
3. **The single-mode band.** TE₁₀ alone propagates from 6.56 to 13.12 GHz. The narrow wall is chosen a little less than half the wide one so that TE₀₁ stays above TE₂₀.
4. **In practice.** The guide is used from about 8.2 to 12.4 GHz (X band), staying clear of the high loss and dispersion near cutoff and of the second mode.

**Answer:** TE₁₀ alone propagates from 6.56 to 13.12 GHz; in practice the guide is used from about 8.2 to 12.4 GHz.
:::
:::

::: example
## A metal cube 10 cm on a side is a microwave cavity. What is its lowest resonance?

::: solution
1. **The lowest indices.** For electromagnetic modes one index may be zero, so the lowest has indices (1, 0, 1) or any arrangement of them.
2. **Its frequency.**
   $$\begin{aligned} f &= \frac c2\sqrt{\frac{1}{a^2} + \frac{1}{a^2}} \\ &= \frac{c\sqrt2}{2a} \\ &= \frac{3 \times 10^8 \times 1.414}{0.2}\ \text{Hz} \\ &= 2.12\ \text{GHz} \end{aligned}$$
3. **Three modes at once.** The three arrangements (1, 0, 1), (0, 1, 1) and (1, 1, 0) all have this frequency, so the cube's lowest resonance is three-fold degenerate.
4. **Why cavities are seldom cubes.** Making the box slightly unequal splits them, and a single clean mode is easier to couple and tune.

**Answer:** the lowest resonance is 2.12 GHz, three-fold degenerate.
:::
:::

::: example
## A room is 5 × 4 × 3 m. What are its lowest acoustic resonances (c = 343 m/s)?

::: solution
1. **The mode formula.** Hard walls are Neumann boundaries, so the modes are cosines with indices from 0, and
   $$f = \frac c2\sqrt{\frac{l^2}{25} + \frac{m^2}{16} + \frac{n^2}{9}}$$
2. **List them in order.** The first is (1, 0, 0) at $\frac{343}{10} = 34.3$ Hz:

| $(l, m, n)$ | $f$ (Hz) |
|---|---|
| (1, 0, 0) | 34.3 |
| (0, 1, 0) | 42.9 |
| (1, 1, 0) | 54.9 |
| (0, 0, 1) | 57.2 |
| (1, 0, 1) | 66.7 |
| (2, 0, 0) | 68.6 |

3. **Low-frequency trouble.** Below about 100 Hz the modes are few and far apart, so some bass notes ring and others die. That's the low-frequency trouble of small rooms.
4. **Weyl's estimate.** At 100 Hz it gives
   $$\frac{4\pi \times 60 \times 100^3}{3 \times 343^3} \approx 6$$
   which undercounts here (the room actually has 13 modes below 100 Hz), because the many modes with zero indices (axial and tangential ones) are what dominate at low frequency.

**Answer:** the lowest resonances are 34.3, 42.9, 54.9, 57.2, 66.7 and 68.6 Hz, for modes (1, 0, 0), (0, 1, 0), (1, 1, 0), (0, 0, 1), (1, 0, 1) and (2, 0, 0).
:::
:::

::: check
given: a = 22.86 | 15.80 | 10.67
answer: 150/a
unit: GHz
tolerance: 0.5%

## A rectangular waveguide's wide wall is {a} mm. What is its TE₁₀ cutoff? (c = 3.00 × 10⁸ m/s.)

::: right
Right. $\frac{c}{2a}$: half a wavelength fits across the wide wall.
:::

::: misses
- [300/a] That's TE₂₀, a full wavelength across.
- [any] $f_c = \frac{c}{2a}$.
:::
:::

::: check
kind: parts
given: a = 22.86 | 40; b = 10.16 | 8

## A rectangular waveguide is {a} × {b} mm (c = 3.00 × 10⁸ m/s).

::: part
answer: 150/b
unit: GHz
tolerance: 0.5%

### What is the TE₀₁ cutoff?

::: misses
- [150/a] That's TE₁₀; TE₀₁ fits half a wavelength across the narrow wall.
- [any] $\frac{c}{2b}$.
:::
:::

::: part
answer: 150*sqrt(1/a^2 + 1/b^2)
unit: GHz
tolerance: 0.5%

### What is the TE₁₁ cutoff?

::: misses
- [150/a + 150/b] Add the squares, then take the square root.
- [any] $\frac c2\sqrt{\frac{1}{a^2} + \frac{1}{b^2}}$.
:::
:::
:::

::: check
given: L = 5 | 10 | 20
answer: 15*sqrt(2)/L
unit: GHz
tolerance: 0.5%

## A metal cube {L} cm on a side: what is its lowest electromagnetic resonance? (c = 3.00 × 10⁸ m/s.)

::: right
Right. Mode (1, 0, 1): $\frac{c\sqrt2}{2L}$.
:::

::: misses
- [15*sqrt(3)/L] Electromagnetic modes can have one zero index, so (1, 1, 1) isn't the lowest.
- [15/L] Two zero indices give no field at all.
- [any] $\frac c2\sqrt{\frac{1}{L^2} + \frac{1}{L^2}}$.
:::
:::

::: check
given: c = 100 | 200; a = 0.3 | 0.5; b = 0.2 | 0.4
answer: c/2*sqrt(1/a^2 + 1/b^2)
unit: Hz
tolerance: 0.5%

## A rectangular membrane {a} × {b} m has wave speed {c} m/s and fixed edges. What is its fundamental?

::: right
Right. Mode (1, 1): $\frac c2\sqrt{\frac{1}{a^2} + \frac{1}{b^2}}$.
:::

::: misses
- [c/(2*a)] A membrane fixed on all edges can't have a zero index.
- [any] Half a wavelength each way.
:::
:::

::: check
given: L = 4 | 6 | 8
answer: 343/(2*L)
unit: Hz
tolerance: 0.5%

## A room's longest dimension is {L} m. What is its lowest acoustic mode? (c = 343 m/s.)

::: right
Right. Mode (1, 0, 0): half a wavelength along the longest wall.
:::

::: misses
- [343/L] That's (2, 0, 0); the lowest fits half a wavelength.
- [any] $\frac{c}{2L}$.
:::
:::

::: check
given: m = 1 | 2; n = 3 | 4
answer: sqrt((m^2 + n^2)/2)
tolerance: 0.5%

## On a square drumhead, what is the frequency of mode ({m}, {n}) relative to the fundamental (1, 1)?

::: right
Right. $\sqrt{\frac{m^2 + n^2}{2}}$. The overtones aren't whole-number multiples, which is why drums don't sound a clear pitch.
:::

::: misses
- [(m + n)/2] Frequencies add in squares.
- [any] $f_{mn} \propto \sqrt{m^2 + n^2}$.
:::
:::

::: check
given: V = 1 | 30; f = 2.45 | 10
answer: 8*pi*V*1e-3*(f*1e9)^3/(3*(3e8)^3)
tolerance: 1%

## About how many electromagnetic modes does a {V} liter metal cavity have below {f} GHz, by Weyl's law?

::: right
Right. $\frac{8\pi Vf^3}{3c^3}$. A microwave oven has well over a hundred modes at 2.45 GHz, which is why a turntable is needed to even out its hot spots.
:::

::: misses
- [4*pi*V*1e-3*(f*1e9)^3/(3*(3e8)^3)] That's for sound; light has two polarizations.
- [any] Remember to convert liters to cubic meters.
:::
:::

::: check
kind: choice

## Why do the acoustic modes of a hard-walled room use cosines and allow zero indices?

- [ ] Because the pressure must vanish at the walls
- [x] Because the air can't move through a hard wall, so the pressure's normal derivative vanishes there
- [ ] Because sound waves are longitudinal
- [ ] Because the room is three-dimensional

::: right
Right. Zero normal velocity at the wall means zero normal pressure gradient: a Neumann condition, met by cosines, including the constant.
:::

::: misses
- [1] That's an open end, like the mouth of a pipe; a wall reflects with a pressure maximum.
- [3] Longitudinal waves still obey the Helmholtz equation; the walls set the functions.
- [4] Dimension doesn't decide between sines and cosines.
:::
:::

::: check
kind: derivation
vars: a = 0.5..2, b = 0.5..2, c = 1..5

## A membrane $a \times b$ vibrates in the mode $\psi = \sin\frac{\pi x}{a}\sin\frac{2\pi y}{b}$, with wave speed c.

::: step
answer: (pi/a)^2 + (2*pi/b)^2

### Substitute into $\nabla^2\psi + k^2\psi = 0$. What is $k^2$?
:::

::: step
answer: c/2*sqrt(1/a^2 + 4/b^2)

### What is its frequency, $\frac{ck}{2\pi}$?
:::

::: right
Right. Mode (1, 2): one half-wavelength across x and two across y.
:::
:::

::: check
kind: python

## Count the acoustic modes (l, m, n), indices from 0 but not all zero, of a 5 × 4 × 3 m hard-walled room below 100 Hz (c = 343 m/s). Set `count`, and set `weyl` to Weyl's estimate $\frac{4\pi Vf^3}{3c^3}$.

```python starter
import math

count = 0
weyl = 0.0
print(count, weyl)
```

```python solution
import math

c = 343.0
count = 0
for l in range(20):
    for m in range(20):
        for n in range(20):
            if (l, m, n) != (0, 0, 0) and c / 2 * math.sqrt((l / 5)**2 + (m / 4)**2 + (n / 3)**2) < 100:
                count += 1
weyl = 4 * math.pi * 60 * 100**3 / (3 * c**3)
print(count, weyl)
```

```python tests
assert count == 13, f"The room has 13 modes below 100 Hz; got {count}."
assert abs(weyl - 6.228) < 0.001, f"Weyl's leading term gives 6.23; got {weyl}."
```

::: right
Right. 13 modes against Weyl's 6.2: at low frequency the axial and tangential modes, with zero indices, roughly double the count.
:::
:::

::: explain
## Why does a rectangular waveguide stop carrying a mode below a cutoff frequency?

::: model
A guided mode has a pattern across the guide that must fit the walls, which fixes its transverse wavenumber $k_c$: for TE₁₀, half a wavelength across the wide wall gives $k_c = \pi/a$. The free-space wavenumber $k = \omega/c$ then splits into a transverse part and a part along the guide, $\beta^2 = k^2 - k_c^2$. Above cutoff β is real and the wave travels. Below cutoff $k < k_c$, so β is imaginary, and the field decays exponentially along the guide instead of traveling: the wave is too long to fit the cross-section and bounces back. That's why a waveguide is a high-pass filter, and why a small hole in a metal shield blocks frequencies whose half-wavelength is larger than the hole.
:::
:::

::: practice

::: check
given: a = 7.11 | 10.67 | 15.8 | 22.86 | 34.85 | 47.55 | 72.14
answer: 150/a
unit: GHz
tolerance: 0.5%

## TE₁₀ cutoff for a {a} mm wide wall?

::: misses
- [any] $\frac{c}{2a}$.
:::
:::

::: check
given: L = 2.5 | 3 | 4 | 5 | 6 | 10 | 12
answer: 343/(2*L)
unit: Hz
tolerance: 0.5%

## Lowest axial mode for a {L} m wall?

::: misses
- [any] $\frac{c}{2L}$.
:::
:::

::: check
given: m = 3 | 1; n = 1 | 4
answer: sqrt((m^2 + n^2)/2)
tolerance: 0.5%

## Square membrane: f({m}, {n}) / f(1, 1)?

::: misses
- [any] $\sqrt{\frac{m^2 + n^2}{2}}$.
:::
:::
:::
