Waves on a String
Abstract
Here the particular case of waves on a string is considered. At the beginning, a solution for the wave equation in the ideal case is introduced and developed, that is, for a perfectly flexible and frictionless string. Only one initial Gaussian wave packet and two initial Gaussian wave packets are considered to show that the wave packets are unaffected by the collisions. Besides, Fourier analysis is applied in the spectral analysis to exam the waves on a string.
Background
The central equation of wave is
The parameter
is the ratio of the tension in the string to the density per length.To solve the time-dependent solution
, the wave equation should be attacked with rather different numerical treatments than those employed in the work with Laplace’s equation. The numerical approach can be written as follows.
The variables are treated as discrete ones as
. The displacement of the string is a function of i and n, that is,
. Inserting the expression for the second partial derivative, the wave equation can be rewritten as
Rearranging the above equation, we have
Where
Thus if we know the string configuration as time steps n and n-1, the configuration at step n+1 can be calculated. The boundary condition is
and the initial condition is
Main body
On an ideal string, the wave can be described as
Here is the code
And we can discuss the string with a fixed end,and here is the code
Conclusion
From the results above, we can draw the conclusion that when there are two Gaussian wave packets located at different places on the string, the wave packets may then propagate and collide but the wave packets are unaffected by the collisions.
Acknowledgement
Thanks for Junyi Shangguan's shared code