Waves can be found in many different areas of physics, including electromagnetic fields, pressure variations in a gas, solids and stretched strings. We will consider many of these as examples of waves as we go along. However, a general definition of a wave is rather hard. Waves do not require a medium to propagate (e.g. electromagnetic waves) though many waves propagate only through a material (e.g. sound). Waves do not need to be periodic (though often are periodic). They involve the transfer of energy (though standing waves appear to violate this definition) and consist of a disturbance which propagates in time and space. We will now derive the equation for the simplest wave propagation.
Let us consider a string with mass per unit length $\mu$ under a tension $T$. We will investigate what happens when it is displaced slightly perpendicular to its length, and derive a \emph{wave equation} which will turn out to be quite general. So that we know where we're going, here is the wave equation in one dimension:
\begin{equation} \label{eq:13} \frac{\partial^2 \psi}{\partial t^2} = c^2 \frac{\partial^2 \psi}{\partial x^2}, \end{equation}where $c$ is the speed of the wave. We will now derive this for small displacements of our string. The set up we will consider is illustrated below.
from IPython.display import Image
Image(filename='stringsegment.png',width=300)
In the diagram above, we show a stretched string, and have slightly different notation than in the main text ($dx = \Delta x$, $dm = \mu\Delta x$ and $x_2 = x_1 + \Delta x$). We assume that the vertical displacement of the string is given by $\psi$ but that the string lies initially along the $x$ axis (which will give us a transverse wave: one where the displacement is in a different direction to the propagation). We are interested in the forces acting on the string given the displacement; the force can be written, using Newton's second law, as:
\begin{equation} F = ma = \mu \Delta x \frac{\partial^2 \psi}{\partial t^2} \end{equation}What force will act on the displaced string ? It will be a component of the tension, which we will need to resolve into components along $x$ and along the displacement, as the string is no longer purely along $x$. For small displacements we could write, by inspection:
\begin{equation} \label{eq:test} F = T\left(\frac{\partial \psi}{\partial x}\right)_{x+\Delta x} - T \left(\frac{\partial \psi}{\partial x}\right)_{x} \end{equation}where we are assuming that the tension does not vary with position (if it did, we would have a rather more complex situation involving dispersion which we will discuss briefly later in the course). Another way to arrive at this formula is to resolve the tension geometrically, which gives:
\begin{equation} F_\psi = T \sin(\theta_{x+\Delta x}) - T \sin(\theta_{x}) \end{equation}But it is fairly easy to show that $\sin \theta \simeq \tan \theta$ for small values of $\theta$ (an approximation which has an error which is third order in $\theta$ -- i.e. $\sin \theta - \tan \theta = \frac{1}{2}\theta^3$), and we can write $\tan \theta = \Delta\psi/\Delta x \rightarrow \partial \psi/\partial x$, which just gives us the force again. Now we equate these two forces:
\begin{equation} T\left(\frac{\partial \psi}{\partial x}\right)_{x+\Delta x} - T \left(\frac{\partial \psi}{\partial x}\right)_{x} = \mu \Delta x \frac{\partial^2 \psi}{\partial t^2} \end{equation}If we recall the formal definition of a derivative, we can write: \begin{equation} \frac{\left(\frac{\partial \psi}{\partial x}\right)_{x+\Delta x} - \left(\frac{\partial \psi}{\partial x}\right)_{x}}{\Delta x} = \frac{\partial^2 \psi}{\partial x^2} \text{ as } \Delta x \rightarrow 0 \end{equation}
If we rearrange by dividing through by $\Delta x$ and $\mu$ and substituting in, then we find: \begin{eqnarray} \frac{T\left(\frac{\partial \psi}{\partial x}\right)_{x+\Delta x} - T \left(\frac{\partial \psi}{\partial x}\right)_{x}}{\Delta x} &=& \mu \frac{\partial^2 \psi}{\partial t^2}\\ \frac{T}{\mu} \frac{\partial^2 \psi}{\partial x^2} &=& \frac{\partial^2 \psi}{\partial t^2} \end{eqnarray}
which has the form of a wave equation with velocity $\sqrt{T/\mu}$. A quick check on dimensions ($T$ is a force with dimensions mass (M) $\times$ length (L) $\times$ time$^{-2}$ (T$^{-2}$) while $\mu$ is mass per unit length (ML$^{-1}$) so $\sqrt{T/\mu}$ has dimensions LT$^{-1}$ which is a velocity) suggests that this is reasonable. Experience with elastic bands or strings suggests that the note produced gets higher with increasing tension or decreasing mass density: if the note is proportional to the velocity then our formula makes physical sense (we will see later that this is indeed what we'd expect).
What about the signs ? If the string is pulled up then the second derivative with $x$ will be negative (we'll have a maximum) which means that there is a downward force, as we'd expect (and require for sensible motion). What assumptions have we made to get to this point, and how might they break down ?
So provided we don't make too large a displacement of the string, our derivation will hold. We will find that the same equation (though with different displacement variable, and different physical quantities contributing to the velocity) appears in many areas, such as:
The equation can be written as a single term operating on $\psi$:
\begin{equation} \left( \frac{\partial^2}{\partial x^2} - \frac{1}{c^2}\frac{\partial^2}{\partial t^2}\right) \psi = 0 \end{equation}where the operator in brackets is called the d'Alembertian (named after the French mathematician and physicist d'Alembert).
Now that we have an equation which is obeyed by the displacement of a stretched string, we need to look for solutions. This will also allow us to understand the general behaviour of wave equations. We can start by noticing that we need the second time derivative to equal the second position derivative multiplied by $c^2$. This implies that we need the same functional form for $x$ and $t$ but with a multipicative constant (and dimensionally a constant with LT$^{-1}$ will convert from time to distance). If we combine the time and position variables into a single variable $x-ct$ (or $x+ct$), we will be able to write $\psi(x,t) = f(x-ct)$ or $\psi(x,t) = g(x+ct)$. We want to check that these will satisfy the wave equation, so we write $u = x-ct$ and use the chain rule:
\begin{eqnarray} u &=& x - ct\\ \psi &=& f(u)\\ \frac{\partial \psi}{\partial x} &=& \frac{\partial \psi}{\partial u}\frac{\partial u}{\partial x} = \frac{\partial \psi}{\partial u} \\ \frac{\partial \psi}{\partial t} &=& \frac{\partial \psi}{\partial u}\frac{\partial u}{\partial t} = -c\frac{\partial \psi}{\partial u} \\ \frac{\partial^2 \psi}{\partial x^2} &=& \frac{\partial^2 \psi}{\partial u^2}\frac{\partial u}{\partial x} = \frac{\partial^2 \psi}{\partial u^2} \\ \frac{\partial^2 \psi}{\partial t^2} &=& \frac{\partial^2 \psi}{\partial u^2}\frac{\partial u}{\partial t} = c^2\frac{\partial^2 \psi}{\partial u^2} \\ \Rightarrow \frac{\partial^2 \psi}{\partial t^2} &=& c^2 \frac{\partial^2 \psi}{\partial x^2} \end{eqnarray}So this will satisfy the wave equation. The same result can be found for $\psi(x,t) = g(x + ct)$ (though in the fourth line the factor of $c$ is positive), so using the fact that the wave equation is linear, we write:
\begin{equation} \psi(x,t) = f(x-ct) + g(x+ct) \end{equation}This is, it turns out, the most general form of the solution for the wave equation. It's interesting to note that we can rewrite the wave equation itself in terms of differentials with respect to $u$ and $v$ (noting, for instance, that $\frac{\partial}{\partial x} = \frac{\partial u}{\partial x}\frac{\partial }{\partial u} + \frac{\partial v}{\partial x}\frac{\partial }{\partial v}$) to give: \begin{equation} \frac{\partial^2\psi}{\partial u \partial v} = 0 \end{equation}
The most general solution for this equation is $\psi = f(u) + g(v)$ which is, or course, just our solution again. Yet another way of rewriting the wave equation is this:
\begin{equation} \left( \frac{\partial}{\partial t} - c\frac{\partial }{\partial x}\right)\left( \frac{\partial}{\partial t} + c\frac{\partial }{\partial x}\right)\psi = 0 \end{equation}which is again solved by our general solution.
The second time derivative (and knowledge of the physical world) might lead us to think of a sinusoidal or periodic function as a solution, but to use this we will need a dimensionless argument. So we divide $u$ or $v$ by some characteristic length; in the case of a periodic function the distance between repeats, which we call the wavelength $\lambda$ seems most appropriate. Notice that rescaling $u$ and $v$ by a constant ($u \rightarrow Cu$) does not change the wave velocity or the wave equation. Let's go one step further, and incorporate the factor of $2\pi$ that we know is the period of sinusoidal functionals, giving:
\begin{equation} \psi(x,t) = f(\frac{2\pi}{\lambda}x-\frac{2\pi c}{\lambda}t) + g(\frac{2\pi}{\lambda}x+\frac{2\pi}{\lambda c}t) \end{equation}We often define two new variables:
We can now write:
\begin{equation} \psi(x,t) = f(kx-\omega t) + g(kx+\omega t) \end{equation}where the quantity $kx\pm \omega t$ is known as the phase.
So, if we have a periodic solution with period $T$ in time and distance $\lambda$ between peaks (or troughs), when we advance the position $x$ by $\lambda$ or the time by $T$ the phase increases by 2$\pi$, which is what is required for periodic wave motion. If we look at a fixed point in space, then the time between peaks passing that point is $\lambda/c = T$. A summary of these different quantities:
x = linspace(0,4,1000)
t = linspace(0,4,1000)
omega = pi
k = pi
A = 1.0
fig = figure(figsize=[12,3])
# Plot vs x
ax = fig.add_subplot(121)
ax.axis([0,4,-1.5*A,1.5*A])
ax.plot(x,A*cos(k*x))
ax.set_xlabel("x")
ax.set_ylabel(r"$\psi$")
# Add indications for lambda and A
lx = [0.0,2*pi/k]
ly = [1.1,1.1]
ax.plot(lx,ly)
ax.text(pi/k,1.15,r"$\lambda$",color="green")
ampx = [2*pi/k,2*pi/k]
ampy = [0.0,1.0]
ax.plot(ampx,ampy,'r')
ax.text(2*pi/k+0.05,0.5*A,"A",color="red")
# Plot vs t
ax2 = fig.add_subplot(122)
ax2.axis([0,4,-1.5*A,1.5*A])
ax2.plot(t,A*cos(omega*t))
ax2.set_xlabel("t")
ax2.set_ylabel(r"$\psi$")
# Add indications for lambda and A
lx = [0.0,2*pi/omega]
ly = [1.1,1.1]
ax2.plot(lx,ly)
ax2.text(pi/omega,1.15,"T",color="green")
ampx = [2*pi/omega,2*pi/omega]
ampy = [0.0,1.0]
ax2.plot(ampx,ampy,'r')
ax2.text(2*pi/omega+0.05,0.5*A,"A",color="red")
<matplotlib.text.Text at 0x11107da50>
All of these different parameters can be used in writing a wave, so long as the appropriate conversion factors are used. Motivated by our knowledge of the simple harmonic oscillator (which we know can be solved with a sinusoidal function, or equivalently a complex exponential) and noting that a wave can be created in a stretched string by attaching a harmonic oscillator to one end we will try a solution for a periodic wave which is a sinusoidal function of $kx - \omega t$. Let's list a number of different ways that a periodic sinusoidal wave could be written:
\begin{eqnarray} \psi(x,t) &=& A\cos(kx - \omega t + \phi)\\ &=& Re\left[ A e^{i(kx - \omega t +\phi)} \right]\\ &=& Re\left[ a e^{i(kx - \omega t)} \right]\\ & & \left( a= Ae^{i\phi}\right)\\ \psi(x,t) &=& A\cos\left(\frac{2\pi}{\lambda}(x-ct)+\phi\right) = A\cos\left(2\pi(\frac{x}{\lambda} - \nu t)+\phi\right) \end{eqnarray}Remember that, when we use the complex exponential form (which is almost always the easiest form to use) we have to take the real part when considering the physical quantity we're measuring.
Below we show a three dimensional plot of $\psi$ against position and time. Notice how there is a single, periodic wave which will produce the characteristic shapes seen above when projected onto either the $x$ or $t$ axes. We plot both $kx - \omega t$ (left) and $kx + \omega t$ (right).
# Import necessary 3D plotting
from mpl_toolkits.mplot3d.axes3d import Axes3D
# Create figure
fig = plt.figure(figsize=(18,6))
# `axminus` is a 3D-aware axis instance, because of the projection='3d' keyword argument to add_subplot
axminus = fig.add_subplot(1, 2, 1, projection='3d')
axminus.set_xlabel('x')
axminus.set_ylabel('t')
axminus.set_zlabel(r'$\psi$')
# Specify x and t and put onto mesh
phix = linspace(0,4*pi,100)
phit = linspace(0,4*pi,100)
x,t = meshgrid(phix, phit)
# Choose k and omega
k = 0.5
omega = 0.5
# Create variable
zm = cos(k*x - omega*t)
# Plot surface
pm = axminus.plot_surface(x, t, zm, linewidth=0,rstride=2,cstride=2,cmap=cm.coolwarm)
# Set angles
axminus.view_init(50, 30)
# Add colour bar
fig.colorbar(pm, shrink=0.5)
# Repeat for positive sign
axplus = fig.add_subplot(1, 2, 2, projection='3d')
axplus.set_xlabel('x')
axplus.set_ylabel('t')
axplus.set_zlabel(r'$\psi$')
zp = cos(k*x + omega*t)
pp = axplus.plot_surface(x,t,zp,linewidth=0,rstride=2,cstride=2,cmap=cm.coolwarm)
axplus.view_init(50, 30)
fig.colorbar(pp, shrink=0.5)
<matplotlib.colorbar.Colorbar instance at 0x111131e60>
What is the energy stored in the wave as it travels along the stretched string ? We will have to think about energy per unit length. The kinetic energy (transverse to the string) is just given as usual, though we use a mass per unit length:
\begin{equation} KE = \frac{1}{2} \mu v^2 = \frac{1}{2}\mu \left(\frac{\partial \psi}{\partial t}\right)^2 = \frac{1}{2}\mu A^2 \omega^2 \sin^2 (kx-\omega t) \end{equation}where we have assumed that the wave is $\psi=A\cos(kx-\omega t)$. The potential energy will come from the stretching of the string and doing work against the tension in the string. How much has a small segment $\Delta x$ been stretched ? At a point x, we can write the length of the string (using Pythagoras' theorem) as:
\begin{eqnarray} \label{eq:42} \Delta l &=& \sqrt{\Delta x^2 + \left(\Delta x\frac{\partial \psi}{\partial x}\right)^2}\\ &=& \Delta x \left(1 + \left(\frac{\partial \psi}{\partial x}\right)^2\right)^{\frac{1}{2}}\\ &\simeq& \Delta x \left( 1 + \frac{1}{2}\left(\frac{\partial \psi}{\partial x}\right)^2\right) \end{eqnarray}So the change in length is approximately $\Delta l - \Delta x = \frac{1}{2}\left(\frac{\partial \psi}{\partial x}\right)^2 \Delta x$ and the work done against the tension per unit length (i.e. dividing by $\Delta x$) to extend it (and hence the potential energy stored) is:
\begin{equation} U = \frac{1}{2} T \left(\frac{\partial \psi}{\partial x}\right)^2 = \frac{1}{2}TA^2k^2\sin^2(kx-\omega t) \end{equation}where we have assumed the same form for the wave as in the kinetic energy above. At this point, we will introduce the impedance for waves which we already saw for oscillators. It is a measure of the resistance that a wave encounters (and can be thought of as a generalisation of the idea of resistance which occurs in circuits). We will derive it properly in the section on driving waves, but until then we will just quote the result. For the stretched string, it is defined as:
\begin{equation} Z_0 = \sqrt{T\mu} \end{equation}We will shortly see that it is very similar to a drag term as we've seen for harmonic oscillators. If we recall that the speed of the wave along the string is given by $c = \sqrt{T/\mu}$ then we see that $\mu = Z_0/c$ and $T = Z_0 c$. So we can write the total energy per unit length (or energy density) in terms of the speed and impedance only:
\begin{eqnarray} E(x,t) &=& KE(x,t) + U(x,t) \\ &=& \frac{1}{2}\mu \left(\frac{\partial \psi}{\partial t}\right)^2 + \frac{1}{2} T \left(\frac{\partial \psi}{\partial x}\right)^2\\ &=& \frac{1}{2} \frac{Z_0}{c}\left[ \left(\frac{\partial \psi}{\partial t}\right)^2 + c^2 \left(\frac{\partial \psi}{\partial x}\right)^2\right] \end{eqnarray}This expression is actually true for any disturbance which satisfies the wave equation.
What is the rate at which energy moves along the wave (in other words the power delivered along the string) ? The force at any point $x$ due to the string to its left is approximately $-T(\partial \psi/\partial x)$, and the rate at which work is done is:
\begin{equation} P(x,t) = -T\frac{\partial \psi}{\partial x}\frac{\partial \psi}{\partial t} = -Z_0 c \frac{\partial \psi}{\partial x}\frac{\partial \psi}{\partial t} \end{equation}We will return to this expression in the next section when we consider travelling waves.
# Create figure
fig = plt.figure(figsize=(18,6))
# `axminus` is a 3D-aware axis instance, because of the projection='3d' keyword argument to add_subplot
axminus = fig.add_subplot(1, 2, 1, projection='3d')
axminus.set_xlabel('x')
axminus.set_ylabel('t')
axminus.set_zlabel('Power')
# Specify x and t and put onto mesh
phix = linspace(0,4*pi,100)
phit = linspace(0,4*pi,100)
x,t = meshgrid(phix, phit)
# Choose k and omega
k = 0.5
omega = 0.5
# Create variable: Ignore Z0 and c, and manually differentiate psi = cos(kx - omega t)
zm = k*omega*sin(k*x - omega*t)*sin(k*x-omega*t)
# Plot surface: energy on left of figure
pm = axminus.plot_surface(x, t, zm, linewidth=0,rstride=2,cstride=2,cmap=cm.coolwarm)
# Set angles
axminus.view_init(50, 30)
# Add colour bar
fig.colorbar(pm, shrink=0.5)
# Plot psi to compare
axplus = fig.add_subplot(1, 2, 2, projection='3d')
axplus.set_xlabel('x')
axplus.set_ylabel('t')
axplus.set_zlabel(r'$\psi$')
# Create variable
zm = cos(k*x - omega*t)
# Plot surface: wave on right of figure
pm = axplus.plot_surface(x, t, zm, linewidth=0,rstride=2,cstride=2,cmap=cm.coolwarm)
# Set angles
axplus.view_init(50, 30)
# Add colour bar
fig.colorbar(pm, shrink=0.5)
<matplotlib.colorbar.Colorbar instance at 0x1115e43b0>
Notice that the individual solutions $\psi_{-}=f(kx-\omega t)$ and $\psi_+=g(kx+\omega t)$ are both good solutions for the wave equation, and we can use the fact the the equation is linear to add them together (this also gives a valid solution, which is the most general solution):
\begin{equation} \psi = a\psi_-+ b\psi_+ \end{equation}This is called the principle of superposition and leads to interference effects.
Each of the solutions $\psi_- = f(kx - \omega t + \phi)$ and $\psi_+ = g(kx + \omega t + \phi)$ are called travelling waves. The direction of travel is set by the relative sign of $x$ and $t$: if the relative sign is negative (e.g. $kx - \omega t$) then the wave travels in the positive x direction; if it is positive (i.e. $kx + \omega t$) then the wave travels in the negative x direction.
We can understand this by considering a particular shape at $t=0$, which will be given by $f(kx)$. Notice that this is an arbitrary function - it doesn't have to be periodic. Then at a time $t$ later than this, if we increase $x$ by $\frac{\omega}{k}t$ we will find:
\begin{equation} \psi(x +\frac{\omega}{k}t ,t) = f(k[x + \frac{\omega}{k}t] - \omega t) = f(kx + \omega t -\omega t) = f(kx) = \psi(x,0) \end{equation}So the shape of the wave is the same as it was at $t=0$ but translated a distance $\frac{\omega}{k}t$ along the $x$-axis. This is illustrated for a triangular function in the snippet below. We have already written that $\omega/k = v$, so we see that the wave is translated (or travels) a distance $vt$ along the axis. This is why the solution is called a travelling wave. We can generalise away from a form with $k$ and $\omega$ by writing $f(x\pm ct)$ with the knowledge that we may need to scale the argument by an appropriate constant to get the right units. Now think about differentiating this function with respect to $t$ and $x$. We will find that:
\begin{equation} \frac{\partial \psi}{\partial t} \mp c\frac{\partial \psi}{\partial x} = 0 \end{equation}This equation is satisfied by functions of the form $\psi(x,t) = f(x \pm ct)$ which are travelling waves. Notice the close connection with the factorisation of the wave equation we gave above. If either bracket in that equation is zero then the wave equation will be satisfied---a condition which is also in the last equation. Note that this is not an exact mapping: all waves satisfy a wave equation, but not all waves satisfy the travelling wave equation.
If we return to the energy density and power formulae, we see that we can eliminate one of the differentials, so that:
\begin{eqnarray} E(x,t) &=& \frac{Z_0}{c}\left( \frac{\partial \psi}{\partial t}\right)^2= cZ_0\left( \frac{\partial \psi}{\partial x}\right)^2 \\ \label{eq:50} P(x,t) &=& -Z_0 c^2\left( \frac{\partial \psi}{\partial x}\right)^2 = -Z_0\left( \frac{\partial \psi}{\partial t}\right)^2 = -cE(x,t) \end{eqnarray}So the instantaneous kinetic and potential energy densities are equal at any point on a string under tension carrying a travelling wave. The power is given by the energy density multiplied by the speed of wave propagation and travels in the direction of wave propagation.
# Show that f(x-ct) propagates to the right by plotting function for three values of t
# You can easily change it to f(x+ct) by changing the definition of u below
# Define a function which gives a triangular wave
def tri(u,out):
for i in range(len(u)):
if u[i]<0.0:
out.append(0.0)
elif u[i]>1.0:
out.append(0.0)
else:
out.append(u[i])
# Define x, speed c and amplitude A
x = linspace(-1,4,1000)
c = 1.0
A = 1.0
# Create figure
fig = figure(figsize=[12,3])
ax = fig.add_subplot(121)
ax.axis([-1,4,-0.1*A,2.2*A])
# Plot triangular wave vs x for t=0 (blue)
t = 0.0
u = x-c*t
out = []
tri(u,out)
ax.plot(x,out,label='t=0')
# Plot triangular wave vs x for t=1 (green)
t=1.0
u = x-c*t
out = []
tri(u,out)
ax.plot(x,out,label='t=1')
# Plot triangular wave vs x for t=2 (red)
t=2.0
u = x-c*t
out = []
tri(u,out)
ax.plot(x,out,label='t=2')
legend()
<matplotlib.legend.Legend at 0x10cb33850>