A Byte of PhysicsLogo

Superposition principle

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.

Think like a programmer

Represent each contribution as an immutable array plus sampling metadata: physical coordinate origin, spacing, time, units, and phase/reference convention. Reject mismatched array lengths or grids rather than silently truncating or zipping them. Sum source arrays with a pure reducer and keep source arrays available for decomposition tests, renderer updates, and reproducible experiments.

Model checklist

Inputs
One or more finite source sample arrays, shared coordinate/time metadata, physical quantity and unit, boundary convention, and optional source amplitudes/phases.
State
Immutable source arrays, combined sample array, metadata, source-enabled flags, and residual diagnostics.
Rule
At each matching physical sample, add all source values under the linear-medium assumption.
Output
Combined displacement/field array, per-source contribution trace, interference extrema, and array-alignment validation result.
Check
With one source disabled, output equals the remaining source exactly; equal arrays add to twice their values; equal opposite arrays cancel within floating-point tolerance; reordering sources leaves output unchanged; mismatched sample grids or units are rejected or explicitly resampled.
\[y_{\rm total}(x,t)=\sum_i y_i(x,t)\]

Wave data sampler

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.

Try this experiment

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.

Where this model breaks

Large amplitudes or nonlinear media can violate simple addition. Different frequencies, grids, units, polarizations, or sampling clocks require explicit conversion or interpolation before addition. Clipping, saturation, source coupling, dispersion with changing state, and nonlinear propagation are separate model stages; keep the linearity assumption in the run metadata.

Summary

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.

Glossary

Sources

Model contract

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})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

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.

Guided experiment

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.

Where this model breaks

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.

Summary

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.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Superposition Principle into a test

Combine linear waves by reproducible pointwise array addition and test constructive or destructive interference.

  1. Name the inputs and units that the waves i — mechanical waves model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: