Skip to content
ScienceQuest
Waves & Optics Simulator School

Standing Wave Simulator

Watch a standing wave on a string alongside the two travelling waves that make it, with nodes, harmonics and frequencies for any tension and length.

Simulator

Step through the harmonics with the up and down arrow keys. Space plays and pauses.

Frequency
n·v/(2L). Unchanged by amplitude, which is why a plucked string keeps its pitch as it fades.
212.1 Hz
Wavelength
2L/n. The string holds exactly n half wavelengths.
0.6667 m
Wave speed
√(T/μ), set by the string alone and the same for every harmonic.
141.4 m/s
Period
4.714 ms
Fundamental
Every harmonic is an exact integer multiple of this, which is why a string plays a note.
70.71 Hz
Nodes
Both fixed ends count, so harmonic n has n+1 nodes and n antinodes.
4
Parameters

1 is the fundamental. Step through them with the up and down arrow keys.

m
N

Four times the tension doubles the speed, so pitch goes as √T.

g/m
mm

Watch the frequency readout while you change this. It does not move.

Pause a quarter period after the extreme and the whole string is flat at once. A travelling wave never is, and that difference is what "standing" means.

  • Harmonic frequency (Hz)
Frequency against harmonic number. It is a straight line through the origin because every harmonic is an exact integer multiple of the fundamental, which is why a string plays a note rather than a noise.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

fn=n2LTμf_n = \frac{n}{2L}\sqrt{\frac{T}{\mu}}

Normal modes of a vibrating string, Mersenne (1636)

Two clamped ends is the whole story

A string fixed at both ends can carry a wave only if that wave has a node at each end. There is no other constraint, and everything about harmonics follows from it. A node at each end means the length must be a whole number of half wavelengths, so the only allowed wavelengths are 2L, L, 2L/3, L/2 and so on: λₙ = 2L/n.

The speed is fixed by the string rather than by the wave, v = √(T/μ), so the allowed frequencies are fₙ = nv/2L. Every one of them is an exact integer multiple of the lowest. That is why a plucked string sounds like a note and a struck saucepan does not: the saucepan’s allowed frequencies are not in whole-number ratios.

A standing wave really is two travelling waves

This is usually asserted and rarely shown, so the simulator draws it. Add a wave travelling right to an identical wave travelling left:

A sin(kx − ωt) + A sin(kx + ωt) = 2A sin(kx) cos(ωt)

Position and time have separated. The sin(kx) factor fixes an amplitude for each point on the string, and the cos(ωt) factor makes every point oscillate in step with every other. That separation is exactly what “standing” means, and it is why nothing appears to move along the string even though both components are moving at 141 m/s.

Watch the two dashed components slide in opposite directions while their sum stays put. The nodes are where sin(kx) = 0, so the two components are equal and opposite there at every instant, forever.

The test that distinguishes standing from travelling

Pause a quarter of a period after the extreme and the entire string is flat at once. Every point crosses zero simultaneously, and at that instant all the energy is kinetic. A travelling wave is never flat: there is always a crest somewhere. If you can flatten it, it was standing.

Counting nodes, and the off-by-one

Harmonic n has n + 1 nodes and n antinodes. The plus one catches almost everyone, because the two clamped ends are nodes and are easy to overlook when you are counting the visible bumps. The fundamental has two nodes and one antinode. The third harmonic has four nodes and three antinodes.

What changes the pitch, and what does not

  • Tension. Pitch goes as √T, so quadrupling the tension doubles the frequency. This is what a tuning peg does.
  • Length. Pitch goes as 1/L. Halving the vibrating length doubles the frequency, which is what a finger on a fretboard does.
  • Mass per unit length. Pitch goes as 1/√μ, which is why the bass strings on a guitar are the thick ones.
  • Amplitude. Nothing. Watch the frequency readout while you drag the amplitude slider; it does not move. This is why a plucked string holds its pitch as it fades instead of sliding downwards.

What this model leaves out

The string is perfectly flexible, so it has no stiffness of its own. Real strings, and especially thick piano bass strings, are slightly stiff, which raises the upper harmonics above exact integer multiples. Piano tuners deal with the consequences of that every day.

There is also no damping here, so the wave rings forever. And only one harmonic is present at a time. A real plucked string vibrates in many harmonics at once, and the mixture is what makes a guitar sound like a guitar rather than like a flute playing the same note.

Common mistakes

  • Forgetting the end nodes. Harmonic n has n+1 nodes, not n.
  • Thinking the wavelength is the length of the string. It is 2L/n. Only the second harmonic has a wavelength equal to L.
  • Expecting frequency to scale with tension. It scales with the square root of tension. Doubling the pitch needs four times the tension.
  • Assuming nothing is moving. The string is moving fast; it is the pattern that is stationary. Two travelling waves are crossing at the full wave speed the whole time.
  • Mixing grams per metre with kilograms per metre. A factor of a thousand inside a square root is a factor of about 32 in the speed. The slider here is in g/m and the conversion is done for you.
  • Believing amplitude affects pitch. It does not, for any wave in a linear medium.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • The displacement is the exact expression 2A sin(kx) cos(wt), with time as a parameter rather than something accumulated, so the animation cannot drift.
  • The string is perfectly flexible and uniform, held rigidly at both ends, and the amplitude is small enough for the wave equation to be linear.
  • No damping, so a mode once established persists.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Standing Wave Simulator: a string vibrating in its third harmonic, displacement along its length.
A string vibrating in its third harmonic, displacement along its length, computed by the simulator’s own model. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

Why does a string only vibrate at certain frequencies?

Because both ends are clamped, so any wave on it must have a node at each end. That forces the length to be a whole number of half wavelengths, which allows only the wavelengths 2L, L, 2L/3 and so on, and therefore only the frequencies v/2L, 2v/2L, 3v/2L. Every allowed frequency is an exact integer multiple of the lowest one, which is why a string plays a recognisable note rather than a noise.

How is a standing wave two travelling waves?

Add a wave going right to an identical wave going left and the trigonometry collapses: A sin(kx − ωt) + A sin(kx + ωt) = 2A sin(kx) cos(ωt). Position and time end up in separate factors, which is exactly what standing means. Every point oscillates in step, with an amplitude fixed by where it sits, and the nodes are the places where sin(kx) is zero so the two waves always cancel. The simulator draws both components so you can watch them slide past while their sum stays put.

Does the amplitude change the frequency?

No. Frequency depends only on the harmonic number, the length, the tension and the mass per unit length. Change the amplitude slider and the frequency readout does not move, which is why a plucked guitar string holds its pitch as it fades away rather than sliding down.

How many nodes does harmonic n have?

It has n+1 nodes and n antinodes. The n+1 catches people out because both fixed ends are nodes and are easy to forget. The fundamental has two nodes, one at each end, and a single antinode in the middle; the third harmonic has four nodes and three antinodes.