Professional Documents
Culture Documents
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
4
5
5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
7
9
10
11
12
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
15
17
19
21
23
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
25
25
27
29
32
33
35
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
39
39
41
44
47
49
7 Waves
7.1 The homogeneous wave equation without boundaries
7.2 Fourier series methods for the wave equation . . . .
7.3 Finite element methods for the wave equation . . . .
7.4 Resonance . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
53
53
54
57
58
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
CONTENTS
7.5
61
63
63
65
67
9 Greens Functions
9.1 Greens functions for BVPs in ODEs: Special cases . . . .
9.2 Greens functions for BVPs in ODEs: the symmetric case
9.3 Greens functions for BVPs in ODEs: the general case . .
9.4 Introduction to Greens functions for IVPs . . . . . . . . .
9.5 Greens functions for the heat equation . . . . . . . . . . .
9.6 Greens functions for the wave equation . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
71
71
72
75
76
79
80
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
83
83
84
85
85
86
88
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
89
89
90
94
96
100
102
107
109
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
111
111
113
116
116
117
117
119
. . . . .
. . . . .
methods
. . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
121
121
122
124
124
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . .
. . . . . . . .
Fourier series
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
Chapter 1
3.
5.
(a) No.
(b) Yes.
(c) No.
Chapter 2
1. The units of are energy per length per time per temperature, for example, J/(cm s K) = W/(cm K).
3. The units of Acux are
g J
Kcm = J.
cm2
cm3 g K
r
5. u
(`, t) = A
, t > t0 .
x
7. Measuring x in centimeters, the steady-state temperature distribution is u(x) = 0.1x + 20, the solution of
d2 u
= 0, u(0) = 20, u(100) = 30.
dx2
du
(x) = 0.802 0.1 = 0.0802 W/cm2 .
dx
.
Since the area of the bars cross-section is cm2 , the rate at which energy is flowing through the bar is 0.0802 =
0.252 W (in the negative direction).
9. Consider the right endpoint (x = `). Let the temperature of the bath be u` , so that the difference in temperature
between the bath and the end of the bar is u(`, t) u` . The heat flux at x = ` is, according to Fouriers law,
u
(`, t),
x
so the statement that the heat flux is proportional to the temperature flow is written
u
(`, t) = (u(`, t) u` ) ,
x
where > 0 is a constant of proportionality. This can be simplified to
u(`, t) +
u
(`, t) = u` .
x
2.2
1. The sum of the forces on the cross-section originally at x = ` must be zero. As derived in the text, the internal
(elastic) force acting on this cross-section is
du
Ak(`) (`),
dx
while the external traction results in a total force of pA (force per unit area times area). Therefore, we obtain
Ak(`)
du
(`) + pA = 0,
dx
or
k(`)
3.
du
(`) = p.
dx
d2 u
= 0, 0 < x < 1,
dx2
u(0) = 0,
9 du
(1) = 109 .
195 10
dx
It is easy to show by direct integration that the solution is u(x) = x/195, and therefore u(1) = 1/195. Since
u is the displacement (in meters), the final position of the end of the bar is 1 + 1/195 m, that is, the stretched
bar is 196/195 m.
5. The wave equation is
2
2u
11 u
7.9 103
1.95
10
= f (x, t), 0 < x < 1.
t2
x2
3
The units of f are N/m (force per unit volume). The units of the first term on the left are
195 109
kgm/s2
kg m
N
=
= 3,
3
2
m s
m3
m
and the units of the second term on the left are
N 1
N
= 3.
m2 m
m
7.
(a) We have
2u
(x, t) = c2 2 u(x, t),
t2
while
2u
(x, t) = 2 u(x, t).
x2
Therefore,
2
2u
2 u
c
= c2 2 u + c2 2 u = 0.
t2
x2
(b) Regardless of the value of , u(0, t) = 0 holds for all t. The only way that u(`, t) = 0 can hold for all t is if
sin (`) = 0,
so must be one of the values
=
n
, n = 0, 1, 2, . . . .
`
2.3
u
(`, t).
x
(2.1)
If this end can move freely in the vertical direction, force balance implies that (2.1) must be zero.
7. If u(x, t) = f (x ct), then
v
(x, t)=f 0 (x ct),
x
v
(x, t)= cf 0 (x ct),
t
2v
(x, t)=f 00 (x ct),
x2
2v
(x, t)=c2 f 00 (x ct),
t2
Therefore,
2u
2u
(x, t) c2 2 (x, t) = c2 f 00 (x ct) c2 f 00 (x ct) = 0,
2
t
x
as desired. Similarly, if v(x, t) = f (x + ct), then
v
(x, t)=f 0 (x + ct),
x
v
(x, t)=cf 0 (x + ct),
t
and hence
2.4
2v
(x, t)=f 00 (x + ct),
x2
2v
(x, t)=c2 f 00 (x + ct),
t2
2
2v
2 v
(x,
t)
c
(x, t) = c2 f 00 (x + ct) c2 f 00 (x + ct) = 0.
t2
x2
1. The solution u of
u
u
+c
= 0, 0 < x < `, t > 0,
t
x
u(x, 0) = u0 (x), 0 < x < `,
u(0, t) = (t), t > 0.
can be found by reasoning similar to that used to solve the pure IVP (see (2.23) and following in the text). The
cross-section at point x at time t was ct units to the left at time t = 0. If x ct > 0, then the value of u(x, t)
is given by the initial condition: u(x, t) = u0 (x ct). If x ct < 0, then u(x, t) is determined by the boundary
condition u(0, t) = (t), and we must ask: At what time was the cross-section, now at point x at time t, found at
x = 0? The answer is t0 , where c(t t0 ) = x, that is, t0 = t (1/c)x. Thus u(x, t) = (t (1/c)x) if x ct < 0.
It is easy to verify by a direct calculuation that
u0 (x ct),
x ct > 0,
u(x, t) =
t 1c x , x ct < 0
solves the given IBVP.
3. Suppose u solves
u
u
+c
= 0, < x < , t > 0,
t
x
u(x, 0) = (x), < x < ,
where c > 0, and suppose that (x) = 0 for all x a. The solution is u(x, t) = (x ct), so u(x, t) = 0 if
x ct a, that is, if t > (x a)/c.
Chapter 3
1. A function of the form f (x) = ax + b is linear if and only if b = 0. Indeed, if f : R R is linear, then f (x) = ax,
where a = f (1).
3. Let f : R2 R2 be defined by
f (x) =
x21 + x22
x2 x21
If we take x = (1, 1), then f (x) = (2, 0), while 2x = (2, 2) and hence f (2x) = (8, 2) 6= 2f (x). Thus f is not
linear.
5.
du
du
+ (2u)3 = 2
+ 8u3 ,
dx
dx
while
2Lu = 2
du
+ 2u3 .
dx
du
d2 u
2x
+ 3u.
dx2
dx
Then K is linear:
d2
d
(u) 2x (u) + 3(u)
dx2
dx
du
d2 u
= x2 2 2x
+ 3u
dx
dx
d2 u
du
= x2 2 2x
+ 3u = Ku,
dx
dx
K(u) = x2
d2
d
(u + v) 2x (u + v) + 3(u + v)
dx2
dx
2
d u
d2 v
du
dv
= x2
+
2x
+
+ 3(u + v)
dx2
dx2
dx
dx
d2 u
du
d2 v
dv
= x2 2 2x
+ 3u + x2 2 2x
+ 3v = Ku + Kv.
dx
dx
dx
dx
K(u + v) = x2
u
2u
2.
t
x
L(u + v) = c
13.
2
u
2u
u
2u
(u) 2 (u) = c
2 = c
2 = Lu,
t
x
t
x
t
x
2
2
u
v
u
2v
(u + v) 2 (u + v) = c
+
+
t
x
t
t
x2
x2
2
u
u
2v
v
= c
2 + c
2 = Lu + Lv.
t
x
t
x
A(x + z)
=
=
=
=
=
=
x1
z1
+
x2
z2
a11 a12
x1 + z1
a21 a22
x2 + z2
a11 (x1 + z1 ) + a12 (x2 + z2 )
a21 (x1 + z1 ) + a22 (x2 + z2 )
(a11 x1 + a12 x2 ) + (a11 z1 + a12 z2 )
(a21 x1 + a22 x2 ) + (a21 z1 + a22 z2 )
a11 x1 + a12 x2
a11 z1 + a12 z2
+
a21 x1 + a22 x2
a21 z1 + a22 z2
a11
a21
a12
a22
Ax + Az.
n
X
aij (xj + yj )
j=1
and
(Ax + Ay)i =
aij xj +
j=1
n
X
aij yj .
j=1
Now,
(A(x + y))i
n
X
aij (xj + yj )
j=1
n
X
(aij xj + aij yj )
j=1
n
X
aij xj +
j=1
n
X
j=1
n
X
aij yj
j=1
aij xj +
n
X
aij yj
j=1
(Ax + Ay)i ,
as desired. The third equality follows from the commutative and associative properties of addition, while
the fourth equality follows from the distributive property of multiplication over addition.
3.2
1. The range of A is
{(1, 1) : R} ,
which is a line in the plane. See Figure 3.1.
3
x2
3
3
0
x
(a) A is nonsingular.
(b) A is nonsingular.
(c) A is singular. Every vector in the range is of the form
1 1
x1
Ax =
1 1
x2
x1 + x2
=
.
x1 + x2
That is, every y R2 whose first and second components are equal lies in the range of A. Thus, for example,
Ax = b is solvable for
1
b=
,
1
but not for
1
b=
.
2
5. The solution set is not a subspace, since it cannot contain the zero vector (A0 = 0 6= b).
7. The null space of L is the set of all first-degree polynomials:
N (L) = {u : [a, b] R : u(x) = mx + c for some m, c R} .
9.
d2 u
(x) = f (x), a < x < b.
dx2
Integrating once yields, by the fundamental theorem of calculus,
Z x 2
Z x
d u
(s)
ds
=
f (s) ds
2
a dx
a
Z
x
du
du
(x) +
(a) =
f (s) ds
dx
dx
a
Z x
du
(x) =
f (s) ds.
dx
a
10
(z) dz =
f (s) ds dz
x dx
x
a
Z bZ z
u(b) u(x) =
f (s) ds dz
Z aZ z x a
f (s) ds dz.
u(x) =
x
Z
u(x) =
f (s) ds
a
is another solution.
3.3
1.
3. The given set is not a basis. If A is the matrix whose columns are the given vectors, then N (A) is not trivial.
5. There is a typo in the problem statement; the given polynomials are linearly independent:
c1 (1 x + 2x2 ) + c2 (1 2x2 ) + c3 (1 3x + 7x2 ) = 0
(c1 + c2 + c3 ) + (c1 3c3 )x + (2c1 2c2 + 7c3 )x2 = 0
c1 + c2 + c3
c1 3c3
2c1 2c2 + 7c3
= 0,
= 0,
= 0.
A direct calculation (using Gaussian elimination) shows that this last system of equations has only the trivial
solution, and hence the three polynomials form a linearly independent set.
7. We know that P2 has dimension 3, and therefore it suffices to show either that the given set of three vectors spans
P2 or that it is linearly independent. If p P2 , then we write
c1 = p(x1 ), c3 = p(x3 ), c3 = p(x3 )
and define the polynomial
q(x) = c1 L1 (x) + c2 L2 (x) + c3 L3 (x).
Then
q(x1 ) = c1 L1 (x1 ) + c2 L2 (x1 ) + c3 L3 (x1 ) = c1 1 + c2 0 + c3 0 = c1 = p(x1 ),
and, similarly, q(x2 ) = p(x2 ), q(x3 ) = p(x3 ). But then p and q are second-degree polynomials that agree at three
distinct points, and three points determine a quadratic (just as two points determine a line). Therefore,
p(x) = c1 L1 (x) + c2 L2 (x) + c3 L3 (x),
and we have shown that every p P2 can be written as a linear combination of L1 , L2 , L3 . This completes the
proof.
11
2
9. Let L : CN
[a, b] C[a, b] be the second derivative operator. We wish to find a basis for the null space of L. A
2
function u CN
[a, b] belongs to the null space of L if and only if it satisfies
du
d2 u
du
(0) =
(`) = 0.
(x) = 0 for all x [a, b],
dx2
dx
dx
The only functions satisfying the differential equation are first-degree polynomials, u(x) = mx + c. Moreover, the
boundary conditions are satisfied if and only if the slope m is zero. Thus u belongs to the null space of L if and
only if u(x) = c for some c R, that is, if and only if u is a constant function. A basis is therefore the set {u1 },
where u1 (x) = 1 for all x [a, b].
3.4
1.
=
=
v1 v2
=
=
1 1
1 1
1 1
+ +
3 3
3 3
3 3
1
1
1
+ + = 1,
3
3
3
1 1
1
1
+ 0+
3 2
3
3
1
1
= 0,
6
6
and so forth.
(b)
x
=
=
3. We have
kx + yk2
(x + y, x + y)
(x, x + y) + (y, x + y)
Therefore,
kx + yk2 = kxk2 + kyk2
if and only if (x, y) = 0.
5. First of all, if
(y, z) = 0 for all z W,
then since wi W for each i, we have, in particular,
(y, wi ) = 0, i = 1, 2, . . . , n.
Suppose, on the other hand, that
(y, wi ) = 0, i = 1, 2, . . . , n.
If z is any vector in W , then, since {w1 , w2 , . . . , wn } is a basis for W , there exist scalars 1 , 2 , . . . , n such that
z=
n
X
i=1
i wi .
12
y,
n
X
!
i wi
i=1
n
X
i=1
n
X
i (y, wi )
i 0
i=1
0.
4
3.5
3
2.5
2
1
1.5
2
x
2.5
Figure 3.2: The data from Exercise 3.4.7 and the best linear approximation.
9. The projection of g onto P2 is
or
2 5( 2 12)
2
q1 (x) + 0q2 (x) +
q3 (x)
3
10( 2 12)
2
2 12
2 12 2
+
60
x + 60
x .
3
3
0.5
y=sin( x)
quadratic approx.
0.5
0
0.2
0.4
0.6
0.8
Figure 3.3: The function g(x) = sin (x) and its best quadratic approximation over the interval [0, 1] (see
Exercise 3.4.9).
3.5
1. The eigenvalues of A are 1 = 200 and 2 = 100, and the corresponding (normalized) eigenvectors are
0.8
0.6
u1 =
, u2 =
,
0.6
0.8
13
b u2
b u1
u1 +
u2 =
1
2
1
1
u1 =
3
1
3
1
3
, u2 =
0
, u3 =
12
1
6
26
1
6
3/2
b u1
b u2
b u3
x=
u1 +
u2 +
u3 = 1/2 .
1
2
3
5/2
5. The computation of ui b/i costs 2n operations, so computing all n of these ratios costs 2n2 operations.
Computing the linear combination is then equivalent to another n dot products, so the total cost is
2n2 + n (2n 1) = 4n2 n = O(4n2 ).
7.
1
(j)
Ls(j) = 2 (2 2 cos (jh)) sk , k = 2, 3, . . . , n 1.
h
k
Similar calculations show that this formula holds for k = 1 and k = n also. Therefore, s(j) is an eigenvector
of L with eigenvalue
2 2 cos (jh)
.
j =
h2
(b) The eigenvalues j are all positive and are increasing with the frequency j.
(c) The right-hand side b can be expressed as
b = s(1) b s(1) + s(2) b s(2) + + s(n) b s(n) ,
while the solution x of Lx = b is
x=
Since j increases with j, this shows that, in producing x, the higher frequency components of b are
dampened more than are the lower frequency components of b. Thus x is smoother than b.
Chapter 4
Background
1. Define
x1 = u, x2 =
du
.
dt
Then
dx1
dt
dx2
dt
3. Define
x1 = u, x2 =
x2 ,
1
x1 .
2
du
d2 u
d3 u
, x3 = 2 , x4 = 3 .
dt
dt
dt
Then
dx1
dt
dx2
dt
dx3
dt
dx4
dt
x2 ,
x3 ,
x4 ,
2x3 x1 + sin t.
5. Define
dp
dq
, x3 = q, x4 =
.
dt
dt
x1 = p, x2 =
Then the first-order system is
dx1
dt
dx2
m1
dt
dx3
dt
dx4
m2
dt
x2 ,
f1 (x1 , x3 , x2 , x4 ),
x4 ,
f2 (x1 , x3 , x2 , x4 ).
15
16
u1 (t)
W (t) = du1
(t)
dt
e2t
= e3t .
2e2t
(a) Let u1 , u2 be two functions defined on an interval, let t0 be a point in that interval, and suppose
u1 (t0 )
du
1
(t0 )
dt
u2 (t0 )
6 0.
=
du2
(t0 )
dt
We wish to prove that {u1 , u2 } is linearly independent. We argue by contradiction, and suppose {u1 , u2 } is
linearly dependent. Then there exist c1 , c2 R such that c1 u1 +c2 u2 = 0. This means that c1 u1 (t)+c2 u2 (t) =
1
2
0 for all t in the given interval, which in turn implies that c1 du
(t) + c2 du
(t) = 0 for all t. But then, taking
dt
dt
t = t0 , we obtain
c1 u1 (t0 ) + c2 u2 (t0 ) = 0,
du2
du1
(t0 ) + c2
(t0 ) = 0.
c1
dt
dt
In matrix-vector form, this system is
u1 (t0 )
du1
(t0 )
dt
u2 (t0 )
du2
(t0 )
dt
c1
c2
=
0
0
.
u1 (t0 )
du1
(t0 )
dt
u2 (t0 )
du2
(t0 )
dt
is singular, contradicting the assumption that its determinant is nonzero. This contradiction completes the
proof.
(b) Let u1 (t) = cos (t), u2 (t) = cos (2t). Then
u1 (t)
du
1
(t)
dt
u2 (t)
du2
(t)
dt
cos (t)
=
sin (t)
cos (2t)
= cos (2t) sin (t) 2 cos (t) sin (2t).
2 sin (2t)
We see that W (/2) = 1 6= 0, and hence, by part (a), {u1 , u2 } is linearly independent. Nevertheless,
W (0) = 0, which shows that the fact that {u1 , u2 } is linearly independent does not imply that W (t) 6= 0 for
all t, unless u1 and u2 are both solutions to the same second-order linear differential equation.
4.2
1.
17
d2 w
dw
+ cw
+b
dt2
dt
=
=
=
=
d2
d
[u + v] + b [u + v] + c(u + v)
dt2
dt
2
dv
d u
d2 v
du
+
a 2 + 2 +b
+ c(u + v)
dt
dt
dt
dt
2
2
d u
du
d v
dv
a 2 +b
+ cu + a 2 + b
+ cv
dt
dt
dt
dt
0 + 0 = 0.
a
aeat
t0
Z
=
a
t0
Therefore, with
u(t) = u0 ea(tt0 ) +
we have
du
(t)
dt
au0 ea(tt0 ) + a
au(t) + f (t).
18
1
2
11. u(t) =
1
2
13.
sin2 (t)
et + cos (t) + sin (t)
/2
du
d2 u
+b
+ cu = f (t),
dt2
dt
where u1 , u2 are solutions of the homogeneous version of this ODE, and assume that
dc1
dc2
u1 +
u2 = 0.
dt
dt
We then have
du1
du2
du
= c1
+ c2
,
dt
dt
dt
d2 u
d 2 u1
d 2 u2
dc2 du2
dc1 du1
+
.
= c1 2 + c2 2 +
2
dt
dt
dt
dt dt
dt dt
Substituting into the ODE, we obtain
d 2 u2
du1
du2
d 2 u1
dc1 du1
dc2 du2
+
+ b c1
+ c2
+ c(c1 u1 + c2 u2 ) = f (t)
a c1 2 + c2 2 +
dt
dt
dt dt
dt dt
dt
dt
2
2
dc1 du1
d u1
d u2
dc2 du2
du1
du2
c1 a 2 + b
+ cu1 + c2 a 2 + b
+ cu2 + a
+
= f (t)
dt
dt
dt
dt
dt dt
dt dt
dc2 du2
dc1 du1
+
= f (t)
a
dt dt
dt dt
dc2 du2
dc1 du1
+
= a1 f (t),
dt dt
dt dt
as desired. Notice that we have used the fact that u1 , u2 solve the homogenous ODE:
a
d 2 u1
du1
d 2 u2
du2
+b
+ cu1 = 0, a 2 + b
+ cu2 = 0.
2
dt
dt
dt
dt
17. Let us define v(s) = u(es ); then u(t) = v(ln (t)). It follows that
1 d2 v
1 dv
du
1 dv
d2 u
(t) =
(ln (t)),
(t) = 2 2 (ln (t)) 2
(ln (t)).
2
dt
t ds
dt
t ds
t ds
It follows that
du
d2 u
(t) + at (t) + bu(t) = 0
dt2
dt
d2 v
dv
dv
2 (ln (t))
(ln (t)) + a (ln (t)) + bv(ln (t)) = 0
ds
ds
ds
d2 v
dv
2 (ln (t)) + (a 1) (ln (t)) + bv(ln (t)) = 0
ds
ds
d2 v
dv
2 (s) + (a 1) (s) + bv(s) = 0.
ds
ds
t2
Thus the change of variables t = es transforms the Euler equation into a constant coefficient ODE.
4.3
19
1. The solution is
x(t)
1
1
u1 et u2 +
3
2
1
1 t
e
+ 16 e2t
3
2
1
13 e2t
1
3
1
e2t u3
6
+ 12 et + 16 e2t
c1 et + c2 et
c1 et c2 et
.
9.
(b) If the initial populations are x(0) = r, y(0) = s, then the solution to the IVP is
x(t) =
1
1
(r + s)et + (r s)e3t , y(t) =
(r + s)et + (s r)e3t .
2
2
Therefore, if r = s, both populations decay to zero exponentially; that is, both species die out.
11. Assume v(t; s) satisfies
d2 v
dv
(0; s) = 0
+ 2 v = 0, v(0; s) = 0,
dt2
dt
for all s, and define
t
v(t s; s) ds.
u(t) =
0
Then
du
(t) = v(0; t) +
dt
dv
d2 u
(t) =
(0; t) +
dt2
dt
(using the fact that v(0; t) = 0 and
Z
0
dv
(t s; s) ds =
dt
t
Z
0
dv
(t s; s) ds,
dt
Z t 2
d2 v
d v
(t
s;
s)
ds
=
f
(t)
+
(t s; s) ds
2
dt2
0 dt
0
dv
(0; t)
dt
s;
s)
+
v(t
s;
s)
ds
dt2
0
= f (t)
since
d2 v
(t s; s) + 2 v(t s; s) = 0 for all s.
dt2
Also,
Z 0
du
dv
(t) =
(t s; s) ds = 0,
dt
0
0 dt
and thus u satisfies both the differential equations and the initial conditions.
Z
u(t) =
v(t s; s) ds = 0,
20
u(s) = 0,
Define
v(t; s) ds.
u(t) =
0
Then
Z t
Z t
dv
dv
du
(t) = v(t; t) +
(t; s) ds =
(t; s) ds
dt
dt
0
0 dt
(since v(t; t) = 0 for all t). Similarly,
Z t 2
Z t 2
d v
d2 u
dv
d v
(t;
t)
+
(t)
=
(t;
s)
ds
=
(t; s) ds,
2
2
dt2
dt
dt
0
0 dt
..
.
Z t k1
Z t k1
dk1 u
dk2 v
d
v
d
v
(t)
=
(t;
t)
+
(t;
s)
ds
=
(t; s) ds
k1
k1
dtk1
dtk2
dt
dt
0
0
and finally
dk u
dk1 v
(t)
=
(t; t) +
dtk
dtk1
Z
0
dk v
(t; s) ds = f (t) +
dtk
Z
0
dk v
(t; s) ds.
dtk
+
a
(t)
(t;
s)
+
a
(t)v(t;
s)
ds
1
0
k1
dtk
dtk1
dt
0
=f (t),
since
dk1 v
dv
dk v
(t; s) + ak1 (t) k1 (t; s) + + a1 (t) (t; s) + a0 (t)v(t; s) = 0
k
dt
dt
dt
by assumption. Also,
dj u
(0) =
dtj
Z
0
dj v
(t; s) ds = 0, j = 0, 1, . . . , k 1.
dtj
Z
v(t s; s) ds =
u(t) =
0
e(ts) e2(ts) f (s) ds.
4.4
1.
21
3.
u2 ,
u1 + 2u4
u4 ,
2u2 + u3
2 (u1 + 1 )
1 (u1 2 )
,
r1 (u1 , u3 )3
r2 (u1 , u3 )3
2 u 3
1 u 3
.
r1 (u1 , u3 )3
r2 (u1 , u3 )3
(b) The routine ode45 from MATLAB (version 5.3) required 421 steps to produce a graph with the ending
point apparently coinciding with the initial value. The graph of y(t) versus x(t) is given in Figure 4.1. The
graphs of x(t) and y(t), together with the times steps, are given in Figure 4.2. They show, not surprisingly,
that the time step is forced to be small precisely when the coordinates are changing rapidly.
1
0.8
0.6
0.4
0.2
0
0.2
0.4
0.6
0.8
1
1.5
0.5
0
x
0.5
1.5
x(t)
2
0
y(t)
2
0
1
3
4
Step index
1
0
0.15
Time step
3
t
0.1
0.05
0
0
Figure 4.2: The coordinates of the satellite in Exercise 4.4.3 (top two graphs) with the step lengths taken
(bottom graph).
(c) The minimum step size taken by ode45 was 3.28 104 , and using this step length over the entire interval
of [0, T ] would require almost 19000 steps. This is to be compared to the 421 steps taken by the adaptive
algorithm. (Note: The exact results for minimum step size, etc., will differ according to the algorithm and
tolerances used.)
22
(a) We first note that a + (t1 t0 ) t b + (t1 t0 ) if and only if a t (t1 t0 ) b, so the function v is
well-defined. In fact,
{v(t) : t [a + (t1 t0 ), b + (t1 t0 )]}
=
d
[u(t (t1 t0 ))]
dt
du
(t (t1 t0 ))
dt
f (u(t (t1 t0 )))
f (v(t)),
=
=
t,
1,
t,
1
(t 1)2 + 1.
2
2 2et ,
1 t
e,
2
0 < t < ln 2,
t > ln 2.
Error
2.4332e-05
1.3697e-06
8.1251e-08
4.9475e-09
3.0522e-10
1.8952e-11
By inspection, we see that as t is cut in half, the error is reduced by a factor of approximately 16, as
expected for O(t4 ) convergence.
(b) The following errors were obtained at t = 2.0:
23
t
1/4
1/8
1/16
1/32
1/64
1/128
Error
5.0774e-03
3.2345e-03
3.1896e-04
1.0063e-04
8.9026e-06
3.4808e-06
The error definitely does not exhibit O(t4 ) convergence to zero. The reason is the lack of smoothness
of the function 1 + |x 1|; the rate of convergence given in the text only applies to ODEs defined by
smooth functions. When integrating from t = 0 to t = 0.5, the nonsmoothness of the right-hand side is not
encountered since x(t) < 1 on this interval. This explains why we observed good convergence in the first
part of this problem.
4.5
1.
1
2
et + et
et et
.
= y1 + t(Au1 ) xi
(i+1)
= y1 + t1 u1 xi
(i+1)
= y1 + t1 y1
y1
y1
y1
(i+1)
y1
(i)
(i)
(i)
= (1 +
(i)
(i)
t1 )y1 .
y2
(i)
= (1 + t2 )y2 .
1,
|1 + t2 |
1.
Since the eigenvalues of A are 1, 100, it is not hard to see that the upper bound for t is t 0.02, just
as was determined by experiment.
(d) For the backward Euler method, a similar calculation shows that
y1
(i+1)
(1 t1 )1 y1 ,
(i+1)
y2
(1 t2 )1 y2 .
(i)
(i)
Chapter 5
du
(x) = f (x), 0 < x < ` and u(0) = 0,
dx
which imply that
x
Z
u(x) =
f (s) ds.
0
f (s) ds = 0.
0
If f C[0, `] does not satisfy this condition, then it is impossible for MD u = f to have a solution.
3.
(a) If v, w S are both solutions of Lu = f , then Lv = Lw, or (by linearity) L(v w) = 0. Therefore
v w N (L). But, since S is a subspace, v w is also in S. If the only function in both N (L) and S is the
zero function, then v w must be the zero function, that is, v and w must be the same function. Therefore,
if N (L) S = {0}, then Lu = f can have at most one solution for any f .
(b) We have already seen that Lu = f has a solution for any f C[0, `] (see the discussion immediately preceding
Example 5.1). We will use the result from the first part of this exercise to show that the solution is unique.
The null space of L is the space of all first degree polynomials:
N (L) = {u : [0, `] R : u(x) = ax + b for some a, b R} .
i. Suppose u N (L) S. Then u(x) = ax + b for some a, b R and
du
dx
`
= 0 a = 0.
2
u(x) dx = 0 b` = 0 b = 0.
0
Therefore u is the zero function, and so N (L) S = {0}. The uniqueness property then follows from
the first part of this exercise.
25
26
Z
0
du
(x)
dx
2
dx = 0
(5.1)
implies that du/dx is zero, and hence that u is constant. The boundary conditions on u would then imply that
u is the zero function. But, by assumption, u is nonzero (we assumed that (u, u) = 1). Therefore, (5.1) cannot
hold.
7.
(a) If Lm
u = 0, then u has the form u(x) = ax + b. The first boundary condition, du/dx(0) = 0, implies that
a = 0, and then the second boundary condition, u(`) = 0, yields b = 0. Therefore, u is the zero function
and N (Lm
) is trivial.
(b) For any f C[0, `], the function
Z
u(x) =
f (s) ds dz
x
2
belongs to Cm
[0, `] and satisfies
d2 u
(x) = f (x), 0 < x < `.
dx2
This shows that Lm
u = f has a solution for any f C[0, `], and therefore R(Lm
) = C[0, `].
2
(c) Suppose u, v Cm
[0, `]. Then
=
=
=
=
=
=
d2 u
(x)v(x) dx
2
0 dx
` Z `
du
dv
du
(x)v(x) +
(x) (x) dx
dx
dx
dx
0
0
Z `
du
dv
(x) (x) dx (since v(`) = 0, du/dx(0) = 0)
dx
0 dx
` Z `
d2 v
dv
u(x) 2 (x) dx
u(x) (x)
dx
dx
0
0
Z `
2
d v
(Lm
u, v)
Thus Lm
is symmetric.
(d) Suppose is an eigenvalue of Lm
with corresponding eigenfunction u, and assume that u has been normalized
so that (u, u) = 1. Then
= (u, u) = (u, u)
=
=
=
=
>
(Lm
u, u)
Z ` 2
d u
(x)u(x) dx
2
0 dx
` Z `
2
du
du
(x)u(x) +
(x)
dx
dx
dx
0
0
Z `
2
du
(x)
dx (since u(`) = 0, du/dx(0) = 0)
dx
0
0.
2
The last step follows because every nonzero function in Cm
[0, `] has a nonzero derivative.
27
9. Define u(x) = x(1 x), v(x) = x2 (1 x). Then a direct calculation shows that
(M u, v) =
7
,
30
(u, M v) =
4
.
15
but
11.
2
(a) Suppose u, v CR
[0, `]. Then
`
d2 u
(x)v(x) dx
2
0 dx
`
Z `
du
dv
du
(x) (x) dx
(x)v(x) +
dx
dx
0 dx
0
`
`
Z `
du
dv
d2 v
(x)v(x) + u(x) (x)
u(x) 2 (x) dx
dx
dx
dx
0
0
0
du
du
dv
(`)v(`) + (0)v(0) + u(`) (`)
dx
dx
dx
dv
u(0) (0) + (u, LR v).
dx
Z
(LR u, v)
=
=
=
=
0,
(` + )a + b
0.
= (2 + `) < 0.
5.2
1. If n 6= m, then
`
Z
(un , um )
nx
sin
mx
dx
`
`
(n + m)x
(n m)x
cos
dx
cos
`
`
0
`
(n m)x
(n + m)x
`
`
sin
sin
.
(n m)
`
(n + m)
`
0
sin
1
2
1
2
`
This last expression simplifies to four terms, each including the sine function evaluated at an integer multiple of
, and hence each equal to zero. Thus (un , um ) = 0 for n 6= m.
3. The eigenpairs are
(2n 1)2 2
, cos
4`2
(2n 1)x
, n = 1, 2, 3, . . . .
2`
28
1 + 21 4
1 21 4
, r2 =
.
r1 =
2
2
(5.2)
Case 1: = 21/4. In this case, the characteristic roots are r = 1/2, 1/2 and the general solution of the ODE is
u(x) = c1 ex/2 + c2 xex/2 .
The boundary condition u(0) = 0 yields c1 = 0, and then the boundary condition u(1) = 1 implies that c2 = 0.
Thus there is no nonzero solution to the BVP, and = 21/4 is not an eigenvalue.
Case 2: < 21/4. In this case, the characteristic roots, given by (5.2), are real and distinct. The general solution
of the ODE is
u(x) = c1 er1 x + c2 er2 x .
The boundary conditions lead to the system
c1 + c2
0,
c1 r1 er1 + c2 r2 er2
0.
This system has the unique solution c1 = c2 = 0, so there is no nonzero solution for < 21/4. Hence no < 21/4
is an eigenvalue.
Case 3: > 21/4. In this case, the roots are complex conjugate:
1
4 21
1
r1 = i, r2 = + i, =
.
2
2
2
The general solution of the ODE is
u(x) = (c1 cos (x) + c2 sin (x)) ex/2 .
The boundary condition u(0) = 0 yields c1 = 0, so any eigenfunction is of the form
u(x) = sin (x)ex/2 .
The Neumann condition at x = 1 is equivalent to the equation
tan () = 2, > 0.
Although this equation cannot be solved explicitly, a simple graph shows that there are infinitely many solutions
0 < 1 < 2 < , with
2k 1 2k + 1
k
,
, k = 1, 2, . . . .
2
2
Define k by
4k 21
k =
,
2
that is,
21
k = k2 +
, k = 1, 2, . . . .
4
Then k , k = 1, 2, . . ., are eigenvalues, and the corresponding eigenfunctions are
vk (x) = sin (k x)ex/2 .
Using Newtons method, we find that
which yields
.
.
1 = 1.8366, 2 = 4.8158,
.
.
1 = 8.6231, 2 = 28.4423.
(a)
2(1)n+1
n
sin (nx)
(b)
4 sin n
2
n2 2
sin (nx)
(c)
n=1
n=1
n+1
n=1
12(1)
n3 3
29
sin (nx)
720(1)n+1
n=1
n5 5
(d)
sin (nx)
The errors in approximating the original functions using 10 terms of the Fourier sine series are graphed in Figure
5.1.
1
0.03
0.02
0.5
0.01
0
0
0.5
0
0.5
x
0.01
0
1.5
0.5
x
0.5
x
x 10
x 10
1
0.5
0
0
0.5
1
0
0.5
x
5
0
an cos
n=1
(2n 1)x
,
2
where
n
(2n1))
(a) an = 4(2+(1)
;
2 (2n1)2
(b) an =
(c) an =
8(24+12(1)n (2n1)+(2n1)2 2 )
4 (2n1)4
(d) an =
The errors in approximating the original functions using 10 terms of the Fourier quarter-wave cosine series are
graphed in Figure 5.2.
5.3
1.
n=1
2(1(1)n )
n3 3
sin (nx)
n
3.
)
(b) x + n=1 2(1(1)
sin (nx)
n3 3
P 32(1)n+1
(2n1)x
(a)
n=1 (2n1)4 4 sin
2
(b) 1 +
(c)
n=1
2(1(1)n )
n=1 n (2+n2 2 )
(2n1)4 4
sin (nx)
cos
(2n1)x
2
30
0.04
0.02
0.5
0
0
0.02
0.5
0
0.5
x
0.01
0.04
0
0.5
x
0.5
x
0.05
0.01
0.05
0.02
0.1
0.03
0
0.5
x
0.15
0
(d) x +
2(1)n
n=1 n (1+n2 2 )
sin (nx)
5. We have
d2 u
(x) = x, 0 < x < 1,
dx2
so
du
(x)
dx
=
=
=
Z x 2
du
d u
(0) +
(s) dx
2
dx
0 dx
Z x
du
(0)
s dx
dx
0
x2
du
(0)
.
dx
2
u(x)
du
(s) ds
dx
Z x
s2
0+
C
ds
2
0
u(0) +
=
=
Cx
x3
.
6
1
x x3 .
6
2T
`
2
`
d2 u
(x) sin
dx2
(2n 1)x
2`
dx,
u(x) sin
(2n 1)x
2`
dx.
31
Using integration by parts twice, almost exactly as in (5.19), we can express bn in terms of an :
(2n 1)x
d2 u
(x) sin
dx
2
2`
0 dx
(
`
(2n 1)x
du
2T
(x) sin
`
dx
2`
x=0
Z `
(2n 1)x
(2n 1)
du
(x) cos
dx
2`
2`
0 dx
Z `
2T (2n 1)
(2n 1)x
du
(x) cos
dx
2`2
dx
2`
0
(since sin (0) = du/dx(`) = 0)
(
`
(2n 1)x
2T (2n 1)
u(x)
cos
2`2
2`
x=0
Z `
(2n 1)
(2n 1)x
+
u(x) sin
dx
2`
2`
0
Z
T (2n 1)2 2 2 `
(2n 1)x
dx
u(x)
sin
4`2
` 0
2`
(since u(0) = cos ((2n 1)/2) = 0)
2T
T (2n 1)2 2
an .
4`2
This gives the desired result. (Actually, since it is known that the negative second derivative operator is symmetric
under the mixed boundary conditions, we can just appeal to (5.25), which is the above calculation written
abstractly.)
9. Let a1 , a2 , a3 , . . . be the Fourier quarter-wave sine coefficients of u; then
X
(2n 1)2 2
(2n 1)x
d2 u
(x)
=
a
sin
,
n
dx2
2002
200
n=1
X
n=1
0.004
sin
(2n 1)
(2n 1)x
.
200
X
n=1
3.2 102
sin
3(2n 1)3 3
(2n 1)x
.
200
temperature
2.5
2
1.5
1
0.5
0
0
20
40
60
80
100
Figure 5.3: The temperature distribution (in degrees Celsius) in Exercise 5.3.9.
32
5.4
2
1. Suppose f, g CD
[0, `], so that
=
=
=
=
=
k(x)
df
dx
,g
df
k(x) (x) g(x) dx
dx
0
` Z `
df
df
dg
k(x) (x)g(x) +
k(x) (x) (x) dx (integration by parts)
dx
dx
dx
0
0
Z `
df
dg
k(x) (x) (x) dx (using g(0) = g(`) = 0)
dx
dx
0
` Z `
d
dg
dg
f (x)
k(x) (x) dx (integration by parts)
k(x)f (x) (x)
dx
dx
dx
0
0
Z `
d
dg
f (x)
k(x) (x) dx (using f (0) = f (`) = 0)
dx
dx
0
d
dg
f,
k(x)
.
dx
dx
Z
d
dx
d
dx
The last step follows from the fact that v(0) = v(`) = 0. Thus the weak form of the given BVP is
Z `
Z `
du
dv
2
2
find u CD
[a, b] such that
k(x) (x) (x) + p(x)u(x)v(x) dx =
f (x)v(x) dx for all v CD
[a, b].
dx
dx
0
0
7. The calculation is the same as in Exercise 5; we integrate by parts only in the first integral, and obtain the
2
following weak form: Find u CD
[a, b] such that
Z `
Z `
du
dv
du
2
k(x) (x) (x) + c(x) (x)v(x) + p(x)u(x)v(x) dx =
f (x)v(x) dx for all v CD
[a, b].
dx
dx
dx
0
0
Notice that now the left-hand side is not symmetric in u and v.
9. Repeating the calculation beginning on page 167, we obtain
" Z
#
2
2
Z
1 `
u
1 `
u
A(x)
dx +
Ak(x)
dx
t 2 0
t
2 0
x
Z ` 2
u
=
c
dx, t > 0.
t
0
33
This shows that derivative with respect to time of the total energy is always negative, and hence that the total
energy is always decreasing.
5.5
1.
3. Let
FN = span {sin (x), sin (2x), . . . , sin (N x)} .
We will apply the Galerkin method to the BVP
d2 u
= f (x), 0 < x < `,
dx2
u(0) = 0,
u(`) = 0,
using FN as the approximating subspace. The weak form of the BVP is
Z `
Z `
dv
du
2
2
find u CD
[a, b] such that
f (x)v(x) dx for all v CD
[a, b],
k (x) (x) dx =
dx
dx
0
0
and the Galerkin method takes the form
find vN =
N
X
k
0
j=1
dvn
dv
(x) (x) dx =
dx
dx
Z
0
di
dj
k
(x)
(x) dx =
dx
dx
kj 2 2
,
2
0,
i = j,
i 6= j.
This last step follows from the fact that the functions cos (x), cos (2x), . . . , cos (N x) are mutually orthogonal
with respect to the L2 (0, 1) inner product. Also, notice that
Z `
Z `
cj
f (x)j (x) dx =
f (x) sin (jx) dx = ,
2
0
0
where cj is the Fourier sine coefficient of f . Since K is diagonal, it is easy to solve Ku = f :
uj =
cj /2
cj
= 2 2.
kj 2 2 /2
kj
Thus
vN (x) =
N
X
j=1
cj
sin (jx).
kj 2 2
This is exactly the solution obtained by the method of Fourier series in Section 5.3.2.
5.
34
=
"
=
dp
dp
(1 + x) dx
(x) dx
(x) dx
0
R1
(1
0
1
2
1
30
dq
dp
(x) dx
(x) dx
+ x) dx
#
1
30
,
3
R1
dq
dp
(1 + x) dx
(x) dx
(x) dx
0
R1
(1
0
dq
dq
+ x) dx
(x) dx
(x) dx
40
0.16412
0.038168
0.01
0.005
0
0
0.2
0.4
0.6
0.8
Figure 5.4: The exact and approximate solutions from Exercise 5.5.7.
9.
(a) It will take about 103 times as long, or 1000 seconds (almost 17 minutes), to solve a 1000 1000 system,
and 1003 times as long, or 106 seconds (about 11.5 days) to solve a 10000 10000 system.
(b) Gaussian elimination consists of a forward phase, in which the diagonal entries are used to eliminate nonzero
entries below and in the same column, and a backward phase, in which the diagonal entries are used to
eliminate nonzero entries above and in the same column. During the forward phase, at a typical step, there
is only 1 nonzero entry below the diagonal, and only 5 arithmetic operations are required to eliminate it (1
division to compute the multiplier, and 2 multiplications and 2 additions to add a multiple of the current
row to the next). Thus the forward phase requires O(5n) operations. A typical step of the backward phase
requires 3 arithmetic operations (a multiplication and an addition to adjust the right-hand side and a division
to solve for the unknown). Thus the backward phase requires O(3n) operations. The grand total is O(8n)
operations.
(c) It will take about 10 times as long, or 0.1 seconds, to solve a 1000 1000 tridiagonal system, and 100 times
as long, or 1 second, to solve a 10000 10000 tridiagonal system.
5.6
35
1. We wish to compute the piecewise linear finite element approximation to the solution of
d2 u
= x, 0 < x < 1,
dx2
u(0) = 0,
u(`) = 0
using a uniform mesh with four elements. Such a mesh corresponds to h = 1/4, and there are three basis functions.
The stiffness matrix is
8 4
0
8 4
K = 4
0 4
8
(as computed in Example 5.18 in the text). The load vector F R3 is defined by
1
Z
Fi =
u=
128
1
16
7
128
The exact solution to the BVP is u(x) = (x x3 )/6. Figure 5.5 shows the exact solution and the piecewise linear
approximation.
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
0
0.2
0.4
0.6
0.8
Figure 5.5: The exact (dashed curve) and approximate (solid curve) solutions from Exercise 5.6.1.
3.
(b) Here are the errors for n = 10, 20, 40, 80:
n
10
20
40
80
maximum error
1.6586 103
4.3226 104
1.1036 104
2.7881 105
We see that, when n is doubled, the error decreases by a factor of approximately four. Thus
1
error = O
.
n2
5. The exact solution is u(x) = x(1 x3 )/12. Here are the errors for n = 10, 20, 40, 80:
36
maximum error
1.1286 103
2.9710 104
7.6186 105
1.9288 105
We see that, when n is doubled, the error descreases by a factor of approximately four. Thus
1
error = O
.
n2
7. The weak form is
`
Z
find u V such that
0
dv
du
k(x) (x) (x) + p(x)u(x)v(x) dx
dx
dx
=
0
a(u, v) =
0
dv
du
k(x) (x) (x) + p(x)u(x)v(x) dx.
dx
dx
9. We wish to apply the piecewise linear finite element method to the BVP
d2 u
1
+ 2u = x, 0 < x < 1,
dx2
2
u(0) = 0,
u(1) = 0.
We use a sequence of increasingly fine uniform meshes. The weak form of the BVP is
Z 1
Z 1
Z 1
dv
du
1
2
2
u CD
[0, 1],
(x) (x) dx +
x v(x) dx for all v CD
[a, b],
2u(x)v(x) dx =
dx
2
0 dx
0
0
and the Galerkin method requires the solution of
Z 1
Z 1
Z 1
dvn
1
dv
vn Vn ,
(x) (x) dx + 2
x v(x) dx for all v Vn .
vn (x)v(x) dx =
dx
dx
2
0
0
0
The second integral on the left side of the variational equation leads to the matrix M R(n1)(n1) , where
Z 1
Mij =
j (x)i (x) dx
0
and j is the jth standard basis function for the space of continuous piecewise linear functions. The matrix M
can be computed explicitly (similarly to how K was computed in Example 5.18 in the text), and the result is
2h
,
j = i,
3
Mij =
f rach6, j = i 1 or j = i + 1,
0,
otherwise.
We then must solve (K + 2M)u = f , where K is the usual stiffness matrix (as in Example 5.18) and the load
vector f is defined by
Z 1
1
h
fi =
x i (x) dx = (1 2ih), i = 1, 2, . . . , n 1.
2
2
0
After solving (K + 2M)u = f to get the piecewise linear approximation for each n, we estimate the maximum
error by evaluating both the exact function and the approximation on a finer mesh. The results are shown in the
following table.
n
10
20
40
80
160
320
error
5.4953 104
1.4660 104
3.7842 105
9.6121 106
2.4222 106
6.0794 107
37
These results show that when n is doubled, the error is reduced by a factor of approximately 4. Thus it appears
that the error is O(1/n2 ).
Chapter 6
0,
u(100)
0.
Either by solving this BVP or by taking the limit (as t ) of the solution of Example 6.2, we find that the
steady-state solution is
nx
X
2 103 (1 (1)n )
us (x) =
sin
.
Dn3 3
100
n=1
3. The solution is
u(x, t) =
X
2(1)n+1 n2 2 t
e
sin (nx).
n
n=1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.2
0.4
0.6
0.8
Figure 6.1: The snapshot u(, 0.1), together with the initial temperature distribution, for Exercise 6.1.3.
5. With
p(x, t) = g(t) +
x
(h(t) g(t))
`
2v
v
2
t
x
=
=
2u
2p
u
p
2 c
2
t
x
t
x
x dh
dg
dg
f (x, t) c
(t) +
(t)
(t)
.
dt
` dt
dt
c
39
40
x
(h(t0 ) g(t0 ))
`
and
v(0, t)
v(`, t)
We define
g(x, t) = f (x, t) c
dg
x
(t) +
dt
`
and
(x) = (x) g(t0 )
dh
dg
(t)
(t)
dt
dt
x
(h(t0 ) g(t0 )).
`
Then v satisfies
c
2v
v
2
t
x
v(x, t0 )
v(0, t)
0, t > t0 ,
v(`, t)
0, t > t0 .
7. Define v(x, t) = u(x, t) x cos (t). Then v satisfies the following IBVP (with homogeneous boundary conditions,
but with a nonzero source term):
v
2v
t
x2
v(x, 0)
0, 0 < x < 1,
v(0, t)
0, t > 0,
v(1, t)
0, t > 0.
v(x, t) =
n=1
where
2 2
2(1)n
cos (t) en t n2 2 sin (t) .
4
4
n (n + 1)
The solution to the original IBVP is then u(x, t) = v(x, t) + x cos (t). A graph of u(, 1.0) is given in Figure 6.2.
an (t) =
1
u(,0)
u(,0.1)
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.2
0.4
0.6
0.8
Figure 6.2: The snapshot u(, 1.0), together with the initial temperature distribution, for Exercise 6.1.7.
9. The temperature u(x, t) satisfies the IBVP
c
u
2u
2
t
x
u(x, 0)
u(0, t)
0, t > 0,
u(100, t)
0, t > 0.
41
nx
X
n2 2 t
10(1 (1)n ) 100
2 c
sin
e
.
n
100
n=1
2u
u
2
t
x
u(x, 0)
u(0, t)
0, t > 0,
u(100, t)
5, t > 0.
The solution is
u(x, t) =
nx
X 10 n2 2 t
x
+
e 1002 c sin
.
20 n=1 n
100
Considering the results of Exercise 6.1.9, it is obvious that at least several thousand seconds will elapse
before the temperature is within 1% of steady state, so we can accurately estimate u(x, t) using a single
term of the Fourier series:
x
2 t
10 100
. x
2 c
u(x, t) =
+
e
.
sin
20
100
We want to find t large enough that
|u(x, t) us (x)|
0.01
|us (x)|
for all x [0, 100]. Using our approximation for u, this is equivalent to
200 sin x
2
100 1002 c t
0.01.
e
x
A graph shows that
200 sin
x
x
100
2
100 c
0.005.
This yields
1002 c ln 0.005 .
= 4520.
2
About 75 minutes and 20 seconds are required.
t
6.2
1. The solution is
u(x, t) = d0 +
dn en
2 t
cos (nx),
n=1
where
Z
d0 =
0
1
x(1 x) dx = , dn = 2
6
Z
0
2 (1)n+1 1
x(1 x) cos (nx) dx =
.
n2 2
42
0.2
0.15
0.1
u(x,0)
u(x,0.02)
u(x,0.04
u(x,0.06)
u(x,)
0.05
0
0
0.2
0.4
0.6
0.8
Figure 6.3: The solution u(x, t) from Exercise 6.2.4 at times 0, 0.02, 0.04, and 0.06, along with the steady-state
solution. These solutions were estimated using 10 terms in the Fourier series.
3.
2
[0, `], then
(a) If u, v CN
=
=
=
=
=
=
d2 u
(x)v(x) dx
2
0 dx
` Z `
dv
du
du
(x)v(x) +
(x) (x) dx
dx
dx
0 dx
0
Z `
du
dv
(x) (x) dx (since du
(0) = du
(`) = 0)
dx
dx
dx
dx
0
` Z `
d2 v
dv
u(x) 2 (x) dx
u(x) (x)
dx
dx
0
0
Z `
2
d v
dv
dv
(0) = dx
(`) = 0)
u(x) 2 (x) dx (since dx
dx
0
(u, LN v).
Z
(LN u, v)
(u, u)
(LN u, u)
Z ` 2
d u
(x)u(x) dx
2
0 dx
` Z `
2
du
du
(x)u(x) +
(x)
dx
dx
dx
0
0
2
Z `
du
(x)
dx (since du
(0) = du
(`) = 0)
dx
dx
dx
0
0.
=
=
=
(0)
(`)
= (a b).
2
dx
dx
0
0 dx
This is the compatibility condition:
Z
f (x) dx = (a b).
0
2
(b) The operator K : CN
[0, `] C[0, `] defined by
Ku =
d2 u
+u
dx2
43
has eigenpairs
nx
n2 2
, n = 1, 2, 3, . . . .
,
(x)
=
cos
n
`2
`
0 = 1, 0 (x) = 1, and n = 1 +
The method of Fourier series can be applied to show that a unique solution exists for each f C[0, `]. (The
key is that 0 is not an eigenvalue of K, as it is of LN .)
7. As shown in this section, the solution to the IBVP is
u(x, t) = d0 +
dn en
2 t/`2
cos
nx
`
n=1
X
nx
nx
X
2 2
2
n2 2 t/`2
cos
dn e
|dn | en t/` cos
`
`
n=1
n=1
|dn | en
2 t/`2
n=1
t/`2
|dn | e(n
1) 2 t/`2
n=1
This last series certainly converges (as can be proved, for example, using the comparison test), and
e
This shows that
d0 +
dn en
t/`2
0 as t .
2 t/`2
cos
n=1
The limit d0 is
1
`
the average of the initial temperature distribution.
nx
`
d0 as t .
(x) dx,
0
X
n=1
an (t) sin
Z
nx
nx
2 `
, an (t) =
u(x, t) sin
dx
`
` 0
`
and u satisfies
u
u
(0, t) =
(`, t) = 0 for all t > 0.
x
x
The nth Fourier sine coefficient of 2 u/x2 is computed as follows:
Z
nx
2 ` 2u
(x,
t)
sin
dx
` 0 x2
`
"
#
Z
nx `
nx
2 u
n ` u
=
(x, t) sin
(x, t) cos
dx
` x
` 0
` 0 x
`
Z
nx
2n ` u
=
(x,
t)
cos
dx
`2 0 x
`
Z
nx `
nx
2n
n `
=
u(x,
t)
cos
+
u(x,
t)
sin
dx
`2
`
` 0
`
0
=
2n
n2 2
((1)n u(`, t) u(0, t)) + 2 an (t).
2
`
`
Since the values u(0, t) and u(`, t) are unknown, we see that it is not possible to express the Fourier sine
coefficients of 2 u/x2 in terms of a1 (t), a2 (t), . . ..
44
X
2 (1 (1)n ) t
sin (nx),
n
n=1
n=1
However,
2u
(x, t) = 0,
x2
and so all of the Fourier sine coefficients of 2 u/x2 should be zero. Thus the formal calculation is wrong.
6.3
1. The formula for the solution u is exactly the same as in Example 6.6, with a different value for (4.29 instead of
3.17). This implies that the amplitude of the solution is reduced by about 26%. Therefore, there is less variation
in the temperature distribution in the silver ring as opposed to the gold ring.
3.
2u
u
2
t
x
u(x, 0)
u(5, t)
u
(5, t)
x
cn e
n t
25c
cos
n=1
nx
5
where
c0
cn
4
,
9
n+1
10(1)
, n = 1, 2, 3, . . . .
n4
25 +
(a) To show that Lp is symmetric, we perform the now familiar calculation: we form the integral (Lp u, v) and
integrate by parts twice to obtain (u, Lp v). The boundary term from the first integration by parts is
du
(x)v(x)
dx
`
=
`
du
du
(`)v(`)
(`)v(`).
dx
dx
du
du
(`) =
(`),
dx
dx
so the boundary term vanishes. The boundary term from the second integration by parts vanishes for exactly
the same reason.
45
(a) Since the ring is completely insulated, a steady-state temperature distribution cannot exist unless the net
amount of heat being added to the ring is zero. This is exactly the same situation as a straight bar with the
ends, as well as the sides, insulated.
(b) Suppose u is a solution to (6.21). Then
`
Z `
Z ` 2
u
u
u
u
(x, t) dx =
(x, t)
=
(`, t)
(`, t) = 0.
f (x) dx =
2
x
x
x
`
` x
`
The last step follows from the periodic boundary conditions.
(c) The negative second derivative operator, subject to boundary conditions, has a nontrivial null space, namely,
the space of all constant functions on (`, `). In analogy to the Fredholm alternative for symmetric matrices,
we would expect a solution to the boundary value problem to exist if and only if the right-hand-side function
is orthogonal to this null space. This condition is
Z `
cf (x) dx = 0 for all c R,
`
or simply
Z
f (x) dx = 0.
`
2u
u
2 + pu = f (x, t), ` < x < `, t > t0 ,
t
x
u(x, t0 ) = (x), ` < x < `,
u(`, t) = u(`, t), t > t0 ,
u
u
(`, t) =
(`, t), t > t0 .
x
x
46
dan
dt
dbn
dt
n =
Therefore, n 0 for all n, and all the eigevalues are positive if and only if p > 0.
11. Let f : (`, `) R be an even function. We wish to prove that the full Fourier series of f reduces to the cosine
series of f , regarded as a function on (0, `). The full Fourier series of f is
f (x) = a0 +
n
X
an cos
nx
n=1
+ bn sin
nx o
`
where
Z `
1
f (x) dx,
2` `
Z `
nx
1
dx, n = 1, 2, . . . ,
f (x) cos
an =
` `
`
Z
nx
1 `
bn =
dx, n = 1, 2, . . . .
f (x) sin
` `
`
a0 =
g(x) dx,
0
g(x) dx = 0.
`
Since f is even,
a0 =
1
2`
f (x) dx =
`
1
`
f (x) dx.
0
Also, f (x) cos (nx/`) is an even function of x (the product of even functions is even), and therefore
Z
Z
nx
nx
2 `
1 `
an =
f (x) cos
dx =
f (x) cos
dx, n = 1, 2, . . . .
` `
`
` 0
`
Finally, f (x) sin (nx/`) is an odd function of x (the product of an even and an odd function is odd), and thus
Z
nx
1 `
dx = 0, n = 1, 2, . . . .
bn =
f (x) sin
` `
`
Thus the full Fourier series reduces to
f (x) = a0 +
X
n=1
where
an cos
nx
`
Z
Z
nx
1 `
2 `
f (x) dx, an =
f (x) cos
dx, n = 1, 2, . . . .
` 0
` 0
`
This is precisely the Fourier cosine series of f on the interval (0, `) (cf. Section 6.2.2).
a0 =
6.4
47
1. We give the proof for the general case of a Gram matrix G. Suppose Gx = 0, where x Rn . Then (x, Gx) = 0
must hold, and
!
n
n X
n
n X
n
n
n
X
X
X
X
X
(x, Gx) =
(Gx)i xi =
Gij xj xi =
(uj , ui )xj xi =
xj u j , u i u i
i=1
i=1 j=1
i=1 j=1
i=1
n
X
j=1
xj uj ,
j=1
n
X
!
xi u i
i=1
n
2
X
xj uj
.
j=1
Pn
(a)
M=
2/9
1/18
1/18
2/9
6
3
, K=
3
6
, f (t) =
1
162
11 cos (t)
11 cos (t)
=
=
11 cos (t)
,
162
11 cos (t)
31 62 +
.
162
61 + 32 +
1 ,
2 ,
u
(x)c(x)
(x)
t
x
x
u(x, 0)
u(0, t)
0, t > 0,
u(100, t)
0, t > 0.
(b) The mass matrix M is tridiagonal and symmetric, and its nonzero entries are
( c h
1 1
,
i = 1, 2, . . . , n2 1,
6
Mi,i+1 =
2 c 2 h
,
i = n2 , n2 + 1, . . . , n 1,
6
and
Mii =
21 c1 h
,
3
(1 c1 +2 c2 )h
,
3
22 c2 h
,
3
i = 1, 2, . . . ,
i=
i=
n
,
2
n
+
2
1,
n
2
n
2
1,
+ 2, . . . , n 1.
The stiffness matrix K is tridiagonal and symmetric, and its nonzero entries are
(
h1 ,
i = 1, 2, . . . , n2 1,
Ki,i+1 =
h2 ,
i = n2 , n2 + 1, . . . , n 1,
and
Kii =
21
,
h
1 +2
,
h
22
,
h
i = 1, 2, . . . ,
i=
i=
n
,
2
n
+
2
1,
n
2
n
2
1,
+ 2, . . . , n 1.
.
48
an (t) sin
n=1
nx
,
100
where
an (t) =
400(2 + (1)n )
2 7 n7
2 2
n t
104 c e 104 c 1 + n2 2 t .
The errors in Examples 6.8 and 6.9 are graphed in Figure 6.4.
0.05
0.05
0.1
0.15
0.2
Euler
Backward Euler
0.25
0
20
40
60
80
100
Figure 6.4: The errors in Examples 6.8 and 6.9 (see Exercise 6.4.7).
(x)c(x)
t
x
u
(x)
x
u(x, 0)
5, 0 < x < `,
u(0, t)
0, t > 0,
u(`, t)
0, t > 0.
Z
0
u
u
dv
(x)c(x) (x, t)v(x) + (x) (x, t) (x) dx = 0, t > 0, v V.
t
x
dx
(c) The temperature distribution after 120 seconds is shown in Figure 6.5.
t = 120 (seconds)
5
4.5
4
3.5
temperature
9.
3
2.5
2
1.5
1
0.5
0
0
20
40
60
80
100
Figure 6.5: The temperature distribution after 120 seconds in Exercise 6.4.9.
6.5
49
0,
0,
with k = 1.5 and f (x) = 107 x(25 x)(100 x) + 1/240. The steady-state temperature is not unique; the solution
with u(100) = 0 is shown in Figure 6.6.
6
5
temperature
4
3
2
1
0
1
0
20
40
60
80
100
Figure 6.6: The computed steady-state temperature distribution from Exercise 6.5.1.
(a) The total amount of heat energy being added to the bar is 0.51A W, where A is the cross-sectional area
(0.01A W through the left end and 0.5A W in the interior). Therefore, 0.51A W must be removed through
the right end; that is, heat energy must be removed at a rate of 0.51 W/cm2 through the right end.
(b) The BVP is
d2 u
dx2
du
k (0)
dx
du
k (100)
dx
0.01,
0.51.
The steady-state temperature is not unique; the temperature with u(100) = 0 is graphed in Figure 6.7.
7
6
5
temperature
3.
4
3
2
1
0
0
20
40
60
80
100
Figure 6.7: The computed steady-state temperature distribution from Exercise 6.5.3.
50
(a) We have
=
u Ku
n X
n
X
n X
n
X
ij uj ui =
K
i=0 j=0
a (j , i ) uj ui
i=0 j=0
n
X
i=0
n
X
ui
n
X
j=0
n
X
uj j ,
j=0
!
uj j , i
ui i
i=0
a(v, v).
Therefore,
= 0 u Ku
= 0 a(v, v) = 0.
Ku
(b) Suppose v V and a(v, v) = 0. By definition of a(, ), this is equivalent to
`
(x)
2
dv
(x)
dx = 0.
dx
Since the integrand is nonnegative, this implies that the integrand is in fact zero, and, since (x) is positive,
we conclude that
dv
(x)
dx
7.
(6.1)
(b) The fact that a solution of the strong form is also a solution of the weak form is proved by the usual argument:
multiply the differential equation by an arbitrary test function v V , and then integrate by parts.
The proof that a solution of the weak form is also a solution of the strong form is similar to the argument
given in Section 6.5.2. Assuming that u satisfies the weak form (6.1), an integration by parts and some
simplification shows that
k(`)
du
(`)v(`)
dx
Z
0
du
d
k(x) (x) + f (x) v(x) dx = 0 for all v V .
dx
dx
du
(`)v(`) = 0 for all v V .
dx
Choosing any v V with v(`) 6= 0 shows that the Neumann condition holds at x = `.
9. The temperature distribution after 300 seconds is shown in Figure 6.8.
51
t=300 (seconds)
8
7
temperature
6
5
4
3
2
1
0
0
20
40
60
80
100
Figure 6.8: The temperature distribution from Exercise 6.5.9 (after 300 seconds).
= 0, then
11. Here is a sketch of the proof: If Ku
= 0 a(v, v) = 0,
u Ku
P
where v = n1
i=0 ui i . But then, by the usual reasoning, v must be a constant function, and v(xn ) = 0 (since
i (xn ) = 0 for i = 0, 1, 2, . . . , n 1). Thus v is the zero function, which implies that the nodal values of v are all
is nonsingular.
zero. Therefore u = 0, and so K
Chapter 7
Waves
7.1
1. The solution, by dAlemberts formula, is u(x, t) = ((x ct) + (x + ct)). Figure 7.1 shows three snapshots of
u.
4
20
x 10
15
10
5
20
15
10
10
15
20
Figure 7.1: Three snapshots of the solution of Exercise 7.1.1: t = 0 (dashed curve), t = 0.01 (solid curve), and
t = 0.025 (dash-dotted curve).
3. The two waves join and add constructively, and then separate again. See Figure 7.2.
3
1.5
x 10
t=0
t=0.02
t=0.04
0.5
0
40
30
20
10
0
x
10
20
30
40
Figure 7.2: Constructive interference in Exercise 7.1.3. The blip in the center is the result of two waves
combining temporarily. (The velocity in this example is c = 1.)
53
54
CHAPTER 7. WAVES
5. Consider the IVP
2
2u
2 u
c
= 0, < x < , t > 0,
t2
x2
u(x, 0) = (x), < x < ,
u
= 0, < x < ,
t
where the support of is [a, b]. The solution is u(x, t) = ((x ct) + (x + ct))/2. Now, since (x ct) is a
right-moving wave, we see that (x1 ct) = 0 if any of the following conditions hold:
x1 a;
a < x1 < b and t
x1 a
c
(since (x1 ct) = 0 after the trailing edge of the wave passes x1 );
x1 b
c
x b and (t
or t x1ca ) (since (x1 ct) = 0 before the leading edge of the wave reaches x1 and
after the trailing edge of the wave passes x1 ).
Similarly, (x + ct) is a left-moving wave, and therefore (x1 + ct) = 0 if any of the following is true:
x1 b;
a < x1 < b and t
x1 a and (t
bx1
;
c
ax1
c
or t
bx1
).
c
Since u(x1 , t) is guaranteed to be zero if both (x1 ct) and (x1 + ct) are zero, we see that u(x1 , t) = 0 if any
of the following is true:
x1 a and (t
ax1
c
or t
x1 a
c
x1 b
c
bx1
);
c
and t
or t
bx1
;
c
x1 a
).
c
1
((x ct) + (x + ct)) ,
2
then we know that u satisfies the same PDE and initial condition as does the solution of the above IBVP. Also,
since the support of is [a, b], u(0, t) = 0 for all t a/c (since u(0, t) cannot be nonzero until the leading edge of
the left-moving wave reaches x = 0), and similarly u(`, t) = 0 for all t (` b)/c (since u(`, t) cannot be nonzero
until the leading edge of the right-moving wave reaches x = `). Therefore, if t < tf = min{a/b, (` b)/c}, then u
satisfies both boundary conditions, in addition to the initial conditions and the PDE, and hence is a solution of
the above IBVP.
7.2
X
n=1
bn cos
cnt
25
sin
nx
.
25
A graph analogous to Figure 7.6 from the text is given in Figure 7.3.
displacement
55
10
15
20
25
Figure 7.3: Fifty snapshots of the vibrating string from Example 7.4, with no external force.
3. The solution is
u(x, t) =
an (t) sin
n=1
(2n 1)x
,
50
where
502 cn
2
c (2n 1)2 2
an (t) = bn
and
bn =
cos
c(2n 1)t
50
+
502 cn
1)2 2
c2 (2n
2 sin (n/2) 2 cos (n/2) + (1)n
4000
, cn =
.
5(2n 1)2 2
(2n 1)
The fundamental frequency is now c/100 instead of c/50. Fifty snapshots are shown in Figure 7.4.
2.5
2
1.5
displacement
1
0.5
0
0.5
1
1.5
2
2.5
0
10
15
20
25
Figure 7.4: Fifty snapshots of the vibrating string from Example 7.4, with the right end free.
5. The solution is
u(x, t) =
1
+ 50t2
20
+
bn cos
n=1
cnt
25
cos
nx
25
where
bn =
Fifty snapshots of the solution are shown in Figure 7.5. The solution gradually moves up; this is possible because
both ends are free to move vertically.
7. The solution is
u(x, t) =
X
n=1
an (t) sin
(2n 1)x
,
2
56
CHAPTER 7. WAVES
0.6
displacement
0.4
0.2
0
0
10
15
20
25
Figure 7.5: Fifty snapshots of the vibrating string from Example 7.4, with both ends free.
where
an (t)
bn
cn
bn
4cn
c2 (2n 1)2 2
cos
c(2n 1)t
2
+
4cn
,
c2 (2n 1)2 2
2(1)n+1
,
125(2n 1)2 2
4g
.
(2n 1)
Snapshots of the solution are graphed in Figure 7.6, which should be compared to Figure 7.9 from the text.
3
displacement
x 10
1
t=0
t=5e05
t=0.0001
t=0.00015
0
0
0.2
0.4
0.6
0.8
Figure 7.6: Snapshots of the displacement of the bar in Example 7.6, taking into account the effect of gravity.
9. Consider a string whose (linear) density (in the unstretched state) is 0.25 g/cm and whose longitudinal stiffness is
6500 N. Suppose the unstretched (zero tension) length of the string is 40 cm. We wish to determine the length to
which the string must be stretched in order that its fundamental frequency be f0 = 261 Hz (middle C). We will
write `0 = 40, k = 6.5 108 (the stiffness of the string in g cm/s2 ), and T for the unknown tension. Note that the
mass of the string is m = 10 (g). We know that f0 = c/(2`), where c is the wave speed and ` = `0 + `. Also,
c2 = T /, where = m/`. Finally, ` is related to T by Hookes law: k`/`0 = T . Putting all these equations
together, we obtain
q
c
1
q
f0 =
=
2(`0 + `)
2(`0 + `)
k`
`0
m
`0 +`
k`
k`
= p
= f02 .
4m`
(`
0 0 + `)
2 m`0 (`0 + `)
4m`20 f02
.
= 8.0586.
k 4m`0 f02
7.3
57
1. The fundamental period is 2`/c = 0.2. Using h = 100/20 = 5, Dt = T /60, and the RK4 method, we obtain the
solution shown in Figure 7.7.
displacement
0.2
0.2
0
0.2
0.4
0.6
0.8
Figure 7.7: The computed solution of the wave equation in Exercise 7.3.1. Shown are 30 snapshots, plus the
initial displacement. Twenty subintervals in space and 60 time steps were used.
3.
(a) Since the initial disturbance is 24 cm from the boundary and the wave speed is 400 cm/s, it will take
24/400 = 0.06 s for the wave to reach the boundary.
(b) The IBVP is
2u
2u
c2 2
2
t
x
u(x, 0)
u
(x, 0)
t
u(0, t)
u(50, t)
0, t > 0,
0, t > 0,
displacement
0.1
0.1
0
10
20
30
40
50
Figure 7.8: The computed solution of the wave equation in Exercise 7.3.3.
5. It is not possible to obtain a reasonable numerical solution using finite elements. In Figure 7.9, we display the
result obtained using h = 2.5 103 and t = 3.75 104 . Three snapshots are shown.
7.
Z `
u
dv
2u
(x) 2 (x, t)v(x) + k(x) (x, t) (x) dx =
f (x, t)v(x) dx
t
x
dx
0
58
CHAPTER 7. WAVES
1.2
1
displacement
0.8
0.6
0.4
0.2
0
0.2
0
0.2
0.4
0.6
0.8
Figure 7.9: The computed solution of the wave equation in Exercise 7.3.5.
for t t0 and v V , where
V = v C 2 [0, `] : v(0) = 0 .
(b) The system of ODEs has the same form as in the case of a homogeneous bar:
2
d u + Ku
=
M
f (t),
dt2
except that the entries in the mass matrix are now
Z `
ij =
M
(x)j (x)i (x) dx, i, j = 1, 2, . . . , n,
0
7.4
Resonance
X
n=1
an (t) sin
nx
.
`
cnt
`
)
7.4. RESONANCE
59
cnt
`
2`(` sin
cnt cos
c2 n3 3
cnt
`
)
Therefore, if does not equal cn/(2`) for any odd n, then the Fourier coefficients of u are uniformly bounded
with respect to t and go to zero like 1/n3 . Notice, though, that if is very close to cn/(2`) for some odd n, then
the corresponding an (t) is larger (due to the factor of c2 n2 4`2 2 in the denominator), and thus that frequency
has greater weight in the Fourier series.
On the other hand, if = cn/(2`) for some odd n, then the corresponding Fourier coefficient an (t) grows without
bound as t , and resonance is observed.
3. The experiment described in this problem is modeled by the IBVP
2u
2u
c2 2 = 0, 0 < x < 1, t > 0,
t2
x
u(x, 0) = 0, 0 < x < 1,
u
(x, 0) = 0, 0 < x < 1,
t
u
k (0, t) = B sin (2t), t > 0,
x
u(1, t) = 0, t > 0.
.
Here c2 = k/ = 3535.53 m/s.
We transform this problem into one that we can analyze by the Fourier series method by shifting the data. The
function v(x, t) = (B/k) sin (2t)(x 1) satisfies the given boundary conditions; if we define w = u v, then w
satisfies the IBVP
2w
2w
4 2 2 B
sin (2t)(x 1), 0 < x < 1, t > 0,
c2 2 =
2
t
x
k
w(x, 0) = 0, 0 < x < 1,
w
2B
(x, 0) =
(x 1), 0 < x < 1,
t
k
w
k
(0, t) = 0, t > 0,
x
w(1, t) = 0, t > 0.
We solve this IBVP by the usual method. We write
u(x, t) =
n=1
cn (t) = 2
0
4 2 2 B
8 2 B
sin (2t)(x 1) sin (nx) dx =
sin (2t)
k
kn
and
bn =
4B
k
(x 1) sin (nx) dx =
0
4B
.
kn
60
CHAPTER 7. WAVES
while if = cn/2,
an (t) =
4B
4 2 B
sin (cnt)
2
kcn
ckn2
sin (cnt)
t cos (cnt) .
cn
(a) From the above analysis, we see that the smallest resonant frequency is r = c/2, the fundamental frequency
of the wave equation modeling the problem.
(b) If = r , then a1 (t) is given by the second formula above, while an (t), n > 1, is given by the first. We
compute several snapshots of the displacement, using 20 terms in the Fourier series, on each of the time
intervals [0, 0.005], [0.005, 0.01], [0.01, 0.015], and [0.015, 0.02]. These are shown in Figure 7.10. The graphs
show that the amplitude grows as t increase, and also that the shape of the displacement is dominated by
the first fundamental mode.
0.5
0.5
0.5
0
0.5
0.5
0
0.5
0.5
0.5
0
0.5
0.5
0
0.5
0.5
x 10
5
0
0.5
5
0
x 10
x 10
5
0
0.5
0.5
x 10
0.5
5
0
61
n=1
3/5
2 sin (2t)
=
n
cos
3n
5
cos
13n
20
.
It follows that
1
cn
an (t) =
Five snapshots of the solution, at t = 0.002, 0.004, 0.006, 0.008, 0.01, are shown in Figure 7.12.
6
x 10
1.5
1
0.5
0
0.5
1
1.5
2
0
0.2
0.4
0.6
0.8
7.5
d
1 d2
(x)x +
(c)x2 ,
dx
2 dx2
(c)x
dx
x
2 dx2
or
Since
(x + x) (x)
d
1 d2
(x)
=
(c)x.
dx
x
2 dx2
d2
d2
(c)
(x)
2
dx
dx2
as x 0, it follows that the error in the forward difference approximation to the first derivative is approximately
proportional to x.
62
CHAPTER 7. WAVES
3. Suppose : R R is at least four times continuously differentiable. By Taylors theorem,
d
(x)x +
dx
d
(x)x +
(x x) = (x)
dx
(x + x) = (x) +
1 d2
(x)x2 +
2 dx2
1 d2
(x)x2
2 dx2
1 d3
(x)x3 +
6 dx3
1 d3
(x)x3 +
6 dx3
1 d4
(c1 )x4 ,
24 dx4
1 d4
(c2 )x4 ,
24 dx4
where c1 is between x and x + x and c2 is between x and x x. Adding these two equations yields
d2
1 d4
d4
2
(x + x) + (x x) = 2(x) + 2 (x)x +
(c1 ) + 4 (c2 ) x4 .
dx
24 dx4
dx
Solving this equation for the second derivative yields
(x + x) 2(x) + (x x)
d2
1
(x) =
dx2
x2
24
d4
d4
(c
)
+
(c
)
x2 .
1
2
dx4
dx4
Since
d4
d4
d4
(c1 ) + 4 (c2 ) 2 4 (x)
4
dx
dx
dx
as x 0, it follows that the error in the central difference approximation to the second derivative is approximately proportional to x2 .
5. With a Dirichlet condition at the left endpoint and a Neumann condition at the right, we must compute
(j)
ui
.
= u(xi , tj ), i = 1, 2, . . . , k, j = 1, 2, . . . , n
(using the same notation as in the text). We apply the usual 2-2 scheme at each (xi , tj ), i = 1, 2, . . . , k 1,
(j+1)
(j+1)
, i = 1, 2, . . . , k 1. To compute uk
,
resulting in equation (7.41) (page 301 in the text) for computing ui
we approximate the Neumann condition
u
(xk , tj ) = 0
x
by
(j)
(j)
uk+1 uk1
(j)
(j)
= 0 uk+1 = uk1 .
x
(j+1)
(1)
t
0.002
0.001
0.0005
0.00025
maximum error
1.9 102
4.8802 103
1.2250 103
3.0792 104
Chapter 8
x
= 4, x(0, ) = f (s),
t
= 3, t(0, ) = g(s),
which yield
x(s, ) = 4 + f (s), t(s, ) = 3 + g(s).
63
64
4
t
, s = x t.
3
3
4
x t .
3
x
3
, s = t x.
4
4
u0 x 43 t ,
t 34 x ,
t 34 x,
t > 34 x.
u0 (x ct),
(t c1 x),
t < c1 x,
t > c1 x.
65
du0
(x ct),
dx
1 d
c dt (t c1 x),
t < c1 x,
t > c1 x,
and
du0
du0
du0
(x ct)
(x0 ct0 ) =
(0) as (x, t) (x0 , t0 ),
dx
dx
dx
d
d
d
c1 (t c1 x) c1 (t0 c1 x0 ) = c1 (0) as (x, t) (x0 , t0 ),
dt
dt
dt
Therefore, u/x is continuous if and only if
du0
d
(0) = c1 (0).
dx
dt
Similar reasoning shows that this condition also ensures that u/t is continuous.
7. Consider the IVP
u
u
+
= x + y, (x, y) R2 ,
y
x
u(x, x) = x2 , x R.
We solve the problem in characteristics variables as follows:
x
= 1, x(s, 0) = s,
t
y
= 1, y(s, 0) = s,
t
v
= x + y, v(s, 0) = s2 .
t
The first two equations yield
x = s + t, y = s + t s =
and therefore
xy
x+y
, t=
,
2
2
v
= 2t, v(s, 0) = s2 v(s, t) = s2 + t2 .
t
Thus,
u(x, y) =
8.2
x y 2
2
x + y 2
2
1 2
(x + y 2 ).
2
u
u
+y
(x + y)u = 0,
x
y
u(1, y) = (y).
y
.
x
Notice that x must be positive. Also, since s represents y0 on the initial curve x = 1, we see that the
characteristics can be written as y = y0 x. Thus the characteristic through (1, y0 ) is the line with slope y0
passing through the origin. This also shows that there must be a discontinuity when x decreases to zero.
x = et , y = set t = ln x, s =
66
1)
y
ex+y1y/x .
x
(c) The formula for u shows that it is defined for all x > 0 (or for all x < 0, but the initial curve lies in the right
half-plane). This is consistent with the analysis of the characteristics.
u(x, y) =
u
u
+u
= 0,
x
y
u(x, 0) = (x).
The PDE is quasi-linear and can be solved by solving the characteristic equations:
x
= v, x(s, 0) = s,
t
y
= v, y(s, 0) = 0,
t
v
= 0, v(s, 0) = (s).
t
The equations for v yield v(s, t) = (s); substituting this into the first two equations yields x(s, t) = s + (s)t,
y = (s)t. From this we obtain s = x y, t = y/(x y), and the solution is
u(x, y) = v(s, t) = (s) = (x y),
that is, u(x, y) = (x y).
If we test the initial curve using the Jacobian test, we obtain
x
(s, 0) x
(s, 0) 1
s
t
y
=
(s, 0) y
(s, 0) 0
s
t
(s)
= (s),
(s)
67
x+
x2 4y
.
2
8.3
Burgerss equation
1
.
1 + x2
(1 + x20 )2
1 + 3x20
, t=
, x0 > 0.
2x0
2x0
The corner of the caustic can be found by setting the derivatives of x and t (with respect to x0 ) to zero and
solving, which yields
1
8
x0 = , x = 3, t = .
3
3 3
Moreover, we can solve
1 + 3x20
x=
2x0
for x0 in terms of x to get
x x2 3
x0 =
.
3
Substituting into the equation for t yields the two branches of the caustic:
!2
!2
3 1+
t1 =
x2 3
3
2(x x2 3)
3 1+
, t2 =
x+
2(x +
x2 3
3
x2
3)
, x
68
t
= 1, t(s, 0) = 0,
v
1
= 0, v(s, 0) = .
s
Solving yields
x(s, t) = s +
s1
1
, t(s, t) = , v(s, t) = .
s
s
Setting s = x0 , we obtain
x0
x0 1
t t=
(x x0 ).
x0
x0 1
These are the equations of the characteristics.
x = x0 +
s1
t
s
for s as follows:
x=s+
s1
t s2 + (t x)s t = 0
s
p
x t (t x)2 + 4t
s=
2
p
x t (t x)2 + 4t
s=
,
2
where the last step uses the fact that s must be negative. We then obtain u(x, t) = v(s, ) = 1/s, that is,
u(x, t) =
2
p
.
x t (t x)2 + 4t
(c) Notice that the slope of the characteristic decreases as x0 increases; therefore, the characteristics through
(x0 , 0) and (x1 , 0) will intersect at some point (x, t) with t < 0. Solving the equations
t=
x0
x1
(x x0 ), t =
(x x1 )
x0 1
x1 1
69
x x0
.
a((x0 ))
Assuming that a((x)) is an decreasing function of x, we know that characteristic passing through (x0 , 0) will
intersect with the characteristic passing through (x1 , 0) if x1 > x0 . We can compute the point of intersection as
follows:
x = x0 + a((x0 ))t, x = x1 + a((x1 ))t
x0 + a((x0 ))t = x1 + a((x1 ))t
x0 x1
1
t=
= a((x ))a((x )) .
1
0
a((x1 )) a((x0 ))
x1 x0
If we take the limit as x1 decreases to x0 , we find the smallest value of t for the characteristic through (x0 , 0)
intersects another characteristic:
t =
d
(a((x)))x=x
dx
0
1
((x
)) d
(x0 )
0
du
dx
= da
On the other hand, suppose we look for the smallest value of for which the change of variables from (s, ) to
(x, t) is no longer well-defined. This occurs when the following Jacobian determinant is first zero:
x
da
d
da
(s, ) x
(s, ) 1 + du
((s)) d
(s) a((s))
dx
s
=
t
t
= 1 + du ((s)) dx (s).
(s, )
(s, )
0
1
s
Setting this expression equal to zero, solving for , and replacing s by x0 and by t yields the same result as
before.
Chapter 9
Greens Functions
9.1
1. u(x) = xex .
3.
(a) This BVP models a bar whose top end (originally at x = 0) is free and whose bottom end is fixed at x = `.
If we apply a unit force to the cross-section at x = s, then the part of the bar originally between x = s and
x = ` will compress, and the part of the bar originally above x = s will just move rigidly with u(x) = u(s)
for 0 x < s. The compression of the bottom part of the bar will satisfy Hookes law:
k
u(x)
`x
= 1 u(x) =
`x
k
(the uncompressed length of the part of the bar between x = s and x = ` is ` x). Therefore we obtain
( `s
, 0 < x < s,
k
u(x) =
`x
, s < x < `.
k
The Greens function is
`s
,
k
`x
,
k
G(x; s) =
0 < x < s,
s < x < `.
G(x; s) =
max{x,s}
dz
.
k(z)
`s
,
k
`x
,
k
0 < x < s,
s < x < `.
(d)
u(x) =
ln (1 + x)
ln 2
1
x2
x
+
.
2
4
4
2
2
Z
u(x) = p
0
ds
,
k(s)
that is,
u(x) = g(x; `)p.
71
72
d
dx
Ku =
du
k(x)
dx
and
`
Z
(M f )(x) =
where
min{x,y}
Z
G(x; y) =
0
1
dz.
k(z)
2
We wish to prove directly that (M K)u = u for all u Cm
[0, `]. Given the definition of G, we will write
x
Z
(M f )(x) =
1
f (y) dz dy +
k(z)
1
f (y) dy dz +
k(z)
0
x
=
0
=
Z
xZ
1
f (y) dz dy
k(z)
1
f (y) dy dz,
k(z)
0
x
Z
Z
where the last step follows from changing the order of integration. Therefore,
Z xZ `
du
du
1 d
1 d
k(y) (y) dy dz
k(y) (y) dy dz
dx
dx
0
0
z k(z) dx
x k(z) dx
Z x
Z x
1
du
du
1
du
du
=
k(x) (x) k(z) (z) dz
k(`) (`) k(x) (x) dz
dx
dx
dx
dx
0 k(z)
0 k(z)
Z x
du
1
k(z) (z) dz
=
dx
0 k(z)
Z x
du
=
(z) dz = u(x)
0 dx
Z
(M Ku)(x) =
(notice how we used both boundary conditions in the course of this calculation). This is the desired result.
9.2
0 y x,
x y 1.
0 y x,
x y 1,
1
.
2(e2 1)
5. Let G = G(x, y) be any continuous function of two variables, a x b, a y b, and define M : C[a, b] C[a, b]
by
Z b
(M f )(x) =
G(x, y)f (y) dy.
a
73
Suppose G is symmetric in the sense that G(y, x) = G(x, y) for all x, y [a, b]. We then have
Z b
(M f, g)L2 =
(M f )(x)g(x) dx
a
Z
=
a
G(x, y)f (y) dy g(x) dx
a
b
a
b
a
b
Z
G(x, y)g(x) dx dy
G(y, x)g(x) dx dy (since G is symmetric)
f (y)
a
Z
f (y)
Z
=
a
b
0,
1.
x < 0,
0<x
(x)(x) dx =
H(x)
d
(x) dx
dx
holds for all D(R). That is, we wish to prove that if D(R), then
Z
d
H(x) (x) dx = (0).
dx
This is a direct calculation. Choose b > 0 sufficiently large that (x) = 0 for all x b. Then
Z
Z
Z b
d
d
d
H(x) (x) dx =
(x) dx =
(x) dx = (b) (0) = (0),
dx
dx
0
0 dx
as desired.
9. Let G be the Greens function for the BVP
du
d
P (x)
+ R(x)u = f (x), a < x < b,
dx
dx
du
1 u(a) + 2 (a) = 0,
dx
du
1 u(b) + 2 (b) = 0.
dx
Then
(
G(x; y) =
(y)v2 (x)
vP1(x)W
, a y x,
(x)
(x)v2 (y)
vP1(x)W
, x y b,
(x)
P (x)
+ R(x)u = 0, a < x < b.
dx
dx
We wish to show that, for fixed y (a, b), u(x) = G(x; y) is the solution of the above BVP with the right-hand-side
function f (x) replaced by (x y). To do this, we must interpret the BVP in its weak sense, which is
b Z b
Z b
du
du
dv
P (x) (x)v(x) +
P (x) (x) (x) + R(x)u(x)v(x) dx =
(x y)v(x) dx = v(y).
dx
dx
dx
a
a
a
74
The integrands of both integrals on smooth on the intervals of integration, and hence integration by parts is valid:
b Z b
du
du
dv
(x)v(x) +
P (x) (x) (x) + R(x)u(x)v(x) dx
dx
dx
dx
a
a
du
du
du
du
du
du
= P (a) (a)v(a) P (b) (b)v(b) + P (y) (y )v(y) P (a) (a)v(a) + P (b) (b)v(b) P (y) (y + )v(y)
dx
dx
dx
dx
dx
dx
Z b
Z y
du
du
d
d
P (x) (x) v(x) + R(x)u(x)v(x) dx +
P (x) (x) v(x) + R(x)u(x)v(x) dx
+
dx
dx
dx
dx
y
a
Z b
du
du
du
d
= P (y) (y )v(y) P (y) (y + )v(y) +
P (x) (x) + R(x)u(x) v(x) dx
dx
dx
dx
dx
a
du
du +
= P (y) (y )v(y) P (y) (y )v(y),
dx
dx
P (x)
where the last step follows because, on both (a, y) and (y, b), u(x) = G(x; y) is a smooth solution of the homogeneous ODE
d
du
P (x)
+ R(x)u = 0.
dx
dx
We now have
b Z b
du
du
dv
P (x) (x)v(x) +
P (x) (x) (x) + R(x)u(x)v(x) dx
dx
dx
dx
a
a
du
du +
= P (y)v(y)
(y )
(y )
dx
dx
!
2
1
(y) dv
(y)v2 (y)
v1 (y) dv
dx
dx
= P (y)v(y)
= v(y)
P (y)W (y)
2
since W (y) = v1 (y) dv
(y)
dx
dv1
(y)v2 (y).
dx
P (x)
+ R(x)u = 0, a < x < b,
dx
dx
du
1 u(a) + 2 (a) = va ,
dx
du
1 u(b) + 2 (b) = vb ,
dx
75
P (x)
+ R(x)u = f (x), a < x < b,
dx
dx
du
1 u(a) + 2 (a) = 0,
dx
du
1 u(b) + 2 (b) = 0.
dx
We proceed as in Section 9.2.2; in particular, we apply
dv
du
dv
du
(u, Lv) (Lu, v) = P (a) u(a) (a)
(a)v(a) P (b) u(b) (b)
(b)v(b)
dx
dx
dx
dx
as in the text (where L is defined by (9.16)), with v(x) = G(x; y) (for a fixed y) and u the solution of the above
BVP with inhomogeneous boundary conditions. We then have (Lv)(x) = (x y), and hence (u, Lv) = u(y).
Also, Lu = 0 since u satisfies the homogeneous ODE, and therefore (Lu, v) = 0. We thus obtain
dv
du
dv
du
u(y) = P (a) u(a) (a)
(a)v(a) P (b) u(b) (b)
(b)v(b) .
dx
dx
dx
dx
We now apply the boundary condition satisfied by u and v:
du
(a) = va
dx
du
1 u(b) + 2 (b) = vb
dx
dv
1 v(a) + 2 (a) = 0
dx
dv
1 v(b) + 2 (b) = 0
dx
1 u(a) + 2
du
1
1
(a) =
va
u(a),
dx
2
2
du
1
1
(b) =
vb
u(b),
dx
2
2
dv
1
(a) = v(a),
dx
2
dv
1
(b) = v(b).
dx
2
We thus obtain
du
dv
du
dv
(a)v(a) P (b) u(b) (b)
(b)v(b)
u(y) = P (a) u(a) (a)
dx
dx
dx
dx
1
1
1
1
1
1
= P (a) u(a)v(a)
va v(a) +
u(a)v(a) P (b) u(b)v(b)
vb v(b) +
u(b)v(b)
2
2
2
2
2
2
= 21 P (b)v(b)vb 21 P (a)v(a)va
= 21 P (b)G(b; y)vb 21 P (a)G(a; y)va
= 21 P (b)G(y; b)vb 21 P (a)G(y; a)va .
In the last step we used the symmetry of G. This is the desired formula:
u(y) = 21 P (b)G(y; b)vb 21 P (a)G(y; a)va .
9.3
(
G(x; y) =
(y)v2 (x)
,
vP1(x)W
(x)
v1 (x)v2 (y)
P (x)W (x) ,
0 y x,
x y 1,
where v1 (x) = ex e2x , v2 (x) = ex e2x1 , and P (x)W (x) is the constant 1 e1 . The solution to the BVP is
1
Z
u(x) =
76
(
G(x; y) =
(y)v2 (x)
,
vP1(x)W
(x)
v1 (x)v2 (y)
P (x)W (x) ,
0 y x,
x y 1,
where v1 (x) = ex sin (2x), v2 (x) = ex (sin(2x) (tan (2)) cos (2x)), and P (x)W (x) is the constant 2 tan (2). The
solution to the BVP is
Z
1
u(x) =
0
G(x; y) =
ey 6 + 6x + 3x2 + x3 ,
x
2
3
e 6 + 6y + 3y + y ,
1
y x,
2
x y 1.
23
23
+
x + 6x2 + 2x3 7ex1 .
2
2
Rb
7. Let G be the Greens function derived in this section, and let M be defined by (M f )(x) = a G(x; y)f (y) dy. (Here
2
M maps complex C[a, b] into complex C [a, b].) We wish to prove that (M f, g)w = (f, M g)w for all f, g C[a, b].
In the following calculation, we use the facts that G is symmetric (G(x; y) = G(y; x) for all x, y [a, b]) and G is
real-valued, so that G(x; y) = G(x; y). We have
Z b Z b
Z b
(M f, g)w =
(M f )(x)g(x)w(x) dx =
G(x; y)f (y)w(y) dy g(x)w(x) dx
a
a
b
a
bZ
a
b
Z
=
G(x; y)g(x)w(x) dx w(y) dy
G(x; y)g(x)w(x) dx w(y) dy
G(y; x)g(x)w(x) dx w(y) dy
Z
f (y)
a
b
Z
=
Z
f (y)
a
b
Z
=
Z
f (y)
a
b
=
a
(Notice how the key step was the interchanging of the order of integration.) This proves the desired result.
9.4
G
(t; 0)u0 + G(t; 0)v0 +
t
where
G(t; s) =
sin ((ts))
,
0,
t > s,
t < s.
sin (t)
v0 +
Z
0
77
Then
Z t
sin ((t t))
du
(t) = sin (t)u0 + cos (t)v0 +
f (t) +
cos ((t s))f (s) ds
dt
0
Z t
cos ((t s))f (s) ds
= sin (t)u0 + cos (t)v0 +
0
Z t
d2 u
2
(t)
=
cos
(t)u
sin
(t)v
+
cos
((t
t))f
(t)
From these formulas, we can easily verify that u satisfies the ODE and the initial conditions:
Z 0
sin (0)
sin ((t s))
u(0) = cos (0)u0 +
v0 +
f (s) ds = u0 ,
0
Z 0
du
(0) = sin (0)u0 + cos (0)v0 +
cos ((t s))f (s) ds = v0 ,
dt
0
and
Z t
d2 u
2
2
(t)
+
u(t)
=
cos
(t)u
sin
(t)v
+
f
(t)
= f (t).
3. The Greens function is
G(t; s) =
5. The Greens function is
G(t; s) =
sin (2(ts))
,
2
0,
t > s,
t < s.
e(ts) e2(ts) ,
0,
G(t; s) =
e0.02(ts) ,
0,
t > s,
t < s.
t > s,
t < s,
78
dt
t
t0
t0
which implies that
G
S
(t, s) = H(t s)
(t, s)
t
t
in the weak sense. We have
Z
Z
d
d
G(t; s) (t) dt =
H(t s)S(t, s) (t) dt
dt
dt
t0
t0
Z b
d
=
S(t, s) (t) dt
dt
s
Z b
S
= S(t, s)(t)|bs +
(t, s)(t) dt (by integration by parts)
s t
Z b
S
(t, s)(t) dt (since S(s, s) = 0 and (b) = 0)
=
t
Zs
S
=
H(t s)
(t, s)(t) dt.
t
t0
This proves the desired formula for G/t.
Next, we will show that
Z
Z
G
d
2S
(t; s) (t) dt =
H(t s)
(t, s) (t) dt
t
dt
t
dt
t0
t0
Z b
S
d
=
(t, s) (t) dt
t
dt
s
b Z b 2
S
S
=
(t, s)(t) +
(t, s)(t) dt (by integration by parts)
t
t2
s
s
Z b 2
S
= (s) +
(t, s)(t) dt (since S
(s, s) = 1 and (b) = 0)
t
2
s t
Z
2S
= (s) +
H(t s) 2 (t, s)(t) dt.
t
t0
This proves the desired formula for G2 /t2 .
Since S(t, s), as a function of t, satisfies the homogeneous version of the ODE, we see that
2G
G
(t; s) + a1 (t)
(t; s) + a0 (t)G(t; s) = (t s),
t2
t
as desired. Also,
G
S
(t0 , s) = H(t0 s)
(t0 , s) = 0
t
t
since H(t0 s) = 0 because t0 s < 0 by assumption. This completes the proof.
G(t0 , s) = H(t0 s)S(t0 , s) = 0,
9.5
79
1. Given that
2
1
ex /(4kt) ,
S(x, t) =
2 kt
we have
Z
2
1
S(x, t) dx =
ex /(4kt) dx.
2
kt
S(x y, t) dx =
S(v, t) dv = 1.
3. For t = 660, six terms of the Fourier series are sufficient to give an accurate graph. For t = 61, even 100 terms
are not sufficient to give a correct graph.
5. Following the example in Section 9.5.2, we obtain the following Greens function:
(
P k(2n1)2 2 (ts)/(4`2 )
2
sin (2n1)x
,
e
sin (2n1)y
n=1
`c
2`
2`
G(x, t; y, s) =
0,
0 s t,
s > t.
Here we used the correct eigenfunctions for the given mixed boundary conditions and also adjust for the the fact
that the constants appear differently in the PDE in this exercise than in the example in Section 9.5.2 (notice the
extra factor of 1/(c) in the formula for this Greens function). As before, k = /(c). Snapshots of G(x, t; 75, 60)
are shown in Figure 9.1.
Graph of G(x,t;75,60) for various values of t
temperature
0.02
t=120
t=240
t=360
t=480
t=600
0.015
0.01
0.005
0
0
20
40
60
80
100
Figure 9.1: Snapshots of the Greens function in Exercise 9.5.5 at times t = 120, 240, 360, 480, 600 seconds.
Twenty terms of the Fourier series were used to create these graphs.
7. We have
`
Z
u(x, t) =
G(x, t; y, 0)(y) dy
0
ny
nx
2 X kn2 2 t/`2
e
sin
sin
(y) dy
`
`
0 ` n=1
Z `
ny
nx
X
2 2
2
2
=
sin
(y) dy ekn t/` sin
` 0
`
`
n=1
X
n=1
bn ekn
2 t/`2
sin
nx
`
80
bn =
sin
0
ny
(y) dy, n = 1, 2, 3, . . .
`
are the Fourier sine coefficients of the function . We recognize u as the solution of the IBVP
u
2u
k 2 = 0, 0 < x < `, t > 0,
t
x
u(x, 0) = (x), 0 < x < `,
u(0, t) = 0, t > 0,
u(`, t) = 0, t > 0
(see the derivation at the beginning of Section 6.1 in the text).
9.6
1. Let
1
2c
u(x, t) =
x+c(ts)
f (y, s) dy ds.
0
xc(ts)
We wish to show that u satisfies the inhomogeneous wave equation (with right-hand side f (x, t)) on the real line,
subject to zero boundary conditions. We have
1
u
(x, t) =
t
2c
1
2c
=
=
1
2c
x+c(tt)
f (y, t) dy +
xc(tt)
x
f (y, t) dy +
x
Z t
1
2c
1
2c
Z t
2u
1
1
2 df
2 df
(cf
(x
+
c(t
t),
t)
+
cf
(x
c(t
t),
t))
+
c
(x
+
c(t
s),
s)
c
(x
c(t
s),
s)
ds
(x,
t)
=
t2
2c
2c 0
dx
dx
Z t
1
df
1
df
=
(cf (x, t) + cf (x, t)) +
c2 (x + c(t s), s) c2 (x c(t s), s) ds
2c
2c 0
dx
dx
Z
c t df
df
= f (x, t) +
(x + c(t s), s)
(x c(t s), s) ds,
2 0 dx
dx
Z t
u
1
(x, t) =
{f (x + c(t s), s) f (x c(t s), s)} ds,
x
2c 0
Z t
1
2u
df
df
(x,
t)
=
(x
+
c(t
s),
s)
(x
c(t
s),
s)
ds.
x2
2c 0 dx
dx
Thus
2u
2u
c
(x, t) c2 2 (x, t) = f (x, t) +
2
t
x
2
df
df
(x + c(t s), s)
(x c(t s), s) ds
dx
dx
0
Z t
c
df
df
(x + c(t s), s)
(x c(t s), s) ds
2 0 dx
dx
Z
= f (x, t),
as desired. It is obvious from the formulas for u and u/t that both are identically zero when t = 0.
3. We wish to show that
H(c(t s) |x y|) = (H((x y) + c(t s)) H((x y) c(t s))) H(t s)
81
for all x, y, t, s R such that c(t s) 6= |x y|. (The two expressions differ when c(t s) = |x y| > 0, at least
when H is defined as in the text: H(t) = 1 if t > 0 and H(t) = 0 if t 0.) We have
H(c(t s) |x y|) = 1 c(t s) |x y| > 0
c(t s) > |x y|
c(t s) < |x y| < c(t s) and t s > 0
x y + c(t s) > 0 and x y c(t s) < 0 and t s > 0
H(x y + c(t s)) = 1 and H(x y c(t s)) = 0 and H(t s) = 1
(H((x y) + c(t s)) H((x y) c(t s))) H(t s) = 1.
The reasoning can be reversed if we add the condition c(t s) 6= |x y|. This completes the proof.
5. Let u be the solution to
2u
2u
c2 2 = f(x, t), < x < , t > 0,
2
t
x
u(x, 0) = 0, < x < ,
u
(x, 0) = 0, < x < ,
t
where f is odd (f(x, t) = f(x, t)). We wish to show that u is also odd. We will do this by defining v(x, t) =
u(x, t) and proving that v satisfies the same IVP; then, by uniqueness, it will follow that v = u, that is,
u(x, t) = u(x, t), as desired.
We have
v
u
(x, t) = (x, t),
t
t
2v
2u
(x, t) = 2 (x, t),
t2
t
v
u
(x, t) =
(x, t),
x
x
2
v
2u
(x, t) = 2 (x, t).
2
x
x
Therefore,
2v
2v
2u
2u
(x, t) c2 2 (x, t) = 2 (x, t) + c2 2 (x, t)
2
t
x
t
x
2
2
u
2 u
=
(x,
t)
c
(x,
t)
t2
x2
= f(x, t) = f(x, t)
(since f is odd). Thus v satisfies the same wave equation as does u. Moreover, it is obvious that v also satisfies
the same initial conditions; hence v = u and the proof is complete.
7. We outline the derivation of the Greens function for
2u
2u
c2 2 = f (x, t), 0 < x < `, t > 0,
2
t
x
u(x, 0) = 0, 0 < x < `,
u
(x, 0) = 0, 0 < x < `,
t
u
(0, t) = 0, t > 0,
x
u
(`, t) = 0, t > 0.
x
82
2u
(x, t) =
x
(x, 0) =
x
(x, `) =
x
n
o
f(x + c(t s), s) f(x c(t s), s) ds.
It follows that
t
n
o
f(c(t s), s) f(c(t s), s) ds,
0
t
n
o
f(` + c(t s), s) f(` c(t s), s) ds.
Since f is even, we have f(c(t s), s) = f(c(t s), s), and hence
u
(x, 0) = 0.
x
Also,
f(` c(t s), s) = f(` + c(t s), s) (since f is even)
= f(` + c(t s), s) (since f is 2`-periodic).
Therefore,
u
(x, `) = 0.
x
It follows that u
, restricted to the interval 0 < x < `, solves the original IBVP.
The derivation of the Greens function for the IBVP is almost exactly the same as that given in the text (for
Dirichlet conditions). The result is
G(x, t; y, s) =
X
n=
1
{H(c(t s) |x y 2n`|) + H(c(t s) |x + y 2n`|)} .
2c
Chapter 10
1. The verification that L is symmetric is exactly the same as that given (for the general case) on pages 389390,
except for the treatment of the boundary term. We have
b
du
du
du
P (x) (x)v(x) = P (b) (b)v(b) + P (a) (a)v(a)
dx
du
dx
a
du
= P (b) (b)v(b) (since v(a) = 0)
du
1
1
du
=
(b) = u(b) .
P (b)u(b)v(b) since
2
dx
2
Therefore,
(Lu, v)w =
1
P (b)u(b)v(b) +
2
P (x)
a
du
dv
(x) (x) dx +
dx
dx
R(x)u(x)v(x) dx.
a
du
(a) = 0
dx
(relative to the interval [a, b]). We wish to determine the physically meaningful sign for 1 in the case that this
boundary condition models heat flow through the left end of a bar. Recall that the heat flux at x = a (a vector
quantity) is given by
du
(a)
dx
(the direction of the vector is indicated by the sign). Since the normal direction to the left end of the bar is 1,
the rate at which heat flows out of the bar at x = a is
1 u(a) +
du
du
(a)(1) = (a).
dx
dx
u(a) +
83
du
(a) = T,
dx
84
du
(b).
dx
The same reasoning as above then shows that the boundary condition is
u(b) +
du
(b) = T.
dx
Therefore, we should take 1 = , which shows that 1 > 0 is the physically meaningful case.
5. The eigenpairs are
n = 3 +
7.
n 2
ln 2
, un (x) = sin
n ln x
, n = 1, 2, 3, . . . .
ln 2
n 2
ln 2
, un (x) = x2 sin
n ln x
, n = 1, 2, 3, . . . .
ln 2
n 2
ln 2
4 2
2
< 4
,
2
(ln 2)
(ln 2)2
(k + 1)2 2
k2 2
< 4
.
(ln 2)2
(ln 2)2
10.3
n 2
ln 2
, un (x) = x1
n
cos
ln 2
n ln x
ln 2
+ sin
n ln x
ln 2
, n = 1, 2, 3, . . . .
dx
dx
u(a) = 0,
du
(b) = 0.
dx
Using the usual uniform mesh on the interval [a, b], the finite element space of consists of all piecewise linear
functions v (relative to the given mesh) satisfying v(a) = 0 (note that the Neumann condition is a natural
boundary condition). The standard basis for this space is {1 , . . . , n } (where each j is the usual hat function).
Applying the Galerkin method to the weak form (Equation (10.12) in the text), we obtain Au = Wu, where A
and W are the n n matrices defined by
Z b
dj
di
Aij =
P (x)
(x)
(x) + R(x)j (x)i (x) dx,
dx
dx
a
Z b
Wij =
w(x)j (x)i (x) dx.
a
(These are the same formulas derived in the text, except now i and j vary from 1 to n.)
85
3. The result is exactly the same as in Exercise 1, but now the basis for the finite element space is {0 , 1 , . . . , n },
the matrices A and W are (n + 1) (n + 1), and i, j vary from 0 to n in the formulas for Aij , Wij .
5. Let C and x Cn satisfy Ax = Wx, and let (x, y)W = (Wx) y. We can assume x satisfies (x, x)W = 1.
We then obtain
= (x, x)W = (Wx) x = (Ax) x = x (Ax) = x (Wx) = x (Wx) = ((Wx) x) = .
(Notice how the symmetry of both A and W is used to move these matrices from one side of the inner products
to the other.) Since = , it follows that R.
10.4
1. Let
u(x) =
n
X
i i (x)
i=0
be a continuous piecewise linear function defined on [0, `], relative to the usual uniform mesh. Here {0 , 1 , . . . , n }
is the standard basis. The average value of u on [0, `] is then
Z
Z
Z `
n
n
1 `
1X
1 `X
i i (x) dx =
u(x) dx =
i
i (x) dx.
` 0
` 0 i=0
` i=0
0
Since the graph of each i , i = 1, . . . , n 1, forms a triangle of height 1 and base 2h (h = `/n), it follows that
Z `
i (x) dx = h, i = 1, 2, . . . , n 1;
0
similarly,
Z
Z
0 (x) dx =
n (x) dx =
h
, i = 1, 2, . . . , n 1.
2
1
1
0 + 1 + + n1 + n .
2
2
10.5
an (t) cos
n=1
(2n 1)x
,
2`
where
2
an (t) = cn e(2n1)
2 t/(4`2 c)
, cn =
40(1)n+1
, n = 1, 2, . . . .
(2n 1)
du
(`) + u(`) = 0
dx
86
20
40
60
80
100
Figure 10.1: The temperature in the bar of Exercise 10.5.1 after 30, 60, 90, 120, 150, 180 minutes.
Case 1 ( > 0) The positive eigenvalues are the solutions of the equation
tan ( `) =
or
s
, s > 0,
tan (s) =
`
.
where s = `. There are solutions sk = (2k + 1)/2, k = 1, 2, 3, . . .. The corresponding eigenpairs are
s x
s2
k
, k = 1, 2, 3, . . . .
k = 2k , k (x) = sin
`
`
These eigenpairs exist regardless of the value of `. In addition, if ` < 1, then there is an additional solution
of tan (s) = s/(`), namely, s0 (0, /2), with corresponding eigenvalue 0 = s20 /`2 and eigenfunction
0 (x) = sin (s0 x/`).
Case 2 ( = 0) If ` = 1, then 0 = 0 is an eigenvalue with eigenfunction 0 (x) = x. If ` 6= 1, then 0 is not an
eigenvalue.
Case 3 ( < 0) Negative eigenvalues must satisfy the equation
tanh ( `) =
or
s
, s > 0,
tanh (s) =
`
where s = `. If ` 1, then this equation has no solution and hence there are no negative eigenvalues.
If ` > 1, then there is a single solution s0 , leading to a single negative eigenvalue 0 = s20 /`2 and
eigenfunction 0 (x) = sinh (s0 x/`).
Therefore, when < 0, there is a sequence of eigenpairs
s x
s2
k
k = 2k , k (x) = sin
, k = 1, 2, 3, . . . ,
`
`
where
2 2
. (2k + 1)
k =
.
2
4`
There is also an eigenvalue 0 , which is positive if ` < 1 (with eigenfunction 0 (x) = sin
( 0 x)), zero if ` = 1
(with eigenfunction 0 (x) = x), and negative if ` > 1 (with eigenfunction 0 (x) = sinh ( 0 x)).
10.6
d
dx
du
P (x)
+ R(x)u = F (x), a < x < b,
dx
u(a) = 0,
du
(b) + u(b) = 0,
dx
87
where P (x) > 0 for all x [a, b], , > 0, is nearly the same as for the BVP (10.26) given in the text. The
Dirichlet condition at x = a is an essential boundary condition (whereas the Neumann condition in (10.26) is a
natural boundary condition). This implies that we only consider finite element functions satisfying the Dirichlet
condition, so we use the basis {1 , 2 , . . . , n } instead of {0 , 1 , . . . , n }. The weak form of the BVP is unchanged
from (10.27), although now
du
P (a) (a)v(a)
dx
vanishes because v(a) = 0 rather than because du/dx(a) = 0. The result is the linear system Au = f , where A
and f are given by the same formulas as in the text (page 420), except that the entries corresponding to 0 are
omitted. Thus A is now n n and f is now an n-vector.
3. The weak form of
d
dx
P (x)
du
dx
+ R(x)u = F (x), a < x < b,
du
(a) = 0,
dx
du
1 u(b) + 2 (b) = 0
dx
1 u(a) + 2
is
P (a)
du
du
(a)v(a) P (b) (b)v(b) +
dx
dx
P (x)
a
du
dv
(x) (x) dx +
dx
dx
Z
R(x)u(x)v(x) dx =
F (x)v(x) dx
a
P (x)
a
dv
du
(x) (x) dx +
dx
dx
Z
R(x)u(x)v(x) dx =
F (x)v(x) dx.
a
Notice that the Robin conditions at the endpoints are natural boundary conditions, and hence no boundary
conditions are imposed on the test functions. We therefore take {0 , 1 , . . . , n } as the basis for the finite element
space (using the usual notation), and obtain the linear system Au = f , where A = K + M + G. The matrices K
and M are the same stiffness and mass matrices defined in the text (page 420), and G R(n+1)(n+1) is defined
by
1
2 P (a), i = j = 0,
1
Gij =
P (b), i = j = n,
2
0,
otherwise.
5. Suppose u satisfies
du
= F (x), 0 < x < `,
dx
du
(0) = 0,
dx
du
(`) + u(`) = 0.
dx
Then
Z
Z
F (x) dx =
d2 u
(x) dx =
dx2
du
du
(`)
(0)
dx
dx
du
du
= (`) since
(0) = 0
dx
dx
= u(`) (applying the Robin condition at x = `).
88
10.7
1. Let L : U V be a compact linear operator, where U , V are normed linear spaces. We wish to show that L is
bounded. We will argue by contradiction and assume L is unbounded. Then there exists a sequence {un } U
with kun kU = 1 for all n and kLun kV as n . (Here we are using the alternate definition of the norm
of L: kLk = sup{kLukV : u U, kukU = 1}.) Since L is compact and {un } is bounded in U , there must exist a
subsequence {unk } of {un } such that {Lunk } is convergent in V . But kLun kV implies that kLunk kV ,
and hence that {Lunk } is not convergent. This is a contradiction, which shows that the assumption that L is
unbounded is not possible. Therefore, L must be bounded, which is what we wanted to prove.
3. Suppose that, for a given R, u = , u = both satisfy
du
d
P (x)
+ R(x)u = w(x)u, a < x < b,
dx
dx
du
1 u(a) + 2 (a) = 0,
dx
du
1 u(b) + 2 (b) = 0,
dx
where P and w are assumed to be positive on the interval [a, b]. Let
(x)
d
d
(x)
W (x) = d
d
= (x) dx (x) dx (x)(x)
(x)
(x)
dx
dx
be the Wronskian of , . Since , satisfy the linear homogeneous ODE
d
du
P (x)
+ (R(x) w(x)u = 0
dx
dx
on [a, b], we can show that {, } is linearly independent by proving that W (x) = 0 for any given x [a, b]. We
have
d
d
1
1 (a) + 2 (a) = 0
(a) = (a),
dx
dx
2
and similarly
d
1
(a) = (a).
dx
2
Therefore,
d
1
d
1
(a)
(a)(a) = (a)(a) +
W (a) = (a)
(a)(a) = 0.
dx
dx
2
2
This shows that {, } is linearly dependent, as desired.
Chapter 11
a
c
Z bZ d
Z bZ d
F1
F2
=
(x1 , x2 ) dx2 dx1 +
(x1 , x2 ) dx2 dx1
x
1
a
a
c
c x2
Z dZ b
Z bZ d
F1
F2
=
(x1 , x2 ) dx1 dx2 +
(x1 , x2 ) dx2 dx1
c
a x1
a
c x2
Z d
Z b
=
{F1 (b, x2 ) F1 (a, x2 )} dx2 +
{F2 (x1 , d) F2 (x2 , c)} dx1
c
a
d
Z
=
Zc
=
Z b
Z b
F1 (b, x2 ) dx2
F1 (a, x2 ) dx2 +
F2 (x1 , d) dx1
F2 (x2 , c) dx1
c
a
a
Z
Z
Z
Z
Fn+
Fn+
Fn+
Fn=
F n,
Z
as desired. Here 1 , 2 , 3 , 4 denote the four sides of , labeled as in Figure 11.3 on page 452 of the text.
3. We have F(x) = 1, and therefore
Z
F = area() = .
On the other hand, on , n = x and therefore F n = 2x1 x2 + x22 . In polar coordinates, F n = sin (2) + sin2 (),
and hence
Z
Z 2
sin (2) + sin2 () d = .
Fn=
This verifies the divergence theorem for this domain and vector field.
5. Let L : C 2 () C() be defined by Lu = (k(x)u). By the product rule,
(k(u)v) = ku v + (ku)v;
therefore,
Z
(ku)v =
ku v
89
(k(u)v).
90
(k(u)v) =
k(u)v) n =
u
v.
n
The boundary term disappears if u and v both satisfy Dirichlet condition (since then v = 0 on ) and also if u
and v both satisfy Neumann conditions (since then u/n = 0 on ). Thus, in either case,
Z
Z
(Lu, v) =
(ku)v =
ku v.
Since the right-hand side is symmetric in u and v, so is the left-hand side; that is, (Lu, v) = (Lv, u) = (u, Lv),
and we see that L is a symmetric operator.
7. We have
(F1 (u(x))) +
(F2 (u(x))) +
(F3 (u(x)))
x1
x2
x3
u
u
u
= F10 (u(x))
(x) + F20 (u(x))
(x) + F30 (u(x))
(x)
x1
x2
x3
= F0 (u(x)) u(x).
F(u(x)) =
X
3
3
X
v u
u
2u
v
=
+v 2
xi
xi
xi xi
xi
i=1
i=1
3
3
X
X
2u
v u
+v
xi xi
x2i
i=1
i=1
v u + vu.
2
11. Suppose u, v Cm
(). Then
(Lm u, v) =
vu
Z
u v
u
(Greens first identity)
n
Z
u v
=
Z
=
Z
uv (Greens first identity)
Z
=
uv = (u, Lm v).
The boundary terms vanish because the product that forms the integrand is zero over the entire boundary. For
example,
Z
u
v
=0
n
since v = 0 on 1 and u/n = 0 on 2 .
11.2
1.
4 (5 + 7(1)m ) (1 + (1)n )
m3 n3 6
X
cmn
sin (mx1 ) sin (nx2 ),
mn
m=1 n=1
91
x 10
2
0
2
1
0.5
0
0.2
x2
0.4
0.8
0.6
0.8
0.6
x1
x 10
2
0
2
1
0.5
0
0.2
x2
0.4
x1
Figure 11.1: The error in approximating f (x, y) by the first 4 terms (top) and the first 25 terms (bottom) of
the double Fourier sine series. (See Exercise 11.2.1.)
5.
u
u
t
u(x, 0)
0.02, x , t > 0,
5, x ,
0, x , t > 0.
: 0 < x1 < 50, 0 < x2 < 50 .
u(x, t)
u(x, t) =
m=1 n=1
mx
1
50
sin
nx
2
50
where
amn (t)
bmn
cmn
mn
cmn
cmn
emn t/(c) +
,
mn
mn
20 (1 + (1)m ) (1 + (1)n )
,
mn 2
2 (1 + (1)m ) (1 + (1)n )
,
25mn 2
(m2 + n2 ) 2
.
2500
bmn
The solution is
us (x) =
0.02, x ,
u(x)
0, x .
mx
nx
X
cmn
1
2
sin
sin
.
50
50
mn
m=1 n=1
(d) The maximum difference between the temperature after 10 minutes and the steady-state temperature is
about 1 degree. The difference is graphed in Figure 11.2.
7. The minimum temperature in the plate reaches 4 degrees Celsius after 825 seconds.
9. The leading edge of the wave is initially 2/5 units from the boundary,
wave travels at a speed of 261 2
and the
.
units per second. Therefore, the wave reaches the boundary after 2/1305 = 0.00108 seconds. Figure 11.6 from
the text shows the wave about to reach the boundary after 103 seconds.
92
1
0.8
0.6
0.4
0.2
0
60
60
40
40
20
20
0
x2
x1
Figure 11.2: The difference between the temperature in the plate after 10 minutes and the steady-state temperature. (See Exercise 11.2.5.)
11. The difficult task is to compute the Fourier coefficients of the initial displacement . If we write
(x) =
m=1 n=1
(
bmn =
0,
sin2 (m/2)
,
1250m2 2
m 6= n,
m = n.
m=1 n=1
amn (t) =
0,
bmn ,
0.
0,
m 6= n,
m = n.
m=1
X
4 sin (m/2) sin (n/2)
sin (mx1 ) sin (nx2 ).
(m2 + n2 ) 2
m=1 n=1
u
u
t
u(x, 0)
u(x, t)
u
(x, t)
n
0.02, x , t > 0,
5, x ,
0, x 1 4 , t > 0,
0, x 2 3 , t > 0.
x R2 : 0 < x1 < 50, 0 < x2 < 50 .
x 10
x 10
1
1
0.5
x
1
1
1
0 0
0.5
x
0.5
x1
0.5
x1
0 0
0.5
x1
x 10
1
1
1
1
0 0
x 10
1
0.5
x
93
1
1
0.5
x
0.5
0 0
x1
Figure 11.3: Four snapshots of the solution to Exercise 11.2.11: t = 0 (top left), t = T /8 (top right), t = T /2
(bottom left), t = 5T /8 (bottom right). The solution is periodic with period T .
0.5
0.5
1
1
0.5
0.5
0
x2
x1
amn (t) sin
m=1 n=1
(2m 1)x1
100
sin
(2n 1)x2
,
100
where
amn (t)
bmn
cmn
mn
cmn
cmn
,
bmn
emn t/(c) +
mn
mn
80
(2m 1)(2n 1) 2
8
25(2m 1)(2n 1) 2
The solution is
us (x) =
0.02, x ,
u(x)
u
(x)
n
0, x 1 4 ,
0, x 2 3 .
X
X
(2m 1)x1
(2n 1)x2
cmn
sin
sin
.
mn
100
100
m=1 n=1
94
0
2
4
6
8
10
60
60
40
40
20
x2
20
0 0
x1
Figure 11.5: The difference between the temperature in the plate after 10 minutes and the steady-state temperature. (See Exercise 11.2.15.)
11.3
m=1
where
am0 =
cm0
,
s20m
the cm0 are the coefficients of f (r, ) = 1 r, and the s0m are the positive roots of J0 . A direct calculation shows
that
a10
a20
a30
a40
a50
a60
.
=
.
=
.
=
.
=
.
=
.
=
0.226324,
0.0157747,
0.00386078,
0.00148156,
0.000716858,
0.000399554.
The solution (approximated by six terms of the series) is graphed in Figure 11.6.
5. The solution is
u(r, ) =
m=1
where
am0 =
cm0
,
s20m
95
0.25
0.2
0.15
0.1
0.05
0
1
1
0.5
0.5
0
0
0.5
0.5
1 1
x2
x1
Figure 11.6: The approximation to solution u, computed with six terms of the (generalized) Fourier series (see
Exercise 11.3.3).
the cm0 are the coefficients of f (r, ) = r, and the s0m are the positive roots of J0 . A direct calculation shows
that
.
=
.
=
.
=
.
=
.
=
.
=
a10
a20
a30
a40
a50
a60
0.141350,
0.0371986,
0.0106599,
0.00537260,
0.00283289,
0.00182923.
The solution (approximated by six terms of the series) is graphed in Figure 11.7.
0.15
0.1
0.05
0
1
1
0.5
0.5
0
0
0.5
x2
0.5
1 1
x1
Figure 11.7: The approximation to solution u, computed with six terms of the (generalized) Fourier series (see
Exercise 11.3.5).
7. If we write
(r, ) =
cm0 J0 (m0 r) +
m=1
m=1 n=1
m=1
(amn (t) cos (n) + bmn (t) sin (n)) Jn (mn r),
m=1 n=1
then
amn (t)
bmn (t)
96
m=1
with am1 (t) given above. After 30 seconds, the temperature distribution can be approximated accurately using a
single eigenfunction (corresponding to the largest eigenvalue, 11 ), so we need only
.
c11 = 9.04433.
The temperature distribution after 30 seconds is graphed in Figure 11.8.
0.04
0.02
0
0.02
0.04
10
10
5
5
0
0
5
x2
5
10 10
x1
Figure 11.8: The approximation to solution u at t = 30, computed with one term of the (generalized) Fourier
series (see Exercise 11.3.7).
9. A circular drum of radius A has area A2 , the same area as a square drum of side length
frequency of such a square drum is
q
2
2
c (A)2 + (A)2
c
c 1 .
= 0.398942 .
=
2
A 2
A
A. The fundamental
Comparing to Example 11.9, we see that the circular drum sounds a lower frequency than a square drum of equal
area.
.
.
.
.
11. s41 = 7.588342434503804, s42 = 11.06470948850118, s43 = 14.37253667161759, s44 = 17.61596604980483
11.4
1. The mesh for this problem is shown in Figure 11.9, in which the free nodes are labeled. The stiffness matrix is
0.11111
. 0.11111
F=
0.11111 .
0.11111
The resulting weights for the finite element approximation are given by
0.048398
. 0.044979
u = K1 F =
0.044979 .
0.039879
97
0.8
3
x2
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
x1
3. The mesh for this problem is shown in Figure 11.10, in which the free nodes are labeled. The stiffness matrix is
16 16 and neither it nor the load vector will be reproduced here. The matrix is singular, as is expected for a
Neumann problem. The unique solution to KU = F with its last component equal to zero is
.
u=
0.071138
0.047315
0.012656
0.001458
0.067934
0.047349
0.014145
0.001566
0.065432
0.046198
0.015160
0.000329
0.062914
0.046391
0.016065
0.000000
13
14
15
16
10
11
12
0.8
x2
0.6
0.4
0.2
0
0
0.2
0.4
0.6
0.8
x1
5. Let Vn be the space of continuous piecewise linear functions relative to a given triangulation of the domain , and
2
let {1 , . . . , n } be the standard basis for Vn . Suppose that u :
PR belongs to L (). We wish to find v Vn
that minimizes kw ukL2 () over all w Vn . We can write v = n
and
use
the projection theorem: v
i=1 i i
must satisfy (u v, w)L2 () = 0 for all w Vn , which is equivalent to (u v, i )L2 () = 0 for all i = 1, 2, . . . , n.
98
j j , i = (u, i ), i = 1, 2, . . . , n
j=1
n
X
j (j , i ) = (u, i ), i = 1, 2, . . . , n.
j=1
This last system of equations is equivalent to M = f , where M is the usual mass matrix,
Z
Mij =
j i , i, j = 1, 2, . . . , n,
vi , i = 1, 2, . . . , n.
7.
f (x), x ,
u(x)
g(x), x ,
where G is any function satisfying the condition G(x) = g(x) for x , and
G + V = {G + v : v V } .
Substituting u = G + w, where w V , into the weak form yields
w V, a(w, v) = (f, v) a(G, v) for all v V.
In the Galerkin method, we replace V by a finite-dimensional subspace Vn and solve
w Vn , a(w, v) = (f, v) a(G, v) for all v Vn .
When using piecewise linear finite elements, we can satisfy the boundary conditions approximately by taking
G to be a continuous piecewise linear function whose values at the boundary nodes agree with the given
boundary function g. For simplicity, we take G to be zero at the interior nodes. The resulting load vector
is then given by
fi = (f, i ) a(G, i ), i = 1, 2, 3, . . . , n.
Since G is zero on interior nodes, the quantity a(G, i ) is nonzero only if (free) node i belongs to a triangle
adjacent to the boundary.
(b) The regular triangulation of the unit square having 18 triangles has only four interior (free) nodes, and each
one belongs to triangles adjacent to the boundary. This means that every entry in the load vector is modified
(which is not the typical case). Since f = 0, the load vector f is defined by
fi = a(G, i ), i = 1, 2, 3, 4.
The load vector is
0.22222222222222
. 1.55555555555556
f =
0.22222222222222 ,
1.55555555555556
0.27777777777778
. 0.61111111111111
u=
0.27777777777778 .
0.61111111111111
99
(11.1)
Multiplying the PDE by a test function v V = C 2 () and applying Greens first identity yields
Z
Z
Z
ku v =
fv +
kvh for all v V .
We will apply Galerkins method with Vm equal to the space of all continuous piecewise linear function
relative to a given triangulation T . We label the standard basis of Vm as 1 , 2 , . . . , n , and the nodes as
z1 , z2 , . . . , zn . (Every node in the mesh is now free.) Thus Vn = span{1 , 2 , . . . , n }.
We then define the Galerkin approximation wn by
Z
wn Vn , a(wn , i ) = (f, i ) +
khi , i = 1, 2, . . . , m.
Writing wn =
Pm
j=1 j j and
1
2
w = . ,
..
n
Z
khi , i = 1, 2, . . . , n.
The boundary integral in the expression for Fi is zero unless zi is a boundary node.
(b) The compatibility condition for (11.1) is determined by the following calculation:
Z
Z
Z
Z
u
f =
(ku) =
k
=
kh.
0.3622
0.2984
0.1344
0.0843
0.3728
0.3302
0.2081
0.0255
.
u=
0.3803
0.3447
0.2334
0.0591
0.3665
0.3257
0.1878
k(x) = 1, f (x) = x1 x2 +
0.0000
100
11.5
as desired.
3. We have
1 d
d2
d
d2
=
(r)
= r(r)
dr2
r dr
dr2
dr
d
d
r
(r) = r(r).
dr
dr
This last ODE can be solved by integrating twice to yield the general solution
Z r
r
(r) = c1 + c2 ln (r)
ln
(s)s ds.
s
0
5. Let V be the space of all smooth functions defined on R2 and having compact support. We wish to show that
the variational problem
Z
u(x) v(x) dx = v(y) for all v V
R2
is equivalent to
Z
0
Z
0
1 u v
u v
+ 2
r r
r
v rdrd = v(y) for all v V
in polar coordinates.
(a) We first convert
Z
u(x) v(x) dx
R2
to polar coordinates, where y R2 is fixed and represents the origin for the polar coordinates. By the chain
rule, we have
sin () u u
cos () u
u
u
u
= cos ()
,
= sin ()
+
x1
r
r x2
r
r
cos ()
+
r
r
r
r
cos () u
cos () v
u
v
sin ()
+
sin ()
+
r
r
r
r
sin () cos () u v
sin () cos () u v
sin2 () u v
u v
+
+
r r
r
r
r
r
r2
2
sin () cos () u v
sin () cos () u v
cos () u v
u v
sin2 ()
+
+
+
r r
r
r
r
r
r2
2
2
sin ()
cos () u v
u v
2
2
= (sin () + cos ())
+
+
r r
r2
r2
u v
1 u v
=
+ 2
.
r r
r
= cos2 ()
101
It follows that
Z
u(x) v(x) dx =
R2
u v
1 u v
+ 2
r r
r
v rdrd,
as desired.
(b) We can derive the same result by starting with the PDE u = (x y) in polar coordinates, multiplying
by a test function, and integrating. The right-hand side becomes
Z
(x y)v(x) dx = v(y).
R2
2u
1 2u
1 u
vr dr d
r2
r r
r2 2
0
0
Z 2 Z 2
Z 2 Z
Z Z 2 2
u
u
1
u
vr
dr
d
v
dr
d
v
d
r dr
r2
r
r2 0 2
0
0
0
0
0
Z
Z 2
Z
Z 2 Z
u
u v
u
u
r v +
r dr +
v dr d
v dr d
r
r
r
r
r
0
0
0
0
0
0
(
)
2 Z 2
Z
u
1
u v
v
d r dr
r2 0
0
0
Z 2
Z 2 Z
u v
1 u v
r dr d +
r dr d
r r
r2
0
0
0
Z 2
u v
1 u v
+ 2
r dr d.
r r
r
0
Z
=
=
=
=
and therefore
Z
0
Z
0
Z
0
g v 2
sin () d d d = c1
1 v 2
sin () d d d
2
v
sin () d d d
Z
Z 2 Z
v
d d d
= c1
sin ()
0
0
0
Z 2 Z
= c1
sin () (v(y)) d d
= c1
0
2 Z
= c1 v(y)
sin () d d
0
Z
= 2c1 v(y)
d
0
= 4c1 v(y).
From this we see that g is a solution of (11.83) if and only if c1 = 1/(4).
102
11.6
1. Suppose u satisfies
u = f (x) in ,
1 u + 2
u
= 0 on ,
n
u
v+
n
Z
u v =
f v.
1
2
as desired.
3. Let G be the free-space Greens function for the Laplacian and define
w(x; y) = 1 G(x; y) +
G
(x; y)
nx
u
= w(x; y) on ,
n
where
w(x; y) = 1 G(x; y) + 2
Define
G
(x; y).
nx
Z
u2 (x) =
Z
Z
Z
1
1
v (x; y)v(x) dx
w(x; y)v(x) dx +
x v (x; y) v(x) dx = 0
2
2
Z
Z
Z
1
1
v (x; y)v(x) dx +
x v (x; y) v(x) dx =
w(x; y)v(x) dx .
2
2
Notice how we used the boundary condition satisfied by v to substitute for v /nx . We now multiply both
sides of this last equation by f (y) and integrate over to obtain
Z Z
Z Z
1
v (x; y)v(x) dx f (y) dy+
x v (x; y) v(x) dx f (y) dy
2
Z Z
1
=
w(x; y)v(x) dx f (y) dy.
2
Changing the order of integration in the two integrals on the left yields
Z Z
Z Z
1
v (x; y)f (y) dy v(x) dx +
x v (x; y)f (y) dy v(x) dx
2
Z Z
1
=
w(x; y)v(x) dx f (y) dy.
2
Z
103
= u2 (x),
we obtain
1
2
Z
u2 (x)v(x) dx +
u2 (x) v(x) dx
Z Z
1
w(x; y)v(x) dx f (y) dy,
=
2
as desired.
5. Let G be the free-space Greens function for the Laplacian, and suppose v (x; y) satisfies the BVP
x v = 0 in ,
v (x; y) = G(x; y) on
for all y . (Notice that G(x; y) is a continuous function of x for all y , and therefore v is welldefined.) We define G (x; y) = G(x; y) v (x; y), and we will show that G is the Greens function for the
BVP
u = f (x) in ,
u = 0 on .
The weak form of the last BVP is
2
u CD
(),
2
f (x)v(x) dx for all v CD
().
u(x) v(x) dx =
where
u1 (x) =
Letting V be the space of all smooth functions with compact support, we have
Z
Z
u1 (x) v(x) dx =
f (x)v(x) dx for all v V,
R2
R2
where f has been extended to be zero outside of . This last variational equation holds because G is the free-space
2
Greens function. For any v CD
(), we can extend v to be identically zero outside of and thereby obtain an
element v of V . We then have
Z
Z
2
u1 (x) v(x) dx =
f (x)v(x) dx for all v CD
().
2
CD
()
104
2
This shows that u CD
(); hence u satisfies the given BVP, which shows that G is the desired Greens function.
Z
(vu uv) =
v
u
u
n
n
.
u
= 0 on ,
n
and, for y, z , define u(x) = G (x; y), v(x) = G (x; z). Since G (x; y) satisfies
x G = (x y) in
1 G + 2
G
= 0, on ,
nx
we see that
Z
vu = v(y) = G(y; z),
Z
uv = u(z) = G(z; y).
Therefore,
Z
(vu uv) = G(z; y) G(y; z).
We also have
u
1
= u on ,
n
2
or
1
G
(x; y) = G (x; y).
nx
2
Similarly,
G
1
(x; z) = G (x; z).
nx
2
Therefore,
u
v
u
n
n
1
1
G (x; z)G (x; y) +
G (x; y)G (x; z) dx = 0.
2
2
105
Let v(x) = G (x; y), where G is the Greens function for the BVP
u = f (x) in ,
u = 0 on .
Finally, define = {x : kx yk > }, where y is given and > 0 is small enough that B (y) .
Notice that u = 0 in , v = 0 in , and v(x) = 0 for all x . Applying Greens second identity to u and
v yields
Z
Z
u
v
(vu uv) =
v
u
dx
n
n
Z
Z
v
u
v
u
(x) u(x)
(x) dx +
v(x)
(x) u(x)
(x) dx
0=
v(x)
n
n
n
n
S (y)
Z
Z
u
u
G
G
0=
0
G (x; y)
(x) (x)
(x; y) dx +
(x) u(x)
(x; y) dx
n
nx
n
nx
S (y)
Z
Z
Z
G
u
G
(x)
(x; y) dx =
G (x; y)
(x) dx
u(x)
(x; y) dx .
nx
n
nx
S (y)
S (y)
Now, recall that G = G v , where G is the free-space Greens function for the Laplacian and v (x; y) satisfies
x v = 0 in ,
v (x; y) = G(x; y) on .
We therefore have
Z
(x)
G
(x; y) dx =
nx
G(x; y)
S (y)
u
(x) dx
n
Z
v (x; y)
S (y)
u
(x) dx +
n
u(x)
S (y)
G
(x; y) dx
nx
Z
u(x)
S (y)
v
(x; y) dx .
nx
The integrands for the last two integrals are continuous, with no singularities as 0+ . Therefore, these two
integrals tend to zero as 0+ . We have
G(x; y) =
1
ln (kx yk) ,
2
u
(x) dx =
n
Z
u(x) dx = 0
B (y)
(applying the divergence theorem and using the fact that u = 0 in ). It remains only to calculate
Z
G
u(x)
(x; y) dx .
n
x
S (y)
Now,
x G(x; y) =
and, on S (y),
nx =
xy
2kx yk2
xy
kx yk
106
Z
u(x)
S (y)
G
1
(x; y) dx =
nx
2
Z
u(x) dx ,
S (y)
R2 kxk2
(y) dy .
2Rkx yk2
Now suppose that u is to represented as a function of polar coordinates (r, ). Let the circle SR (0) be represented
by y = (R cos (), R sin ()), 0 2. Then
s
2
2
q
y1
y2
dy =
+
d = R2 cos2 () + R2 sin2 () d = Rd.
P (x)
+ R(x)u = 0, a < x < b,
dx
dx
u(a) = ua ,
u(b) = ub
is
G
G
(y; a) P (b)ub
(y; b),
y
y
where G is the Greens function for the inhomogeneous differential equation with homogeneous boundary conditions. If we take P (x) = 1, we obtain
G
G
u(y) =
(y; a)ua +
(y; b)ub .
y
y
u(y) = P (a)ua
Thus u is obtained by integrating (that is, summing) the normal derivative of the Greens function, times the
boundary function over the boundary of = (a, b) (that is, the set {a, b}). Notice that the unit normal to
at x = b is n = 1, while at x = a it is n = 1, so that
G
(y; a)
y
107
R2 kx zk2
(y) dy .
2Rkx yk2
Substituting x = z, we see that kz yk2 = R2 (since y SR (z), and of course kz zk2 = 0; therefore,
Z
Z
R2
1
u(z) =
(y) dy =
(y) dy .
3
2R SR (z)
SR (z) 2R
Thus u(z) is the average value of u over the circle SR (z) (recall that u(y) = (y) on SR (z)).
11.7
((x + cty)) =
(x + cty) (xi + ctyi )
t
x
t
i
i=1
=
3
X
(x + cty)(cyi )
x
i
i=1
=c
3
X
(x + cty)yi = (x + cty) y.
x
i
i=1
Similarly,
!
3
X
c
(x + cty)yi
xi
i=1
3
X
=c
(x + cty)yi
t xi
i=1
((x + cty)) =
t2
t
=c
3 X
3
X
2
=c
3 X
3
X
2
(x + cty)yi cyj
xj xi
i=1 j=1
=c
3
X
i=1
= c2
3
X
yi
3
X
2
(x + cty)yj
xj xi
j=1
yi 2 (x + cty)y
i
i=1
= c2 y 2 (x + cty)y.
3. We wish to derive the solution of
2u
c2 u = 0, x R2 , t > 0,
t2
u(x, 0) = 0, x R2 ,
u
(x, 0) = (x), x R2 .
t
108
B1 (0)
Z 1x2
=2
Z
=2
B1 (0)
It follows that
1x2
(x + cty)
p
dy.
1 kyk2
B1 (0)
Performing the change of variables z = x + cty yields the alternate formula
Z
(z)
1
p
dy.
u(x, t) =
2c Bct (x) c2 t2 kz xk2
u(x, t) =
t
2
5. The solution of
2u
c2 u = 0, x R3 , t > 0,
t2
u(x, 0) = 0, x R3 ,
u
(x, 0) = (x), x R3 .
t
is
u(x, t) =
t
4(ct)2
Let
(x) =
1,
0,
Z
(z) dz .
Bct (x)
kxk < 1,
otherwise,
and let u be the corresponding solution of the above IVP. Suppose first that x R3 , kxk > R, and t < (kvkR)/c.
This last condition implies that ct < kxk R, and therefore, if z Sct (x), then
kz xk = ct < kxk R.
It is easy to see that this condition implies that kzk > R (since z is closer to x than x is to SR (0)). Therefore,
z Sct (x) (z) = 0,
and it follows from the formula for u(x, t) that u(x, t) = 0.
Now suppose t > (kxk + R)/c, that is, ct > kxk + R. Then
z Sct (x) kz xk = ct > kxk + R,
which implies that kzk > R (since kz xk kzk + kxk). Therefore, in this case also,
z Sct (x) (z) = 0,
and we see that u(x, t) = 0.
7. The causal Greens function is
G(x, t; y, s) =
( P
n=1
sin (c
n (ts))
n (x)n (y),
c n
0,
t > s,
t < s.
11.8
109
/(4kt)
,
t
4kt2
2t
2
xi
S
(x, t) = (4kt)n/2 ekxk /(4kt)
,
xi
2kt
2S
x2i
1
n/2 kxk2 /(4kt)
(x,
t)
=
(4kt)
e
,
x2i
4k2 t2
2kt
2
kxk2
n
S(x, t) = (4kt)n/2 ekxk /(4kt)
.
4k2 t2
2kt
From these formulas, it follows immediately that
S
(x, t) kS(x, t) = 0.
t
3. We have seen that the IBVP
v
kv = f (x, T t), x , 0 < t < T,
t
v(x, 0) = (x), x ,
v(x, t) = 0, x , 0 < t < T
has a unique solution v. Let us define u(x, t) = v(x, T t). Then
u
v
(x, t) = (x, T t),
t
t
u(x, t) = v(x, T t),
and hence
u
v
(x, t) ku(x, t) =
(x, T t) kv(x, T t) = f (x, T (T t)) = f (x, t).
t
t
Also, u(x, T ) = v(x, 0) = (x) for all x , and u(x, t) = v(x, T t) = 0 for all x and 0 < t < T . Thus u
satisfies
u
ku = f (x, t), x , 0 < t < T,
t
u(x, T ) = (x), x ,
u(x, t) = 0, x , 0 < t < T,
Z Z T
Z Z T
Z TZ
Z TZ
v
u
=
u
dt dx k
uv dx dt +
v
dt dx + k
vu dx dt
t
t
0
0
0
0
Z
Z T
Z T Z
Z
Z Z T
u
v
u
dt dx k
u
dx
u v dx dt +
v
dx dt+
=
uv|T0
v
t
n
t
0
0
0
Z T Z
Z
u
k
v
dx
u v dx dt
0
n
Z
Z TZ
u
v
=
(u(x, T )v(x, T ) u(x, 0)v(x, 0)) dx + k
v
u
dx .
n
n
Chapter 12
cn einx ,
n=
2(1)n
, n = 1, 2, . . . .
n2 2
The errors in approximating f by a partial Fourier series are shown in Figure 12.1.
0.04
0.02
0
0.02
0.04
1
0.04
0.5
0
x
0.5
0.5
0
x
0.5
0.5
0
x
0.5
0.02
0
0.02
0.04
1
0.04
0.02
0
0.02
0.04
1
Figure 12.1: The error in approximating f (x) = 1 x2 by its partial complex Fourier series with N = 10 (top),
N = 20 (middle), and N = 40 (bottom). (See Exercise 12.1.1.)
The magnitudes of the error in approximating f by a partial Fourier series are shown in Figure 12.2.
5. Let
g(x) = a0 +
nx
nx
X
an cos
+ bn sin
,
`
`
n=1
111
112
0.5
0
1
1
0.5
0
x
0.5
0.5
0
x
0.5
0.5
0
x
0.5
0.5
0
1
1
0.5
0
1
Figure 12.2: The magnitude of the error in approximating f (x) = eix by its partial complex Fourier series with
N = 10 (top), N = 20 (middle), and N = 40 (bottom). (See Exercise 12.1.3.)
where
a0
an
bn
Z `
1
g(x) dx,
2` `
Z
nx
1 `
g(x) cos
dx, n = 1, 2, 3, . . . ,
` `
`
Z `
nx
1
g(x) sin
dx, n = 1, 2, 3, . . . ,
` `
`
nx
nx
X
pn cos
+ qn sin
.
`
`
n=1
1
2`
f (x)einx/` dx.
=
=
Z `
nx
nx
1
(g(x) + ih(x)) cos
i sin
dx
2` `
`
`
Z
Z
nx
nx
1 1 `
1 `
g(x) cos
dx i
g(x) sin
dx
2 ` `
`
` `
`
Z `
Z
nx
nx
1
1 `
+i
h(x) cos
dx +
h(x) sin
dx
` `
`
` `
`
1
(an + qn + i(pn bn )) .
2
1
(an qn + i(pn + bn )) .
2
Finally,
c0 = a0 + ip0 .
7. We have
N
1
X
eijn/N
2
n=0
N
1
X
e2ij/N
n=0
2ij
e
1
,
e2ij/N 1
n
113
rn =
n=0
rm+1 1
.
r1
Moreover, since ei is a 2-periodic function of , we see that e2ij = 1 and hence that
N
1
X
eijn/N
2
= 0.
n=0
eijn/N
2
N
1
X
2
jn
jn
+ i sin
N
N
n=0
N
1
X
jn
jn
jn
jn
sin2
+ 2i cos
sin
cos2
N
N
N
N
n=0
N
1
N
1
X
X
jn
jn
cos2
sin2
N
N
n=0
n=0
N
1
X
jn
jn
+2i
sin
.
cos
N
N
n=0
n=0
cos
cos2
n=0
jn
N
N
1
X
N
1
X
sin2
n=0
cos
n=0
jn
N
sin
jn
N
jn
N
0,
0.
The second equation is one of the results we set out to prove. The first equation can be written, using the
trigonometric identity sin2 () = 1 cos2 (), as
N
1
X
cos2
n=0
jn
N
N
1
X
1 cos2
n=0
jn
N
which simplifies to
2
N
1
X
cos2
n=0
jn
N
= N,
or
N
1
X
cos2
n=0
jn
N
jn
N
N
,
2
N
2
sin2
n=0
then follows.
12.2
.
cn = Fn , n = 16, 15, . . . , 15,
= 0,
114
0.4
|Fn|
0.3
0.2
0.1
0
0
10
n
15
20
Figure 12.3: The magnitude of the sequence {Fn } from Exercise 12.2.1.
0.5
0.4
0.3
0.2
0.1
0
0.1
0.2
0.3
0.4
0.5
1
0.5
0
x
0.5
Figure 12.4: The function f (x) = x(1 x2 ) (the curve) and the estimates of f (xj ) (the circles) computed from
the complex Fourier coefficients of f (see Exercise 12.2.3.
15
where {Fn }15
n=16 is the DFT of {fj }j=16 ,
fj = f (xj ), xj = 1 +
j
, j = 16, 15, . . . , 15
16
(note that f (1) = f (1)). Therefore, we can estimate {f (xj )} by taking the inverse DFT (using the inverse FFT)
of {cn }. The results are shown in Figure 12.4.
5. We have
N
1
X
An e2ijn/N
n=0
N 1 N 1
1 X X
am e2imn/N e2ijn/N
N n=0 m=0
N 1 N 1
1 X X
am e2i(jm)n/N
N n=0 m=0
(N 1
)
N 1
X 2i(jm)n/N
1 X
am
e
.
N m=0
n=0
If j = m, then
N
1
X
n=0
e2i(jm)n/N =
N
1
X
n=0
1 = N,
12.3. RELATIONSHIP OF SINE AND COSINE SERIES TO THE FULL FOURIER SERIES
115
e2i(jm)n/N
N
1
X
n=0
e2i(jm)/N
n
n=0
=
e2i(jm)/N
N
1
e2i(jm) 1
e2i(jm)/N 1
0.
e2i(jm)/N
=
=
Therefore,
am
N
1
X
e2i(jm)n/N =
N aj ,
0,
n=0
m = j,
m 6= j,
and so we obtain
N
1
X
2ijn/N
An e
n=0
N 1
1 X
am
=
N m=0
(N 1
X
)
2i(jm)n/N
n=0
1
N aj = aj ,
N
as desired.
7. Below we show the exact Fourier sine coefficients of f , the coefficients estimated by the DST, and the relative
error. Since both an and the estimated an are zero for n even, we show only an for n odd.
n
an
1
estimated an
relative error
2.5801 10
2.5801 10
6.2121 106
9.5560 103
9.5511 103
5.1571 104
2.0641 10
2.0555 10
4.1824 103
7.5222 104
7.3918 104
1.7340 102
3.5393 10
3.3531 10
5.2608 102
11
1.9385 104
1.6778 104
1.3448 101
13
1.1744 104
8.0874 105
3.1135 101
15
6.8241 101
7.6448 10
2.4279 10
9. We have
2
N
1
X
Fn sin
n=1
jn
N
N
1 N
1
X
X
fm sin
mn
N
n=1 m=1
N
1
X
fm
m=1
N
1
X
sin
mn
N
n=1
jn
N
jn
.
N
sin
sin
By the hint,
N
1
X
sin
mn
n=1
sin
jn
N
N
1
X
n=1
Fn sin
jn
N
=4
N
fj = 2N fj ,
2
116
0.5
0.5
1.5
3
0
x
Figure 12.5: The partial Fourier sine series (50 terms) of f (x) = x.
12.3
1. The partial Fourier sine series, with 50 terms, is shown in Figure 12.5. It appears that the series converges to the
function F satisfying
F (x) = x 2k, 2k 1 < x < 2k + 1, k = 0, 1, 2, . . . .
The period of this function is 2.
3.
(a) The odd extension fodd is continuous on [`, `] only if f (0) = 0. Otherwise, fodd has a jump discontinuity
at x = 0.
(b) The even extension feven is continuous on [`, `] for every continuous f : [0, `] R.
5. The quarter-wave sine series of f : [0, `] R is the full Fourier series of the function f : [2`, 2`] R obtained
by first reflecting the graph of f across the line x = ` (to obtain a function defined on [0, 2`]) and then taking the
odd extension of the result. That is, f is defined by
f (x),
0 x `,
f
(2`
x),
`
< x 2`,
f(x) =
f
(x),
`
x < 0,
f (x + 2`), 2` x < `.
Since this function is odd, its full Fourier series has only sine terms (all of the cosine coefficients are zero), and
because of the other symmetry, the even sine terms also drop out.
12.4
s
Z
|f (x) fN (x)|2 dx
b
2
MN
dx
MN b a.
117
7. Suppose f : [0, `] R is continuous. Then feven , the even, periodic extension of f to R, is defined by
f (x 2k`),
2k` x < (2k + 1)`, k = 0, 1, 2, . . . ,
feven (x) =
f (x + 2k`), (2k 1)` x < 2k`, k = 0, 1, 2, . . . .
Obviously, then, feven is continuous on every interval (2k`, (2k + 1)`) and ((2k 1)`, 2k`), that is, except possibly
at the points 2k` and (2k 1)`, k = 0, 1, 2, . . .. We have
lim
feven (x) =
lim
feven (x) =
x2k`
lim
lim
x2k`
x0+
and
x2k`+
x2k`+
x0+
Since feven (2k`) = f (0) by definition, this shows that feven is continuous at x = 2`.
A similar calculation shows that
lim
x(2k1)`
feven (x) =
lim
x(2k1)`+
f (x),
f (2` x),
f (x) =
f (x),
f (x + 2`),
0 x `,
` < x 2`,
` x < 0,
2` x < `.
Then define F : R R to be the periodic extension of f to R. Assuming f is piecewise smooth, the quarter-wave
sine series of f converges to F (x) if F is continuous at x, and to
1
[F (x) + F (x+)]
2
if F has a jump discontinuity at x. If f is continuous, then its quarter-wave sine series converges to f except
possibly at x = 0. If f is continuous and f (0) = 0, then the quarter-wave sine series of f converges to f at every
x [0, `].
12.5
1. The function h(x) fails to satisfy h(1) = h(1), so its Fourier coefficients decay like 1/n and its Fourier series is
the slowest to converge. The function f satisfies f (1) = f (1), but df /dx has a discontinuity at x = 0 (and the
derivative of fper also has discontinuities at x = 1). Therefore, the Fourier coefficients of f decay like 1/n2 .
Finally, gper and its first derivative are continuous, but its second derivative has a jump discontinuity at x = 1,
so its Fourier coefficients decay like 1/n3 . The Fourier series of g is the fastest to converge.
3.
5. Figure 12.6 shows the f , its partial Fourier series with 21, 41, 81, and 161 terms, and the line y = 1.09. Zooming
in near x = 0 shows that the overshoot is indeed about 9%; see Figure 12.7.
12.6
1.
X
1
2
n
n=1
converges to a finite value.1 Therefore, {1/n} `2 and so, by Theorem 12.36, the sine series converges to a
function in L2 (0, 1).
1A
X
1
k
n
n=1
118
0.5
0
21 terms
41 terms
81 terms
161 terms
0.5
1
0.5
0
x
0.5
Figure 12.6: The function f from Exercise 12.5.5, its partial Fourier series with 21, 41, 81, and 161 terms, and
the line y = 1.09.
1.105
21 terms
41 terms
81 terms
161 terms
1.1
1.095
1.09
1.085
1.08
1.075
0.02
0.02
0.04
x
0.06
0.08
0.1
(1 x).
2
1.5
0.5
0.5
0
0.2
0.4
0.6
0.8
Figure 12.8: The partial sine series, with 100 terms, from Exercise 12.6.1.
converges if k is greater than 1. This can be proved, for example, by comparison with the improper integral
Z
dx
.
xk
1
119
2 X
X
1
1
=
n
n
n=1
n=1
is the harmonic series, a standard example of a divergent series. Therefore, {1/ n} 6 `2 , and so the series does
2
not converge to an L (0, 1) function.
R1
5. (a) The function f (x) = xk belongs to L2 (0, 1) if and only if the integral 0 x2k dx is finite. Provided k 6= 1/2,
we have
1
Z 1
Z 1
, k > 21 ,
1 r2k+1
1+2k
x2k dx = lim
x2k dx = lim
=
,
k < 12 .
1 + 2k
r0+
r0+ r
0
For k = 1/2,
Z 1
Z 1
Z 1
dx
dx
x2k dx =
= lim
= lim ln (r) = .
+
x
x
r0
r0+
0
0
r
2
Thus we see that f L (0, 1) if and only if k > 1/2.
(b) The first few Fourier sine coefficients of f (x) = x1/4 , as computed by the DST, are approximately
1.5816, 0.25353, 0.63033, 0.17859, 0.41060, 0.14157, . . . .
(c) The graphs of f , the partial Fourier sine series, with 63 terms, and the difference between the two, are shown
in Figure 12.9.
6
y=x1/4
sine series (63 terms)
0
0
0.2
0.4
0.6
0.8
0.6
0.8
x
0.1
0.1
0
0.2
0.4
x
Figure 12.9: The function f (x) = x1/4 , together with its partial Fourier sine series (first 63 terms) (top), and
the difference between the two (bottom). See Exercise 12.6.5.
7. Since vn v, there exists a positive integer N such that
n N kv vn k <
.
2
Then, if n, m N , we have
kvn vm k kvn vk + kv vm k <
+ = .
2
2
12.7
2
1. The proof is a direct calculation, using integration by parts (Greens identity): Suppose u, v CD
(). Then
Z
Z
Z
u
(KD u, v) =
(k(x)u) v =
k(x)u v
k(x)v
n
Z
=
k(x)u v (since v = 0 on )
Z
Z
v
=
(k(x)v) u +
k(x)u
n
Z
=
(k(x)v) u (since u = 0 on )
(u, KD v).
120
3. If t is very large, then we can approximate u(x, t) by the first term in its generalized Fourier series. Using the
same notation as before for the eigenvalues and eigenfunctions of the negative Laplacian on , we have
.
u(x, t) = c1 e1 t/(c) 1 (x), t large.
The constant c1 is the first generalized Fourier coefficient of the initial temperature 5:
R
51
c1 = R 2 .
1
The approximation is valid provided 1 is a simple eigenvalue; that is, there is only one linearly independent
eigenvector corresponding to 1 . Then all of the other terms in the generalized Fourier series decay to zero much
more rapidly than does the first term.
Chapter 13
1. We must check that the one-point rule gives the exact values for the integral
f (x) = x2 . With f (x) = 1, we have
Z
1
f = (area of T R ) 1 =
2
TR
TR
and
1
f
2
1 1
,
3 3
1
.
2
Z
f
1x1
x1 dx2 dx1
TR
0
1
Z
=
0
1
1
1
x1 x21 dx1 = = .
2
3
6
1
f
2
1 1
,
3 3
=
1 1
1
= ,
2 3
6
so the rule is exact in this case as well. By symmetry, the rule must hold for f (x) = x2 , which shows that the
rule has degree of precision at least 1. To show that the degree of precision is not greater than 1, we note that,
for f (x) = x21 ,
Z
Z 1 Z 1x1
Z 1
1
1
1
f=
x21 dx2 dx1 =
x21 x31 dx1 = =
,
3
4
12
R
0
0
0
T
while
1
f
2
1 1
,
3 3
=
1 1
1
=
.
2 9
18
3. We have
Z
3/2
2x1 2
f=
T
x1 x22
42x1
dx2 dx1 +
3/2
1 + z1 +
x2
z2 .
1
z2 ,
2
The Jacobian is
J=
121
1
0
1
2
,
7
1
1
+
= .
120
15
8
122
1
1
1 + z1 + z2 , z2 = 1 + z1 + z2 z22 ,
2
2
we have
1z1
g=
f=
T
TR
1
1 + z1 + z2 z22 dz2 dz1 .
2
by
Z
f i a(G, i ).
Fi =
The quantity a(G, i ) is nonzero only if the free node nfi belongs to a triangle that also contains a constrained
boundary node. The point here is simply that this can easily be determined from the information in the data
structure. As we loop over the triangles, we can determine, for each, whether it contains both a free node and a
constrained node. If it does, we modify the load vector accordingly.
13.2
n1
X 2 n1
X
n2
n
2n3
2(n i)2 + (n i) = 2
j +
.
j=
3
2
6
j=1
j=1
This agrees with the O(2n3 /3) operation count given in the text.
The computation of L1 b requires n 1 steps, with 2(n i) arithmetic operations per step. The total is
2
n1
X
i=1
(n 1) = 2
n1
X
j = n2 n.
j=1
The final step of back substitution requires n steps, with 2(n i) + 1 operations per step, for a total of
n
X
{2(n i) + 1} = 2
i=1
n1
X
j + n = n2 .
j=1
2
The total for the two triangular solves is 2n n, which also agrees with the count given in the text.
123
3. With
(x) =
1
x Ax b x,
2
we have
(x + y) =
1
(x + y) A(x + y) b (x + y)
2
1
1
x Ax + y Ax + y Ay b x b y
2
2
1
(x) + (Ax b) y + y Ay.
2
=
=
23 23
,
7 14
.
(b) At x(1) = (23/7, 23/14), the negative gradient is (3/14, 3/7), so we must minimize
45
529
27 2
x(1) x(1)
=
.
196
196
28
The minimizer is = 5/6, and so
x(2) =
87
,2 .
28
124
13.3
+
f,
x1
x1
+
f=
(F) =
F n =
f n1 .
x1
x1
=
f.
x1
x1
The derivation for /x2 is exactly analogous.
3. A direct computation shows that
kf gkL2 =
1
for all integers m, n,
2
while
1p
1 + m2 2 + n2 2 for all m, n.
2
Thus the L2 error is independent of m, n, while the H 1 error becomes arbitrarily large as m, n .
5. The following table shows the L2 and energy norm errors. The initial mesh has eight triangles, and the side
lengths of the triangles are divided by two each time the mesh is refined.
kf gkH 1 =
h
2/2
2/4
2/8
2/16
2/32
2/64
L2 error
1.7803 102
5.6705 103
1.5112 103
3.8399 104
9.6392 105
2.4123 105
energy error
1.0190 101
5.3955 102
2.7318 102
1.3700 102
6.8554 103
3.4283 103
We see that the L2 error goes down by a factor of approximately four each time the mesh is refined, which is
consistent with O(h2 ) convergence. Similarly, the energy norm of the error goes down by a factor of approximately
two each time the mesh is refined, which is consistent with O(h) convergence.
13.4
1.
n
X
ui i , vh =
i=1
n
X
v i i .
i=1
It follows that
Z
(uh , vh ) =
uh vh =
Z X
n
n
X
(ui i )
(vi i )
i=1
j=1
n X
n Z
X
i=1 j=1
n X
n
X
i i ui vi
Mij ui vi
i=1 j=1
u Mv.
(b) As shown in the text, if u and v are generalized eigenvectors for the problem Ku = Mu, then LT u and
LT v are orthogonal in the Euclidean norm. But then
0 = LT u LT v = u LLT v = u Mv = (uh , vh ).
Thus uh and vh are orthogonal in the L2 norm.
3. The smallest eigenvalue is approximately 9.80 (correct to three digits).