7 Wave Equation Handout
7 Wave Equation Handout
Ronnie Sebastian
Department of Mathematics
Indian Institute of Technology Bombay
Powai, Mumbai - 76
1 / 40
One-dimensional wave equation
Consider the following differential equation
u(0, t) = u(L, t) = 0.
2 / 40
Dirichlet boundary conditions: Getting some solutions
X 00 (x) T 00 (t)
= 2
X(x) k T (t)
T 00 (t) + k 2 λT (t) = 0
5 / 40
Dirichlet boundary conditions: Formal solution
From the above we conclude that one possible solution of the wave
equation with boundary conditions is,
X knπ β L knπ nπx
n
u(x, t) = αn cos t + sin t sin .
L knπ L L
n≥1
X nπx
ut (x, 0) = βn sin .
L
n≥1
6 / 40
Dirichlet boundary conditions: Formal solution
Thus, if f (x) and g(x) have Fourier expansions given by
X nπx
f (x) = αn sin and
L
n≥1
X nπx
g(x) = βn sin .
L
n≥1
then we will have solved our wave equation with the given
boundary and initial conditions.
Definition
Consider the wave equation with initial and boundary values given
by
utt = k 2 uxx 0 < x < L, t > 0
u(0, t) = u(L, t) = 0 t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
7 / 40
Dirichlet boundary conditions: Formal solution
Definition (continued)
The formal solution of the above problem is
X knπ β L knπ nπx
n
u(x, t) = αn cos t + sin t sin .
L knπ L L
n≥1
where
Z L
2 nπx
αn = f (x) sin dx and
L 0 L
2 L
Z
nπx
βn = g(x) sin dx.
L 0 L
We say u(x, t) is a formal solution, since the series for u(x, t) may
NOT make sense, or it may not make sense to differentiate it term
wise.
8 / 40
Dirichlet boundary conditions: Actual solution
Theorem
Let f and g be continuous and piecewise smooth functions on
[0, L] such that f (0) = f (L) = 0. Then the problem given by
utt = k 2 uxx 0 < x < L, t > 0
u(0, t) = u(L, t) = 0 t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
has an actual solution, which is given by
X knπ β L knπ nπx
n
u(x, t) = αn cos t + sin t sin .
L knπ L L
n≥1
where Z L Z L
2 nπx 2 nπx
αn = f (x) sin dx and βn = g(x) sin dx.
L 0 L L 0 L
9 / 40
Dirichlet boundary conditions: Example
Example
Consider the wave equation with initial and boundary value given
by
utt = 5uxx 0 < x < 1, t > 0
u(0, t) = u(L, t) = 0 t>0
u(x, 0) = sin πx + 3 sin 5πx 0≤x≤1
ut (x, 0) = sin 5πx − 26 sin 9πx 0≤x≤1
Since both f and g are given by their Fourier series in the above
example, it is clear that
α1 = 1 β1 = 0
α5 = 3 β5 = 1
α9 = 0 β9 = −26
10 / 40
Dirichlet boundary conditions: Example
Example (continued)
Thus, the solution to the above problem is given by
√ √
u(x, t) = cos( 5πt) sin(πx) + (3 cos( 5πt)+
1 √ −26 √
√ sin( 5πt)) sin(5πx) + √ sin( 9πt) sin(9πx)
5π 5 9π 5
11 / 40
Dirichlet boundary conditions: Formal solution
Theorem
Let f and g be continuous and piecewise smooth functions on
[0, L]. Then the problem given by
utt = k 2 uxx 0 < x < L, t > 0
u(0, t) = u(L, t) = 0 t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
has an actual solution, which is given by
X knπ β L knπ nπx
n
u(x, t) = αn cos t + sin t sin .
L knπ L L
n≥1
where Z L Z L
2 nπx 2 nπx
αn = f (x) sin dx and βn = g(x) sin dx.
L 0 L L 0 L
12 / 40
Neumann boundary condition
ux (0, t) = ux (L, t) = 0.
13 / 40
Neumann boundary conditions: Getting some solutions
X 00 (x) T 00 (t)
= 2
X(x) k T (t)
T 00 (t) + k 2 λn T (t) = 0
16 / 40
Neumann boundary conditions: Formal solution
For n = 0 we get
From the above we conclude that one possible solution of the wave
equation with boundary conditions is,
X knπ β L knπ nπx
n
u(x, t) = β0 t+α0 + αn cos t + sin t cos .
L knπ L L
n≥1
17 / 40
Neumann boundary conditions: Formal solution
Thus, if f (x) and g(x) have Fourier expansions given by
X nπx
f (x) = α0 + αn cos and
L
n≥1
X nπx
g(x) = β0 + βn cos .
L
n≥1
then we will have solved our wave equation with the given
boundary and initial conditions.
Definition
Consider the wave equation with initial and boundary values given
by
utt = k 2 uxx 0 < x < L, t > 0
ux (0, t) = ux (L, t) = 0 t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
18 / 40
Neumann boundary conditions: Formal solution
Definition (continued)
The formal solution of the above problem is
u(x, t) = β0 t + α0 +
X knπ β L knπ nπx
n
αn cos t + sin t cos .
L knπ L L
n≥1
where
Z L Z L
1 2 nπx
α0 = f (x) dx αn = f (x) cos dx and
L 0 L 0 L
Z L Z L
1 2 nπx
β0 = g(x) dx βn = g(x) cos dx.
L 0 L 0 L
We say u(x, t) is a formal solution, since the series for u(x, t) may
NOT make sense, or it may not make sense to differentiate it term
wise.
19 / 40
Neumann boundary conditions: Actual solution
Theorem
Let f and g be continuous and piecewise smooth functions on
[0, L]. Then the problem given by
utt = k 2 uxx 0 < x < L, t > 0
ux (0, t) = ux (L, t) = 0 t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
has an actual solution, which is given by
u(x, t) = β0 t + α0 +
X knπ β L knπ nπx
n
αn cos t + sin t cos .
L knπ L L
n≥1
where
1 L 2 L
Z Z
nπx
α0 = f (x) dx αn = f (x) cos dx and
L 0 L 0 L
Z L Z L
1 2 nπx
β0 = g(x) dx βn = g(x) cos dx.
L 0 L 0 L
20 / 40
Neumann boundary conditions: Example
Example
Consider the wave equation with initial and boundary value given
by
utt = 5uxx 0 < x < 1, t > 0
ux (0, t) = ux (L, t) = 0 t>0
u(x, 0) = 34 + cos πx + 3 cos 5πx 0≤x≤1
ut (x, 0) = 23 + cos 5πx − 26 cos 9πx 0≤x≤1
Since both f and g are given by their Fourier series in the above
example, it is clear that
α0 = 34 β0 = 23
α1 = 1 β1 = 0
α5 = 3 β5 = 1
α9 = 0 β9 = −26
21 / 40
Neumann boundary conditions: Example
Example (continued)
Thus, the solution to the above problem is given by
√
u(x, t) = 23t + 34 + cos( 5πt) cos(πx)
√ 1 √
+ (3 cos( 5πt) + √ sin( 5πt)) cos(5πx)
5π 5
−26 √
√ sin( 9πt) cos(9πx)
9π 5
22 / 40
Non homogeneous PDE: Dirichlet boundary condition
Let us now consider the following PDE
utt − k 2 uxx = F (x, t) 0 < x < L, t > 0
u(0, t) = f1 (t) t>0
u(L, t) = f2 (t) t>0
u(x, 0) = f (x) 0≤x≤L
ut (x, 0) = g(x) 0≤x≤L
How do we solve this?
Let us first make the substitution
x x
z(x, t) = u(x, t) − (1 − )f1 (t) − f2 (t)
L L
Then clearly
ztt − k 2 zxx = G(x, t)
z(0, t) = 0
z(L, t) = 0
z(x, 0) = v(x)
zt (x, 0) = w(x)
23 / 40
Non homogeneous PDE: Dirichlet boundary condition
It is clear that we would have solved for u iff we have solved for z.
In view of this observation, let us try and solve the problem for z.
By observing the boundary conditions, we guess that we should try
and look for a solution of the type
X nπx
z(x, t) = Zn (t) sin( )
L
n≥1
24 / 40
Non homogeneous PDE: Dirichlet boundary condition
k 2 n2 π 2
Gn (t) = Zn00 (t) + Zn (t) (∗)
L2
We also need that z(x, 0) = v(x) and zt (x, 0) = w(x).
If X nπx X nπx
v(x) = bn sin w(x) = cn sin
L L
n≥1 n≥1
25 / 40
Non homogeneous PDE: Dirichlet boundary condition
26 / 40
Non homogeneous PDE: Dirichlet boundary condition
Example
Let us now consider the following PDE
utt − uxx = et 0 < x < 1, t > 0
u(0, t) = 0 t>0
u(1, t) = 0 t>0
u(x, 0) = x(x − 1) 0≤x≤1
ut (x, 0) = 0 0≤x≤1
From the boundary conditions u(0, t) = u(1, t) = 0 it is clear that
we should look for solution in terms of Fourier sine series.
The Fourier sine series of F (x, t) is given by (for n ≥ 1)
Z 1
Fn (t) = 2 F (x, t) sin nπx dx
0
1
2(1 − (−1)n )et
Z
=2 et sin nπx dx =
0 nπ
27 / 40
Non homogeneous PDE: Dirichlet boundary condition
Example (continued ...)
Thus, the Fourier series for et is given by
X 2(1 − (−1)n )
et = et sin nπx
nπ
n≥1
P
Substitute u(x, t) = n≥1 un (t) sin nπx into the equation
utt − uxx = et
X X 2(1 − (−1)n )
u00n (t) + n2 π 2 un (t) sin nπx = et sin nπx
nπ
n≥1 n≥1
28 / 40
Non homogeneous PDE: Dirichlet boundary condition
that is,
un (t) = Cn cos nπt + Dn sin nπt
Since n is even, the nth Fourier coefficient of f (x) is 0. Thus, we
get that Cn = 0. Further, since g(x) = 0, the nth Fourier
coefficient is 0. Thus, we get that Dn = 0.
We conclude that un (t) = 0 for n ≥ 1 and even.
29 / 40
Example
For n ≥ 1 and odd we get
4 t
u00n (t) + n2 π 2 un (t) = e
nπ
If we put un (t) = cet then we get
4 t
cet + n2 cet = e
nπ
4
Solving the above we get that et is a solution.
n(n2 + 1)π
The general solution is given by
4
un (t) = et + Cn cos nπt + Dn sin nπt
n(n2 + 1)π
30 / 40
Non homogeneous PDE: Dirichlet boundary condition
Example (continued ...)
In the case n ≥ 1 odd, we have the Fourier coefficient of x(x − 1)
−8
is (nπ) 3 . Thus, we get
4 −8
Cn + =
n(n2 + 1)π (nπ)3
33 / 40
Non homogeneous PDE: Neumann boundary condition
k 2 n2 π 2
Gn (t) = Zn00 (t) + Zn (t) (∗)
L2
We also need that z(x, 0) = v(x) and zt (x, 0) = w(x).
If X nπx X nπx
v(x) = bn cos w(x) = cn cos
L L
n≥0 n≥0
34 / 40
Non homogeneous PDE: Neumann boundary condition
35 / 40
Non homogeneous PDE: Neumann boundary condition
Example
Let us now consider the following PDE
utt − uxx = et 0 < x < 1, t > 0
ux (0, t) = 0 t>0
ux (1, t) = 0 t>0
u(x, 0) = x(x − 1) 0≤x≤1
ut (x, 0) = 0 0≤x≤1
From the boundary conditions ux (0, t) = ux (1, t) = 0 it is clear
that we should look for solution in terms of Fourier cosine series.
The Fourier cosine series of F (x, t) is given by (for n ≥ 0)
Z 1 Z 1
F0 (t) = F (x, t) dx = et dx = et
Z 01 0 Z 1
Fn (t) = 2 F (x, t) cos nπx dx = 2 et cos nπx dx = 0 n > 0
0 0
36 / 40
Non homogeneous PDE: Neumann boundary condition
1 X 2((−1)n + 1)
x(x − 1) = − + cos nπx
6 (nπ)2
n≥1
P
Substitute u(x, t) = n≥0 un (t) cos nπx into the equation
utt − uxx = et
X
u00n (t) + n2 π 2 un (t) cos nπx = et
n≥0
37 / 40
Non homogeneous PDE: Neumann boundary condition
38 / 40
Non homogeneous PDE: Neumann boundary condition
4
Cn =
(nπ)2
We also have u0n (0) = 0, that is, Dn = 0.
39 / 40
Example (continued ...)
Thus, when n is even we get
4
un (t) = cos nπt
(nπ)2
40 / 40