Wave Superposition Lab
Put two ideal sine waves on one line and watch their sum move. Each wave has its own amplitude (0 to 5), wavelength (0.1 to 10) and phase in radians or degrees, and both share one speed (0 to 10), travelling the same way or opposite ways. The lab shows each wave's frequency and period, marks standing-wave nodes, reads the displacement at a probe point and downloads the current frame as an SVG diagram or a CSV of every plotted sample. Model time comes from elapsed time rather than the number of frames drawn, so Play, Pause and Step give the same waves on any screen.
Your waves
Wave 1travels toward +x
Wave 2travels toward +x
Sharedone medium, one speed
Viewwindow, probe and time
- Wave 1, dashed grey
- Wave 2, dotted amber
- Sum, solid teal
- Probe line
Plot of wave 1 (dashed grey), wave 2 (dotted amber) and their sum (solid teal) over x from 0 to 5 at t = 0. The sum peaks at 1.414 in this window. Probe at x 0.5 reads 1.26. The samples table below lists the values.
- Model time
- 0
- Wave 1
- f 0.4 · T 2.5
- Wave 2
- f 0.4 · T 2.5
- Sum peak in window
- 1.414
- Probe at x = 0.5
- 1.26 (wave 1 0.951, wave 2 0.309)
Example waves shown. Change any wave to explore your own.
Same wavelength and direction: the sum is one traveling wave with amplitude 1.414, from √(A1² + A2² + 2·A1·A2·cos Δφ) with Δφ = π/2 rad. It moves toward +x at speed 1.
Frequency f = v/λ and period T = λ/v for each wave. Units are yours to choose, as long as they are consistent: with x in metres and t in seconds, v is in metres per second and f in hertz.
| x | Wave 1 | Wave 2 | Sum |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 0.5 | 0.951 | 0.309 | 1.26 |
| 1 | 0.588 | -0.809 | -0.221 |
| 1.5 | -0.588 | -0.809 | -1.397 |
| 2 | -0.951 | 0.309 | -0.642 |
| 2.5 | 0 | 1 | 1 |
| 3 | 0.951 | 0.309 | 1.26 |
| 3.5 | 0.588 | -0.809 | -0.221 |
| 4 | -0.588 | -0.809 | -1.397 |
| 4.5 | -0.951 | 0.309 | -0.642 |
| 5 | 0 | 1 | 1 |
Worked cases
- sum amplitude 2
- the waves cancel: sum 0 everywhere
- nodes every 1.25 at x = 0, 1.25, 2.5, 3.75 and 5
- f 0.5 and 0.4, beat frequency 0.1
- frequency 0, period undefined (infinite); nothing moves
Common questions
- What is wave superposition?
- When two waves share a medium, the displacement at each point is the sum of the two displacements. This lab adds wave 1 and wave 2 at every plotted point, so the solid teal curve is always y1 + y2. The model is linear and ideal: each wave carries on unchanged after they overlap.
- How do I make a standing wave?
- Choose Opposite direction and give both waves the same amplitude and wavelength, with a speed above 0. With wavelength 2.5 and matching phases, nodes stay still at x = 0, 1.25, 2.5, 3.75 and 5, every half wavelength, while the points halfway between swing up to twice the amplitude. The plot marks the nodes with circles. Unequal amplitudes give a partial standing wave whose smallest swing is the difference of the two amplitudes.
- Why do two waves cancel each other?
- Two waves with equal amplitude, the same wavelength and the same direction cancel when their phases differ by π radians (180 degrees): every crest of one meets a trough of the other. Load the Opposite phase case to see the sum stay at 0 everywhere, to numerical tolerance. Any other phase difference leaves a single sine wave with amplitude √(A1² + A2² + 2·A1·A2·cos Δφ).
- How are frequency and period linked to wavelength and speed?
- Frequency is speed divided by wavelength, f = v/λ, and the period is its inverse, T = λ/v. With wavelength 2.5 and speed 1 the frequency is 0.4 and the period 2.5, and after one period each wave is back where it started. At speed 0 the frequency is 0 and the period is shown as undefined (infinite), because nothing moves.
- What happens when the two wavelengths differ?
- The sum beats. At a fixed point its amplitude envelope repeats at the beat frequency |f1 - f2|: wavelengths 2 and 2.5 at speed 1 give frequencies 0.5 and 0.4 and a beat frequency of 0.1. When both waves travel the same way, the combined shape keeps its form and slides along at the shared speed, because the modelled medium is nondispersive.
- What do the SVG and CSV downloads contain?
- Both capture the frame at the current time t. The SVG is a labelled diagram of wave 1, wave 2, the sum and the probe, with each wave's amplitude, wavelength, phase, direction, frequency and period written out. The CSV lists the parameters, the probe readings and every plotted sample (x, wave 1, wave 2 and sum): between 361 and 1201 rows, depending on the window and the shorter wavelength.
- Does the animation respect reduced motion?
- Yes. If your device asks for reduced motion the lab opens paused, and Step forward, Step back and the time slider still move through time when you choose. Playback also pauses when the page is hidden. Model time comes from elapsed time, not from the number of frames drawn, so a slow or fast screen shows the same waves at the same t.
- What units does the wave simulator use?
- Any consistent set. If x is in metres and t in seconds, speed is in metres per second and frequency in hertz; amplitude uses whatever displacement unit you choose. The plot is an educational model of ideal sine waves, not a prediction for a particular material or instrument.
- Are my settings saved?
- Valid settings you change are kept in this browser's local storage, so the lab reopens where you left off; invalid values are not saved. The calculations and downloads are made in your browser and your values are never uploaded. Use Start over at the top of the page to forget the saved settings.
Original analytic one-dimensional sinusoidal model y=A*sin(2pi*(x/λ−direction*v*t/λ)+phase). Linear superposition in an ideal nondispersive medium; plots are educational models, not measured material/acoustic/engineering predictions. Zero speed has zero frequency and undefined/infinite period displayed explicitly.