We can express the considerations above in the following way:
The equation above is a partial differential equation (PDE) called the wave equation and can be used to model different phenomena such as vibrating strings and propagating waves.The constant term C has dimensions of m/s and can be interpreted as the wave speed.
It turns out that the problem above has the following general solution
The thing that strikes me about this equation is how powerful the solution is. To think about it, any function that has the argument x-ct or x+ct or a combination of both is a solution to the wave equation. This means that we can model a lot of different waves! Furthermore, as you could probably spot, the general solution is a combination of a wave travelling to the left and one travelling to the right.
Assuming let’s try the following solution
By implementing the equation in Python for a string of length 2pi and of speed 1 m/s we obtain the following animation:
The range of animation you can run is infinite. I tried out a couple of solutions:
Shortening the string, L=pi
Click here to download the code for the above video.
Trying out f(x-ct) + g(x+ct)= cos(x-ct)**3 + cos(x+ct)**3
Click here to download the code for the above video.
The solution
yields the following:
Click here to download the code for the above video.
Note how the resulting wave (cyan) is the sum of two cosine waves travelling in opposite directions.
What happens if you input the f(x-ct) term only and set g = 0? Basically what you get is a single travelling wave. The same happens if f = 0 and g = g(x+ct).
Click here to download the code for the above video.
Hope this was entertaining and helpful!
Hi Mic,
ReplyDeleteThank you for the interesting article. I really enjoyed the read.
I have the following questions which I think worthwhile to pause and ponder by anyone.
1. If a wave equation/differential equation has multiple solutions how do we select from them?. In the example given by you, the string can vibrate in different ways. So what determines whether the string vibration follow one solution or other?.
2. Why would someone start with wave equation/differential equation and then solve it?. Why can't they directly mention the function which describes the string vibration of 2D waves?
3. You have written, "the simplest assumption one can make is that the acceleration of each piece of the string is somewhat proportional to the curvature of the string". But how does one come up with this? by observation or by guessing?
4. How can one solve the wave equation and reach the general solution?
Yo man
ReplyDeleteExcellent Work Sir. Please carry on.
ReplyDeleteHey man can you derive the equation for a wave 750m long with a wavelength of 0.572m and a positive amplitude of 0.143m and a negative amplitude of 0
ReplyDeleteThanks in advance
ReplyDeleteThanks in advance
ReplyDeleteThanks in advance
ReplyDeleteThanks in advance
ReplyDeleteI never animated in python before... but somehow the animation wont render on my system (I am getting an empty figure). any idea why?
ReplyDeleteall I am getting is a warning.
C:\Users\yairs\Anaconda3\lib\site-packages\matplotlib\animation.py:973: UserWarning: Animation was deleted without rendering anything. This is most likely unintended. To prevent deletion, assign the Animation to a variable that exists for as long as you need the Animation.