HW 7 Sols
HW 7 Sols
HW 7 Sols
1(b) Solve the heat equation ut = 2uxx for a rod of length L with both ends held at 0 , if L = 1, u(x, 0) =
x. (See Example 2, Section 3.6.)
As before, we use separation of variables to solve, letting u(x, t) = X(x)T (t). Then, we obtain
dT d2 X
X=2 2T
dt dx
1 dT 1 d2 X
= = = .
2T dt X dx2
We also must separate the boundary conditions:
d2 X
+ X = 0, X(0) = X(1) = 0,
dx2
dT
+ 2T = 0.
dt
From our previous work, we know that the solution to the eigenvalue problem is
and
2
Tn (t) = cn e2(n) t .
Then, for each n, un (x, t) = Xn (x)Tn (t), so
2
un (x, t) = cn e2(n) t sin nx.
1
By superposition,
2
X
u(x, t) = cn e2(n) t sin nx.
n=1
We need to determine the coefficients cn using the initial condition. Since
X
x = u(x, 0) = cn sin nx, n = 1, 2, . . . ,
n=1
we see that the right-hand side must be the Fourier sine series of x. By Example 2 in Section 3.6,
then, we have that
2(1)n+1
cn = .
n
Therefore,
X 2(1)n+1 2(n)2 t
u(x, t) = e sin nx .
n
n=1
2(c) Solve the heat equation ut = 4uxx for a rod of length L with both ends insulated, if L = 2,
(
10, if 0 x 1,
u(x, 0) = .
0, if 1 < x 2.
As before, we use separation of variables to solve, letting u(x, t) = X(x)T (t). Then, we obtain
dT d2 X
X=4 2T
dt dx
1 dT 1 d2 X
= = = .
4T dt X dx2
We also must separate the boundary conditions:
dX dX
ux (0, t) = 0 = (0)T (t) = 0 = (0) = 0,
dx dx
dX dX
ux (2, t) = 0 = (2)T (t) = 0 = (2) = 0.
dx dx
Thus, we obtain the following equations:
d2 X dX dX
+ X = 0, (0) = (2) = 0,
dx2 dx dx
dT
+ 4T = 0.
dt
2
From our previous work, we know that the solution to the eigenvalue problem is
0 = 0, X0 (x) = 1,
n 2 nx
n = , Xn (x) = cos , n = 1, 2, . . . ,
2 2
and
n 2
T0 (t) = c0 , Tn (t) = cn e4( 2) , n = 1, 2, . . . .
t
u0 (x, t) = c0
un (x, t) = cn e4( 2) cos nx , n = 1, 2, .
n 2
t
2
Therefore, by superposition,
cn e4( ) cos nx .
n 2
X
t
u(x, t) = c0 + 2
2
n=1
we know that the right-hand side is the Fourier cosine series of u(x, 0), which we now must deter-
mine.
2 2
Z a0
2c0 = u(x, 0) dx since c0 =
2 0 2
Z 1 Z 2
= 10 dx + 0 dx
0 1
= 10
= c0 = 5.
Z 2
2 nx
cn = u(x, 0) cos dx
2 0 2
Z 1
nx
= dx + 0
10 cos
0 2
nx 1
20
= sin
n 2 0
20 n
= sin .
n 2
Therefore, the solution is
X 20 n 4( n )2 t nx
u(x, t) = 5 + sin e 2 cos .
n 2 2
n=1
3
5(d) Solve the general heat equation ut = 2 uxx subject to initial conditions u(x, 0) = f (x) and to the
boundary conditions ux (0, t) = u(L, t) = 0.
4
2 Exercises 4.2: 2(b), 3(a), 5(a)
2(b) Solve the wave equation utt = 4uxx for a string of length , subject to the boundary conditions
ux (0, t) = ux (, t) = 0 and to the initial conditions u(x, 0) = sin x, ut (x, 0) = 0. (See Exercise 3,
Section 3.6.)
As before, we use separation of variables to solve, letting u(x, t) = X(x)T (t). Then, we obtain
d2 T d2 X
X = 4 T
dt2 dx2
1 d2 T 1 d2 X
= = = .
4T dt2 X dx2
We also must separate the boundary conditions:
dX dX
ux (0, t) = 0 = (0)T (t) = 0 = (0) = 0,
dx dx
dX dX
ux (, t) = 0 = ()T (t) = 0 = () = 0.
dx dx
Thus, we obtain the following equations:
d2 X dX dX
+ X = 0, (0) = () = 0,
dx2 dx dx
d2 T
+ 4T = 0.
dt2
From our previous work, we know that the solution to the eigenvalue problem is
0 = 0, X0 (x) = 1,
n = n2 , Xn (x) = cos nx, n = 1, 2, . . . ,
= 0 = T = c1 + c2 t,
n = n2 = T 00 + 4n2 T = 0
= Tn (t) = c1 cos 2nt + c2 sin 2nt.
u0 (x, t) = c0 + d0 t and un (x, t) = cn cos 2nt cos nx + dn sin 2nt cos nx.
By superposition,
X
X
u(x, t) = c0 + d0 t + cn cos 2nt cos nx + dn sin 2nt cos nx.
n=1 n=1
5
We now apply the initial conditions. First,
X
sin x = u(x, 0) = c0 + cn cos nx.
n=1
Therefore, the right-hand side must be the Fourier cosine series of f (x) = sin x, which we have
computed in Exercise 3.6, problem 3.
2 X 2 (1 + (1)n )
Fc (x) = + cos nx.
n2 1
n=1
3(a) Solve the wave equation utt = uxx subject to u(0, t) = ux (1, t), u(x, 0) = 0, ut (x, 0) = 1.
6
We also must separate the boundary conditions:
(2n 1) 2
(2n 1)x
n = , Xn (x) = sin , n = 1, 2, . . . ,
2 2
and therefore,
(2n 1)t (2n 1)t
Tn (t) = cn cos + dn sin .
2 2
Then, for each n, un (x, t) = Xn (x)Tn (t), so
(2n 1)t (2n 1)x (2n 1)t (2n 1)x
un (x, t) = cn cos sin + dn sin sin .
2 2 2 2
By superposition,
X (2n 1)t (2n 1)x X (2n 1)t (2n 1)x
u(x, t) = cn cos sin + dn sin sin .
2 2 2 2
n=1 n=1
7
and
1
(2m 1)x 1
(2m 1)x
Z
2
sin dx = cos ,
0 2 (2m 1) 2 0
Z 1 (
(2n 1)x (2m 1)x 0, if n 6= m,
sin sin dx = 1
0 2 2 2 , if n = m.
2 (2m 1)
= = dm
(2m 1) 4
8
= dm = .
(2m 1)2 2
Therefore, we obtain the solution
X 8 (2n 1)t (2n 1)x
u(x, t) = sin sin .
(2n 1)2 2 2 2
n=1
Solution: We will use separation of variables to solve this problem. Let u(x, t) = X(x)T (t). Then
dT d2 T d2 X
ut = X(x) , utt = X(x) 2 , uxx = T (t) 2 .
dt dt dx
Substituting into the PDE gives
d2 T d2 X dT
2
=X(x)
T (t) 2
4X(x)
dt dx dt
d2 T dT d2 X
X(x) 2 + 4X(x) = T (t) 2 .
dt dt dx
Divide both sides by X(x)T (t) to obtain
1 d2 T 1 d2 X
dT
+ 4 = = .
T dt2 dt X dx2
We also separate the boundary conditions.
X 00 + X = 0, X(0) = X() = 0,
d2 T dT
+4 + T = 0.
dt2 dt
8
From our previous work, we know that the solution to the eigenvalue problem is
T 0 + 4T 0 + n2 T = 0
Characteristic equation:
r2 + 4r + n2 = 0
4 16 4n2
r1,2 =
p2
= 2 4 n2
If n = 1, then
r1,2 = 2 3
2t
= T1 (t) = c1 e cosh 3t + d1 e2t sinh 3t.
If n = 2, then
r1 = r2 = 2
= T2 (t) = c2 e2t + d2 te2t .
If n > 2, then
p
r1,2 = 2 i n2 4
p p
= Tn (t) = cn e2t cos(t n2 4) + dn e2t sin(t n2 4).
By superposition, we have
u(x, t) = c1 e2t cosh 3t sin x + d1 e2t sinh 3t sin x + c2 e2t sin 2x + d2 te2t sin 2x
X p
X p
+ cn e2t cos(t n2 4) sin nx + dn e2t sin(t n2 4) sin nx.
n=3 n=3
9
Therefore, the right-hand side is the Fourier sine series of u(x, 0) = 1, and so
2
Z
cn = bn = sin nx dx
0
2
= cos nx|0
n
2
= (1 cos n)
n
2
= (1 (1)n ).
n
So, we have
4
u(x, t) = e2t cosh 3t sin x + d1 e2t sinh 3t sin x + d2 te2t sin 2x
X 2 p X p
+ (1 (1)n )e2t cos(t n2 4) sin nx + dn e2t (sin t n2 4) sin nx
n
n=3 n=3
8 2t 4 3 2t
= ut (x, t) = e cosh 3t sin x + e sinh 3t sin x 2d1 e2t sinh 3t sin x
+ 3d1 e cosh 3t sin x + d2 e2t sin 2x 2d2 te2t sin 2x
2t
X 4 2t p X 2 n2 4 p
+ 2
e cos(t n 4) sin nx + (1 (1)n ) sin(t n2 4) sin nx
n n
n=3 n=3
X p X p p
+ 2dn e2t sin(t n2 4) sin nx + dn n2 4e2t cos(t n2 4) sin nx.
n=3 n=3
Therefore,
8 X 4 X p
0 = ut (x, 0) = sin x + 3d1 sin x + d2 sin 2x + sin nx + dn n2 4 sin nx.
n
n=3 n=3
Re-arranging gives
8 X 4 X p
= sin x + sin nx = 3d1 sin x + d2 sin 2x + dn n2 4 sin nx.
n
n=3 n=3
10
Since lim e2t = 0, | cos at| 1, | sin at| 1, and 3 < 2, we have lim u(x, t) = 0.
t t
For problems 3 and 7, solve Laplaces eequation subject to the given boundary conditions. Work each
problem out completely, rather than referring to the solutions in this section.
We will solve this problem using separation of variables. Let u(x, y) = X(x)Y (y). Then, we obtain
d2 X d2 Y
Y (y) + X(x) = 0.
dx2 dy 2
Divide by XY to obtain
1 d2 X 1 d2 Y
= = .
X dx2 Y dy 2
We need to obtain the boundary conditions, as well:
Y 00 + Y = 0, Y (0) = Y () = 0,
00
X X = 0.
The eigenvalue problem is similar to one we have seen before, so we know that
X 00 n2 X = 0
r 2 n2 = 0
= r1,2 = n
= Xn (x) = cn cosh nx + dn sinh nx.
11
For each n, un (x, y) = Xn (x)Yn (y) is given by
un (x, y) = cn cosh nx sin ny + dn sinh nx sin ny.
By superposition,
X
X
u(x, y) = cn cosh nx sin ny + dn sinh nx sin ny.
n=1 n=1
We now may apply the remaining boundary conditions to determine cn and dn .
X
y = u(0, y) = cn sin ny.
n=1
Therefore, the right-hand side represents the Fourier sine series of u(0, y) = y. This tells us
2
Z
cn = y sin ny
0
2
= cos n
n
2
= (1)n
n
2
= (1)n+1 .
n
So, we have
X 2 X
u(x, y) = (1)n+1 cosh nx sin ny + dn sinh nx sin ny
n
n=1 n=1
X 2 X
= 0 = u(1, y) = (1)n+1 cosh n sin ny + dn sinh n sin ny
n
n=1 n=1
X X 2
= dn sinh n sin ny = (1)n+1 cosh n sin ny.
n
n=1 n=1
12
We will solve this problem using separation of variables. Let u(x, y) = X(x)Y (y). Then, we obtain
d2 X d2 Y
Y (y) + X(x) = 0.
dx2 dy 2
Divide by XY to obtain
1 d2 X 1 d2 Y
= = .
X dx2 Y dy 2
We need to obtain the boundary conditions, as well:
X 00 + X = 0, X(0) = X(1) = 0,
00
Y Y = 0.
The eigenvalue problem is similar to one we have seen before, so we know that
Y 00 (n)2 Y = 0
r2 (n)2 = 0
= r1,2 = n
= Yn (y) = cn cosh ny + dn sinh ny.
By superposition,
X
X
u(x, y) = cn cosh ny sin nx + dn sinh ny sin nx.
n=1 n=1
13
Therefore, the right-hand side must represent the Fourier sine series for u(x, 1) = x.
X 2(1)n+1
Fs (x) = sin nx
n
n=1
2(1)n+1
= cn cosh n =
n
2
= cn = (1)n+1 .
n cosh n
Therefore, the solution to the problem is
X 2
u(x, y) = (1)n+1 cosh ny sin nx .
n cosh n
n=1
uxx + uyy = 0,
uy (x, 0) = f1 (x),
uy (x, b) = f2 (x),
ux (0, y) = g1 (y),
ux (a, y) = g2 (y)?
u1xx + u1yy = 0,
u1y (x, 0) = 0,
u1y (x, b) = 0,
u1x (0, y) = g1 (y),
u1x (a, y) = g2 (y),
and u2 solves
u2xx + u2yy = 0,
u2y (x, 0) = f1 (x),
u2y (x, b) = f2 (x),
u2x (0, y) = 0,
u2x (a, y) = 0.
First, solve for u1 (x, y). Write u1 (x, y) = X1 (x)Y1 (y). Then, we have
d2 X1 d2 Y1
Y1 (y) + X1 (x) = 0.
dx2 dy 2
Divide both sides by X1 Y1 to obtain
1 d2 X1 1 d2 Y1
= = .
X1 (x) dx2 Y1 (x) dy 2
14
We need to obtain the boundary conditions, as well.
The eigenvalue problem is similar to one we have seen before, so we know that
0 = 0, Y10 (y) = 1,
n 2 ny
n = , Y1n (y) = cos , n = 1, 2, . . . .
b b
Then, solving for X1 gives us
X10 (x) = c0 + d0 x,
nx nx
X1n (x) = cn cosh + dn sinh .
b b
For each n, then u1n (x, y) is given by
u10 (x, y) = c0 + d0 x,
nx ny nx ny
u1n (x, y) = cn cosh cos + dn sinh cos , n = 1, 2, . . . .
b b b b
By superposition, then
X nx ny X nx ny
u1 (x, y) = c0 + d0 x + cn cosh cos + dn sinh cos .
b b b b
n=1 n=1
Therefore, the series on the right-hand side must be the Fourier cosine series of g1 (y), and
2 b 1 b
Z Z
2c0 = g1 (y) dy = c0 = g1 (y) dy,
b 0 b 0
2 b
Z
ny
cn = g1 (y) cos dy.
b 0 b
X na ny X na ny
g2 (y) = u1x (a, y) = c0 + d0 a + cn cosh cos + dn sinh cos
b b b b
n=1 n=1
X na na ny
= g2 (y) = c0 + d0 a + cn cosh + dn sinh cos .
b b b
n=1
15
The right-hand side must represent the Fourier cosine series of g2 (y), and so
2 b 1 1 b
Z Z
2(c0 + d0 a) = g2 (y) dy = d0 = g2 (y) dy c0
b 0 a b 0
2 b
Z
na na ny
cn cosh + dn sinh = g2 (y) cos dy
b b b 0 b
Z b
1 2 ny na
= dn = g2 (y) cos dy cn cosh .
sinh na
b b 0 b b
where cn and dn , n = 0, 1, . . . are defined as above. Next, we solve for u2 (x, y) using separation of
variables. Let u2 (x, y) = X2 (x)Y2 (y). Then,
d2 X2 d2 Y2
Y2 (y) + X2 (x) = 0.
dx2 dy 2
Divide both sides by X2 Y2 to obtain
1 d2 X2 1 d2 Y2
2
= = .
X2 (x) dx Y2 (x) dy 2
We need to obtain the boundary conditions, as well.
The eigenvalue problem is similar to one we have seen before, so we know that
0 = 0, X20 (x) = 1,
n 2 nx
n = , X2n (y) = cos , n = 1, 2, . . . .
a a
Then, solving for Y2 gives us
Y20 (y) = p0 + q0 y,
ny ny
Y2n (y) = pn cosh + qn sinh .
a a
For each n, then u2n (x, y) is given by
u20 (x, y) = p0 + q0 y,
ny nx ny nx
u2n (x, y) = pn cosh cos + qn sinh cos ,
a a a a
16
and by superposition,
X ny nx X ny nx
u2 (x, y) = p0 + q0 y + pn cosh cos + qn sinh cos .
a a a a
n=1 n=1
Therefore, the right-hand side is the Fourier cosine series of f1 (x). So,
2 a 1 a
Z Z
2p0 = f1 (x) dx = p0 = f1 (x) dx
a 0 a 0
2 a
Z
nx
pn = f1 (x) cos dx.
a 0 a
X nb nx X nb nx
f2 (x) = u2x (x, b) = p0 + q0 b + pn cosh cos + qn sinh cos
a a a a
n=1 n=1
X nb nb nx
= g2 (y) = p0 + q0 b + pn cosh + qn sinh cos .
a a a
n=1
The right-hand side must represent the Fourier cosine series of f2 (x), and so
2 a 1 1 a
Z Z
2(p0 + q0 b) = f2 (x) dx = q0 = f2 (x) dx p0
a 0 b a 0
Z a
nb nb 2 nx
pn cosh + qn sinh = f2 (x) cos dx
a a a 0 a
Z a
1 2 nx nb
= qn = f2 (x) cos dx pn cosh .
sinh nb
a
a 0 a a
17