In a linear medium, overlapping waves add point by point. This does not mean “add whichever samples look nearby on a graph.” Every source must use the same quantity, unit, coordinate grid, timestamp, and phase convention at an index before its values can be added. The combined result is a new field sample, not a destructive edit of any source.
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.
For two sinusoidal sources with the same amplitude and frequency, a phase difference of π makes every matching sample opposite in sign. The expected combined value is zero only where amplitude and sampling alignment actually match. If one array was shifted by one cell or sampled at a different time, visible “almost cancellation” may be an indexing bug rather than physics.
\[y_{total}[j,t]=\sum_i y_i[j,t],\qquad y_1=A\sin\theta,\;y_2=A\sin(\theta+\pi)=-y_1\]Linearity gives useful test laws. Scaling every source by a should scale the output by a; combining sources A and B then adding C should equal combining all three; source order should not matter. These algebraic properties are stronger than a single snapshot. They also expose accidental clipping, normalization, and in-place mutation, which can make a visual look stable while losing the decomposability that superposition promises.
The model needs a boundary statement. Superposing prescribed source arrays is different from solving a wave equation with sources, reflection, damping, or nonlinear material response. If a solver clamps amplitude or applies a nonlinear filter after addition, record it as a separate stage; do not claim that its output still follows simple linear superposition.
Prediction: Equal opposite-phase waves cancel at aligned samples, while a one-sample shift leaves a residual pattern.
Generate two equal sampled sinusoids on the same grid with a π phase offset. Assert every combined value is near zero. Shift one source by one index without changing its label and inspect the residual. Then disable one source and assert exact recovery of the other. Record the coordinate/time metadata that makes those three assertions meaningful.Superposition is deterministic, immutable pointwise addition under a shared sampling contract. Treat sources, metadata, and combined field as inspectable arrays, and validate cancellation, scaling, source order, and source-disable recovery before interpreting interference.
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 Superposition Principle, 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 Superposition Principle 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.
Combine linear waves by reproducible pointwise array addition and test constructive or destructive interference.