Standing waves arise when counter-propagating waves interfere under boundary constraints. A string fixed at both ends cannot choose any wavelength: its endpoints must remain at zero displacement, so only patterns with nodes at both endpoints persist as ideal normal modes.
For an ideal string fixed at both ends,
\[\lambda_n=\frac{2L}{n},\qquad f_n=\frac{nv}{2L},\qquad n=1,2,3,\ldots\]Mode 1 is the fundamental with one antinode in the middle. Mode 2 has an additional central node. In general, the allowed wavelengths are selected by the boundary condition, not by a special force that “creates” a standing wave. The state is a superposition of two travelling-wave components whose interference repeats in place.
function fixedEndModeFrequency(mode: number, length: number, waveSpeedValue: number) {
if (!Number.isInteger(mode) || mode < 1) throw new RangeError("positive mode required");
return (mode * waveSpeedValue) / (2 * length);
}
For a 2 m string with v = 12 m/s, the fundamental is 3 Hz and mode 3 is 9 Hz. Those values form a compact test fixture: a mode-frequency helper must return integer multiples, while a numerical simulation can compare a zero-crossing or Fourier estimate with the target under a stated tolerance.
Adjust amplitude and wavelength. The plotted line is a view of sampled displacement data; its speed is frequency divided by wave number.
Amplitude 1.0; wavelength 3.0 m; model speed 1.91 m/s.
The displayed sampled sine wave is a simple amplitude/wavelength view, not a full string solver. It helps identify spatial periodicity. A full standing-wave update also needs velocity, time, boundary enforcement, and a stability condition. Record energy or amplitude drift to distinguish physical damping from numerical loss.
Prediction: Doubling a fixed string’s length halves every ideal mode frequency when wave speed is unchanged.
Usev = 12 m/s and compare fundamental frequencies for L = 2 m and L = 4 m. Then predict node positions for mode 2 and write the endpoint assertions a grid step must satisfy.Standing modes are boundary-selected array states. Enforce endpoints, test the integer frequency pattern, measure numerical drift and refinement error, and make clear that a stationary-looking plot alone does not establish a correct wave model.
Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.
\[\text{observable output} = f(\text{inputs},\,\text{state})\]For Standing Waves, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Waves I — Mechanical Waves, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.
Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.
This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.
Treat Standing Waves as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.
Derive fixed-end wave modes by enforcing boundary constraints in a spatial update model.