Skip to main content
Mathematics LibreTexts

2.8: Optional — Solving the Wave Equation

  • Page ID
    92241
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Many phenomena are modelled by equations that relate the rates of change of various quantities. As rates of change are given by derivatives the resulting equations contain derivatives and so are called differential equations. We saw a number of such differential equations in §2.4 of the CLP-1 text.

    In this section we consider

    \[ \frac{\partial^2 w}{\partial x^2}(x,t) -\frac{1}{c^2}\frac{\partial^2 w}{\partial t^2}(x,t)=0 \nonumber \]

    This is an extremely important 1 partial differential equation called the “wave equation” (in one spatial dimension) that is used in modelling water waves, sound waves, seismic waves, light waves and so on. The reason that we are looking at it here is that we can use what we have just learned to see that its solutions are waves travelling with speed \(c\text{.}\)

    To start, we'll use gradients and the chain rule to find the solution of the slightly simpler equation

    \[ \frac{\partial w}{\partial x}(x,t)-\frac{1}{c}\frac{\partial w}{\partial t}(x,t)=0 \nonumber \]

    By way of motivation for what will follow, note that

    • we can rewrite the above equation as

      \[ \left \langle  1\,,\,-\frac{1}{c} \right \rangle\cdot \nabla w(x,t) =0 \nonumber \]

    • This equation tells that the gradient of any solution \(w(x,t)\) must always be perpendicular to the constant vector \(\big \lt 1\,,\,-\frac{1}{c}\big \gt \text{.}\)
    • A vector \(\left \langle  a,b \right \rangle\) is perpendicular to \(\big \lt 1\,,\,-\frac{1}{c}\big \gt \) if and only if

      \[\begin{align*} \left \langle  a,b \right \rangle \cdot \left \langle  1\,,\,-\frac{1}{c} \right \rangle =0 &\iff a-\frac{b}{c} = 0 \iff b=ac \iff \left \langle  a,b \right \rangle =a \left \langle  1,c \right \rangle \end{align*}\]

      That is, a vector is perpendicular to \(\big \lt 1\,,\,-\frac{1}{c}\big \gt \) if and only if it is parallel to \(\left \langle  1,c \right \rangle\text{.}\)
    • Thus the gradient of any solution \(w(x,t)\) must always be parallel to the constant vector \(\left \langle  1\,,\,c \right \rangle\text{.}\)
    • Recall that one of our implications following Definition 2.7.5 is that the gradient of \(w(x,t)\) must always be perpendicular to the level curves of \(w\text{.}\)
    • So the level curves of \(w(x,t)\) are always perpendicular to the constant vector \(\big \lt 1\,,\,c\big \gt \text{.}\) They must be straight lines with equations of the form

      \[ \left \langle  1\,,\,c \right \rangle\cdot\left \langle  x-x_0\,,\,t-t_0 \right \rangle =0\qquad\text{or}\qquad x+ct=u\quad\text{with $u$ a constant} \nonumber \]

      level.svg
    • That is, for each constant \(u\text{,}\) \(w(x,t)\) takes the same value at each point of the straight line \(x+ct=u\text{.}\) Call that value \(U(u)\text{.}\) So \(w(x,t)=U(u)=U(x+ct)\) for some function \(U\text{.}\)

    This solution represents a wave packet moving to the left with speed \(c\text{.}\) You can see this by observing that all points \((x,t)\) in space-time for which \(x+ct\) takes the same fixed value, say \(z\text{,}\) have the same value of \(U(x+ct)\text{,}\) namely \(U(z)\text{.}\) So if you move so that your position at time \(t\) is \(x=z-ct\) (i.e. move the left with speed \(c\)) you always see the same value of \(w\text{.}\) The figure below illustrates this. It contains the graphs of \(U(x)\text{,}\) \(U(x+c) =U(x+ct)\big|_{t=1}\) and \(U(x+2c)=U(x+ct)\big|_{t=2}\) for a bump shaped \(U(x)\text{.}\) In the figure the location of the tick \(z\) on the \(x\)-axis was chosen so that so that \(U(z)=\max_x U(x)\text{.}\)

    bumpLeft.svg

    The above argument that lead to the solution \(w(x,t)=U(x+ct)\) was somewhat handwavy. But we can easily turn it into a much tighter argument by simply changing variables from \((x,y)\) to \((u,v)\) with \(u=x+ct\text{.}\) It doesn't much matter what we choose (within reason) for the new variable \(v\text{.}\) Let's take \(v=x-ct\text{.}\) Then \(x=\frac{u+v}{2}\) and \(t=\frac{u-v}{2c}\) and it is easy to translate back and forth between \(x,t\) and \(u,v\text{.}\)

    Now define the function \(W(u,v)\) by

    \[ w(x,t) = W(x+ct\,,\,x-ct) \nonumber \]

    By the chain rule

    \[\begin{align*} \frac{\partial w}{\partial x}(x,t) &=\frac{\partial }{\partial x}\big[W(x+ct\,,\,x-ct) \big]\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct)\frac{\partial }{\partial x}(x+ct) + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct) \frac{\partial }{\partial x}(x-ct)\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct) + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct) \end{align*}\]

    and

    \[\begin{align*} \frac{\partial w}{\partial t}(x,t) &=\frac{\partial }{\partial t}\big[W(x+ct\,,\,x-ct) \big]\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct)\frac{\partial }{\partial t}(x+ct) + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct) \frac{\partial }{\partial t}(x-ct)\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct)\times c + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct)\times(-c) \end{align*}\]

    Subtracting \(\frac{1}{c}\) times the second equation from the first equation gives

    \[ \frac{\partial w}{\partial t}(x,t)-\frac{1}{c}\frac{\partial w}{\partial t}(x,t) = 2 \frac{\partial W}{\partial v}(x+ct\,,\,x-ct) \nonumber \]

    So

    \begin{align*} & w(x,t) \text{ obeys the equation } \frac{\partial w}{\partial x}(x,t)-\frac{1}{c}\frac{\partial w}{\partial t}(x,t)=0 \text{ for all } x,r\\ \end{align*}

    if and only if

    \begin{align*} &W(u,v) \text{ obeys the equation } \frac{\partial W}{\partial v}(x+ct\,,\,x-ct)=0 \text{ for all } x,t,\\ \end{align*}

    which, substituting in \(x=\frac{u+v}{2}\) and \(t=\frac{u-v}{2c}\text{,}\) is the case if and only if

    \begin{align*} &W(u,v)\text{ obeys the equation } \frac{\partial W}{\partial v}(u\,,\,v)=0 \text{ for all } u,v \end{align*}

    The equation \(\frac{\partial W}{\partial v}(u\,,\,v)=0\) means that \(W(u,v)\) is independent of \(v\text{,}\) so that \(W(u,v)\) is of the form \(W(u,v)=U(u)\text{,}\) for some function \(U\text{,}\) and, so finally,

    \[ w(x,t) = W(x+ct\,,\,x-ct) = U(x+ct) \nonumber \]

    Now that we have solved our toy equation, let's move on to the 1d wave equation.

    Example 2.8.1. Wave Equation

    We'll now expand the above argument to find the general solution to

    \[ \frac{\partial^2 w}{\partial x^2}(x,t) -\frac{1}{c^2}\frac{\partial^2 w}{\partial t^2}(x,t)=0 \nonumber \]

    We'll again make the change of variables from \((x,y)\) to \((u,v)\) with \(u=x+ct\) and \(v=x-ct\) and again define the function \(W(u,v)\) by

    \[ w(x,t) = W(x+ct\,,\,x-ct) \nonumber \]

    By the chain rule, we still have

    \[\begin{align*} \frac{\partial w}{\partial x}(x,t) &=\frac{\partial }{\partial x}\big[W(x+ct\,,\,x-ct) \big]\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct) + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct)\\ \frac{\partial w}{\partial t}(x,t) &=\frac{\partial }{\partial t}\big[W(x+ct\,,\,x-ct) \big]\\ &= \frac{\partial W}{\partial u}(x+ct\,,\,x-ct)\times c + \frac{\partial W}{\partial v}(x+ct\,,\,x-ct)\times(-c) \end{align*}\]

    We now need to differentiate a second time. Write \(W_1(u,v)=\frac{\partial W}{\partial u}(u,v)\) and \(W_2(u,v)=\frac{\partial W}{\partial v}(u,v)\) so that

    \[\begin{align*} \frac{\partial w}{\partial x}(x,t) &= W_1(x+ct\,,\,x-ct) + W_2(x+ct\,,\,x-ct)\\ \frac{\partial w}{\partial t}(x,t) &= c\,W_1(x+ct\,,\,x-ct) -c\,W_2(x+ct\,,\,x-ct) \end{align*}\]

    Using the chain rule again

    \[\begin{alignat*}{2} \frac{\partial^2 w}{\partial x^2}(x,t) &=\frac{\partial }{\partial x}\left[\frac{\partial w}{\partial x}(x,t)\right]\\ &=\frac{\partial }{\partial x}\left[W_1(x+ct\,,\,x-ct)\right] &&+ \frac{\partial }{\partial x}\left[W_2(x+ct\,,\,x-ct)\right]\\ &=\frac{\partial W_1}{\partial u} \ +\ \frac{\partial W_1}{\partial v} &&+ \frac{\partial W_2}{\partial u} \ +\ \frac{\partial W_2}{\partial v}\\ &=\frac{\partial^2 W}{\partial u^2} \ +\ \frac{\partial^2\ W}{\partial v\,\partial u} &&+ \frac{\partial^2\ W}{\partial u\ \partial v} \ +\ \frac{\partial^2 W}{\partial v^2}\\ \frac{\partial^2 w}{\partial t^2}(x,t) &=\frac{\partial }{\partial t}\left[\frac{\partial w}{\partial t}(x,t)\right]\\ &=c\frac{\partial }{\partial t}\left[W_1(x+ct\,,\,x-ct)\right] &&-c \frac{\partial }{\partial t}\left[W_2(x+ct\,,\,x-ct)\right]\\ &=c^2\frac{\partial W_1}{\partial u} \ -\ c^2\frac{\partial W_1}{\partial v} && -c^2 \frac{\partial W_2}{\partial u} \ +\ c^2\frac{\partial W_2}{\partial v}\\ &=c^2\frac{\partial^2 W}{\partial u^2} \ -\ c^2\frac{\partial^2 W}{\partial v\partial u} && - c^2\frac{\partial^2 W}{\partial u\partial v} \ +\ c^2\frac{\partial^2 W}{\partial v^2} \end{alignat*}\]

    with all of the functions on the right hand sides having arguments \((x+ct\,,\,x-ct)\text{.}\) So, subtracting \(\frac{1}{c^2}\) times the second from the first, we get

    \[\begin{align*} \frac{\partial^2 w}{\partial x^2}(x,t) -\frac{1}{c^2}\frac{\partial^2 w}{\partial t^2}(x,t) &=4 \frac{\partial^2 W}{\partial u\partial v}(x+ct\,,\,x-ct) \end{align*}\]

    and \(w(x,t)\) obeys \(\frac{\partial^2 w}{\partial x^2}(x,t) -\frac{1}{c^2}\frac{\partial^2 w}{\partial t^2}(x,t)=0\) for all \(x\) and \(t\) if and only if

    \[ \frac{\partial^2 W}{\partial u\partial v}(u\,,\,v)=0 \nonumber \]

    for all \(u\) and \(v\text{.}\)

    • This tells us that the \(u\)-derivative of \(\frac{\partial W}{\partial v}\) is zero, so that \(\frac{\partial W}{\partial v}\) is independent of \(u\text{.}\) That is \(\frac{\partial W}{\partial v}(u,v) = \widetilde V(v)\) for some function \(\tilde V\text{.}\) The reason that we have called it \(\widetilde V\) instead of \(V\) with become evident shortly.
    • Recall that to apply \(\frac{\partial }{\partial v}\text{,}\) you treat \(u\) as a constant and differentiate with respect to \(v\text{.}\)
    • So \(\frac{\partial W}{\partial v}(u,v) = \widetilde V(v)\) says that, when \(u\) is thought of as a constant, \(W\) is an antiderivative of \(\widetilde V\text{.}\)
    • That is, \(W(u,v) = \int \tilde V(v)\,\mathrm{d}{v} +U\text{,}\) with \(U\) being an arbitrary constant. As \(u\) is being thought of as a constant, \(U\) is allowed to depend on \(u\text{.}\)

    So, denoting by \(V\) any antiderivative of \(\tilde V\text{,}\) we can write our solution in a very neat form.

    \[ W(u,v) = U(u) + V(v) \nonumber \]

    and the function we want is 2 

    \[ w(x,t) = W(x+ct\,,\,x-ct) = U(x+ct) + V(x-ct) \nonumber \]

    As we saw above \(U(x+ct)\) represents a wave packet moving to the left with speed \(c\text{.}\) Similarly, \(V(x-ct)\) represents a wave packet moving to the right with speed \(c\text{.}\)

    This is known as d'Alembert's form of the solution. It is named after Jean le Rond d'Alembert, 1717--1783, who was a French mathematician, physicist, philosopher and music theorist.

    Notice that \(w(x,t) = U(x+ct) + V(x-ct)\) is a solution regardless of what \(U\) and \(V\) are. The differential equation cannot tell us what \(U\) and \(V\) are. To determine them, we need more information about the system — usually in the form of initial conditions, like \(w(x,0)=\cdots\) and \(\frac{\partial w}{\partial t}(x,0)=\cdots\text{.}\) General techniques for solving partial differential equations lie beyond this text — but definitely require a good understanding of multivariable calculus. A good reason to keep on reading!

    Really Optional — Derivation of the Wave Equation

    In this section we derive the wave equation

    \[ \frac{\partial^2 w}{\partial x^2}(x,t) -\frac{1}{c^2}\frac{\partial^2 w}{\partial t^2}(x,t)=0 \nonumber \]

    in one application. To be precise, we apply Newton's law to an elastic string, and conclude that small amplitude transverse vibrations of the string obey the wave equation.

    Here is a sketch of a tiny element of the string.

    string_elmnt.svg

    The basic notation that we will use (most of which appears in the sketch) is

    \[\begin{align*} w(x,t) &= \text{vertical displacement of the string from the }x \text{ axis}\\ &\hskip0.25in\text{at position }x\text{ and time }t\\ \theta(x,t) &= \text{angle between the string and a horizontal line}\\ &\hskip0.25in\text{at position }x\text{ and time }t\\ T(x,t) &= \text{tension in the string at position $x$ and time $t$}\\ \rho(x) &= \text{mass density (per unit length) of the string at position $x$} \end{align*}\]

    The forces acting on the tiny element of string at time \(t\) are

    1. tension pulling to the right, which has magnitude \(T(x+\Delta x,t)\) and acts at an angle \(\theta(x+\Delta x,t)\) above horizontal
    2. tension pulling to the left, which has magnitude \(T(x,t)\) and acts at an angle \(\theta(x,t)\) below horizontal and, possibly,
    3. various external forces, like gravity. We shall assume that all of the external forces act vertically and we shall denote by \(F(x,t)\Delta x\) the net magnitude of the external force acting on the element of string.

    The length of the element of string is essentially \(\sqrt{\Delta x^2+\Delta w^2}\) so that the mass of the element of string is essentially \(\rho(x)\sqrt{\Delta x^2+\Delta w^2}\) and the vertical component of Newton's law \(\textbf{F} =m\textbf{a}\) says that

    \[\begin{align*} &\rho(x)\,\sqrt{\Delta x^2+\Delta w^2}\, \frac{\partial^2 w}{\partial\, t^2}(x,t)\\ &\hskip0.5in=T(x+\Delta x,t)\sin\theta(x+\Delta x,t)-T(x,t)\sin\theta(x,t)+F(x,t)\Delta x \end{align*}\]

    Dividing by \(\Delta x\) and taking the limit as \(\Delta x\rightarrow 0\) gives

    \[\begin{align*} &\rho(x)\,\sqrt{1+\left(\frac{\partial w}{\partial x}\right)^2}\, \frac{\partial^2 w}{\partial\, t^2}(x,t) =\frac{\partial }{\partial x}\big[T(x,t)\sin\theta(x,t)\big]+F(x,t)\\ &\hskip0.5in=\frac{\partial T}{\partial x}(x,t)\sin\theta(x,t) +T(x,t)\cos\theta(x,t)\,\frac{\partial \theta}{\partial x}(x,t) +F(x,t) \tag{E1} \end{align*}\]

    We can dispose of all the \(\theta\)'s by observing from the figure above that

    \[ \tan\theta(x,t)=\lim_{\Delta x\rightarrow 0}\frac{\Delta w}{\Delta x} =\frac{\partial w}{\partial x}(x,t) \nonumber \]

    which implies, using the figure below, that

    \[\begin{align*} \sin \theta(x,t)&= \frac{\frac{\partial w}{\partial x}(x,t)} {\sqrt{1+\big(\frac{\partial w}{\partial x}(x,t)\big)^2}} & \cos \theta(x,t)&= \frac{1} {\sqrt{1+\big(\frac{\partial w}{\partial x}(x,t)\big)^2}} &\\ \theta(x,t)&=\arctan\frac{\partial w}{\partial x}(x,t) & \frac{\partial \theta}{\partial x}(x,t) &=\frac{\frac{\partial^2 w}{\partial x^2}(x,t)} {1+\big(\frac{\partial w}{\partial x}(x,t)\big)^2} \end{align*}\]

    triangleString.svg

    Substituting these formulae into (E1) give a horrendous mess. However, we can get considerable simplification by looking only at small vibrations. By a small vibration, we mean that \(|\theta(x,t)|\ll 1\) for all \(x\) and \(t\text{.}\) This implies that \(|\tan\theta(x,t)|\ll 1\text{,}\) hence that \(\big|\frac{\partial w}{\partial x}(x,t)\big|\ll 1\) and hence that

    \[\begin{align*} \sqrt{1+\left(\frac{\partial w}{\partial x}\right)^2}&\approx 1& \sin \theta(x,t)&\approx \frac{\partial w}{\partial x}(x,t)\\ \cos \theta(x,t)&\approx 1 & \frac{\partial \theta}{\partial x}(x,t) &\approx\frac{\partial^2 w}{\partial x^2}(x,t) \tag{E2} \end{align*}\]

    Substituting these into equation (E1) give

    \[ \rho(x)\frac{\partial^2 w}{\partial\, t^2}(x,t) =\frac{\partial T}{\partial x}(x,t)\frac{\partial w}{\partial x}(x,t) +T(x,t)\,\frac{\partial^2 w}{\partial x^2}(x,t) +F(x,t) \tag{E3} \nonumber \]

    which is indeed relatively simple, but still exhibits a problem. This is one equation in the two unknowns \(w\) and \(T\text{.}\)

    Fortunately there is a second equation lurking in the background, that we haven't used yet. Namely, the horizontal component of Newton's law of motion. As a second simplification, we assume that there are only transverse vibrations. That is, our tiny string element moves only vertically. Then the net horizontal force on it must be zero. That is,

    \[ T(x+\Delta x,t)\cos\theta(x+\Delta x,t)-T(x,t)\cos\theta(x,t)=0 \nonumber \]

    Dividing by \(\Delta x\) and taking the limit as \(\Delta x\) tends to zero gives

    \[ \frac{\partial }{\partial x}\big[T(x,t)\cos\theta(x,t)\big]=0 \nonumber \]

    Thus \(T(x,t)\cos\theta(x,t)\) is independent of \(x\text{.}\) For small amplitude vibrations, \(\cos\theta\) is very close to one, for all \(x\text{.}\) So \(T\) is a function of \(t\) only, which is determined by how hard you are pulling on the ends of the string at time \(t\text{.}\) So for small, transverse vibrations, (E3) simplifies further to

    \[ \rho(x)\frac{\partial^2 w}{\partial\, t^2}(x,t) =T(t)\,\frac{\partial^2 w}{\partial x^2}(x,t) +F(x,t) \tag{E4} \nonumber \]

    In the event that the string density \(\rho\) is a constant, independent of \(x\text{,}\) the string tension \(T(t)\) is a constant independent of \(t\) (in other words you are not continually playing with the tuning pegs) and there are no external forces \(F\) we end up with the wave equation

    \[ \frac{\partial^2 w}{\partial\, t^2}(x,t) =c^2\,\frac{\partial^2 w}{\partial x^2}(x,t) \qquad \text{where}\qquad c=\sqrt{\frac{T}{\rho}} \nonumber \]

    as desired.

    The equation that is called the wave equation has built into it a lot of approximations. By going through the derivation, we have seen what those approximations are, and we can get some idea as to when they are applicable.

    1. If you plug “wave equation” into your favourite search engine you will get more than a million hits.

    This page titled 2.8: Optional — Solving the Wave Equation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Joel Feldman, Andrew Rechnitzer and Elyse Yeager via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.