Professional Documents
Culture Documents
Solution of The Wave Equation by Separation of Variables: U T 2 U X
Solution of The Wave Equation by Separation of Variables: U T 2 U X
The Problem
Let u(x, t) denote the vertical displacement of a string from the x axis at position x and time t. The
string has length . Its left and right hand ends are held fixed at height zero and we are told its initial
configuration and speed. For notational convenience, choose a coordinate system so that the left hand end
of the string is at x = 0 and the right hand end of the string is at x = .
u
x
We assume that the string is undergoing small amplitude transverse vibrations so that u(x, t) obeys the wave
equation
2 u
t2 (x, t)
= c2
2u
x2 (x, t)
(1)
The conditions that the left and right hand ends are held at height zero are encoded in the boundary
conditions
u(0, t) = 0
(2)
u(, t) = 0
(3)
As we have been told the position and speed of the string at time 0, there are given functions f (x) and g(x)
such that the initial conditions
u(x, 0) = f (x)
(4)
ut (x, 0) = g(x)
(5)
X (x)
X(x)
1 T (t)
c2 T (t)
The left hand side is independent of t. So the right hand side, which is equal to the left hand side, must be
independent of t too. The right hand side is independent of x. So the left hand side must be independent of
x too. So both sides must be independent of both x and t. So both sides must be constant. Lets call the
constant . So we have
X (x)
X(x)
1 T (t)
c2 T (t)
2
X (x) X(x) = 0
T (t) c T (t) = 0
(6)
We now have two constant coefficient ordinary differential equations, which we solve in the usual way. We
try X(x) = erx and T (t) = est for some constants r and s to be determined. These are solutions if and only
if
rx
2
st
d2 st
d2
erx = 0
dx2 e
dt2 e c e = 0
r2 erx = 0
s2 c2 )est = 0
r2 = 0
r=
s 2 c2 = 0
s = c
If 6= 0, we now have two independent solutions, namely e x and e x , for X(x) and two independent
+ d2 e
T (t) = d3 ec
+ d4 ec
T (t) = 0
T (t) = d3 + d4 t
for arbitrary constants d1 , d2 , d3 and d4 . We have now found a huge number of solutions to the wave
equation (1). Namely
u(x, t) = d1 e x + d2 e x d3 ec t + d4 ec t
for arbitrary 6= 0 and arbitrary d1 , d2 , d3 , d4
u(x, t) = d1 + d2 x d3 + d4 t
for arbitrary d1 , d2 , d3 , d4
The Second Step Imposition of the Boundary Conditions
P
If Xi (x)Ti (t), i = 1, 2, 3, all solve the wave equation (1), then i ai Xi (x)Ti (t) is also a solution for
any choice of the constants ai . This solution satisfies the boundary condition (2) if and only if
X
ai Xi (0)Ti (t) = 0
for all t > 0
i
This will certainly be the case if Xi (0) = 0 for all i. In fact, if the ai s are nonzero and the Ti (t)s are
independent, then (2) is satisfied if and only if all of the Xi (0)s are zero. For us, it will be good enough to
simply restrict our attention to Xi s for which Xi (0) = 0, so I am not even going to define what independent
P
means(1) . Similarly, u(x, t) = i ai Xi (x)Ti (t) satisfies the boundary condition (3) if and only if
X
ai Xi ()Ti (t) = 0
for all t > 0
i
(1)
and this will certainly be the case if Xi () = 0 for all i. We are now going to go through the solutions that
we found in Step 1 and discard all of those that fail to satisfy X(0) = X() = 0.
First, consider = 0 so that X(x) = d1 + d2 x. The condition X(0) = 0 is satisfied if and only if d1 = 0.
The condition X() = 0 is satisfied if and only if d1 + d2 = 0. So the conditions X(0) = X() = 0 are both
satisfied only if d1 = d2 = 0, in which case X(x) is identically zero. There is nothing to be gained by keeping
an identically zero X(x), so we discard = 0 completely.
0 = d1 e + d2 e = d1 e e
If d1 were zero, then X(x) would again be identically zero and hence useless. So instead, we discard any
that does not obey
e e = 0 e = e e2 = 1
2
2 = 2k = k = k 2 2
With = k and d2 = d1 ,
ck
k
ck
k
X(x)T (t) = d1 e x e x d3 e t + d4 e t
ck
ck
= 2d1 sin k
x (d3 + d4 ) cos
t) + (d3 d4 ) sin
t
ck
ck
= sin k
x k cos
t) + k sin
t
where k = 2d1 (d3 + d4 ) and k = 2d1 (d3 d4 ). Note that, to this point, d1 , d3 and d4 are allowed to be
any complex numbers so that k and k are allowed to be any complex numbers.
k=1
sin
k
x
k cos
ck
t)
+ k sin
ck
t
obeys the wave equation (1) and the boundary conditions (2) and (3), for any choice of the constants k , k .
It remains only to see if we can choose the k s and k s to satisfy
f (x) = u(x, 0) =
g(x) = ut (x, 0) =
k=1
k sin
k
x
k ck
sin
k=1
(4 )
k
x
(5 )
But any (reasonably smooth) function, h(x), defined on the interval 0 < x < , has a unique representation(3)
h(x) =
bk sin kx
(7)
k=1
(2)
(3)
h(x) sin kx
dx
for the coefficients. We can make (7) match (4 ) by choosing h(x) = f (x) and bk = k . This tells us that
R
k = 2 0 f (x) sin kx
we can make (7) match (5 ) by choosing h(x) = g(x) and bk = k ck
dx. Similarly,
.
R
2
ck
dx.
So
we
have
a
solution:
This tells us that k = 0 g(x) sin kx
u(x, t) =
k
x
sin
k=1
ck
t)
k cos
+ k sin
ck
t
(8)
with
2
k =
f (x) sin
kx
dx
k =
2
ck
g(x) sin kx
dx
While the sum (8) can be very complicated, each term, called a mode, is quite simple. For each fixed
kc
kc
is just a constant times sin k
t, the mode sin k
x k cos t) + k sin
t
x . As x runs from 0
to , the argument of sin k
x runs from 0 to k, which is k halfperiods of sin. Here are graphs, at
fixed t, of the first three modes, called the fundamental tone, the first harmonic and the second harmonic.
y
y
y
x
1st harmonic
2nd harmonic
kc
kc
For each fixed x, the mode sin k
is just a constant times cos kc
x k cos
t) + k sin
t
t) plus a
kc
kc
t,
of
both
cos
t)
and
sin kc
constant times sin t). As t increases by one second, the argument, kc
t)
kc
c
kc
increases by , which is 2 cycles (i.e. periods). So the fundamental oscillates at 2 cps, the first harmonic
c
c
cps, the second harmonic oscillates at 3 2
cps and so on. If the string has density and
oscillates at 2 2
q
T
(4)
tension T , then we have seen that c =
. So to increase the frequency of oscillation of a string you
increase the tension and/or decrease the density and/or shorten the string.
fundamental
= c2
2u
x2 (x, t)
u(0, t) = u(1, t) = 0
u(x, 0) = x(1 x)
ut (x, 0) = 0
This is a special case of equations (15) with = 1, f (x) = x(1 x) and g(x) = 0. So, by (8),
u(x, y) =
k=1
with
k = 2
(4)
sin(kx) k cos(ckt) + k sin(ckt)
x(1 x) sin(kx) dx
k = 2
0 sin(kx) dx = 0
Using(5)
Z
x sin(kx) dx =
1
d
1 dk
cos(kx) dx =
1 ddk
1
= cos(k) k
Z 1
Z 1
Z
2
1 d2
1 d2
2 dk2 sin(kx) dx = 2 dk2
x sin(kx) dx =
0
1
1
sin(kx)0
cos(kx) dx = 1 ddk k
1
sin(kx) dx =
2 2
cos(k) 2k
k3 3
1 d2 1
2 dk2 k
2
k3 3
1
cos(kx)0
we have
1
2 2
1
cos(k) 2k
x(1 x) sin(kx) dx = 2 cos(k) k
k = 2
k3 3 +
0
8
for k odd
= k3 3
0
for k even
and
u(x, y) =
8
k3 3
2
k3 3
4
k3 3 [1
cos(k)]
sin(kx) cos(ckt)
k=1
k odd
= c2
2u
x2 (x, t)
u(0, t) = u(1, t) = 0
ut (x, 0) = 0
k=1
sin(kx) k cos(ckt) + k sin(ckt)
This time it is very inefficient to use the integral formulae to evaluate k and k . It is easier to observe
directly, just by matching coefficients, that
sin(5x) + 2 sin(7x) = u(x, 0) =
k=1
0 = ut (x, 0) =
k=1
k sin(kx)
k =
1
2
0
if k = 5
if k = 7
if k 6= 5, 7
ckk sin(kx) k = 0
So
u(x, y) = sin(5x) cos(5ct) + 2 sin(7x) cos(7ct)
(5)
Note that we cannot impose the condition that k is an integer until after evaluating the
d
dk
derivatives.
u(x, t) =
kx
bk (t) sin
k=1
(9)
By using other periodic extensions, like the even periodic extension, we can get other expansions of u(x, t)
too. But the odd periodic expansion (9) is particularly useful because, with it, the boundary conditions (2,3)
are automatically satisfied. If we substitute x = 0 into the right hand side of (9) we necessarily get zero,
regardless of the value of bk (t), because every term contains a factor of sin(0) = 0. Similarly, if we substitute
x = into the right hand side of (9) we again necessarily get zero, for any bk (t), because sin(k) = 0 for
every integer k.
The solution u(x, t) is completely determined by the, as yet unknown, coefficients bk (t). Furthermore
P
kx
into the three remaining rethese coefficients can be found by substituting u(x, t) =
k=1 bk (t) sin
quirements (1), (4), (5) on u(x, t). First the wave equation (1):
0=
2u
t2 (x, t)
c2 xu2 (x, t) =
=
bk (t) sin
k=1
h
X
bk (t) +
kx
k 2 2 c2
2 bk (t) sin
k=1
k 2 2 c2
2 bk (t)
k=1
sin
kx
kx
i
h
2 2 2
by bk (t) + k 2 c bk (t) then forces
bk (t) +
k 2 2 c2
2 bk (t)
0 sin
kx
k=1
dx = 0
bk (0) sin
kx
= f (x)
bk (0) sin
kx
= g(x)
k=1
for all k, t
(1 )
f (x) sin
kx
g(x) sin
kx
dx
(4 )
dx
(5 )
For each fixed k, equations (1 ), (4 ) and (5 ) constitute one second order constant coefficient ordinary
differential equation and two initial conditions for the unknown function bk (t).
January 21, 2007
rt
You already know how to solve constant coefficient ordinary differential equations. The function bk (t) =
satisfies the ordinary differential equation (1 ) if and only if
k 2 2 c2
2
r2 +
=0
kc
t
+ Dk ei
= cos
ck
t)
kc
t
kc
t
+ k sin
i sin
ck
t
kc
t
with k = Ck + Dk and k = iCk iDk again arbitrary constants. They are determined by the initial
conditions (4 ) and (5 ).
(4 ) = bk (0) = k
(5 ) = bk (0) =
ck
k
=
=
f (x) sin
kx
g(x) sin
kx
dx
dx = k =
2
ck
g(x) sin
kx
dx