Skip to main content
Mathematics LibreTexts

9.6: Solution of the Wave Equation

  • Page ID
    90437
  • \( \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}}\)

    Plucked String

    We assume an elastic string with fixed ends is plucked like a guitar string. The governing equation for \(u(x, t)\), the position of the string from its equilibrium position, is the wave equation \[\label{eq:1}u_{tt}=c^2u_{xx},\] with \(c^2 = T/\rho\) and with boundary conditions at the string ends located at \(x = 0\) and \(L\) given by \[\label{eq:2}u(0,t)=0,\quad u(L,t)=0.\]

    Since the wave equation is second-order in time, initial conditions are required for both the displacement of the string due to the plucking and the initial velocity of the displacement. We assume \[\label{eq:3}u(x,0)=f(x),\quad u_t(x,0)=0,\quad 0\leq x\leq L.\]

    Again we use the method of separation of variables and try the ansatz \[\label{eq:4}u(x,t)=X(x)T(t).\]

    Substitution of our ansatz \(\eqref{eq:4}\) into the wave equation \(\eqref{eq:1}\) and separating variables results in \[\frac{X''}{X}=\frac{1}{c^2}\frac{T''}{T}=-\lambda,\nonumber\] yielding the two ordinary differential equations \[\label{eq:5}X''+\lambda X=0,\quad T''+\lambda c^2T=0.\]

    We solve first the equation for \(X(x)\). The appropriate boundary conditions for \(X\) are given by \[\label{eq:6}X(0)=0,\quad X(L)=0,\] and we have solved this equation for \(X(x)\) previously in §9.5 (see (9.5.6)). A nontrivial solution exists only when \(\lambda > 0\), and our previously determined solution was \[\label{eq:7}\lambda_n =(n\pi /L)^2,\quad n=1,2,3,\ldots,\] with corresponding eigenfunctions \[\label{eq:8}X_n=\sin (n\pi x/L).\]

    With \(\lambda_n\) specified, the \(T\) equation then becomes \[T_n''+\frac{n^2\pi^2c^2}{L^2}T_n=0,\nonumber\] with general solution given by \[\label{eq:9}T_n(t)=A\cos\frac{n\pi ct}{L}+B\sin\frac{n\pi ct}{L}.\]

    The second of the initial conditions given by \(\eqref{eq:3}\) implies \[u_t(x,0)=X(x)T'(0)=0,\nonumber\] which can be satisfied only if \(T' (0) = 0\). Applying this boundary condition to \(\eqref{eq:9}\), we find \(B = 0\). Combining our solution for \(X_n(x)\), \(\eqref{eq:8}\), and \(T_n(t)\), we have determined that \[u_n(x,t)=\sin\frac{n\pi x}{L}\cos\frac{n\pi ct}{L},\quad n=1,2,3,\ldots\nonumber\] satisfies the wave equation, the boundary conditions at the string ends, and the assumption of zero initial string velocity. Linear superposition of these solutions results in the general solution for \(u(x, t)\) of the form \[\label{eq:10}u(x,t)=\sum\limits_{n=1}^\infty b_n\sin\frac{n\pi x}{L}\cos\frac{n\pi ct}{L}.\]

    The remaining condition to satisfy is the initial displacement of the string, the first equation of \(\eqref{eq:3}\). We have \[f(x)=\sum\limits_{n=1}^\infty b_n\sin (n\pi x/L),\nonumber\] which is observed to be a Fourier sine series (9.4.4) for an odd function with period \(2L\). Therefore, the coefficients \(b_n\) are given by (9.4.3), \[\label{eq:11}b_n=\frac{2}{L}\int_0^L f(x)\sin\frac{n\pi x}{L}dx,\quad n=1,2,3,\ldots \]

    Our solution to the wave equation with plucked string is thus given by \(\eqref{eq:10}\) and \(\eqref{eq:11}\). Notice that the solution is time periodic with period \(2L/c\). The corresponding fundamental frequency is the reciprocal of the period and is given by \(f = c/2L\). From our derivation of the wave equation in §9.2, the velocity \(c\) is related to the density of the string \(\rho\) and tension of the string \(T\) by \(c^2 = T/\rho\). Therefore, the fundamental frequency (pitch) of our “guitar string” increases (is raised) with increasing tension, decreasing string density, and decreasing string length. Indeed, these are exactly the parameters used to construct, tune and play a guitar.

    The wave nature of our solution and the physical significance of the velocity c can be made more transparent if we make use of the trigonometric identity \[\sin x\cos y=\frac{1}{2}(\sin (x+y)+\sin (x-y)).\nonumber\]

    With this identity, our solution \(\eqref{eq:10}\) can be rewritten as \[\label{eq:12}u(x,t)=\frac{1}{2}\sum\limits_{n=1}^\infty b_n\left(\sin\frac{n\pi (x+ct)}{L}+\sin\frac{n\pi (x-ct)}{L}\right).\]

    The first and second sine functions can be interpreted as a traveling wave moving to the left or the right with velocity \(c\). This can be seen by incrementing time, \(t\to t +\delta\), and observing that the value of the first sine function is unchanged provided the position is shifted by \(x\to x − c\delta\), and the second sine function is unchanged provided \(x\to x + c\delta\). Two waves traveling in opposite directions with equal amplitude results in a standing wave.

    Hammered String

    In contrast to a guitar string that is plucked, a piano string is hammered. The appropriate initial conditions for a piano string would be \[\label{eq:13}u(x,0)=0,\quad u_t(x,0)=g(x),\quad 0\leq x\leq L.\]

    Our solution proceeds as previously, except that now the homogeneous initial condition on \(T(t)\) is \(T(0) = 0\), so that \(A = 0\) in \(\eqref{eq:9}\). The wave equation solution is therefore \[\label{eq:14}u(x,t)=\sum\limits_{n=1}^\infty b_n\sin\frac{n\pi x}{L}\sin\frac{n\pi ct}{L}.\]

    Imposition of initial conditions then yields \[g(x)=\frac{\pi c}{L}\sum\limits_{n=1}^\infty nb_n\sin\frac{n\pi x}{L}.\nonumber\]

    The coefficient of the Fourier sine series for \(g(x)\) is seen to be \(n\pi cb_n/L\), and we have \[\frac{n\pi cb_n}{L}=\frac{2}{L}\int_0^L g(x)\sin\frac{n\pi x}{L}dx,\nonumber\] or \[b_n=\frac{2}{n\pi c}\int_0^L g(x)\sin\frac{n\pi x}{L}dx.\nonumber\]

    General Initial Conditions

    If the initial conditions on \(u(x, t)\) are generalized to \[\label{eq:15}u(x,0)=f(x),\quad u_t(x,0)=g(x),\quad 0\leq x\leq L,\] then the solution to the wave equation can be determined using the principle of linear superposition. Suppose \(v(x, t)\) is the solution to the wave equation with initial condition \(\eqref{eq:3}\) and \(w(x, t)\) is the solution to the wave equation with initial conditions \(\eqref{eq:13}\). Then we have \[u(x,t)=v(x,t)+w(x,t),\nonumber\] since \(u(x, t)\) satisfies the wave equation, the boundary conditions, and the initial conditions given by \(\eqref{eq:15}\).


    This page titled 9.6: Solution of the Wave Equation is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.