π Wave Equation
Above you can see a simulation of the equation for the wave in 2D. (Itβs interactive!) Understanding how waves work is quite important for a lot of physics, as waves can be found everywhere. If you currently listen to music, that is a (sound) wave! This screen you currently look at emits (light) waves.
For me waves were always very mysterious. How could you ever describe something with so intricate patterns with an equation? Surely it must be very complicated.
Actually, the equation for a (1D) wave is just this:
It is quite compact! In my case I did not have a firm understanding of all of the symbols in there so the equation was quite mysterious. Here is a quick summary of how I understood how this beautiful equation works.
Partial Differential Equations (PDEs)
The first thing to understand is, that this equation is a Partial Differential Equation (the part gives it away). Other than βnormalβ equations, where you try to solve for or some other variable, with a PDE you try to find a function. In the case of a wave function one tries to find the function , which is the displacement function. The displacement function in 1D gives for every point at time how high or low it is. (For the 2D case it would just have another variable: )
What the PDE now states is, that when we derive our unknown function twice (this is the ) with respect to time (left side of the equation), it should be similar (up to a constant ) to deriving our function twice with respect to position (right side equation).
I know. It sounds like gibberish. But letβs put aside the Why?!? for a second. Any function that satisfies this condition is a wave function! One thing to notice is, that there are infinitely many such functions ! For example a function describing a single small wave over time and another one describing many big waves over time. Usually one could describe these functions with their starting state - how they evolve in time would then be given by the wave equation.
Usually βfindingβ such a function is done by simply computing the function - this is done at the top of this page. For this page I chose a simple Verlet integration algorithm1 - it really is surprisingly simple to code!
Why this equation?
This was the part that confused me the most. Why not any other equation? In fact the equation can be derived from .
For this, at first letβs consider a very simple system modelling a one dimensional wave:
Imagine many vertical poles with beads on them. The poles are apart. The beads can only move up and down the poles. Neighboring beads are connected with a spring.
For simplicity letβs consider that there is no gravity and no friction. Every bead then has exactly two forces acting upon them, the spring to the left and the spring to the right.
This would then give us the final force of .
Now letβs say we have a function that can tell us the height of the beads on each pole at a given point . Let us call this function . Because our beads are exactly apart, the left and right parts of the force cancel out. With that the force always shows either up or down. And how much is given simply be the difference in the heights of the beads. For now we only care about the direction of the beads. The stiffness of the joints can be added later as a constant. So if the bead in the middle is at height , and the left and right one at and , then we can write as:
(The is there as we only care about the direction.)
Plugging it back into gives:
We have not yet talked about the mass . We just assume that the beads and springs have a given density per distance. Thus we can write the formula as:
Letβs rearrange that so that all are on the left side:
Now in real-life there are no beads and everything is usually smooth. We can model this by making very small.
First we notice that what we do in the brackets as actually just computing the first derivative of !
And this again is just the derivative of !
What I didnβt tell you, is that is actually a function of two parameters: and , for the position and the time. And what we have computed now was the derivitative with respect to the position, so .
Now the acceleration on the right side is by definition just the second derivative of :
When we now turn it around and set to we have now the equation from the beginning!
This is it! You get the wave equation when modeling a system connected with springs!
Sources and Annotations
Footnotes
-
0Mean1Sigma. (2024, June 17). Wave Simulation from scratch using finite difference method [Video]. Youtube. https://youtu.be/4IL8n8yYNjw β©