Longitudinal waves can also be simulated in Excel. This time the points are being displaced horizontally we will start with 3 points. Set up the spreadsheet as shown below. The slider is set to vary cell G5 from 0 to 30,000 in steps of 1. To make the time (F5) change in smaller steps it is calculated from G5/1000.
The displacement is the original position – Asin(2πft)
Insert an xy scatter based on columns B and C and format the x axis so that it doesn’t rescale automatically (min of -0.1 and max of 0.2 works well).
Animate the points by moving the slider, the 3 points should oscillate in phase.
To introduce phase difference the term 2πx/λ is again introduced in the equation.
This equation is copied down to the three cells to give the following phase difference.
To make a wave copy the three columns down to 100 values then insert an xy scatter based on columns B and C. Again fix the X axis between 0 and 10 to stop it rescaling.
Change the amplitude to 0.1 and the wavelength to 2 and use the slider to animate the wave, It should look like the one below.