(N/A) Let $y_{1}(x, t)$ and $y_{2}(x, t)$ be the displacements that any element of the medium would experience if each wave travelled alone.
The displacement $y(x, t)$ of an element of the medium when the waves overlap is given by the superposition principle as:
$y(x, t) = y_{1}(x, t) + y_{2}(x, t) \quad \dots (1)$
If we have $n$ waves moving in the medium,the resultant waveform is the algebraic sum of the wave functions of the individual waves.
Let the individual wave functions be:
$y_{1} = f_{1}(x - vt)$
$y_{2} = f_{2}(x - vt)$
$y_{n} = f_{n}(x - vt)$
Then the resultant wave function $y$ is the sum of these individual functions:
$y = f_{1}(x - vt) + f_{2}(x - vt) + \dots + f_{n}(x - vt)$
Therefore,the resultant wave function can be expressed as:
$y = \sum_{i=1}^{n} f_{i}(x - vt)$
where $i = 1, 2, 3, \dots, n$.