Differential Equations · Undergraduate

The Wave Equation and Vibrating Strings

Quick answer

The wave equation u_tt = c² u_xx describes a vibrating string, with u(x, t) the displacement and c the wave speed. For a string of length L with fixed ends, separating variables gives standing waves sin(nπx/L) that oscillate in time with angular frequencies nπc/L. Unlike heat, these modes do not decay, and their frequencies are whole-number multiples of the lowest one, so a string sounds a note. d'Alembert's form F(x − ct) + G(x + ct) shows two waves moving in opposite directions.

What you'll learn

  • Interpret the wave equation and its boundary and initial conditions
  • Find standing-wave solutions by separation of variables
  • Compute the natural frequencies of a string
  • Recognize d'Alembert's traveling-wave form

A string fixed at both ends

A guitar string of length LL has displacement u(x,t)u(x, t). Newton’s law for each small piece gives the wave equation

utt=c2uxx,u(0,t)=u(L,t)=0u_{tt} = c^2u_{xx}, \qquad u(0, t) = u(L, t) = 0

with a starting shape u(x,0)=f(x)u(x, 0) = f(x) and starting velocity ut(x,0)=g(x)u_t(x, 0) = g(x). As with the heat equation, try u=X(x)T(t)u = X(x)T(t). The ends force X=sin⁡nπxLX = \sin\tfrac{n\pi x}{L}, and now T′′=−(nπcL)2TT'' = -\left(\tfrac{n\pi c}{L}\right)^2T, so TT oscillates:

u(x,t)=∑n=1∞sin⁡nπxL(ancos⁡nπctL+bnsin⁡nπctL)u(x, t) = \sum_{n=1}^{\infty} \sin\frac{n\pi x}{L}\left(a_n\cos\frac{n\pi ct}{L} + b_n\sin\frac{n\pi ct}{L}\right)

The ana_n are the Fourier sine coefficients of ff, and the bnb_n come from gg.

Why a string plays a note

Mode nn vibrates with frequency fn=nc2Lf_n = \tfrac{nc}{2L} cycles per second. Every frequency is a whole-number multiple of the fundamental f1=c2Lf_1 = \tfrac{c}{2L}, so the sound repeats with the period of the fundamental, and the ear hears one pitch. The mix of overtones, set by how the string is plucked, gives the tone its color. Because the time factor is a cosine rather than a decaying exponential, the ideal string never stops; real strings lose energy to air and friction.

A plucked string at three moments The string u = sin x cos 2t + 0.5 sin 3x cos 6t on 0 ≤ x ≤ π, with c = 2. At t = 0 it has a hump with a small extra wiggle. At t = π/8 the wiggle has flipped, leaving one rounded hump. At t = π/4 both modes pass through zero at once, and the string is flat. 123−11xu
  • t = 0
  • t = π/8
  • t = π/4
A plucked string at three moments

Worked examples

Common mistakes

Practice problems

  1. Solve utt=uxxu_{tt} = u_{xx} on 0<x<π0 < x < \pi, fixed ends, u(x,0)=3sin⁡2xu(x, 0) = 3\sin 2x, ut(x,0)=0u_t(x, 0) = 0.

    Answer

    u=3sin⁡2xcos⁡2tu = 3\sin 2x\cos 2t

    Full solution

    With c=1c = 1 and L=πL = \pi, mode 22 oscillates as cos⁡2t\cos 2t.

  2. A string has L=1L = 1 m and c=200c = 200 m/s. Find its fundamental frequency.

    Answer

    100100 Hz

    Full solution

    f1=2002f_1 = \tfrac{200}{2}.

  3. How does the fundamental change if the string is shortened to half its length?

    Answer

    It doubles, raising the pitch an octave.

    Full solution

    f1=c2Lf_1 = \tfrac{c}{2L} is inversely proportional to LL.

  4. Verify that sin⁡(x+ct)\sin(x + ct) solves utt=c2uxxu_{tt} = c^2u_{xx}.

    Answer

    utt=−c2sin⁡(x+ct)u_{tt} = -c^2\sin(x + ct) and uxx=−sin⁡(x+ct)u_{xx} = -\sin(x + ct).

    Full solution

    So utt=c2uxxu_{tt} = c^2u_{xx}: a wave moving left at speed cc.

  5. In Example 1, find u(π2,0)u\left(\tfrac{\pi}{2}, 0\right).

    Answer

    0.50.5

    Full solution

    sin⁡π2+0.5sin⁡3π2=1−0.5\sin\tfrac{\pi}{2} + 0.5\sin\tfrac{3\pi}{2} = 1 - 0.5.

  6. What is the period of the motion in Example 1?

    Answer

    π\pi

    Full solution

    cos⁡2t\cos 2t has period π\pi and cos⁡6t\cos 6t has period π3\tfrac{\pi}{3}, which divides π\pi.

  7. Solve utt=uxxu_{tt} = u_{xx} on 0<x<π0 < x < \pi, fixed ends, starting flat with velocity ut(x,0)=sin⁡xu_t(x, 0) = \sin x.

    Answer

    u=sin⁡xsin⁡tu = \sin x\sin t

    Full solution

    Only a sine term in time can start at 00; ∂∂t(b1sin⁡xsin⁡t)=b1sin⁡x\tfrac{\partial}{\partial t}(b_1\sin x\sin t) = b_1\sin x at t=0t = 0 gives b1=1b_1 = 1.

  8. A student solves Example 1 as sin⁡x e−4t+0.5sin⁡3x e−36t\sin x\,e^{-4t} + 0.5\sin 3x\,e^{-36t}. What is wrong?

    Answer

    That is the heat equation’s form; the wave equation needs cos⁡2t\cos 2t and cos⁡6t\cos 6t.

    Full solution

    uttu_{tt} is a second derivative in time, so T′′=−ω2TT'' = -\omega^2T gives oscillation, not decay.

Frequently asked questions

What does the wave equation say?

u_tt = c² u_xx: the acceleration of each point of the string is proportional to how curved the string is there. c is the speed of waves along the string.

What are the standing waves of a string fixed at both ends?

sin(nπx/L) cos(nπct/L) and sin(nπx/L) sin(nπct/L), for n = 1, 2, 3, …. Each has a fixed shape that oscillates in place.

What are the natural frequencies?

fₙ = nc/(2L) cycles per second, whole-number multiples of the fundamental f₁ = c/(2L).

How is the wave equation different from the heat equation?

The heat equation has u_t, so modes decay exponentially. The wave equation has u_tt, so modes oscillate forever without loss.

What is d'Alembert's solution?

Every solution on an infinite string has the form u = F(x − ct) + G(x + ct): one wave moving right and one moving left at speed c.