University of Alberta Math 337 Q1, Introduction to Partial Differential Equations, Winter 2011 Assignment # 2,
Due time: 4:00 pm, Friday July 15 2011
1. Exercises 2.3: 2.3.3. Consider the heat equation ∂u ∂2u = k 2, ∂t ∂x subject to the boundary conditions u(0, t) = 0
and u(L, t) = 0.
Solve the initial value problem if the temperature is initially (a) u(x, 0) = 6 sin 9πx L { 1, 0 < x ≤ L/2, (d) u(x, 0) = 2, L/2 < x < L. Solution. Recall that for the heat equation with zero Dirichlet boundary conditions and initial condition f (x), we have u(x, t) =
∞ ∑
nπ 2
Bn e−( L )
kt
sin
n=1
if u(x, 0) = f (x) =
∞ ∑
Bn sin
n=1
with coefficients 2 Bn = L
∫
L
f (x) sin 0
nπx , L
nπx , L
nπx dx. L
(a) Since u(x, 0) = 6 sin 9πx L , we have B9 = 6 and Bn = 0 for n ̸= 9. Thus, u(x, t) = 6e−(9π/L)
2 kt
sin 9πx L .
(d) Since u(x, 0) =
{
1, 2,
0 < x ≤ L/2, L/2 < x < L,
1
2 L
Bn =
∫
L
u(x, 0) sin
] nπx dx 2 × sin L 0 L/2 [ ] L 2 nπx L/2 2L nπx L − cos | − cos | L nπ L 0 nπ L L/2 2 nπ [1 + cos − 2 cos nπ] nπ 2 2 nπ [1 + cos − 2(−1)n ], nπ 2 2 L
= = = =
[0∫
nπx dx L
L/2
nπx dx + 1 × sin L
∫
L
and so u(x, t) =
∞ ∑
nπ 2
Bn e−( L )
∞
kt
sin
n=1
nπ 2 nπx ∑ 2 nπ nπx = [1 + cos − 2(−1)n ]e−( L ) kt sin . L nπ 2 L
n=1
2. Exercises 2.3 : 2.3.8. Consider ∂2u ∂u = k 2 − αu ∂t ∂x This corresponds to a one-dimensional rod either with heat loss through the lateral sides with outside temperature 0o (α > 0, see Exercise 1.2.4) or with insulated lateral sides with a heat sink proportional to the temperature. Suppose that the boundary conditions are u(0, t) = 0
and u(L, t) = 0.
(a) What are the possible equilibrium temperature distributions if α > 0? (b) Solve the time-dependent problem [u(x, 0) = f (x)] if α > 0. Analyize the temperature for large time (t −→ ∞) and compare to part (a). 2
Solution. (a) Let u(x, t) = u(x). Then the PDE becomes k ddxu2 − αu = 0 and boundary √ √ conditions become u(0) = 0 and u(L) = 0. If α > 0, then u(x) = c1 e α/kx + c2 e− α/kx . √ √ Then u(0) = 0 implies c1 + c2 = 0, and u(L) = 0 implies c1 e α/kL + c2 e− α/kL = 0. Thus, c1 = c2 = 0 and u(x) ≡ 0 is the only equilibrium solution. (b) Method 1. Let u(x, t) = ϕ(x)G(t). Then ϕ(0) = ϕ(L) = 0, and ϕ(x)
dG(t) d2 ϕ(x) = kG(t) − αϕ(x)G(t). dt dx2 2
So, 1 dG(t) α 1 d2 ϕ(x) + = := −λ. kG(t) dt k ϕ(x) dx2 Then we get the following two ODEs: 1. 1 d2 ϕ(x) := −λ, ϕ(x) dx2 which have eigenvalues: λn =
( nπ )2 L
n = 1, 2, 3, · · · ,
,
and eigenfunctions ϕn (x) = sin
nπx , L
n = 1, 2, 3, · · · ;
2. 1 dG(t) α + = −λ, kG(t) dt k which can be solved for each n = 1, 2, 3, · · · , by G(t) = ce−(λn k+α)t . Thus, u(x, t) =
∞ ∑
Bn e−(λn k+α)t sin
n=1
∞
nπ 2 nπx ∑ nπx = Bn e−αt e−( L ) kt sin . L L
n=1
Method 2. Let u(x, t) = e−αt v(x, t). Then v(x, t) = eαt u(x, t). It is easy to see that v(s, t) satisfies
∂v(x, t) ∂t
∂u(x, t) + αeαt u(x, t) ∂t ∂ 2 u(x, t) = eαt (k − αu(x, t) + αu(x, t)) ∂x2 ∂ 2 v(x, t) ∂ 2 eαt u(x, t) ) = k = k( ∂x2 ∂x2 = eαt
and v(0, t) = 0, v(L, t) = 0 and v(x, 0) = u(x, 0) = f (x). Thus, v(x, t) satisfies the heat equation with initial condition f (x) and zero Dirichlet boundary conditions and so v(x, t) =
∞ ∑
nπ 2
Bn e−( L )
n=1
3
kt
sin
nπx L
with Bn =
2 L
∫L 0
f (x) sin nπx L dx. Therefore, we have u(x) = e−αt v(x, t) = e−αt
∞ ∑
nπ Bn e( L )
2
kt
nπx . L
sin
n=1
From this form of u(x, t), we can see that limt−→∞ u(x, t) = 0, that is u(x, t) goes to the equilibrium solution 0 as t goes to ∞. 3. Exercises 2.4: 2.4.1 Solve the heat equation
2
∂u ∂t
= k ∂∂xu2 , 0 < x < L, t > 0, subject to
{
∂u (0, t) = 0 ∂x
t>0
∂u (L, t) = 0 ∂x
t > 0.
0, x < L/2, 1, x > L/2. Solution. Recall that for heat equation with initial condition u(x, 0) = f (x) and zero
(a) u(x, 0) =
Neumann boundary conditions, the solution u(x, t) = A0 +
∞ ∑
nπ 2
An e−( L )
kt
cos
n=1
with coefficients A0 =
1 L
∫L 0
f (x)dx and
∫ 2 L nπx f (x) cos dx, L 0 L { 0, x < L/2, (a) Since u(x, 0) = f (x) = 1, x > L/2. An =
1 A0 = L
∫ 0
nπx L
L
1 f (x)dx = L
(∫
n = 1, 2, 3, · · · .
∫
L/2
L
0dx + 0
) 1dx
= 1/2,
L/2
similarly, 2 An = L Thus,
∫
L
cos L/2
−2 sin nπ nπx 2 L nπx L 2 dx = sin |L/2 = , L L nπ L nπ ∞
n = 1, 2, 3, · · · .
2 1 ∑ −2 sin nπ nπx 2 −( nπ u(x, t) = + e L ) kt cos . 2 nπ L
n=1
4
4. Exercises 2.4: 2.4.2. Solve
∂u ∂t
∂u = k ∂x 2 with
∂u ∂x (0, t)
= 0, u(L, t) = 0, u(x, 0) = f (x). For this problem you may
assume that no solutions of the heat equation exponentially grow in time. You may also guess appropriate orthogonality conditions for the eigenfunctions. Solution. Let u(x, t) = ϕ(x)G(t). By the method of separation of variables, we transfer the PDE into two ODEs: 1.
dG(t) dt
= −λkG(t) which can be soled by G(t) = e−λkt (because we assume that no
solutions of the heat equation exponentially grow in time, we can assume that λ ≥ 0. Otherwise, G(t) will exponentially grow in time); 2.
d2 ϕ(x) dx2
= −λϕ(x) with
d dx ϕ(0)
= 0 and ϕ(L) = 0.
If λ > 0, the general of this second order ODE can be written as √ √ ϕ(x) = c1 cos( λx) + c2 sin( λx). √ d Then dx ϕ(0) = 0 implies c2 = 0 and so ϕ(x) = c1 cos( λx). Then, ϕ(L) = 0 implies √ λL = (2n − 1) π2 for n = 1, 2, 3, · · · . So, for each n = 1, 2, 3, · · · , eigenvalue is ( λn =
(n − 12 )π L
)2
and the corresponding eigenfunction is (( ϕn (x) = cos
) ) n − 12 πx . L
If λ = 0, the general of this second order ODE can be written as ϕ(x) = c1 + c2 x. Then
d dx ϕ(0)
= 0 implies c2 = 0 and ϕ(x) = c1 . Then ϕ(L) = 0 implies c1 = 0, and So,
ϕ(x) ≡ 0 and u(x, t) ≡ 0. Thus λ can not be zero. Therefore,
(
u(x, t) =
∞ ∑
−
cn e
(n− 12 )π L
n=1
5
)2 kt
(
) n − 21 πx cos . L
{ } (n− 21 )πx We can guess the orthogonality of cos , n = 1, 2, 3, · · · , and get L 2 cn = L since
∫
(
L
cos2 0
∫
L
0
(
) n − 21 πx f (x) cos dx L
) 2(n− 12 )πx ∫ L n − 21 πx 1 + cos L L dx = dx = . L 2 2 0
5. Exercises 2.5 : 2.5.1. Solve Laplace’s equation inside a rectangle 0 ≤ x ≤ L, 0 ≤ y ≤ H, with the following boundary conditions: (b)
∂u ∂x (0, y)
= g(y), u(L, y) = 0, u(x, 0) = 0, u(x, H) = 0,
(c)
∂u ∂x (0, y)
= 0, ∂u ∂x (L, y) = g(y), u(x, 0) = 0, u(x, H) = 0,
Solution. (b) Let u(x, y) = h(x)ϕ(y). Then the boundary conditions imply h′ (L) = 0 and ϕ(0) = ϕ(H) = 0. The first ODE is ϕ′′ (y) = −λϕ(y) with boundary conditions ϕ(0) = ϕ(H) = 0. For each n = 1, 2, 3, · · · , eigenvalues are λn =
( nπ )2 H
,
and eigenfunctions are ϕn (y) = sin
nπy . H
For each n = 1, 2, 3, · · · , the second ODE becomes ′′
h (x) =
( nπ )2 H
h(x)
with h′ (L) = 0. The general solution can be written as h(x) = a1 cosh
nπ(x − L) nπ(x − L) + a2 sinh . H H
So, h′ (x) = a1
nπ nπ(x − L) nπ nπ(x − L) sinh + a2 cosh . H H H H 6
Then h′ (L) = 0 implies a2 = 0, and so h(x) = a1 cosh nπ(x−L) . Thus H u(x, y) =
∞ ∑
An cosh
n=1
and
nπy nπ(x − L) sin H H
∞
∑ nπ ∂ nπ(x − L) nπy u(x, y) = An sinh sin . ∂x H H H n=1
So,
∞
∑ ∂ nπ(−L) nπy nπ u(0, y) = g(y) = sinh sin An ∂x H H H n=1
implies, for each n = 1, 2, 3, · · · , ∫
nπ nπ(−L) 2 An sinh = H H H that is, An =
∫
2 nπ sinh
H
g(y) sin 0
H
g(y) sin
nπ(−L) H
0
nπy dy H
nπy dy. H
(c) Let u(x, y) = h(x)ϕ(y). The boundary conditions become h′ (0) = 0, ϕ(0) = ϕ(H) = 0. The first ODE reads ϕ′′ (y) = −λϕ(y) with ϕ(0) = ϕ(H) = 0. Thus, for each n = 1, 2, 3, · · · , eigenvalues are λn =
( nπ )2 H
and eigenfunctions are sin
nπy . H
So, for each n = 1, 2, 3, · · · , the second ODE reads h′′ (x) =
( nπ )2 H
h(x)
with h′ (0) = 0. So, the general solution can be written as h(x) = a1 cosh
nπx nπx + a2 sinh . H H
Then h′ (x) = a1
nπ nπx nπ nπx sinh + a2 cosh H H H H 7
and h′ (0) = 0 implies a2 = 0. So, h(x) = a1 cosh nπx H . Thus, u(x, y) =
∞ ∑
An cosh
n=1
u(L, y) = g(y) =
∞ ∑
nπx nπy sin . H H
An cosh
n=1
nπL nπy sin . H H
So, for each n = 1, 2, 3, · · · , 2 An = H cosh nπL H
∫
H
g(y) sin 0
nπy dy. H
6. Exercises 3.2: 3.2.2 (b)+(d) For the following functions, sketch the Fourier series of f (x) (on the interval −L ≤ x ≤ L) and determine the Fourier coefficients: (b) f (x) = e−x , Solution. (b) For f (x) = e−x , its Fourier series can be sketched as follows: 6
| −5L
| |
| |
x|
x|
y
| | | −L
| | | −3L
| |
| |
x|
x|
| | | L
| | | 3L
Figure 1: Fourier series of f (x)
1 a0 = 2L
∫
L
−L
e−x dx =
1 2 L sinh L [−e−x ]|L [e − e−L ] = . −L = 2L L L
8
| 5L
-
x
1 L
an = = =
1 nπ
e−x cos −x
[e ∫
L
nπx dx L
nπx L sin ]| + L −L
e−x sin
−L
∫
L
−L
L
nπx dx L
e−x d cos
) an =
(
) nπx −x sin e dx L −L
∫
nπx L
) ∫ L −L nπx L nπx −x −x [e cos ] + dx e cos (nπ)2 L −L L −L ) −L ( −L (e − eL ) cos(nπ) + Lan , 2 (nπ)
=
L2 1+ (nπ)2
(
−L (nπ)2
=
(
L
−L
1 nπ
=
so,
∫
L 2L (eL − e−L ) cos(nπ) = (−1)n sinh(L) 2 (nπ) (nπ)2
and an =
2L (−1)n sinh(L). L2 + (nπ)2
Similarly, we can get 1 bn = L
∫ 0
L
e−x sin
nπx 2nπ dx = 2 (−1)n sinh(L). L L + (nπ)2
7. Exercise 3.3: 3.3.2 (b) For the following functions, sketch the Fourier sine series of f (x) and determine its Fourier coefficients. 1, 3, (b) f (x) = 0, Solution.
x < L/6, L/6 < x < L/2. x > L/2
(b) The Fourier sine series can be sketched as follows:
9
y
6
3
| x|
1 |−L
−L/2 |
| | L/6
−L/6 x | -1 | | x | -3
| x | |
| | x | | L/2
| L
-
x
Figure 3: Fourier sine series of f (x)
Bn = = =
2 L
∫
L
f (x) sin 0
nπx dx L
∫ ∫ 2 L/6 2 L/2 nπx nπx dx + dx sin 3 sin L 0 L L L/6 L ( nπ ) ( nπ )] 1 [ 2 − 6 cos + 4 cos . nπ 2 6
8. Exercise 3.3: 3.3.5 (a). For the following functions, sketch the Fourier cosine series of f (x) and determine its Fourier coefficients: (a) f (x) = x2 . Solution. A0 =
L2 , 3
An =
4L2 (−1)n . (nπ)2
The Fourier cosine series of f (x) can be sketched as follows:
10
6 y
− L2
| −3L
| −2L
| −L
|
L
Figure 4: Fourier cosine series of f (x)
11
| 2L
| 3L
-
x