# Lesson 33 The Wave Equation

Math 21b

May 4, 2007

Announcements
Homework for May 4: Mathematica Assignment Homework for May 7: http://www.courses.fas.harvard. edu/~math21b/pde/iindex.html, Problems 6–10 Final Review: May 14 in Hall B from 12-2 PM. Final: May 18, 2:15 PM, Science Center B

Outline
Recap of the Heat equation The wave equation Solution on the line Solution on a line segment ﬁxed boundary conditions free boundary conditions Derivation of the wave equation

Fact
The general solution to ft = µfxx , f (0, t) = f (π, t) = 0 is f (x, t) =
n=1 ∞

bn e −n
π

2 µt

sin(nt)

where bn =

2 π

f0 (x) sin(nx) dx
0

Outline
Recap of the Heat equation The wave equation Solution on the line Solution on a line segment ﬁxed boundary conditions free boundary conditions Derivation of the wave equation

The wave equation

Our second famous PDE is the wave equation ftt = c 2 fxx

The wave equation

Our second famous PDE is the wave equation ftt = c 2 fxx It describes the motion of a rubber band or other elastic string.

Outline
Recap of the Heat equation The wave equation Solution on the line Solution on a line segment ﬁxed boundary conditions free boundary conditions Derivation of the wave equation

Traveling waves

If u(x) is any function, then u(x − ct) satisﬁes the wave equation. The same for v (x + ct) So the general solution to the unbounded wave equation is f (x, t) = u(x − ct) + v (x + ct)

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Time series plot

f (x, t) = 2e −(x−2t) + 3e −(x+2t)

2

2

Outline
Recap of the Heat equation The wave equation Solution on the line Solution on a line segment ﬁxed boundary conditions free boundary conditions Derivation of the wave equation

From Rn to C ∞
The general solution to the equation x (t) = −c 2 x(t) is x(t) = C1 cos(ct) + C2 sin(ct) 1 = x0 cos(ct) + x0 sin(ct) c

From Rn to C ∞
The general solution to the equation x (t) = −c 2 x(t) is x(t) = C1 cos(ct) + C2 sin(ct) 1 = x0 cos(ct) + x0 sin(ct) c If x0 and x0 are eigenvectors of A with eigenvalue λ, then a solution to x (t) = c 2 Ax(t) is √ √ 1 x(t) = x0 cos( −λct) + √ x0 cos( −λct) −λc

From Rn to C ∞
The general solution to the equation x (t) = −c 2 x(t) is x(t) = C1 cos(ct) + C2 sin(ct) 1 = x0 cos(ct) + x0 sin(ct) c If x0 and x0 are eigenvectors of A with eigenvalue λ, then a solution to x (t) = c 2 Ax(t) is √ √ 1 x(t) = x0 cos( −λct) + √ x0 cos( −λct) −λc So if f is an eigenfunction of the operator T = D 2 with eigenvalue λ, then √ √ 1 ftt (x, t) = f (x, 0) cos( −λct) + ft (x, 0) sin( −λct) c is a solution to ftt = c 2 fxx .

Boundary conditions limit the eigenvalues
Let’s solve the wave equation on the segment [0, π]. So we restrict our solutions to the eigenfunctions of D 2 which satisfy f (0) = f (π) = 0

Boundary conditions limit the eigenvalues
Let’s solve the wave equation on the segment [0, π]. So we restrict our solutions to the eigenfunctions of D 2 which satisfy f (0) = f (π) = 0 Remember the eigenfunctions of D 2 are 1 and x (λ = 0) e±
λx (λ > 0) √ √ sin( −λx) and cos( −λx) (λ < 0) √

Boundary conditions limit the eigenvalues
Let’s solve the wave equation on the segment [0, π]. So we restrict our solutions to the eigenfunctions of D 2 which satisfy f (0) = f (π) = 0 Remember the eigenfunctions of D 2 are 1 and x (λ = 0) e±
λx (λ > 0) √ √ sin( −λx) and cos( −λx) (λ < 0) √

Only the sines can satisfy the boundary conditions, and only when √ −λ is an integer. This means the general solution is
∞ ∞

f (x, t) =
n=0

an cos(nct) sin(nx) +
n=0

bn sin(nct) sin(nx)

Initial conditions
Suppose we have initial values f (x, 0) = f (x) and ft (x, 0) = g (x). Then what are the coeﬃcients?

Initial conditions
Suppose we have initial values f (x, 0) = f (x) and ft (x, 0) = g (x). Then what are the coeﬃcients? We have

f (x, 0) =
n=0

an sin(nx)

so we can solve an = 2 π
π

f (x) sin(nx) dx
0

Initial conditions
Suppose we have initial values f (x, 0) = f (x) and ft (x, 0) = g (x). Then what are the coeﬃcients? We have

f (x, 0) =
n=0

an sin(nx)

so we can solve an = Also, ft (x, 0) =
n=0

2 π

π

f (x) sin(nx) dx
0 ∞

ncbn sin(nx)
π

so bn =

2 cnπ

g (x) sin(nx) dx
0

Example
Pluck the string at the 1/4 mark, so f (x) =
4x π 4x − 3π x − π 4

+1

0≤x ≤ π 4 π 4 ≤x ≤π

Release the string from rest, so g (x) = 0.

Sines of the multiples of π/4
We have a= So
2π/4

nπ 8 4 sin − sin (nπ) 2π2 3n 4

a4k = 0 a4k+1 = a4k+2 a4k+3

(−1)k 16

3π/4

1π/4

2
4π/4

3(4k + (−1)k 32 =− 3(4k + 2)2 π 2 √ (−1)k 16 2 = 3(4k + 3)2 π 2

1)2 π 2

• • •
5π/4

• •
8π/4

6π/4

7π/4

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

Plot of f (x, t)

free boundary conditions

Suppose instead we assume fx (x, 0) = 0 = fx (x, π). Then we take the cosine series
∞ ∞

f (x, t) =
n=0

an cos(nct) cos(nx) +
n=0

bn sin(nct) cos(nx)

where an = 2 π
π

f (x) cos(nx) dxbn
0

=

2 cnπ

π

g (x) cos(nx) dx
0

Outline
Recap of the Heat equation The wave equation Solution on the line Solution on a line segment ﬁxed boundary conditions free boundary conditions Derivation of the wave equation

Why this equation?

Remember the equations for motion of a spring: Newton says F = ma = my Hooke says in a spring, F = k∆y

A string is a bunch of springs

x − ∆x

x

x + ∆x

So (ρ∆x)ftt (x, t) = k f (x+∆x, t)−f (x, t) − f (x−∆x, t)−f (x, t)

A string is a bunch of springs

x − ∆x

x

x + ∆x

So (ρ∆x)ftt (x, t) = k f (x+∆x, t)−f (x, t) − f (x−∆x, t)−f (x, t)

Divide by ∆x and take the limit as ∆x → 0.