You are on page 1of 639

Partial Differential

Equations
Analytical and Numerical Methods

\ ,
"
, .':\" ! /j
....•~: ~-,
/ \ ", I
..... / ...: :

02 0 .4 0' 0.'
Differential
Partial Differential
Equations
This page intentionally
This page intentionally left
left blank
blank
Partial Differential
Partial Differential
Equations
Equations
Analytical and
Analytical and Numerical
Numerical Methods
Methods

Mark S.
Mark S. Gockenbach
Gockenbach
Michigan Technological
Michigan Technological University
University
Houghton, Michigan
Houghton, Michigan

siam
Society for
Society Industrial and
for Industrial and Applied
Applied Mathematics
Mathematics
Philadelphia
Philadelphia
Copyright ©
Copyright © 2002
2002 by
by the Society for
the Society for Industrial
Industrial and Applied Mathematics.
and Applied Mathematics.

1098765432 1
10987654321

All rights
All rights reserved.
reserved. Printed
Printed in
in the
the United
United States
States of
of America.
America. NoNo part
part of
of this book may
this book may
be reproduced,
be reproduced, stored,
stored, or transmitted in
or transmitted in any
any manner
manner without
without the
the written permission of
written permission of
the publisher.
the publisher. For
For information,
information, write
write to
to the Society for
the Society Industrial and
for Industrial and Applied
Applied
Mathematics, 3600
Mathematics, 3600 University
University City
City Science
Science Center,
Center, Philadelphia,
Philadelphia, PA
PA 19104-2688.
19104-2688.

Library of
Library of Congress
Congress Cataloging-in-Publication
Cataloging-in-Publication Data Data
Gockenbach, Mark
Gockenbach, Mark S.S.
Partial differential
Partial equations :: analytical
differential equations analytical and and numerical
numerical methods
methods // Mark
Mark S.
S.
Gockenbach.
Gockenbach.
p. cm.
p.cm.
Includes bibliographical
Includes bibliographical references
references and and index.
index.
ISBN 0-89871-518-0
ISBN 0-89871-518-0
1. Differential
1. Differential equations,
equations, Partial.
Partial. I.I. Title.
Title.

QA377 .G63
QA377 .G63 2002
2002
515'.353-dc21
515'.353-dc21
2002029411

MATLAB is
MATLAB is a
a registered
registered trademark
trademark of The MathWorks,
of The MathWorks, Inc.
Inc.
Maple is
Maple is a
a registered
registered trademark of Waterloo
trademark of Maple, Inc.
Waterloo Maple, Inc.
Mathematica is
Mathematica is a registered trademark
a registered trademark of
of Wolfram
Wolfram Research,
Research, Inc.
Inc.

0-89871-518-0
0-89871-518-0

siam

5.laJ1l.. is a
is a registered
registered trademark.
trademark.
Dedicated to my
Dedicated to my mother,
mother, Joy Gockenbach, and
Joy Gockenbach, and to
to the
the
memory
memory of
of my
my father,
father, LeRoy Gockenbach.
LeRoy Gockenbach.
This page intentionally
This page intentionally left
left blank
blank
Contents
Contents

Foreword
Foreword xiii
xiii

Preface
Preface xvii
xvii

11 Classification of
Classification of differential
differential equations
equations 11

22 Models in
Models in one
one dimension
dimension 9
9
2.1
2.1 Heat flow
Heat in aa bar;
flow in bar; Fourier's
Fourier's law.
law . . . . . . . . . . . . . . . .. 99
2.1.1 Boundary and
Boundary and initial
initial conditions
conditions for
for the heat equation
equation 13
2.1.2
2.1.2 Steady-stateheat
Steady-state heatflow
fk 14
14
2.1.3
2.1.3 Diffusion
Diffusion. . . . . . . . . . . . . . . . . . 16
16
2.2
2.2 The hanging
The hanging bar
bar . . . . . . . . . . . . . . . . . . . . . 21
21
2.2.1
2.2.1 Boundary conditions for
Boundary conditions for the
the hanging bar
hanging bar 24
24
2.3
2.3 The wave
The wave equation
equation for
for aa vibrating
vibrating string
string 27
27
2.4
2.4 Suggestions for
Suggestions for further
further reading.
reading . . . . . . . . . . . . 30
30

33 Essential linear
Essential linear algebra
algebra 31
31
3.1
3.1 Linear systems as
Linear systems as linear
linear operator
operator equations.
equations 31
31
3.2
3.2 Existence and uniqueness
Existence and uniqueness of of solutions
solutions to
to Ax = = bb 38
38
3.2.1
3.2.1 Existence . . . . . . . . . 38
38
3.2.2
3.2.2 Uniqueness
Uniqueness . . . . . . . . 42
42
3.2.3
3.2.3 The Fredholm
The Fredholm alternative
alternative 45
45
3.3
3.3 Basis and
Basis and dimension.
dimension . . . . . . . 50
50
3.4
3.4 Orthogonal bases and
Orthogonal and projections . 55
55
3.4.1 The L L22 inner product . 58
58
3.4.2
3.4.2 The projection
The projection theorem
theorem 61
61
3.5
3.5 Eigenvalues and
and eigenvectors
eigenvectors of of aa symmetric
symmetric matrix
matrix 68
3.5.1
3.5.1 The transpose
The transpose of of aa matrix
matrix and
and the
the dot
dot product
product ... 71
71
3.5.2
3.5.2 Special properties
Special properties ofof symmetric
symmetric matrices
matrices 72
72
3.5.3
3.5.3 The spectral
The spectral method
method for for solving
solving Ax
Ax == bb 74
74
3.6
3.6 Preview of
Preview of methods
methods for for solving
solving ODEs
ODEs and and PDEs
PDEs . 77
77
3.7
3.7 Suggestions for
Suggestions for further
further reading
reading . . . . . . . . . . . . . 78

VVII
II
viii
VIII Contents
Contents

4
4 ordinary differential equations
Essential ordinary 79
79
4.1
4.1 Converting
Converting aa higher-order
higher-order equation
equation to to aa first-order system ...
first-order system 79
79
4.2
4.2 Solutions to
Solutions some simple
to some simple ODEs
ODEs . . . . . . . . . . . . . . . 82
82
4.2.1
4.2.1 The general
The general solution
solution ofof aa second-order
second-order homogeneous
homogeneous
ODE
ODE with constant coefficients
with constant coefficients . . . . . . . . . . . 82
82
4.2.2
4.2.2 A special inhomogeneous
A special inhomogeneous second-order
second-order linear
linear ODE
ODE . 8585
4.2.3
4.2.3 First-order linear ODEs
First-order linear ODEs . . . 87
87
4.3
4.3 Linear systems
Linear systems with
with constant
constant coefficients
coefficients . . . . . . . . . . . . 91
4.3.1
4.3.1 Homogeneous
Homogeneous systems
systems . . . . . . . . . . . . . . . . 92
4.3.2
4.3.2 Inhomogeneous systems
Inhomogeneous systems and and variation
variation of
of parameters
parameters 96
4.4 Numerical methods for for initial value problems . . . . . . . . . . . 101 101
4.4.1
4.4.1 Euler's method
Euler's method . . . . . . . . . . . . . . . . . . . . . 102 102
4.4.2
4.4.2 Improving on
Improving on Euler's
Euler's method:
method: Runge-Kutta
Runge-Kutta methods
methods 104
104
4.4.3
4.4.3 Numerical
Numerical methods
methods for systems of
for systems of ODEs
ODEs . . . . . . 108
108
4.4.4
4.4.4 Automatic
Automatic step step control
control and Runge-Kutta-Fehlberg
and Runge-Kutta-Fehlberg
methods
methods. . . . . . . . . . . . . . . 110
110
4.5
4.5 Stiff systems
Stiff systems of ODEs . . . . . . . . . . . . .
of ODEs. 115
115
4.5.1
4.5.1 A simple example
A simple example of of aa stiff
stiff system
system 117
117
4.5.2
4.5.2 The
The backward
backward Euler
Euler method
method . . . 118
118
4.6
4.6 Green's functions . . . . . . . . . . . . . . . .
Green's functions 123
123
4.6.1
4.6.1 The Green's function
The Green's function forfor aa first-order
first-order linear
linear ODE
ODE.. . 123
123
4.6.2
4.6.2 The
The Dirac
Dirac delta
delta function
function . . . . . . . . . . . 125
125
4.6.3
4.6.3 The Green's function
The Green's function forfor aa second-order
second-order IVPIVP . . . . 126
126
4.6.4
4.6.4 Green's
Green's functions for PDEs
functions for PDEs 127
127
4.7
4.7 Suggestions for
Suggestions for further
further reading
reading . . 128
128

5
5 Boundary value problems in statics 131
5.1
5.1 The analogy
The analogy between
between BVPs
BVPs andand linear
linear algebraic systems . . . . 131
algebraic systems 131
5.1.1
5.1.1 A
A note
note about
about direct integration . . . . . . .
direct integration. 141
141
5.2
5.2 Introduction to
Introduction to the
the spectral
spectral method;
method; eigenfunctions
eigenfunctions . . . . 144
144
5.2.1
5.2.1
5.2.2
5.2.2
Eigenpairs
Eigenpairs of
Representing
of — ::2
- -j^ under
Representing functions
under Dirichlet
functions in
Dirichlet conditions
in terms
terms of
conditions.. . . . 144
of eigenfunctions
144
eigenfunctions.. . 146
146
5.2.3
5.2.3 Eigenfunctions
Eigenfunctions under
under other
other boundary
boundary conditions; other
conditions; other
Fourier series . . . . . . .
Fourier series 150
150
5.3
5.3 Solving
Solving the
the BVP
BVP using
using Fourier
Fourier series
series 155
155
5.3.1
5.3.1 AA special
special case
case . . . . . . 155
155
5.3.2
5.3.2 The
The general
general case
case . . . . . 156
156
5.3.3
5.3.3 Other boundary
Other conditions
boundary conditions 161
161
5.3.4
5.3.4 Inhomogeneous
Inhomogeneous boundary
boundary conditions
conditions 164
164
5.3.5
5.3.5 Summary
Summary . . . . . . . . . . . . . . . 166
166
5.4
5.4 Finite
Finite element
element methods
methods forfor BVPs
BVPs . . . . . . . . 172
172
5.4.1
5.4.1 The
The principle
principle of
of virtual
virtual work
work and
and the
the weak form of
weak form of
aa BVP
BVP . . . . . . . . . . . . . . . . . . . . . . . . . . 173 173
5.4.2
5.4.2 The
The equivalence
equivalence ofof the
the strong
strong and
and weak forms of
weak forms the
of the
BVP
BVP. . . 177
177
5.5
5.5 The
The Galerkin
Galerkin method
method . . . . . . . . . . . . . . . . . . . . . . . . 180 180
Contents ix
IX

5.6 Piecewise polynomials and the finite element method . . . 188


5.6.1 Examples using piecewise
piecewise linear finite elements . . . 193
5.6.2
5.6.2 Inhomogeneous Dirichlet conditions .. . . . . 197
5.7 Green's functions for BVPs
BVPs. . . . . . . . . . . . . . . . . . 202
5.7.1 The Green's function and the inverse of a differential
differential
operator . . . . . .
operator. 207
5.8 reading
Suggestions for further reading. 210

6 Heat flow and diffusion 211


211
6.1
6.1 Fourier series methods for the heat equation 211
211
6.1.1 homogeneous heat equation
The homogeneous 214
6.1.2 Nondimensionalization . . . . . . 217
6.1.3 inhomogeneous heat equation
The inhomogeneous equation 220
220
6.1.4 Inhomogeneous boundary conditions 222
6.1.5 Steady-state heat flow diffusion
flow and diffusion 224
6.1.6 Separation of variables
Separation variables. . . . . . . . 225
6.2 Pure Neumann conditions and the Fourier cosine series 229
6.2.1 One end insulated; mixed boundary conditions . . . 229 229
6.2.2
6.2.2 Both ends insulated; Neumann boundary conditions 231 231
6.2.3
6.2.3 Pure Neumann conditions in a steady-state BVP . . 237 237
6.3 Periodic boundary conditions and the full Fourier series . . . . . 245
6.3.1 -/l;x under periodic boundary conditions247
Eigenpairs of -— -j^ conditions247
6.3.2 Solving the BVP using the full Fourier series . . . . 249 249
6.3.3 Solving the IBVP using the full Fourier series . . . . 252 252
6.4 Finite element methods for the heat equation 256
6.4.1 The method of lines for the heat equation.
equation . . 260
6.5 Finite elements and Neumann conditions . . . . . . . . . . 266
6.5.1 The weak form of a BVP with Neumann conditions 266
6.5.2
6.5.2 Equivalence of the strong and weak forms of a BVP
with Neumann conditions . . . . . . . . . . . . . . . 267
6.5.3 Piecewise linear finite elements with Neumann con-
ditions . . . . . . . . . . . . . . . . . . . . . . . . . 269
ditions.
6.5.4
6.5.4 Inhomogeneous Neumann conditions . . . . . . . . . 273
6.5.5 The finite element method
method for an IBVP with Neu-
mann conditions . . . . . . . . . . . . . . . . . . . . 274
6.6 Green's functions for the heat equation . . . . . . . . . . . . . . 279
6.6.1 The Green's function for for the one-dimensional heat
equation under Dirichlet conditions . . . . . . . . . 280
6.6.2
6.6.2 functions under other boundary conditions.
Green's functions conditions . 281
281
6.7 reading . . . . . . . . . . . . . . . . . . 283
Suggestions for further reading.

7 Waves
VVaves 285
285
7.1
7.1 The homogeneous wave equation without boundaries . . . . . . 285
7.2 Fourier series methods for the wave equation . . . . . . . . . . . 291
291
7.2.1 the homogeneous wave
Fourier series solutions of the
equation . . . . . . . . . . . . . . . . . . . . . . . .
equation. 293
x Contents

7.2.2 Fourier series solutions of the inhomogeneous wave


equation . . . . . . . . . . . . . .
equation. 296
296
7.2.3 Other boundary conditions . . . . . . . . . . 301
7.3 Finite element methods for the wave
wave equation . . . . . . 305
7.3.1 The wave equation with Dirichlet conditions . . . . 306
306
7.3.2 The wave equation under other boundary conditions 312
7.4 Point sources and resonance . . . . . . . . . . . . . . 318
7.4.1 The wave equation with a point source . 318
7.4.2 Another experiment leading to resonance 321
7.5 reading . . . . . . . . . . . .
Suggestions for further reading. 324

88 Problems in
Problems in multiple
multiple spatial
spatial dimensions
dimensions 327
327
8.1
8.1 Physical models in two or three spatial dimensions.
dimensions . . . . .. 327
8.1.1
8.1.1 The divergence theorem . . . . . . . . . . . . . .. 328
8.1.2 The heat equation for for a three-dimensional domain . 330 330
8.1.3
8.1.3 Boundary conditions for for the three-dimensional heat
equation . . . . . . . . . . . . . . . .
equation. 332
8.1.4 The heat equation in a bar . . . . . . . . . . . . . . 333
8.1.5 The heat equation in two dimensions . . . . . . . . . 334
8.1.6
8.1.6 equation for a three-dimensional domain.
The wave equation domain . 334
8.1.7 equation in two dimensions
The wave equation dimensions . . . . . . . . 334
8.1.8
8.1.8 Equilibrium problems and and Laplace's equation
equation . .. .. . . 335
335
8.1.9
8.1.9 Green's identities and the symmetry of the Laplacian Laplacian 336
8.2
8.2 Fourier series on
Fourier series on aa rectangular
rectangular domain
domain . . . . 339
339
8.2.1 conditions . .
Dirichlet boundary conditions. 339
8.2.2
8.2.2 Solving aa boundary
Solving boundary value
value problem
problem 345
345
8.2.3 Time-dependent problems
Time-dependent problems. . . . . 346
8.2.4 Other boundary conditions for for the rectangle . . . . 348 348
8.2.5 Neumann boundary conditions . . . . . . . . 349
8.2.6 Dirichlet and Neumann problems for Laplace's equa-
tion . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
8.2.7 Fourier series methods for a rectangular box in three
dimensions . . . . . . . . . . . . . . 354
8.3
8.3 Fourier
Fourier series
series on
on a
a disk
disk . . . . . . . . . . . . . . . . . . 359
359
8.3.1 Laplacian in polar coordinates . . . . .
The Laplacian 360
360
8.3.2 Separation of variables in polar coordinates
Separation 362
362
8.3.3 Bessel's equation . . . . . . . . . . . . . . . 363
8.3.4 Properties of the Bessel functions . . . . .
Properties 366
8.3.5 eigenfunctions of the negative Laplacian on the
The eigenfunctions
disk . . . . . . . . . . .
disk 368
8.3.6
8.3.6 Solving PDEs
Solving PDEs onon aa disk
disk . . . . . . . . . . . . . . 372
372
8.4 Finite elements in two dimensions . . . . . . . . . . . . . . . 377
377
8.4.1 The weak form of a BVP in multiple dimensions . . 377 377
8.4.2 Galerkin's method . . . . . . . . . . . . . . . . . 378
378
8.4.3 Piecewise linear finite elements in two dimensionsdimensions . 379 379
8.4.4 Finite elements and Neumann conditions . . . . . 388 388
Contents xi
XI

8.4.5
8.4.5 Inhomogeneous boundary
Inhomogeneous conditions
boundary conditions 389
389
8.5
8.5 Suggestions for
Suggestions for further
further reading
reading . . . . . . . . . . 392
392

99 More about
More about Fourier
Fourier series
series 393
393
9.1
9.1 The complex
The complex Fourier
Fourier series
series . . . . . . . . . . . . . . . . 394
394
9.1.1
9.1.1 Complex inner
Complex inner products
products . . . . . . . . . . . 395
395
9.1.2
9.1.2 Orthogonality of
Orthogonality of the
the complex
complex exponentials
exponentials 396
396
9.1.3
9.1.3 Representing functions
Representing functions withwith complex
complex Fourier
Fourier series.
series . 397
397
9.1.4
9.1.4 The complex Fourier series of a real-valued function
The complex Fourier series of a real-valued function 398
398
9.2
9.2 Fourier series
Fourier series and
and the
the FFT
FFT . . . . . . . . . . . . . . . . . . . . . 401
401
9.2.1
9.2.1 Using the trapezoidal
Using the trapezoidal rule rule to
to estimate
estimate Fourier
Fourier coef-
coef-
ficients .. . '. . . . . . . . . . . . . . . . . . 402
402
9.2.2
9.2.2 The discrete
The discrete Fourier
Fourier transform
transform . . . . . . . . . . . . 404
404
9.2.3
9.2.3 A note about
A about using
using packaged
packaged FFT FFT routines
routines . . . . . 409
409
9.2.4
9.2.4 Fast transforms
Fast transforms and and other
other boundary
boundary conditions;
conditions; the
the
discrete sine
discrete sine transform.
transform . . . . . . . . . . . . . . . 410
410
9.2.5
9.2.5 Computing the
Computing the DST
DST using
using thethe FFT
FFT . . . . . . . . 411
411
9.3
9.3 Relationship of
Relationship of sine
sine and
and cosine
cosine series
series toto the
the full
full Fourier
Fourier series
series . 415
415
9.4
9.4 Pointwise convergence
Pointwise convergence of of Fourier
Fourier series
series . . . . . . . . . . . . . 419
419
9.4.1
9.4.1 Modes of
Modes of convergence
convergence for for sequences
sequences of of functions
functions .. . 419
419
9.4.2
9.4.2 Pointwise convergence
Pointwise convergence of of the
the complex
complex Fourier
Fourier series
series 422
422
9.5
9.5 Uniform convergence of
Uniform convergence of Fourier
Fourier series
series . . . . . . 436
436
9.5.1
9.5.1 Rate of
Rate of decay
decay of of Fourier
Fourier coefficients
coefficients 436
436
9.5.2
9.5.2 Uniform convergence
Uniform convergence . . . . . . . . . 439
439
9.5.3
9.5.3 A note
A note about
about Gibbs's
Gibbs's phenomenon
phenomenon . 443
443
9.6
9.6 Mean-square convergence
Mean-square convergence of of Fourier
Fourier series
series .. . 444
444
2
9.6.1
9.6.1 The space
The space L L2( (-l,l)
-£, £) . . . . . . . . . 445
445
9.6.2
9.6.2 Mean-square convergen·ce
Mean-square convergence of of Fourier
Fourier series
series . 448
448
9.6.3
9.6.3 Cauchy sequences
Cauchy sequences and and completeness
completeness 450
450
9.7
9.7 AA note about general
note about general eigenvalue
eigenvalue problems
problems 455
455
9.8
9.8 Suggestions for
Suggestions for further
further reading.
reading . . . . . . 459
459

10
10 More about
More about finite
finite element
element methods
methods 461
461
10.1 Implementation
10.1 Implementation of of finite
finite element
element methods
methods 461
461
10.1.1
10.1.1 Describing aa triangulation
Describing triangulation ... 462
462
10.1.2
10.1.2 Computing the
Computing the stiffness
stiffness matrix
matrix 465
465
10.1.3
10.1.3 Computing the
Computing the load
load vector
vector 467
467
10.1.4
10.1.4 Quadrature . . . . . . . . . . .
Quadrature 467
467
10.2 Solving
10.2 Solving sparse
sparse linear
linear systems
systems . . . . . . . . 473
473
10.2.1
10.2.1 Gaussian elimination
Gaussian elimination forfor dense
dense systems
systems 473
473
10.2.2
10.2.2 Direct solution
Direct solution of of banded
banded systems
systems . . . 475
475
10.2.3
10.2.3 Direct solution of
Direct solution of general sparse systems
general sparse systems 477
477
10.2.4
10.2.4 Iterative solution
Iterative solution of of sparse
sparse linear
linear systems
systems 478
478
10.2.5
10.2.5 The conjugate
The conjugate gradient
gradient algorithm
algorithm 482
482
10.2.6
10.2.6 Convergence of
Convergence of the
the CG
CG algorithm
algorithm 485
485
10.2.7
10.2.7 Preconditioned CG
Preconditioned CG . . . . . . . . . 486
486
xii Contents

10.3 An outline of the convergence theory for finite element methods 488
10.3.1
10.3.1 TheThe Sobolev
Sobolev space H1(
HJ (0) . . . .space
. . . . . 489489
10.3.2 Best approximation
approximation in the energy norm . 491
491
10.3.3 Approximation by piecewise polynomials 491
491
10.3.4 Elliptic regularity and LL22 estimates 492
492
10.4 Finite element methods for eigenvalue problems 494
10.5 Suggestions for further reading . . . . . . . . . . 499

A
A Proof of
Proof of Theorem
Theorem 3.47
3.47 501
501

B
B Shifting the
Shifting the data
data in
in two
two dimensions
dimensions 505
505
B.O.I
B.0.1 Inhomogeneous Dirichlet conditions on a rectangle . 505
B.0.2 Inhomogeneous Neumann conditions on a rectangle 508

C
C Solutions to
Solutions to odd-numbered
odd-numbered exercises
exercises 515
515

Bibliography 603
603

Index 607
607
Foreword
Foreword

Newton
Newton and and other
other seventeenth-century
seventeenth-century scientistsscientists introduced
introduced differential equa-
differential equa-
to describe
tions to
tions describe the
the fundamental
fundamental laws laws ofof physics.
physics. The intellectual and
The intellectual and technological
technological
implications of this innovation are enormous: the differential differential equation
equation description of of
physics is the foundation upon which all modern quantitative science and engineer-
ing rests.
ing rests. Differential
Differential equations
equations describe
describe relations
relations between physicalphysical quantities-
quantities—
forces, masses,
forces, masses, positions, etc.—and their
positions, etc.-and their rates
rates ofof change
change with respect to
with respect space and
to space and
time, i.e. their
time, i.e. derivatives. To
their derivatives. To calculate
calculate the implications of
the implications of these relations requires
these relations requires
the "solution" or integration
integration of the differential
differential equation: since derivatives approxi-
mate
mate thethe ratios
ratios of small changes,
of small changes, solution
solution of differential equations
of differential equations amounts
amounts to to the
the
summing together
summing together of of many small changes—arbitrarily
many small changes-arbitrarily many, many, in in principle—to
principle-to com- com-
pute the effect
effect of
of aa large
large change.
change. Until
Until roughly the middle of of the twentieth
twentieth century,
this meant
meant the derivation
derivation of of formulas
formulas expressing
expressing solutions
solutions of of differential
differential equations
equations
as algebraic
as algebraic combinations
combinations of of the elementary functions
the elementary functions of of calculus—polynomials,
calculus-polynomials,
trigonometric functions, the
trigonometric functions, the logarithm
logarithm and and the exponential, and
the exponential, and certain
certain more
more ex-ex-
otic functions.
otic functions. SuchSuch formulas
formulas are are feasible
feasible only for aa limited
only for limited selection
selection of of problems,
problems,
and even then often often involve infinite sums ("series") which which can only be evaluated evaluated
approximately, and
approximately, and whose
whose evaluation
evaluation was (until not
was (until not soso long
long ago)
ago) quite
quite laborious.
laborious.
The digital
The digital revolution
revolution has changed all
has changed all that. Fast computation,
that. Fast computation, with with inexpen-
inexpen-
sive machines
sive machines performing
performing many many millions
millions ofof arithmetic
arithmetic operations
operations per second, makes
per second, makes
numerical methods
numerical methods for for the solution of
the solution of differential
differential equations
equations practical: these meth-
practical: these meth-
ods give
ods give useful
useful approximate
approximate solutions
solutions to to differential
differential equations
equations by by literally adding up
literally adding up
the effects
the effects of many
many microscopic
microscopic changes
changes to approximate
approximate the effect effect of aa large change.
change.
Numerical methods have
Numerical methods been used
have been used toto solve
solve certain
certain relatively
relatively "small"
"small" differential
differential
equations since
equations since the eighteenth century-notably
the eighteenth century—notably those that occur
those that occur in in the
the computa-
computa-
tion of planetary orbits and other astronomical calculations. Systematic use of the
computer has vastly expanded the range of differential differential equation models that can be
coaxed into
coaxed into making predictions
predictions of of scientific
scientific and
and engineering
engineering significance.
significance. Analytical
techniques developed
techniques developed over over the last three
the last centuries to
three centuries to solve
solve special
special problem
problem classes
classes
have also
have also attained
attained new significance when
new significance when viewed
viewed as as numerical
numerical methods.
methods. OptimalOptimal
design of
design of ships
ships and
and aircraft,
aircraft, prediction
prediction of of underground
underground fluid fluid migration, synthesis of
migration, synthesis of
new drugs,
new drugs, and
and numerous
numerous otherother critical
critical tasks
tasks allall rely—sometimes
rely-sometimes tacitly—upon
tacitly-upon the the
modeling of
modeling of complex
complex phenomena
phenomena by differential equations
by differential equations and and the
the computational
computational
approximation of
approximation of their
their solutions.
solutions. JustJust as significantly, mathematical
as significantly, mathematical advancesadvances un- un-
derlying computational
derlying computational techniques
techniques have have fundamentally
fundamentally changed changed the ways ways in in which
scientists and engineers think about differential differential equations and their implications.

xiii
XIII
xiv
XIV Foreword

Until recently this sea change in theory and practice has enjoyed enjoyed little reflec-
tion
tion in
in the teaching of
the teaching of differential
differential equations
equations in in undergraduate
undergraduate classes classes atat universities.
universities.
While
While mention
mention of of computer
computer techniques
techniques began showing up
began showing up in textbooks published
in textbooks published or or
revised
revised in in the 1970s, the
the 1970s, the view
view of of the subject propounded
the subject propounded by most textbooks
by most textbooks wouldwould
have seemed conventional in the 1920s. The book you hold in your hands, along
with
with aa fewfew others
others published
published in in recent
recent years,
years, notably
notably Gil Gil Strang's
Strang's Introduction
Introduction to to
Applied Mathematics, represents
Applied Mathematics, represents aa new approach to
new approach to differential equations at
differential equations at the
the
undergraduate
undergraduate level. level. It presents computation as
presents computation as anan integral
integral part
part ofof the
the study
study of of
differential equations. It is not so
differential equations. so much that computational
computational exercises must be part
of the syllabus—this
syllabus-this text text can
can be used entirelyentirely without any student student involvement in
computation
computation at at all, though aa class taught taught that that wayway would miss a great deal deal of the
the
possible
possible impact.
impact. Rather,
Rather, the the concepts
concepts underlying
underlying the analysis and
the analysis implementation
and implementation
of numerical methods assume an importance equal equal to to that of solutions
solutions in terms of of
series and
and elementary
elementary functions. In In fact, many of these concepts are are equally effec-
effec-
tive
tive in
in explaining
explaining the the workings
workings of of the
the series
series expansion
expansion methodsmethods as as well. This book
well. This book
devotes considerable effort
devotes considerable effort toto these "classical" methods,
these "classical" methods, side side by
by side
side with mod-
with mod-
ern
ern numerical approaches (particularly
numerical approaches (particularly the finite element
the finite element method).
method). The The "classical"
"classical"
series
series expansions
expansions provideprovide both both aa means
means to to understand
understand the essential nature
the essential nature of the
of the
physical phenomena
phenomena modeled by the equations, equations, and effective effective numerical methods for
those special problems to which they apply.
Perhaps surprisingly,
Perhaps surprisingly, some some of of the
the most
most important
important concepts
concepts in the modern
in the modern
viewpoint
viewpoint on on differential
differential equations
equations are algebraic: the
are algebraic: ideas of
the ideas of vector,
vector, vector space,
vector space,
and other
and components of
other components of linear algebra are
linear algebra central, even
are central, even in in the
the development
development of of
more conventional parts
more conventional parts of of the subject such
the subject such as series solutions.
as series solutions. The The present
present book
book
uses linear algebra
uses linear algebra as as aa unifying
unifying principle
principle in in both
both theory
theory andand computation,
computation, just just as
as
working scientists, engineers,
working scientists, engineers, and and mathematicians
mathematicians do. do.
This
This book,
book, along
along with
with aa number
number of others like
of others it published
like it published in in recent
recent years,
years, dif-
dif-
fers from earlier
fers earlier undergraduate textbooks textbooks on differential
differential equations in in yet
yet another
another
respect. Especially
respect. Especially in in the middle years
the middle years of the last
of the last century,
century, mathematical instruc-
mathematical instruc-
tion in
tion in American universities tended to to relegate the physical context context for differential
differential
equations and other topics to the background. The "big three" differential
equations differential equa-
tions
tions ofof science
science andand engineering—the
engineering-the Laplace, Laplace, wave, wave, andand heat
heat equations,
equations, to to which
which
the
the bulk
bulk of of this
this book
book is devoted—have appeared
is devoted-have appeared in in many
many texts
texts with
with atat most
most aa cur-
cur-
sory
sory nod
nod to to their
their physical origins and
physical origins and meaning
meaning in in applications.
applications. In In part,
part, this trend
this trend
reflected
reflected the development of
the development of the
the theory
theory of of differential
differential equations
equations as as aa self-contained
self-contained
arena
arena ofof mathematical
mathematical research.
research. This This development
development has has been extremely fruitful,
been extremely fruitful, and
and
indeed is
indeed is the source of
the source of many
many of of the
the newnew ideas
ideas which
which underlie
underlie thethe effectiveness
effectiveness of of
modern
modern numerical
numerical methods.
methods. However,
However, it it has
has also led to
also led generations of
to generations of textbooks
textbooks
which
which present
present differential
differential equations
equations as as aa self-contained
self-contained subject,
subject, at at most distantly
most distantly
related
related to to the other intellectual
the other intellectual disciplines
disciplines in in which differential equations
which differential equations play playaa
crucial
crucial role.
role. TheThe present
present text,
text, in contrast, includes
in contrast, includes physically
physically and and mathematically
mathematically
substantial derivations
substantial derivations of each differential
of each differential equation,
equation, often often inin several
several contexts, along
contexts, along
with examples and
with examples and homework
homework problems
problems which which illustrate
illustrate howhow differential equations
differential equations
really
really arise
arise inin science
science andand engineering.
engineering.
With
With the exception of
the exception of aa part
part of the chapter
of the chapter on on ordinary
ordinary differential
differential equations
equations
which begins the book, this text text concerns itself itself exclusively with linear problems— problems-
Foreword xv

that is, problems


that is, problems for for which
which sums
sums and scalar multiples
and scalar multiples of of solutions
solutions are
are also solutions,
also solutions,
if not
if not of the same
of the same problem
problem then then of of aa closely
closely related
related problem.
problem. It might
might be argued
be argued
that such
that such aa conventional
conventional choice
choice is odd in
is odd in aa book
book which otherwise breaks
which otherwise breaks with recent
with recent
tradition in several
tradition several important
important respects. Many if not most most ofof the important
important problems
which concern
which concern contemporary
contemporary scientists
scientists and and engineers
engineers are nonlinear. For example,
nonlinear. For example, al-
most all
most all problems
problems involving
involving fluid
fluid flow and chemical
flow and chemical reaction are nonlinear,
reaction are nonlinear, andand these
these
phenomena and
phenomena and their simulation and
their simulation and analysis
analysis are of central
are of central concern
concern to to many mod-
many mod-
ern engineering
ern engineering disciplines.
disciplines. While series solutions
While series solutions are
are restricted
restricted to
to linear
linear problems,
problems,
numerical methods
numerical methods are are in
in principle
principle justjust asas applicable
applicable to to nonlinear
nonlinear as to linear
as to linear prob-
prob-
lems (though
lems (though manymany technical
technical challenges
challenges arise arise inin making
making them
them work well). However,
work well). However,
it is
it is also
also true
true that not only
that not are the
only are the classic
classic linear
linear differential
differential equations—Laplace,
equations-Laplace,
wave, and
wave, and heat—models
heat-models for for generic classes of
generic classes of physical
physical phenomena (potentials, wave
phenomena (potentials, wave
motion, and
motion, and diffusion)
diffusion) toto which
which many nonlinear processes
many nonlinear processes belong,
belong, but also their
but also their so-
so-
lutions are
lutions are the building blocks
the building blocks ofof methods
methods for for solving
solving complex,
complex, nonlinear
nonlinear problems.
problems.
Therefore the
Therefore the choice
choice to
to concentrate
concentrate on on these
these linear
linear problems seems very
problems seems very natural
natural for
for
aa first
first course
course in in differential
differential equations.
equations.
The computational viewpoint
The computational viewpoint in in thethe theory
theory andand application
application of of differential
differential
equations is
equations is very
very important
important to to aa large
large segment
segment of of SIAM
SIAM membership,
membership, and and indeed
indeed
SIAM members
SIAM members have have been
been inin the forefront of
the forefront of its
its development.
development. It is is therefore
therefore gratify-
gratify-
ing that
ing SIAM should
that SIAM should play
playa a leading
leading rolerole in in bringing
bringing this important part
this important part of
of modern
modern
applied mathematics into the classroom by making the present volume available.
applied mathematics into the classroom by making the present volume available.

William W.
William W. Symes
Symes
Rice
Rice University
University
This page intentionally
This page intentionally left
left blank
blank
Preface
Preface

This introductory text on


This on partial differential equations (PDEs)
differential equations (PDEs) has
has several
several
features that
features that are
are not
not found
found in other texts
in other texts at
at this
this level,
level, including:
including:
•• equal
equal emphasis
emphasis on
on classical
classical and
and modern
modern techniques.
techniques.
•• the
the explicit
explicit use
use of
of the
the language
language and
and results
results of
of linear
linear algebra.
algebra.
•• examples
examples and
and exercises
exercises analyzing
analyzing realistic
realistic experiments
experiments (with
(with correct
correct physical
physical
parameters and
parameters and units).
units).
•• aa recognition
recognition that
that mathematical
mathematical software
software forms
forms aa part
part of
of the
the arsenal
arsenal of
of both
both
students and professional mathematicians.
students mathematicians.
In this
In preface, II will
this preface, discuss these
will discuss these features
features and offer suggestions
and offer suggestions for
for getting the
getting the
most out of the text.

Classical and
Classical and modern
modern techniques
techniques
Undergraduate courses on PDEs tend to focus on Fourier series methods and sep-
aration of variables. These techniques are still useful after after two centuries because
they offer aa great
they offer great deal
deal of
of insight into those
insight into problems to
those problems to which
which they apply. How-
they apply. How-
ever, the
ever, subject of
the subject PDEs has
of PDEs has driven
driven much of the
much of the research
research in in both
both pure
pure and applied
and applied
mathematics in
mathematics in the
the last
last century,
century, and
and students
students ought
ought to to be
be exposed
exposed to some more
to some more
modern techniques as
modern techniques as well.
well.
The limitation
The limitation ofof the Fourier series
the Fourier series technique
technique is is its restricted applicability:
its restricted applicability:
it can be used only for equations
equations with constant
constant coefficients
coefficients and only on certain certain
simple geometries. To complement the classical topic of Fourier series, I present the
finite element
finite element method,
method, aa modern,
modern, powerful, and flexible
powerful, and flexible approach
approach to to solving
solving PDEs.
PDEs.
Although many
Although many introductory
introductory texts include some
texts include some discussion
discussion of of finite
finite elements
elements (or
(or
finite differences, a competing computational
finite computational methodology), the modern approach
tends to
tends to receive
receive less
less attention
attention and
and aa subordinate
subordinate place
place inin the exposition. In
the exposition. In this
this
text,
text, II have
have put equal weight
put equal weight onon Fourier series and
Fourier series and finite elements.
finite elements.

Linear algebra
Linear algebra
Both linear
Both linear and
and nonlinear differential
differential equations
equations occur
occur as
as models of
of physical phenom-
ena of
ena great importance
of great importance inin science
science and
and engineering.
engineering. However,
However, most
most introductory
introductory

xvii
XVII
xviii Preface

texts focus on
texts focus on linear
linear equations,
equations, and and mine
mine is is no exception. There
no exception. There are several reasons
are several reasons
why
why this should be
this should be so.
so. The study of
The study of PDEs
PDEs is difficult, and
is difficult, and itit makes
makes sense
sense to
to begin
begin
with the simpler linear equations
equations before moving on to the more difficult nonlinear
difficult nonlinear
equations. Moreover,
equations. Moreover, linear
linear equations
equations are are much
much better
better understood.
understood. Finally,
Finally, much
much
of what is known about
of about nonlinear differential
differential equations
equations depends on the analysis analysis
of linear
of differential equations,
linear differential equations, so so this
this material
material is is prerequisite
prerequisite forfor moving
moving on to
on to
nonlinear equations.
nonlinear equations.
Because we focus focus onon linear
linear equations,
equations, linear
linear algebra
algebra isis extremely useful.
useful. In-
In-
deed, no discussion of Fourier series or finite element methods can be complete
unless it it puts the
the results
results inin the
the proper linear algebraic
algebraic framework.
framework. For For example,
example,
both
both methods produce the best best approximate solution from
approximate solution from certain
certainfinite-dimensional
finite-dimensional
subspaces, and the projection
subspaces, projection theorem is therefore central to both techniques. Sym-
metry is another
another key feature exploited by both methods.
While many texts de-emphasize the linear algebraic nature of the concepts
and solution
and solution techniques,
techniques, II have
have chosen
chosen toto make
make it explicit. This
it explicit. decision, II believe,
This decision, believe,
leads to
leads to aa more cohesive course
more cohesive course andand aa better
better preparation
preparation for future study.
for future study. However,
However,
it presents
it presents certain
certain challenges.
challenges. Linear
Linear algebra
algebra doesdoes notnot seem
seem to receive the
to receive attention
the attention
it deserves
it deserves in in many engineering and
many engineering science programs,
and science programs, and and so so many
many students
students will
will
take a course basedbased on this text without the "prerequisites."
"prerequisites." Therefore, I present
overview of the necessary material in Chapter 3,
a fairly complete overview 3, Essential
Essential Linear
Linear
Algebra.
Algebra.
Both faculty previewing
Both faculty previewing this this text and students
text and students taking
taking aa course
course from
from itit will
will
soon realize
soon realize that
that there
there isis too
too much
much material
material in in Chapter
Chapter 3 3 to cover thoroughly
to cover thoroughly in the
in the
couple of weeks
weeks it can reasonably occupy in a semester course. From experience I
know
know that conscientious students
that conscientious students dislike moving so
dislike moving so quickly
quickly through
through material
material that
that
they
they cannot
cannot master
master it.it. However,
However, one of the
one of the keys
keys to to using
using this
this text
text is
is to
to avoid getting
avoid getting
bogged down in Chapter 3. Students Students should
should try try to get from it the "big "big picture"
picture"
and two essential
essential ideas:

•• How
Howtoto compute
compute aa best
best approximation
approximation toto aa vector
vector from
from aa subspace,
subspace, with
with and
and
without an orthogonal
without an orthogonal basis
basis (Section 3.4)..
(Section 3.4)

•• How
How to
to solve
solve aa matrix-vector
matrix-vector equation
equation when
when the
the matrix
matrix is
is symmetric
symmetric and
and its
its
eigenvalues and
eigenvalues and eigenvectors
eigenvectors are
are known
known (Section 3.5).
(Section 3.5).

Having at
Having at least begun to grasp these ideas, students
students should
should move onon to Chapter
Chapter 4
even if some details are not clear. The concepts from linear algebra algebra will become
clearer as they are used throughout the remainder of the text. 11
much clearer
II have
have taught
taught this
this course
course several
several times
times using
using this
this approach,
approach, and,
and, although
although
students often
students often find it frustrating
find it at the
frustrating at the beginning, the results
beginning, the results seem
seem to
to be good.
be good.

Realistic problems
Realistic problems
The subject of PDEs is easier to grasp if one keeps in mind certain
certain standard phys-
ical experiments modeled
ical experiments modeled by
by the
the equations under consideration.
equations under consideration. II have
have used these
used these
1
Also, Chapter
1 Also, Chapter 44 is
is much
much easier
easier going
going than
than Chapter
Chapter 3,
3, aa welcome
welcome contrast!
contrast!
Preface xix
XIX

models to introduce
introduce the equations and
and to
to aid
aid in
in understanding
understanding their
their solutions.
solutions. The
The
models also show,
models also show, of
of course,
course, that
that the
the subject
subject of
of PDEs
PDEs is
is worth studying!
worth studying!
To make
To make the
the applications
applications as
as meaningful
meaningful asas possible,
possible, II have
have included
included many
many
examples and exercises posed in terms of meaningful experiments with realistic
physical parameters.

Software
Software
There exists
There exists powerful
powerful mathematical
mathematical software
software that
that can
can be used to
be used to illuminate
illuminate the
the
material presented
material in this
presented in this book.
book. Computer
Computer software
software is useful for
for at least
least three
three
reasons:
reasons:

•• It
It removes
removes the
the need
need to
to do
do tedious
tedious computations
computations that
that are
are necessary
necessary toto compute
compute
Just as
solutions. Just as aa calculator
calculator eliminates
eliminates the need toto use
use aa table
table and
and inter-
inter-
polation
polation to compute aa logarithm,
to compute logarithm, aa computer
computer algebra system can
algebra system can eliminate
eliminate
the need to
the need to perform integration by
perform integration parts several
by parts several times
times in
in order
order toto evaluate
evaluate an
an
integral. With
integral. With the
the more
more mechanical obstacles removed,
mechanical obstacles removed, there
there is
is more
more time to
time to
focus on concepts.

•• Problems
Problems that
that simply
simply cannot
cannot be
be solved
solved (in
(in aa reasonable
reasonable time)
time) by
by hand
hand can
can of-
of-
ten be done with the assistance of a computer. This allows for more interesting
ten be done with the assistance of a computer. This allows for more interesting
assignments.
assignments.

•• Graphical
Graphical capabilities
capabilities allow
allow students
students to
to visualize
visualize the
the results
results of
of their
their compu-
compu-
tations,
tations, improving understanding and
improving understanding and interpretation.
interpretation.
II expect
expect students
students toto use
use aa software
software package
package suchsuch as
as MATLAB,
MATLAB, Mathematica,
Mathematica, or or
Maple
Maple to to reproduce
reproduce thethe examples
examples from
from the text and
the text and to
to solve
solve the
the exercises.
exercises.
II prefer
prefer not
not to
to introduce
introduce aa particular
particular software
software package
package inin the
the text
text itself,
itself, for
at least
at least two
two reasons. The explanation
reasons. The explanation ofof the features and
the features and usage
usage ofof the software can
the software can
detract
detract from the mathematics.
from the mathematics. Also,Also, if
if the
the book
book isis based
based on on aa particular
particular software
software
package, then
package, then it can be
it can difficult to
be difficult to use
use with
with aa different
different package.
package. For For these
these reason,
reason, mymy
text does
text does notnot mention
mention any
any software
software packages except in
packages except in aa few
few footnotes.
footnotes. However,
However,
since the use of software is, in my opinion, opinion, essential for a modern course, course, I have
written tutorials for
written tutorials MATLAB, Mathematica,
for MATLAB, Mathematica, and and Maple that explain
Maple that explain the
the various
various
capabilities
capabilities of of these programs that
these programs that are
are relevant
relevant toto this
this book.
book. These
These tutorials appear
tutorials appear
on the
on the accompanying
accompanying CD. CD.

Outline
Outline
The core
The core material
material inin this
this text is found
text is found inin Chapters
Chapters 5-7,
5-7, which
which present
present Fourier
Fourier series
series
and finite
and finite element
element techniques for the
techniques for the three
three most important differential
most important differential equations
equations ofof
mathematical
mathematical physics: Laplace's equation,
physics: Laplace's equation, the
the heat equation, and
heat equation, and the wave equa-
the wave equa-
tion. Since the
tion. Since concepts themselves
the concepts themselves are
are hard enough, these
hard enough, chapters are
these chapters are restricted
restricted
to problems
to problems in in aa single
single spatial
spatial dimension.
dimension.
Several introductory
Several introductory chapters
chapters set
set the
the stage
stage for
for this
this core.
core. Chapter
Chapter 11 briefly
briefly
defines the
defines basic terminology
the basic terminology and and notation
notation that
that will be used
will be used in
in the
the text. Chapter
text. Chapter
xx
xx Preface

22 then
then derives
derives thethe standard
standard differential
differential equations
equations in in one
one spatial
spatial dimension,
dimension, in in thethe
process explaining
process explaining the the meaning
meaning of of various
various physical parameters
parameters that that appear
appear in in thethe
equations and
equations and introducing
introducing the associated boundary
the associated conditions and
boundary conditions and initial
initial conditions.
conditions.
Chapter 3,
Chapter 3, which has has already
already been
been discussed
discussed above,
above, presents
presents the the concepts
concepts and and
techniques from
techniques from linear
linear algebra
algebra that will will be usedused in in subsequent
subsequent chapters.
chapters. II want want
to reiterate
to reiterate thatthat perhaps the the most
most important
important key key to to using this text text effectively
effectively is
to move
to through Chapter
move through Chapter 33 expeditiously.
expeditiously. The The rudimentary
rudimentary understanding
understanding that that
students obtain
students obtain in in going
going through
through Chapter
Chapter 33 will will grow
grow as as the
the concepts
concepts are are used
used in in
the rest
the rest ofof the book.
book.
Chapter 44 presents
Chapter presents the the background
background material
material on on ordinary
ordinary differential
differential equations
equations
that is
that is needed
needed in in later
later chapters.
chapters. This This chapter
chapter is is much easier than
much easier than thethe previous
previous
one, because
one, because much much of of the
the material
material is is review
review forfor many
many students.
students. Only Only the last two
the last two
sections, on
sections, on numerical
numerical methodsmethods and and stiff
stiff systems,
systems, are are likely
likely to to bebe new.
new. Although
Although
the chapter
the chapter is is entitled
entitled Essential Ordinary Differential
Essential Ordinary Section 4.3
Equations, Section
Differential Equations, 4.3 is
is not
not
formally prerequisite
formally prerequisite for for thethe rest
rest ofof the book. II included
the book. included this this material
material to to give
give
students aa foundation
students foundation for for understanding
understanding stiff stiff systems
systems of of ODEs
ODEs (particularly,
(particularly, the the
stiff system
stiff system arising
arising from from thethe heat
heat equation).
equation). Similarly,
Similarly, Runge-Kutta
Runge-Kutta schemes schemes and and
automatic step
automatic step control
control are are not not strictly
strictly needed. However, However, understanding aa little little
about variable
about variable stepstep size
size methods
methods is is useful if if one
one tries
tries to apply
apply an an "off-the-shelf"
"off-the-shelf"
routine to
routine to aa stiff
stiff system.
system.
Chapter 88 extends
Chapter extends the the models
models and and techniques developed in
techniques developed in the
the first part of
first part of the
the
book to
book to two
two spatial
spatial dimensions
dimensions (with (with somesome brief discussions of
brief discussions of three
three dimensions).
dimensions).
The last
The last two
two chapters
chapters provide
provide aa more in-depth treatment
more in-depth treatment of of Fourier
Fourier series
series
(Chapter 9) and finite elements (Chapter 10). In addition to the standard theory of
(Chapter 9) and finite elements (Chapter 10). In addition to the standard theory of
Fourier series, Chapter 9 shows how to use the fast Fourier transform to efficiently
Fourier series, Chapter 9 shows how to use the fast Fourier transform to efficiently
compute Fourier
compute Fourier series
series solutions
solutions of of the PDEs, explains
explains the relationships
relationships among among the the
various types
various types of of Fourier series, and
Fourier series, and discusses
discusses the the extent
extent to to which
which the Fourier series
the Fourier series
method can be extended to complicated complicated geometries and equations with noncon-
stant coefficients.
stant coefficients. Sections
Sections 9.4-9.6
9.4-9.6 present
present aa careful
careful mathematical
mathematical treatment treatment of of the
the
convergence of
convergence of Fourier series, and
Fourier series, and have
have aa different
different flavor from the
flavor from the remainder
remainder of of the
the
book.
book. In In particular,
particular, they they areare less
less suited
suited for for an
an audience
audience of of science
science and and engineering
engineering
students, and
students, and have
have been included as
been included as aa reference
reference for for the curious student.
the curious student.
Chapter 10
Chapter 10 gives
gives some
some advice
advice on on implementing
implementing finite finite element
element computations,
computations,
discusses the
discusses the solution
solution of of the
the resulting
resulting sparse
sparse linear
linear systems,
systems, and and briefly
briefly outlines
outlines
the convergence theory
the convergence theory for for finite
finite element
element methods.
methods. It It also
also shows
shows how how to to use
use finite
finite
elements to solve
elements solve general
general eigenvalue
eigenvalue problems.
problems. The The tutorials
tutorials on on the accompany-
accompany-
ing CD
ing CD include
include programs implementing
implementing two-dimensional
two-dimensional finite finite element
element methods, as as
described in
described in Section
Section 10.1,10.1, in in each
each of of the
the supported
supported software
software packages (MATLAB, (MATLAB,
Mathematica, and and Maple).
Maple). The The sections
sections on on sparse
sparse systems
systems and and the convergence
convergence the- the-
ory are
ory are both little more
both little more than
than outlines,
outlines, pointing
pointing the students toward
the students toward more more advanced
advanced
concepts. Both
concepts. Both of of these
these topics,
topics, of of course,
course, could
could easily
easily justify
justify aa dedicated
dedicated semester-
semester-
long course,
long course, andand II had no no intention
intention of of going
going into
into detail.
detail. II hope
hope thatthat thethe material
material
on implementation
on implementation of of finite
finite elements
elements (in (in Section
Section 10.1)
10.1) will
will encourage
encourage some some students
students
to experiment
to experiment with with two-dimensional
two-dimensional calculations,
calculations, which which are are already
already too tedious to
too tedious to
carry out
carry out by hand.
hand. This This sort
sort ofof information
information seems seems to to be lacking
lacking from from mostmost books
books
accessible to
accessible to students
students at at this
this level.
Preface
Preface xxi
XXI

Possible course
Possible course outlines
outlines
In aa one-semester
In one-semester course
course (42-45
(42-45 class
class hours),
hours), II typically cover Chapters
typically cover Chapters 1-7
1-7 and
and part
part
of Chapter
of Chapter 8. 8. II touch
touch only
only lightly
lightly onon the material concerning
the material concerning Green's
Green's functions
functions and
and
the Dirac delta
the Dirac delta function
function (Sections
(Sections 4.6,
4.6, 6.6,
6.6, and
and 7.4.1),
7.4.1), and
and sometimes
sometimes omit
omit Section
Section
6.3, but
6.3, but cover
cover the
the remainder
remainder of of Chapters
Chapters 1-7 1-7 carefully.
carefully.
If an
If an instructor
instructor wishes
wishes to
to cover
cover aa significant
significant part of the
part of the material in Chapters
material in Chapters
8-10, an
8-10, an obvious
obvious place
place to save time
to save time isis in
in Chapter
Chapter 4. 4. II would suggest covering
would suggest covering
the needed
the needed material
material on on ODEs
ODEs on on aa "just-in-time"
"just-in-time" basis
basis in
in the
the course
course of
of Chapters
Chapters
5-7. This
5-7. This will
will definitely
definitely save
save time,
time, since
since mymy presentation
presentation in in Chapter
Chapter 44 is is more
more
detailed than
detailed than isis really necessary. Chapter
really necessary. Chapter 22 can
can be
be given
given as
as aa reading assignment,
reading assignment,
particularly for
particularly for the intended audience
the intended audience of of science
science and
and engineering
engineering students,
students, who
who will
will
typically be
typically comfortable with
be comfortable the physical
with the physical parameters
parameters appearing
appearing inin the differential
the differential
equations.
equations.

Acknowledgments
Acknowledgments
This book
This book began
began whenwhen II was visiting Rice
was visiting University in
Rice University in 1998-1999
1998-1999 andand taught
taught aa
course using
course using the lecture notes
the lecture notes ofof Professor William W.
Professor William W. Symes.
Symes. To To satisfy
satisfy mymy per-
per-
sonal predilections,
sonal predilections, II rewrote
rewrote the
the notes
notes significantly,
significantly, andand forfor the
the convenience
convenience of of
myself and my
myself and my students,
students, II typeset them in
typeset them in the
the form
form ofof aa book,
book, which
which waswas the
the first
first
version ofof this
this text.
text. Although the final result bears, bears, in
in some
some ways,
ways, little
little resem-
blance to
blance to Symes's
Symes's original
original notes, II amam indebted to to him for
for the idea
idea of
of recasting
recasting thethe
undergraduate
undergraduate PDE PDE course
course in
in more
more modern
modern terms.
terms. His His example
example was was the
the inspiration
inspiration
for this
for this project, and II benefited
project, and from his
benefited from advice throughout
his advice throughout the the writing
writing process.
process.
II am
am also
also indebted
indebted to to the
the students
students who who have
have suffered
suffered through
through courses
courses taught
taught
from early
from early version
version of of this
this text. Many of
text. Many of them found errors,
them found errors, typographical
typographical and and
otherwise, that
otherwise, that might
might otherwise
otherwise have
have found
found their
their way
way into
into print.
print.
II would
would like
like to
to thank
thank Professors
Professors Gino
Gino Biondini,
Biondini, Yuji
Yuji Kodoma,
Kodoma, Robert
Robert Krasny,
Krasny,
Yuan Lou, Fadil
Yuan Lou, Fadil Santosa,
Santosa, andand Paul
Paul Uhlig, all of
Uhlig, all of whom
whom read part or
read part or all
all of
of the
the text
text
and offered
and offered helpful
helpful suggestions.
suggestions.
The various
The various physical parameters used
physical parameters in the
used in the examples
examples and and exercises
exercises were
were de-
de-
rived (sometimes
rived (sometimes by by interpolation)
interpolation) fromfrom tables
tables inin the
the CRC
CRC Handbook
Handbook of of Chemistry
Chemistry
and Physics [35].
and Physics [35).
The graphs
The graphs in in this
this book
book were generated with
were generated with MATLAB.
MATLAB. For For MATLAB
MATLAB product product
information, please
information, contact:
please contact:
The MathWorks,
The Inc.
MathWorks, Inc.
33 Apple
Apple Hill
Hill Drive
Drive
Natick, MA 01760-2098
Natick, MA 01760-2098 USA
USA
Tel: 508-647-7000
Tel: 508-647-7000
Fax: 508-647-7101
Fax: 508-647-7101
E-mail: info@mathworks.com
E-mail: info@mathworks.com
Web: www.mathworks.com
Web: www.mathworks.com
As mentioned
As above, the
mentioned above, CD also
the CD also supports
supports the
the use of Mathematica
use of and Maple.
Mathematica and Maple. For
For
Mathematica product
Mathematica product information, contact:
information, contact:
xxii Preface

Wolfram Research,
Wolfram Research, Inc.
Inc.
100 Trade
100 Trade Center
Center Drive
Drive
Champaign, IL
Champaign, IL 61820-7237
61820-7237 USA
USA
Tel: 800-965-3726
Tel:
Fax: 217-398-0747
Fax:
E-mail: info@wolfram.com
E-mail: info@wolfram.com
For Maple
Maple product information, contact:
information, contact:

Waterloo Maple
Waterloo Maple Inc.
Inc.
57 Erb
57 Erb Street
Street
West Waterloo,
West Waterloo, Ontario
Ontario
Canada N2L6C2
Canada
Tel: 800-267-6583
Tel: 800-267-6583
E-mail: info@maplesoft.com
E-mail: info@maplesoft.com
Chapter 1
Chapter

classification of
ification of
-al
differential equations

differential equation is an equation specifying a relation between


Loosely speaking, a differential
the derivatives of a function or between one or more derivatives and the function function
We will call the function appearing in such an equation the unknown Junction.
itself. We function.
We use this terminology because the typical task involvinginvolving a differential
differential equation,
differential
and the focus of this book, is to solve the differential equation, is, to find a
that is,
whose
function whose derivatives are related as specified by the differential
differential equation. In
carrying out this task, everything else about the relation, other than the unknown unknown
function, is regarded as known. satisfying the differential
known. Any function satisfying differential equation is
solution.
called a solution. In other words,
words, a solution of a differential equation is a function
differential function
that, when substituted for for the unknown
unknown function, causes the equation to be satisfied.
Differential equations fall into several natural and widely
Differential widely used categories:
1. Ordinary
1. Ordinary versus partial:
versus partial:

unknown function has a single independent variable, say t, then the


(a) If the unknown
ordinary differential
equation is an ordinary differential equation (ODE). In this case, only
equation (ODE).
involved. Examples of ODEs are
"ordinary" derivatives are involved.

du = 3u (1.1)
dt
and
rPu du
a dt 2 + b dt + cu = J (t). (1.2)

In the second example, a, b, known constants,


and c are regarded as known constants,
and fJ(t) known function
( t ) as a known of t. In both equations, the unknown
unknown is
uu =
= u(t).
u(t).
(b) If the unknown function has two or more independent variables, the
unknown function
equation is called a partial differential equation (PDE). Examples include
differential equation
{Pu 82 u
8x2 + 8y2 = 0 (1.3)

11
2 Chapter 1. Classification
Chapter 1. Classification of differential equations

and
(1.4)

In (1-3), the
In (1.3), the unknown
unknown function
function is = u(x,
is u = V), while
u(x,y), while in
in (1.4),
(1.4), it
it is
is u ==
u(x, t). In
u(x,t). In (1.4),
(1.4), cc is
is aa known
known constant.
constant.
2. Order: The
2. Order: The order of
of aa differential equation is
differential equation is the order of
the order of the
the highest deriva-
highest deriva-
tive appearing in
tive appearing in the equation. Most
the equation. differential equations
Most differential equations arising
arising in
in science
science
and engineering
and engineering are
are first
first or second order.
or second order. Example (1.1) above
Example (1.1) above isis first
first order,
order,
while
while Examples (1.2), (1.3),
Examples (1.2), (1.3), and
and (1.4)
(1.4) are second order.
are second order.
3. Linear
3. Linear versus nonlinear:
versus nonlinear:
(a) As the
the examples
examples suggest,
suggest, a differential
differential equation has,has, on
on each
each side of the the
equals sign, algebraic
equals sign, algebraic expressions
expressions involving
involving the unknown function
the unknown function andand
its derivatives,
derivatives, and
and possibly other functions
functions and and constants
constants regarded
regarded as
known.
known. A differential equation
A differential equation isis linear ifif those
those terms involving the
terms involving un-
the un-
known
known function contain only
function contain only products
products of of aa single factor of
of the
the unknown
unknown
function or
function or one
one ofof its
its derivatives with other
derivatives with (known) constants
other (known) constants or func-
or func-
tions of the
tions of the independent variables.22 In
independent variables. In linear
linear differential
differential equations,
equations, the the
unknown function and
unknown function its derivatives
and its derivatives do do not appear
appear raised
raised to to aa power
power
other
other than
than 1,1, or
or as
as the argument of
the argument of aa nonlinear
nonlinear function
function (like
(like sin,
sin, exp,
exp,
log, etc.).
log, etc.).
For
For example,
example, thethe general
general linear second-order ODE
linear second-order ODE has the form
has the form

Here
Here wewe require
require that
that a 2 ( t f:.
a2(t) ) 00 in order that
in order that the equation truly
the equation truly be
be of
of
second order.
second order. Example (1.2) is
Example (1.2) is aa special
special case
case of this general
of this general equation.
equation.
In aa linear
In linear differential equation, the
differential equation, the unknown
unknown or or its derivatives can
its derivatives can be
be
multiplied by constants
multiplied constants or by functions
functions of the
the independent variable, but
independent variable, but
not by
not by functions
functions of
of the
the unknown.
unknown.
As another
As another example, the general
example, the general linear second-order PDE
linear second-order PDE inin two
two inde-
inde-
pendent
pendent variables
variables is
is

a 2u a 2u a 2u
au (x, y) ax 2 +a12(x, y) axay +a22 (x, y) ay2
au au
+ al (x, y) ax +a2(x, y) ay + ao(x, y)u = f(x, V)·
Examples (1.3) and
Examples (1.3) and (1.4)
(1.4) are
are ofof this
this form
form (although
(although the
the independent
independent
variables are
variables are called
called x and
and tt in (1.4), not
in (1.4), and V).
not x and y). Not
Not all
all of an, a12,
of au, a12,
and a22
and a22 can
can be zero in
be zero in order for this
order for equation to
this equation to be second order.
be second order.
A linear differential
A linear differential equation
equation isis homogeneous
homogeneous if if the zero function
the zero function isis aa
solution. For
solution. For example,
example, u(t) = == 00 satisfies
satisfies (1.1),
(1.1), u(x,y)
u(x,y) === 00 satisfies
satisfies (1.3),
(1.3),
-::------
2
In Section
2In Section 3.1,
3.1, we
we will give aa more
will give more precise definition of
precise definition of linearity.
linearity.
Classification of differential
Chapter 1. Classification differential equations
equations 3

and u(x,t)
and u(x, t) = == 00 satisfies
satisfies (1.4),
(1.4), so
so these
these are examples of
are examples of homogeneous
homogeneous
linear differential equations. A homogeneous linear equation has
linear differential equations. A homogeneous linear equation another
has another
important property:
important property: whenever
whenever u andand v are
are solutions
solutions of
of the equation, so
the equation, so
is cm +
is au + (3v for all real numbers a and (3.
ftv for ft. For example, suppose
suppose u(t) and
u(t) and
are solutions
v(t) are
vet) solutions ofof (1.1)
(1.1) (that
(that is,
is, du/dt
du/dt — = 3u
3w and dv/dt = 3i>),
and dv/dt and
3v), and
w == au + (3v. Then
ftv. Then

dw d
ill = dt [au + (3v]
du dv
=a dt +(3dt
= a3u + (33v
= 3(au + (3v)
=3w.

Thus
Thus w isis also
also aa solution of (1.1).
solution of (1.1).
A linear differential
A linear differential equation
equation which
which is
is not homogeneous is
not homogeneous called inho-
is called inho-
mogeneous. For
mogeneous. example
For example

~~ = 3u + sin (21ft) (1.5)

is
is linear inhomogeneous, since
linear inhomogeneous, u(t) =
since u(i) == 00 does not satisfy
does not satisfy this equation.
this equation.
Example
Example (1.2)(1.2) might
might be
be homogeneous
homogeneous or or not,
not, depending
depending on whether
on whether
/(*) =
J(t) == 00 or not.
or not.
It
It is
is always possible to
always possible to group all terms
group all terms involving
involving the
the unknown function
unknown function
in
in aa linear differential equation
linear differential equation on
on the
the left-hand side and
left-hand side and all
all terms
terms not
not
involving
involving thethe unknown function on
unknown function on the
the right-hand side. For
right-hand side. example,
For example,
(1.5) is equivalent to
(1.5)

~~ - 3u = sin (21ft). (1.6)

"Equivalent to" in this context means


"Equivalent means that (1.5) and (1.6)
(1.5) and (1.6) have exactly
exactly
the
the same solutions: ifif u(t)
u(t) solves one
one of these two equations,
equations, it
it solves
the
the other
other as
as well.
well. When
When the equation is
the equation is written
written this
this way,
way, with
with all
all of
of
the
the terms involving the
terms involving the unknown
unknown on on the
the left
left and
and those
those not
not involving the
involving the
unknown
unknown onon the
the right,
right, homogeneity
homogeneity is is easy
easy to recognize: the
to recognize: equation is
the equation is
homogeneous ifif and
and only
only if
if the
the right-hand side is identically zero.
right-hand side
(b) Differential
Differential equations which are not linear are termed nonlinear.
nonlinear. For
example,
example,

(1.7)

is nonlinear.
is This is
nonlinear. This is clear,
clear, as
as the
the unknown
unknown function
function u appears raised
u appears raised toto
the second power.
the second power. Another
Another way way to see that
to see (1.7) is
that (1.7) is nonlinear
nonlinear is
is as follows:
as follows:
if the equation
if the equation were
were linear,
linear, it
it would
would be linear homogeneous,
be linear since the
homogeneous, since the zero
zero
4
4 Classification of differential equations
Chapter 1. Classification equations

function is
function is aa solution.
solution. However,
However, suppose
suppose that
that u(t) and v(t)
u(t) and are nonzero
v(t} are nonzero
solutions, so
solutions, so that
that

rPu 2 rPv 2
dt 2 +u = 0, dt 2 +V = 0,

and w = u + v. Then

rPw 2 rP 2
dt 2 + w = dt 2 [u + v] + (u + v)
rPu d2 v 2 2
= dt 2 + dt 2 + u + 2uv + v
2) (d 2v 2) + 2uv
= ( rPu
dt 2 + u + dt + 2 V

= 2uv.

Thus w
Thus does not
w does not satisfy
satisfy the equation, so
the equation, so the
the equation
equation must
must be nonlinear.
be nonlinear.
Both linear
Both linear and
and nonlinear
nonlinear differential
differential equations
equations occur
occur as
as models
models of
of physi-
cal phenomena
cal phenomena of of great
great importance
importance in in science
science and
and engineering.
engineering. However,
However,
linear differential
linear differential equations
equations are are much
much better
better understood,
understood, and
and most
most of
of
what is
what is known
known about
about nonlinear differential
differential equations
equations depends
depends onon the
the
analysis of linear
linear differential equations.
equations. This
This book will focus
focus almost
almost ex-
clusively on
clusively on the
the solution
solution ofof linear
linear differential
differential equations.
equations.

4. Constant versus
4. Constant versus nonconstant coefficient: Linear
nonconstant coefficient: differential equations
Linear differential equations
like
like

have constant coefficients


have constant if the
coefficients if the coefficients
coefficients ra, c, and
m, c, and kk are
are constants
constants rather
rather
than (nonconstant) functions
than (nonconstant) functions ofof the
the independent
independent variable. The right-hand
variable. The right-hand side
side
( t ) may depend on the independent variable; it is only the quantities
ff(t) quantities which
multiply the
multiply the unknown
unknown function
function and
and its
its derivatives
derivatives which
which must
must bebe constant,
constant,
in order for for the equation to have constant
constant coefficients. Some techniques that
are effective
are effective for
for constant-coefficient
constant-coefficient problems
problems are
are very
very difficult
difficult to
to apply
apply to
to
problems with
problems with nonconstant
nonconstant coefficients.
coefficients.
As aa convention,
As convention, we we will explicitly write
will explicitly write the
the independent
independent variable
variable when
when aa coef-
coef-
ficient is
ficient is aa function
function rather
rather than
than aa constant.
constant. The
The only
only function
function in
in aa differential
differential
equation for
equation for which
which we
we will omit the
will omit the independent
independent variable
variable is
is the
the unknown
unknown
function. Thus
function. Thus
d[
- - k(x)- dU] = f(x)
dx dx
is an
is an ODE
ODE with
with aa nonconstant
nonconstant coefficient,
coefficient, namely
namely k(x).
k(x).
We will
We will only
only apply
apply the
the phrase "constant coefficients"
phrase "constant coefficients" to
to linear
linear differential
differential
equations.
equations.
Classification of differential
Chapter 1. Classification differential equations 5

5. Scalar
5. Scalar equation
equation versus system of
versus system of equations:
equations: A A single
single differential
differential equa-
equa-
tion in
tion in one
one unknown function will
unknown function will be
be referred
referred to to asas aa scalar
scalar equation
equation (all
(all of
of the
the
examples we have seen to this point have been scalar equations). A system of
examples we have seen to this point have been scalar equations). A system of
differential equations consists of several equations for one or more unknown
differential equations consists of several equations for one or more unknown
functions. Here
functions. Here is
is aa system
system ofof three
three first-order
first-order linear, linear, constant-coefficient
constant-coefficient
ODEs for
ODEs for three
three unknown
unknown functions
functions Xlx i ((t),
t ) , XX2(t), and xs(t):
2 ( t ) , and X3(t):
dXI
dt = 2XI - X2 + X3,
dX2
dt = Xl + X2,
dX3
dt = -Xl + X2 - X3·

It is
It is important
important toto realize
realize that, since
since aa differential
differential equation
equation is
is an
an equation
equation
involving functions,
involving functions, aa solution
solution will
will satisfy
satisfy the equation for
the equation for all
all values of the
values of the inde-
inde-
pendent variable(s),
pendent variable(s), or
or at
at least
least all
all values
values in
in some
some restricted domain. The
restricted domain. The equation
equation
is to
is to be
be interpreted
interpreted asas an
an identity, such
such as
as the
the familiar
familiar trigonometric
trigonometric identity
cos 2 (t) + sin2 (t) = 1. (1.8)

To say
To say that
that (1.8)
(1.8) isis an
an identity
identity is
is to say that
to say that it
it is
is satisfied
satisfied for
for all
all values
values of
of the
the
3t
independent variable
independent variable t. Similarly, u(t) =
Similarly, u(t) — e3t is aa solution
is solution of
of (1.1)
(1.1) because
because this
this
function uu satisfies
function satisfies
du
dt (t) = 3u(t)
for all values
for values of
of t.t.
The careful
The careful reader
reader will note the
will note the close
close analogy
analogy between the uses
between the of many
uses of terms
many terms
introduced in
introduced in this
this section
section ("unknown
("unknown function,"
function," "solution,"
"solution," "linear"
"linear" vs.
vs. "nonlin-
"nonlin-
ear" ) and
ear") and the uses of
the uses of similar
similar terms
terms in
in discussing
discussing algebraic
algebraic equations.
equations. The
The analogy
analogy
between linear
between linear differential
differential equations
equations and
and linear
linear algebraic
algebraic systems
systems isis an
an important
important
theme in
theme in this
this book.

Exercises
1. ClaSSify
1. Classify each
each of
of the following differential
the following differential equations
equations according
according to
to the categories
the categories
described in
described in this
this chapter
chapter (ODE
(ODE or or PDE,
PDE, linear
linear or
or nonlinear,
nonlinear, etc.):
etc.):
(a)
dx
dt + tx = 0
(b)
au - -a2 u = (1 + t) sm. (x)
-
at ax2
(c)
6 Classification of differential equations
Chapter 1. Classification

2. Repeat for the following equations:


Repeat Exercise 1 for equations:
(a)
av av
-+3- =x+3t
at ax
(b)
dx 1
- + -x = 0
dt t
(c)
au _ ~ [2U au] = 0
at ax ax

3.
3. Repeat Exercise 11 for
Repeat Exercise for the following equations:
the following equations:
(a)
d2(} .
dt 2 + sm ((}) = 0

(b)
au au
- - 2 - =l+x
at ax
(c)

4. Repeat
Repeat Exercise 1 for
for the following equations:
equations:
(a)
d2 x dx
--2-+tx=O
2
dt dt
(b)
av - -a ( ~(x)-
p(x)c(x)- av) = 0
at ax ax
(c)
d2x dx
dt 2 + 2 dt + 3x = sin (nt)

5. Determine whether each of thethe functions


functions below is a solution of the
the correspond-
ing differential equation in Exercise 1:
differential equation
(a) x(t) = e!t
(b) u(x,t) = tsin(x)
(c) w(x, t) = t(l - x)
6. Determine
6. Determine whether
whether each
each of
of the
the functions
functions below
below is
is aa solution
solution of
of the
the correspond-
correspond-
ing differential equation
ing differential equation in
in Exercise
Exercise 2:
2:
Chapter 1. Classification of differential equations 7

(a) v(x, t) = tx
(b) x(t) = t
(c) u(x, t) = x 2 t
7. Find aa function
7. Find function ff(t) so that
( t ) so u(t) = tsm
that u(t) t sin (t) is
is aa solution of the
solution of the ODE
ODE

du 1
- - -u = f(t) t > O.
dt t '
Is there
Is only one
there only one such function /?
such function f? Why or why
Why or not?
why not?

8. Is
8. Is there
there aa constant
constant f/ such
such that
that u(t) = ee1t is
u(t] = is aa solution of the
solution of the ODE
ODE

d2 u du
dt 2 - 2 dt + 3u = f?

9. Suppose u
9. Suppose is aa nonzero
u is nonzero solution
solution of
of aa linear,
linear, homogeneous
homogeneous differential equation.
differential equation.
What
What is another nonzero
is another nonzero solution?
solution?

10. Suppose
10. is aa solution
Suppose u is solution of
of

~u du
a(t) dt 2 + b(t) dt + c(t)u = f(t) (1.9)

and is aa (nonzero)
and v is solution of
(nonzero) solution of

Explain
Explain how
how to
to produce
produce infinitely
infinitely many different solutions
many different solutions of
of (1.9).
(1.9).
This page intentionally
This page intentionally left
left blank
blank
Chapter 2

Modelass in
in one dimension
one dimension

In this
In chapter, we
this chapter, we present several different
present several different and
and interesting
interesting physical
physical processes
processes that
that
can be modeled by ODEs or PDEs. For now we restrict ourselves to phenomena that
can be modeled by ODEs or PDEs. For now we restrict ourselves to phenomena that
can be
can be described
described (at
(at least
least approximately)
approximately) as as occurring
occurring in
in aa single
single spatial
spatial dimension:
dimension:
heat flow
heat or mechanical
flow or mechanical vibration
vibration inin aa long,
long, thin
thin bar,
bar, vibration
vibration of of aa string,
string, diffusion
diffusion
of chemicals
of chemicals inin aa pipe, and so
pipe, and so forth.
forth. In In Chapters
Chapters 5-7,
5-7, we will learn
we will learn methods
methods forfor
solving the
solving the resulting
resulting differential
differential equations.
equations.
In Chapter
In Chapter 8, 8, we
we consider
consider similar
similar experiments
experiments occurring
occurring in in multiple
multiple spatial
spatial
dimensions.
dimensions.

2.1 in a bar; Fourier's law


Heat flow in law
We begin
We begin by considering the
by considering the distribution
distribution ofof heat energy (or,
heat energy (or, equivalently,
equivalently, of of temper-
temper-
ature) in
ature) in aa long,
long, thin
thin bar.
bar. We We assume
assume that
that the cross-sections of
the cross-sections of the
the bar are uniform,
bar are uniform,
and that
and that the
the temperature
temperature varies varies only
only in
in the longitudinal direction.
the longitudinal direction. In In particular,
particular,
we assume
we assume that
that the bar is
the bar is perfectly
perfectly insulated,
insulated, except
except possibly
possibly at at the
the ends,
ends, so
so that
that
no heat
no heat escapes
escapes through
through the the side.
side. By
By making
making several
several simplifying
simplifying assumptions,
assumptions, we we
derive aa linear
derive linear PDE
PDE whose solution is
whose solution is the
the temperature
temperature in in the
the bar
bar as
as aa function
function ofof
spatial position
spatial position and
and time.
time.
We show,
We show, when
when we we treat
treat multiple
multiple space
space dimensions
dimensions in in Chapter
Chapter 8, 8, that
that if
if the
the
initial temperature
initial temperature is is constant
constant in in each
each cross-section,
cross-section, andand ifif any
any heat
heat source
source depends
depends
only on
only on the
the longitudinal
longitudinal coordinate,
coordinate, then
then all
all subsequent
subsequent temperature
temperature distributions
distributions
depend only
depend only onon the
the longitudinal
longitudinal coordinate.
coordinate. Therefore,
Therefore, in in this
this regard,
regard, there
there isis
no modeling
no modeling error
error inin adopting
adopting aa one-dimensional
one-dimensional model.model. (There
(There is is modeling
modeling error
error
associated with
associated with some
some of of the
the other
other assumptions
assumptions we we make.)
make.)
We will
We will now
now derive
derive thethe model,
model, which
which is is usually
usually called
called the
the heat equation. We
heat equation. We
begin by
begin defining aa coordinate
by defining coordinate system
system (see
(see Figure
Figure 2.1).
2.1). TheThe variable
variable xx denotes
denotes
position in
position in the
the bar
bar in
in the longitudinal direction,
the longitudinal direction, andand we
we assume
assume thatthat one
one end
end of
of the
the
bar is at
bar is at x = O.0. The length of
The length of the
the bar
bar will
will be £, so
be f, so the other end
the other end is at x = t.
is at £. We
We
denote by
denote by A the
the area
area ofof aa cross-section
cross-section of of the bar.
the bar.
The temperature
The temperature of of the
the bar
bar is
is determined
determined by by the
the amount
amount of of heat energy in
heat energy in

99
2.1. Heat flow in a bar;
bar; Fourier's
Fourier's law 11
11

The
The fact
fact that
that we
we do
do not
not know Eo causes
know EQ no difficulty,
causes no difficulty, because
because we
we are going to
are going model
to model
the change
the change in
in the
the energy (and hence
energy (and hence temperature).
temperature).
Specifically, we
Specifically, examine the
we examine the rate of change,
rate of change, with respect to
with respect time, of
to time, of the heat
the heat
energy in
energy in the
the part of the
part of the bar between xx and
bar between and xx + Ax. The total
~x. The heat in
total heat [x, xx + Ax]
in [x, ~xl
is given
is given by
by (2.2),
(2.2), so
so its rate of
its rate change is
of change is

d r+tl.x
dt ix Apeu(s,t)ds
(the constant
(the Eo differentiates
constant EQ differentiates to zero). To
to zero). To work with this
work with expression, we
this expression, we need the
need the
following result,
following result, which allows us
which allows to move
us to move the
the derivative
derivative past
past the integral sign:
the integral sign:

Theorem
Theorem 2.1. 2.1. Let
Let F
F :: (a,
(a,b) x [c,
b) x [e, d\ —>• R
d] -+ and aF/ax
Rand dF/dx be
be continuous,
continuous, and define
and define
(a, 6)
¢(f>: : (a, ->• R
b) -+ R by
by
¢(x) = ld F(x, y) dy.

Then ¢0 is
Then continuously differentiable,
is continuously differentiate, and
and


dx (x) =
ld
c
aF
ax (x, y) dy.

That is,
That is,
d
dx
ld
c F(x,y)dy=
ld c
aF
ax (x,y)dy.

By Theorem
By Theorem 2.1,
2.1, we
we have
have

d r+tl.x r+tl.x au
dt ix Apcu(s, t) ds = ix Ape at (s, t) ds. (2.3)

If we
If assume that
we assume that there
there areare no internal sources
no internal sources or sinks of
or sinks of heat,
heat, the heat
the heat
contained in
contained [x, x + Ax]
in [x, ~xl can change only
can change only because
because heat
heat flows
flows through
through the
the cross-
cross-
sections at
sections at xx and
and x x + ~x.
Ax. TheThe rate at which
rate at which heat
heat flows
flows through
through the cross-section
the cross-section
at xx is
at called the
is called the heat flux, and
heat flux, and isis denoted
denoted q(x,t). It has
q(x, t). It has units
units ofof energy
energy per unit
per unit
area per
area unit time,
per unit and is
time, and is aa signed
signed quantity:
quantity: ifif heat
heat energy
energy is is flowing
flowing in
in the positive
the positive
x-direction, then
x-direction, is positive.
then qq is positive.
The net
The net heat entering [x,
heat entering [x, x +
+ Ax] at time
~xl at time t, through
through thethe two cross-sections, is
two cross-sections, is

r+tl.x aq
A(q(x, t) - q(x + ~x, t)) = - ix A ax (s, t) ds; (2.4)

the last equation


the last equation follows
follows from
from the fundamental theorem
the fundamental of calculus.
theorem of calculus. (See Figure
(See Figure
2.2.) Equating (2.3)
2.2.) Equating (2.3) and
and (2.4)
(2.4) yields
yields

r+tl.x au r+tl.x aq
ix Ape at (s,t)ds = - ix Aax(s,t)ds
12 Chapter 2. Models in one dimension

or
or
X dX
q
l x
+ {Ape
au at (8, t) a (8, t) }
+ A ax d8 = O.

Since this
Since this holds
holds for all x and
for all and Ax,
~x, it
it follows
follows that
that the
the integrand
integrand must
must be
be zero:
zero:

au aq
Ape at (x, t) + A ax (x, t) = 0, 0 < x < c. (2.5)

(The key
(The key point
point here
here is
is that
that the
the integral above equals
integral above equals zero
zero over every small
over every small interval.
interval.
This is only possible if thethe integrand is itself zero.
zero. If the integrand were positive,
positive,
say, at
say, at some
some point
point in [0,^],
in [0, C), and
and were continuous, then
were continuous, then the
the integral
integral over
over aa small
small
interval around that point would be positive.)
interval positive.)

Figure
Figure 2.2.
2.2. The heat flux into and out of a part of
of the bar.
bar.

Naturally, heat will flow


flow from regions of higher temperature to regions of of
lower temperature; note that the sign of au/ax du/dx indicates whether temperature is
increasing or
increasing or decreasing
decreasing as increases, and
as x increases, and hence
hence indicates
indicates the
the direction
direction of heat
of heat
flow.
flow. We
We now
now make
make aa simplifying
simplifying assumption,
assumption, which
which isis called
called Fourier's
Fourier's law of
of heat
conduction: the
conduction: the heat
heat flux
flux qq is
is proportional
proportional to
to the
the temperature
temperature gradient, au/ax. We
gradient, du/dx. We
call the
the magnitude of thethe constant
constant of proportionality the the thermal conductivity K, r.,
and obtain the
and obtain equation
the equation
au
q(x, t) = -r. ax (x, t) (2.6)

(the units of r.K can


(the can be determined from thethe units of the
the heat flux and
and those of the
the
temperature
temperature gradient; see Exercise
gradient; see Exercise 2.1.1). The negative
2.1.1). The negative sign
sign is
is necessary
necessary so
so that
that
heat
heat flows
flows from
from hothot regions
regions to
to cold. Substituting Fourier's
cold. Substituting law into
Fourier's law into the differential
the differential
equation
equation (2.5), wewe can eliminate q and find a PDE
eliminate q PDE for u:u:

au a2u
pc at - r. ax 2 = 0, 0 < x < C, for all t. (2.7)

(We have canceled aa common


(We common factor of A)
A.) Here we have assumed that r. K is constant,
constant,
which would be true if the
the bar
bar were homogeneous.
homogeneous. It It is possible that r.
K depends on
x (in
(in which
which case
case p and
and ce probably
probably do
do as
as well);
well); then
then we
we obtain
obtain

p(x)c(x) ~~ - :x (r.(x) ~~) = 0, 0 < x < C, for all t.

We
We call
call (2.7)
(2.7) the
the heat equation.
equation.
If the
If the bar contains internal
bar contains sources (or
internal sources sinks) of
(or sinks) of heat
heat (such
(such as
as chemical
chemical reac-
reac-
tions that produce heat), we we collect all such sources into a single source function
2.1. Heat flow
Heat flow in
in a bar;
bar; Fourier's
Fourier's law
law 13

/(x,t) (in units


f(x, t) (in units of heat energy
of heat energy per
per unit time per
unit time per unit volume). Then
unit volume). the total
Then the heat
total heat
added to
added to [x, x +
+ ~xl
Ax] during
during the interval [t, t + At]
time interval
the time ~tl is
is

t+.t:.t
it
l x
x+.t:.x
Af(s, r) ds dr.

The time rate of change of this contribution to the total heat energy (at time t) is
x+.t:.x

l x Af(s, t) ds. (2.8)

The rate
The rate of change of
of change of total
total heat
heat in [#, x + ~xl
in [x, Ax] is
is now given by
now given by the
the sum
sum of
of (2.4) and
(2.4) and
(2.8), so
(2.8), so we
we obtain,
obtain, by
by the above reasoning,
the above reasoning, the inhomogeneous33 heat
the inhomogeneous equation
heat equation

au a2 u
pc at - "'ax 2 = f(x,t), 0< x < £, for all t. (2.9)

2.1.1
2.1.1 Boundary and
Boundary and initial
initial conditions
conditions for
for the
the heat
heat equation
equation
The
The heat equation by
heat equation itself is
by itself not aa complete
is not complete model
model of heat flow.
of heat We must
flow. We must know
know
how heat
heat flows
flows through the ends of the bar, and we we must know the temperature
distribution in the bar at some initial
distribution initial time.
Two possible boundary conditions for for heat flow
flow in a bar correspond to perfect
contact. If the ends of the bar are perfectly
insulation and perfect thermal contact. perfectly insulated,
so that the heat flux across
so across the ends
ends is
is zero,
zero, then
then we have
we have

-K,
au
ax (0, t) = 0, -K,
au
ax (£, t) = ° for all t

(no heat flows


flows into the left
left end or out of the right end). On the other hand, ifif
the ends of
the ends of the
the bar
bar are
are kept
kept fixed
fixed at
at temperature zero44 (through
temperature zero (through perfect
perfect thermal
thermal
contact with
contact an ice
with an ice bath,
bath, for
for instance),
instance), we obtain
we obtain

u(0,t) u(£, t) = 00 for


=u(l,t]
u(O, t) = for all
alH.t.

Either of these boundary


Either of conditions can be inhomogeneous (that
boundary conditions (that is,
is, have aa nonzero
right-hand side), and we could,
could, of course, have mixed conditions (one end insulated,
the other
the other held at fixed
held at temperature).
fixed temperature).
A boundary
A boundary condition
condition that
that specifies
specifies the
the value
value of
of the solution
solution is
is called
called aa Dirich-
let condition, while a condition
condition that specifies the value of the derivative called a
derivative is called
Neumann A problem with a Dirichlet condition
condition. A
Neumann condition. condition at one
one end
end and
and a Neu-
mann condition at at the
the other is said
said to
to have mixed
mixed boundary conditions. As noted
boundary conditions. noted
3
The term
3The term homogeneous
homogeneous is is used
used in
in two
two completely
completely different
different ways
ways in
in this
this section
section and
and throughout
throughout
the
the book.
book. AA material
material can
can be
be (physically)
(physically) homogeneous,
homogeneous, which which implies
implies that
that the
the coefficients in the
coefficients in the
differential equations
differential equations will
will be constants. On
be constants. On the other hand,
the other hand, aa linear
linear differential
differential equation can be
equation can be
(mathematically) homogeneous,
(mathematically) which means
homogeneous, which means that
that the
the right-hand
right-hand side
side is
is zero. These two
zero. These two uses
uses of
of
the
the word homogeneous are
word homogeneous are unrelated
unrelated and
and potentially confusing, but
potentially confusing, the usage
but the usage isis standard
standard and
and so
so
the reader must
the reader must understand
understand from
from context
context the
the sense in which
sense in which thethe word
word isis used.
used.
4
Since changing
4Since changing uu by an additive
by an additive constant
constant does
does not
not affect
affect the
the differential
differential equation,
equation, we we can
can as
as
well use
well Celsius as
use Celsius as the
the temperature
temperature scale rather than
scale rather than Kelvin.
Kelvin. (See
(See Exercise
Exercise 6.)6.)
14 Chapter 2. Models in one dimension
Chapter

above, we
above, we will
will also
also use
use the
the terms
terms homogeneous
homogeneous and and inhomogeneous
inhomogeneous to to refer
refer to
to the
the
boundary conditions. The condition u(£) 10 is called an inhomogeneous
u(i] == 10 inhomogeneous Dirichlet
condition, for
condition, for example.
example.
To completely
To completely determine
determine the temperature as
the temperature as aa function
function of
of time
time and space, we
and space, we
must
must know
know thethe temperature
temperature distribution
distribution atat some
some initial
initial time
time to. This is
to. This is an
an initial
initial
rnnAH-.i.nn.'
condition:
u(x, to) = 1jJ(x), 0 < x < £.
Putting together
Putting together the
the PDE,
PDE, the
the boundary
boundary conditions,
conditions, and
and the
the initial
initial condition,
condition,
we obtain an
we obtain initial-boundary value
an initial-boundary value problem (IBVP) for
problem (IBVP) for the
the heat
heat equation.
equation. ForFor
example, with
example, with both ends of
both ends of the
the bar held at
bar held at fixed
fixed temperatures, we have
temperatures, we have the
the IBVP
IBVP
au a2 u
pc at - '" ax 2 = f(x, t), 0 < x < £, t > to,
u(x, to) = 1jJ(x), 0 < x < £, (2.10)
u(O, t) = 0, t > to,
u(£, t) = 0, t > to.

2.1.2 Steady-state heat flow


Steady-state flow
An
An important special case
important special case modeled
modeled by by the
the heat equation is
heat equation is steady-state
steady-state heat
heat flow—a
flow--a
situation in
situation in which
which the
the temperature
temperature is is constant
constant with
with respect to time
respect to time (although
(although not
not
necessarily with respect
necessarily with to space).
respect to space). In
In this case, the
this case, the temperature
temperature function
function uu can
can be
be
thought
thought of of as
as aa function
function of
of xx alone,
alone, uu =
— u(x), the partial
u(x), the derivative with
partial derivative with respect
respect to
to
is zero,
tt is zero, and
and the
the differential
differential equation
equation becomes
J2u
-'" dx 2 = f(x), 0 < x < £.
In the
In steady-state case,
the steady-state case, any
any source
source term
term /f must
must bebe independent
independent of of time
time (otherwise,
(otherwise,
the equation
the equation could
could not
not possibly
possibly be satisfied by
be satisfied by aa function
function uu that is independent
that is independent of of
time). Boundary
time). conditions have
Boundary conditions have the
the same
same meaning
meaning as as in
in the
the time-dependent
time-dependent case,case,
although in
although in the
the case
case of
of inhomogeneous
inhomogeneous boundary
boundary conditions,
conditions, the boundary data
the boundary data
must be constant.
must constant. OnOn the
the other
other hand,
hand, it
it obviously
obviously does
does not
not make sense
sense toto impose
impose
an initial
an initial condition
condition onon aa steady-state
steady-state temperature distribution.
temperature distribution.
Collecting these
Collecting these observations,
observations, we see that
we see that aa steady-state
steady-state heat
heat flow
flow problem
problem
takes the
takes form of
the form of aa boundary
boundary value
value problem (BVP). For
problem (BVP). For example,
example, if
if the temperature
the temperature
is fixed
fixed at the two endpoints of the bar, we we have the following
following Dirichlet problem:
problem:
J2u
-'" dx 2 = f(x), 0 < x < £,
u(O) = 0, (2.11)
u(£) = O.
We remark that,
We remark that, when
when only
only one
one spatial
spatial dimension
dimension is
is taken
taken into
into account,
account, aa steady-
steady-
state (or
state (or equilibrium)
equilibrium] problem
problem results in an
results in an ODE
ODE rather
rather than
than aa PDE.
PDE. Moreover,
Moreover,
these
these problems, at least
problems, at least in their simplest
in their simplest form,
form, can
can be solved directly
be solved directly by
by two inte-
two inte-
grations. Nevertheless, significant amount of effort
Nevertheless, we will (in Chapter 5) devote a significant effort
2.1. Heat flow in a bar;
2.1. bar; Fourier's law 15

toward developing
toward developing methods for solving
methods for solving these ODEs, since
these ODEs, since the techniques can
the techniques can be gen-
be gen-
eralized to
eralized to multiple spatial dimensions,
multiple spatial dimensions, and
and also
also form
form the
the foundation
foundation for
for techniques
techniques
for solving
for solving time-dependent
time-dependent problems.
problems.

Example 2.2.
Example 2.2. The
The thermal
thermal conductivity
conductivity ofof anan aluminum
aluminum alloy
alloy is 1.5 W/(cmK).
is 1.5 W/(cmK).
We will
We will calculate
calculate the
the steady-state temperature of
steady-state temperature of an
an aluminum
aluminum barbar of length 11 m
of length m
(insulated along
(insulated along the
the sides) with its
sides) with its left
left end
end fixed
fixed at 20 degrees
at 20 degrees Celsius
Celsius and
and its
its right
right
end fixed
end fixed at 30 degrees.
at 30 degrees. If
If we write uu = u(x)
we write u(x] for the steady-state
for the temperature, then
steady-state temperature, then
uu satisfies
satisfies the
the BVP
BVP

d2 u
-1.5 dx 2 = 0, 0 < x < 100,
u(O) = 20,
u(100) = 30.
(We changed
(We changed the
the units
units of
of the
the length
length of
of the
the bar
bar to
to centimeters,
centimeters, so as to
so as to be
be consistent
consistent
with the
with the units
units of
of the
the thermal
thermal conductivity.)
conductivity.) The
The differential
differential equation
equation implies
implies that
that
22
d?u/dx
2
is zero, so, integrating once, du/dx is constant,
d u/dx is zero, so, integrating once, du/dx is constant, say say

du
dx(x)=C1 ,0<x<100.

Integrating aa second
Integrating second time
time yields
yields

The boundary
The boundary condition w(0) == 20
condition u(O) 20 implies
implies that
that C 20, and
C?2 == 20, and the
the second boundary
second boundary
condition then
condition then yields
yields
1
100C1 + 20 = 30 ~ C1 = 10.

Thus
Thus
x
u(x) = 20 + 10.

The reader
The reader should
should notice
notice that
that the
the thermal
thermal conductivity
conductivity of
of the
the bar does not
bar does not
affect the
affect the solution
solution in
in the
the previous example. This
previous example. This is
is because the bar
because the bar is
is homogeneous
homogeneous
(that is,
(that is, the
the thermal
thermal conductivity
conductivity of
of the
the bar is constant
bar is constant throughout). This should
throughout). This should
be contrasted with
be contrasted with the
the next
next example.
example.

Example 2.3.
Example 2.3. A metal bar
A metal bar of
of length 100 cm
length 100 cm is
is manufactured
manufactured so that its
so that its thermal
thermal
conductivity is
conductivity is given by the
given by the formula
formula

II:(X) = 1.4 + 0.0025x, 0 < x < 100

(the units
(the units of
of lI:(x)
K(X] are
are W/(cmK)).
W/(cmK)). We We will
will find
find the
the steady-state temperature of
steady-state temperature of the
the
bar under
bar under the
the same conditions as
same conditions as in
in the
the previous example. That
previous example. That is,
is, we
we will
will solve
solve
16 Chapter 2. Models in one dimension

the BVP
the BVP

- d~ ((1.4 + 0.0025x) :~) = 0, 0 < x < 100,


u(O) = 20,
u(100) = 30.
Integrating both sides
Integrating both of the
sides of the differential
differential equation
equation once
once yields
yields
du
(1.4 + 0.0025x) dx (x) = 0, 0 < x < 100,

where 0C is
where is aa constant.
constant. Equivalently, we have
Equivalently, we have
du 0
dx (x) = 1.4 + 0.0025x' 0 < x < 100.
Integrating
Integrating aa second
second time
time yields
yields

u(x) = u(O) + 10
r 0
1.4 + 0.0025s ds

= 20 + r
10
4000 ds
560 + s
= 20 + 4000 In ( 1 + 5:0).
Applying the boundary
Applying the boundary condition w(100) =
condition u(100) = 30,
30, we
we obtain
obtain

0- 10
- 400 In (~~)"

With this
With this value
value for C, we
for 0, we have
have

_ 101n(1+~)
u (x ) - 20+ (33)
In 28

The steady-state
The steady-state temperatures
temperatures from
from the
the two
two previous examples are
previous examples are shown
shown inin
Figure 2.3,
Figure 2.3, which
which shows
shows that
that the
the heterogeneity
heterogeneity of of the
the second
second bar
bar makes
makes aa small
small but
but
discernible difference
discernible difference in
in the
the temperature distribution. In
temperature distribution. In both cases, heat
both cases, heat energy
energy is
is
flowing from
flowing from the
the right end of
right end of the
the bar
bar to
to the
the left,
left, and
and the
the heterogeneous
heterogeneous barbar has
has aa
higher thermal
higher thermal conductivity
conductivity atat the right end.
the right end. This
This leads
leads to
to aa higher temperature
higher temperature
in the
in the middle
middle ofof the
the bar.
bar.

2.1.3
2.1.3 Diffusion
Diffusion
One of
One of the facts that
the facts that makes
makes mathematics
mathematics so so useful
useful is
is that
that different
different physical phe-
physical phe-
nomena can
nomena can lead
lead to
to essentially
essentially the
the same
same mathematical
mathematical model.
model. InIn this
this section
section we
we
introduce another
introduce another experiment
experiment that is modeled
that is modeled by
by the heat equation.
the heat equation. OfOf course,
course, the
the
2.1. Heat flow in a bar;
bar; Fourier's law 17
17

30~--------------~------~--------------~

29

28

27

~26
::J
coQ5 25
a.
E
224

23 - constant K
- _. nonconstant K
22

21

20 40 60 80 100
x

Figure 2.3.
Figure 2.3. The
The steady-state temperature from
steady-state temperature Example 2.2
from Example 2.2 (solid
(solid line)
line)
and Example
and Example 2.3
2.3 (dashed
(dashed curve).
curve).

meaning of
meaning of the quantities appearing
the quantities appearing inin the
the equation
equation will
will be different than
be different than in
in the
the
case of
case of heat
heat flow.
flow.
We suppose
We suppose thatthat aa certain
certain chemical
chemical is is in
in solution
solution in
in aa straight
straight pipe
pipe having
having aa
uniform cross-section. We
uniform cross-section. We assume
assume that
that the
the pipe
pipe has length I!,
has length and we
t, and we establish
establish aa
coordinate system
coordinate system as as in
in the
the preceding section, with
preceding section, with one
one end
end ofof the at xx = 00
pipe at
the pipe
and the
and the other
other atat xx == I!. Assuming the
1. Assuming the concentration
concentration varies
varies only
only in
in the ^-direction,
the x-direction,
we can define u(x,u(x, t) to be the concentration, in units of mass per volume, volume, of the
the
chemical at
chemical at time
time tt inin the
the cross-section
cross-section located
located atat x. Then the
x. Then the total
total mass
mass ofof the
the
chemical in
chemical in the
the part
part of
of the
the bar
bar between and xx + ~x
between xx and Aar (at
(at time
time t) is
is

l
x+~x

x Au(s, t) ds, (2.12)

where
where A A isis the cross-sectional area
the cross-sectional area of
of the
the pipe.
pipe. The
The chemical
chemical will
will tend
tend to
to diffuse
diffuse
from regions
from regions of of high
high concentration
concentration to
to regions
regions of
of low
low concentration
concentration (just
(just as
as heat
heat
energy flows
energy from hot
flows from hot regions
regions to cooler regions).
to cooler regions). We
We will assume55 that
will assume that the rate of
the rate of
diffusion is
diffusion is proportional
proportional toto the
the concentration
concentration gradient
gradient

5
This assumption,
5This assumption, which
which is
is analogous
analogous to
to Fourier's
Fourier's law
law of
of heat
heat conduction,
conduction, is
is called
called Fick's
Pick's law
law
in the
in the diffusion
diffusion setting.
setting.
18 Chapter 2.
Chapter 2. Models in one
Models in one dimension
dimension

the meaning
the meaning of this assumption
of this assumption is that there
is that there exists constant66 D > 00 such
exists aa constant such that,
that, at
at
time t, the chemical moves across the cross-section at x at a rate ofof
au
-D ax (x, t).

of this mass flux are mass per area per time (for
The units ofthis (for example, g/cm22s). Since
44
the units
the of au/ax
units of du/dx areare mass/length
mass/length ,, the the diffusion must have
coefficient D must
diffusion coefficient have unit
unit of
of
area per
area per time (for example,
time (for example, cmcm22/s).
/s).
With
With this assumption, the
this assumption, equation modeling
the equation modeling diffusion
diffusion isis derived
derived exactly
exactly as
as
was the heat equation, with a similar result. The total amount of the chemical
contained
contained inin the
the part
part of
of the pipe between
the pipe between x and and x +
+ 6.x
Ax is is given
given by (2.12), so
by (2.12), so the
the
rate at which this total mass is is changing is

a [r+!::..x
at ix Au(s, t) ds = ix
1
r+!::..x au
A at (s, t) ds.

This same quantity


This same can be
quantity can computed from
be computed from the
the fluxes at the
fluxes at two cross-sections
the two cross-sections at
at xx
and x + 6.x.
and Ax. At
At the left, mass
mass is
is entering at aa rate
rate of
of
au
-AD ax (x, t),
while at the right it enters at a rate of
of
au
AD ax (x + 6.x, t).
We therefore
therefore have
r+!::..x au au au
ix A 8t (s, t) ds = -AD 8x (x, t) + AD 8x (x + 6.x, t)
{x+!::..x 82u
= ix AD 8x 2 (s, t) ds.

The result
The result is
is the
the diffusion
diffusion equation:
equation:
2
8u = D 8 u2 0 < X < e, t > to.
8t 8x '
If the chemical
If chemical is added to the interior
interior of the pipe, this can be accounted
accounted for
for by a
function /(x,
function t), where
f(x, t), mass is
where mass added to
is added the part
to the of the
part of the pipe
pipe between and x + Ax
between x and 6.x
at aa rate
at rate of
of
r+!::..x
ix Af(s, t) ds
(mass per unit time—/
time-f has units of mass per volume per time). We
We then obtain
obtain
the inhomogeneous diffusion
the inhomogeneous diffusion equation:
equation:
8u 82 u
8t - D 8x 2 = f(x, t), 0 < x < e, t> to·
6
This constant
6This constant varies
varies with
with temperature
temperature and
and pressure;
pressure; see
see the
the CRC
CRC Handbook
Handbook of
of Chemistry
Chemistry and
[35], page
°hysics [35],
Physics page 6-179.
6-179.
2.1. Heat flow in a bar; Fourier's law 19

Just as
Just as in
in the
the case
case of
of heat
heat flow,
flow, we can consider
we can consider steady-state
steady-state diffusion.
diffusion. The
The
result is
result is the
the ODE
ODE
d2u
-D dx 2 = f(x), 0 < x < f,
with appropriate
with appropriate boundary conditions. Boundary
boundary conditions. Boundary conditions
conditions for
for the
the diffusion
diffusion equa-
equa-
tion are
tion are explored
explored in
in the
the exercises.
exercises.

Exercises
1. Determine
1. Determine the
the units
units of
of the
the thermal
thermal conductivity
conductivity /'i,K from
from (2.6).
(2.6).
2. In
2. In the
the CRC
CRC Handbook
Handbook ofof Chemistry
Chemistry and
and Physics [35], there
Physics [35], there is
is aa table
table labeled
labeled
"Heat Capacity
"Heat Capacity ofof Selected
Selected Solids,"
Solids," which
which "gives
"gives the
the molar
molar heat
heat capacity
capacity atat
constant pressure
constant pressure of
of representative
representative metals
metals ...
... as
as aa function
function of
of temperature
temperature in in
the range
the range 200
200 to
to 600
600 K"
K" ([35],
([35], page
page 12-190).
12-190). For
For example,
example, the
the entry
entry for
for iron
iron
is as
is as follows:
follows:

Temp. (K)
Temp. 200 250 300 350 400 500 600
cc (J(mole·
(J/mole • K)
K) 21.59 23.74 25.15 26.28 27.39 29.70 32.05
As this table
As this indicates, the
table indicates, specific heat
the specific heat of
of aa material
material depends
depends on
on its
its tempera-
tempera-
ture. How would
ture. How would the
the heat
heat equation
equation change
change if
if we
we did
did not
not ignore
ignore the
the dependence
dependence
of the
of the specific
specific heat
heat on
on temperature?
temperature?
3. Verify
3. Verify that
that the
the integral
integral in
in (2.1)
(2.1) has
has units
units of
of energy.
energy.

4. Suppose
4. Suppose uu represents
represents the
the temperature
temperature distribution
distribution in
in aa homogeneous
homogeneous bar,
bar, as
as
discussed in
discussed in this
this section,
section, and
and assume
assume that
that both
both ends
ends of
of the
the bar
bar are
are perfectly
perfectly
insulated.
insulated.

(a) What
(a) What is
is the
the IBVP
IBVP modeling
modeling this situation?
this situation?
(b) Show
(b) Show (mathematically)
(mathematically) that
that the
the total
total heat energy in
heat energy in the
the bar
bar is
is constant
constant
with respect
with respect to
to time.
time. (Of
(Of course,
course, this
this is
is obvious
obvious from
from aa physical
physical point
point of
of
view. The
view. The fact
fact that
that the
the mathematical
mathematical model
model implies
implies that
that the
the total
total heat
heat
energy is
energy is constant
constant is
is one
one confirmation
confirmation that
that the
the model
model isis not
not completely
completely
divorced from
divorced from reality.)
reality.)

5. Suppose
5. Suppose we
we have
have aa means of "pumping"
means of "pumping" heat energy into
heat energy into aa bar
bar through
through one
one
of the
of the ends.
ends. If
If we
we add
add rr Joules
Joules per second through
per second through the
the end
end at
at xx == f, what
I, what
would the corresponding
would the corresponding boundary
boundary condition
condition be?
be?

6. In
6. In our
our derivation
derivation of
of the
the heat
heat equation,
equation, we
we assumed
assumed that
that temperature
temperature was
was
measured on
measured on the
the Kelvin
Kelvin scale.
scale. Explain
Explain what
what changes
changes must
must be
be made
made (in
(in the
the
PDE, initial
PDE, initial condition,
condition, or
or boundary
boundary conditions)
conditions) to
to use degrees Celsius
use degrees Celsius instead.
instead.
7. The
7. The thermal
thermal conductivity
conductivity of
of iron
iron is
is 0.802
0.802 W
W/(cm Consider an
(( cm K). Consider an iron
iron bar
bar of
of
length
length 11 m
m and
and radius
radius 11 cm,
cm, with the lateral
with the lateral side
side completely
completely insulated,
insulated, and
and
assume that
assume that the
the temperature
temperature ofof one
one end
end of
of the
the bar is held
bar is held fixed at 20
fixed at degrees
20 degrees
Celsius, while
Celsius, while the
the temperature
temperature of of the other end
the other end isis held
held fixed
fixed at
at 30
30 degrees.
degrees.
20 dimension
Chapter 2. Models in one dimension

Assume that no heat


heat energy is added to or removed from the interior of the
bar.
bar.
What is
(a) What is the (steady-state)
(steady-state) temperature
temperature distribution
distribution in the bar?
(b) At what rate is heat energy flowing
flowing through the bar?
8. (a) Show that the function
function

u(x, t) = e-~IPt/(pc) sin (Ox)


is aa solution
is solution to
to the homogeneous heat equation
equation
au - aax2u = 0,
pc at /'i, 0<x < l, for all t.
2

(b) What
(b) What values of 0 will
values of cause uu to
will cause to also
also satisfy
satisfy homogeneous
homogeneous Dirichlet
Dirichlet con-
con-
ditions at x =
= 0 and x = = tl
f?
9. In
9. In this exercise,
exercise, we consider aa boundary
we consider boundary condition
condition for
for aa bar that
that may be
be more
realistic than a simple Dirichlet
Dirichlet condition. Assume that, as usual, the side of a
is completely insulated
bar is insulated and that the ends are placed in a bath maintained
maintained
constant temperature. Assume that the heat
at constant heat flows
flows out of or into the ends
accordance with Newton's law of cooling: the heat flux is proportional
in accordance proportional to
to
difference in temperature
the difference temperature between the end of the bar and the surrounding
medium. What
medium. What are
are the
the resulting boundary conditions?
resulting boundary conditions?
10. Derive the heat equation from Newton's law of cooling (cf. (cf. the previous exer-
cise) as
cise) as follows:
follows: Divide
Divide the bar
bar into
into aa large
large number
number nn ofof equal
equal pieces, eacheach ofof
Ax.
length Llx. Approximate the temperature
temperature in the «th
ith piece as a function Ui(t)
Ui(t)
(thus assuming
(thus assuming that
that the
the temperature
temperature in in each
each piece
piece is
is constant
constant at at each
each pointpoint
in time). Write down a coupled system of ODEs for Ul ui(t), u^t],
(t), U2 • • • ,,u
(t), ... Unn(t)
by applying cooling to each piece and its nearest neighbors.
applying Newton's law of cooling
Assume that the bar is homogeneous, so that the material properties p, p, c,c, and
K are constant.
/'i, constant. Take thethe limit as Llx
Aa; —>
-+ 0, and
and show that the the result is the the
heat equation.
heat equation.
diffusing in a pipe, and both ends of the pipe are sealed.
11. Suppose a chemical is diffusing sealed.
What are
What are the
the appropriate
appropriate boundary
boundary conditions
conditions for
for the diffusion equation?
the diffusion equation?
What initial
What initial conditions
conditions are
are required?
required? Write
Write down
down aa complete
complete IBVP
IBVP for
for the
the
diffusion equation
diffusion equation under these conditions.
conditions.
12. Suppose
12. Suppose that
that aa chemical
chemical contained
contained in in aa pipe
pipe of
of length
length lI has
has an
an initial
initial concen-
concen-
tration distribution
tration distribution of
of u(x, 0) =
w(or,0) = 'IjJ(x).
ip(x}. At At time zero, the
time zero, ends of
the ends of the
the pipe are
pipe are
sealed, and no mass is added to or removed from the interior of the pipe.
diffusion of the chemical.
(a) Write down the IBVP describing the diffusion
mathematically that the total mass of the chemical in the pipe is
(b) Show mathematically
(Derive this fact from the equations rather
constant. (Derive rather than from common
sense.)
2.2. The hanging bar 21
21

(c) Describe
(c) Describe the ultimate steady-state
the ultimate steady-state concentration.
concentration.
(d) Give
(d) Give aa formula
formula for
for the
the steady-state concentration in
steady-state concentration in terms of 'IjJ.
terms of if).
13. Suppose
13. Suppose aa pipe
pipe of length tf and
of length and radius
radius rr joins
joins two
two large
large reservoirs, each con-
reservoirs, each con-
taining
taining aa (well-mixed)
(well-mixed) solution
solution ofof the same chemical.
the same chemical. Let
Let the concentration
the concentration
in one reservoir
in one reservoir be MO and
be Uo and inin the
the other
other be ui, and
be Uf, assume that
and assume w(0,£)
that u(O, = MO
t) = Uo
and u(l,t)t) =
and u(f, = Uf.
ut.
(a) Find
(a) Find the
the steady-state
steady-state rate
rate at which the
at which the chemical
chemical diffuses through the
diffuses through the
pipe (in units
pipe (in units of
of mass
mass per
per time).
time).
(b) How
(b) How does
does this
this rate
rate vary with the
vary with the length and the
length fi and the radius
radius r?
r?
14. Consider
14. Consider the previous exercise,
the previous exercise, in
in which
which the chemical is
the chemical is carbon monoxide
carbon monoxide
(CO) and
(CO) and the solution is
the solution CO in
is CO in air.
air. Suppose
Suppose that
that Uo
MO == 0.01 and Uf
0.01 and = 0.015,
ui = 0.015,
and
and that
that the diffusion coefficient
the diffusion coefficient of
of CO
CO inin air
air is cm22Is.
0.208 cm
is 0.208 /s. If
If the
the bar
bar is
is 11 m
m
long
long and
and its radius is
its radius is 22cm,
cm, find
find the steady-state rate
the steady-state rate at
at which
which CO diffuses
CO diffuses
through
through the
the pipe (in units
pipe (in of mass
units of mass perper time).
time).
15. Verify
15. Verify that Theorem 2.1
that Theorem holds for
2.1 holds for (a, b)
6) xx (c, d) =
(c, d) = (0,1)
(0,1) xx [0,1]
[0,1] and defined
and F defined
by F(x,y)
F(x, y) == cos
cos(xy}.
(xy).

2.2
2.2 The hanging bar
The hanging bar
Suppose that
Suppose that aa bar,
bar, with
with uniform cross-sectional area
uniform cross-sectional area A and
and length
length f, i, hangs verti-
hangs verti-
cally, and
cally, and it it stretches
stretches duedue toto aa force
force (perhaps
(perhaps gravity) acting upon
gravity) acting upon it.
it. We assume
We assume
that
that the
the deformation
deformation occursoccurs only
only inin the vertical direction;
the vertical direction; this
this assumption
assumption is is reason-
reason-
able only
able only if if the
the bar
bar isis long
long and
and thin.
thin. Normal materials tend
Normal materials tend toto contract
contract horizontally
horizontally
when they
when they areare stretched
stretched vertically,
vertically, but both this
but both contraction and
this contraction and the coupling be-
the coupling be-
tween horizontal
tween horizontal and and vertical
vertical motion
motion are small compared
are small compared to to the
the elongation
elongation when when
the bar
the bar isis thin
thin (see
(see Lin
Lin and Segel [36],
and Segel [36], Chapter
Chapter 12).12).
With
With thethe assumption
assumption of of purely
purely vertical
vertical deformation,
deformation, we we can describe the
can describe the move-
move-
ment
ment of of the
the bar
bar inin terms
terms of of aa displacement
displacement function u(x,t).
function u(x, Specifically, suppose
t). Specifically, suppose
that the
that the top
top ofof the
the bar
bar is
is fixed
fixed atat xx == 0,
0, and
and let
let down
down be
be the
the positive
positive x-direction.
x-direction.
Let the
Let the cross-section
cross-section of of the
the bar originally at
bar originally at xx move
move toto xx + u(x,
u(x,t)t) at
at time
time tt (see
(see
Figure 2.4).
Figure 2.4). WeWe will
will derive
derive aa PDE
PDE describing
describing the dynamics of
the dynamics of the
the bar
bar byby applying
applying
Newton's
Newton's secondsecond law of motion.
law of motion.
We assume that
We assume that the
the bar
bar isis elastic,
elastic, which means that
which means that the internal forces
the internal forces in the
in the
bar depend
bar depend on on the
the local
local relative
relative of of change
change in in length.
length. The deformed length
The deformed length of of the
the
part
part ofof the
the barbar originally
originally between
between xx and and xx + Ax6.x (at
(at time
time t}t) is
is
(x + 6.x + U (x + 6.x, t)) - (x + u(x, t)) = 6.x + u(x + 6.x, t) - u(x, t).
Since the
Since original length
the original length is
is Ax,
6.x, the
the change in length
change in length of
of this
this part
part is
is
u(x + 6.x, t) - u(x, t),
and the
and the relative
relative change in length
change in length is
is
u(x+6.x,t) -u(x,t) ~ ou( )
6.x - ax x, t .
22
22 Chapter 2. Models in one dimension
dimension

Figure 2.4. The hanging


Figure 2.4. hanging bar and its
its coordinate system.
system.

This explains
This explains the
the definition
definition of
of the strain, the
the strain, the local
local relative
relative change
change in
in length, as the
length, as the
dimensionless quantity
dimensionless quantity
au
ax (x, t).

As
As we
we noted
noted above,
above, to say that
to say that the
the bar
bar is elastic is
is elastic is to say that
to say that the internal
the internal
restoring force of
restoring force of the
the deformed
deformed bar depends only
bar depends only onon the strain. We
the strain. We now
now make the
make the
further
further assumption
assumption that that the
the deformations
deformations are are small,
small, and
and therefore
therefore that
that the internal
the internal
forces are,
forces are, to
to good
good approximation,
approximation, proportional
proportional to to the strain. This
the strain. is equivalent
This is equivalent toto
assuming that
assuming that the
the bar
bar isis linearly
linearly elastic,
elastic, or Hookean.
or Hookean.
Under
Under the assumption that
the assumption that the
the bar is Hookean,
bar is Hookean, we we can
can write
write an expression for
an expression for
the
the total
total internal force acting
internal force on P,
acting on P, the
the part
part ofof the
the bar
bar between
between xx andand xx + Ax.
~x. WeWe
denote
denote by k(x) the
by k(x) stiffness of
the stiffness of the
the bar
bar at x, that
at x, that is,
is, the
the constant
constant of of proportionality
proportionality
in Hooke's
in Hooke's law,
law, with
with units
units of force per
offorce per unit area. (In
unit area. (In the
the engineering
engineering literature,
literature, kk is
is
called
called the modulus or
Young's modulus
the Young's or the
the modulus
modulus of elasticity. Values
of elasticity. Values forfor various materials
various materials
can be
can found in
be found in reference
reference books,
books, such
such asas [35].)
[35].) Then
Then thethe total
total internal
internal force
force is
is

au + ~x, t) -
Ak(x + ~x) ax (x
au
Ak(x) ax (x, t). (2.13)

The
The first
first term in this
term in expression is
this expression is the force exerted
the force exerted by
by the
the part
part of
of the
the bar
bar below
below
xx + Ax
~x onon P,
P, and
and the
the second
second term
term is
is the
the force
force exerted
exerted by
by the
the part
part of
of the
the bar above
bar above
x on
on P.
P. The
The signs
signs are
are correct;
correct; if
if the strains are
the strains are positive, then the
positive, then the bar has been
bar has been
stretched, and the
stretched, and the internal
internal restoring
restoring force is pulling
force is pulling down
down (the
(the positive
positive direction)
direction)
at x+
at x + Ax and up
~x and up at
at x.
x.
2.2. The hanging
hanging bar 23

Now, (2.13) is equal (by the fundamental theorem of calculus) to

r+l:J.x a ( au )
ix A ax k(s) ax (s, t) ds.

body force
We now assume that all external forces are lumped into a body force given by a force
density f/ (which has units offorce
of force per unit volume). Then the total external force
on P (at time t)
t] is
{x+l:J.x
ix f(s, t)Ads,

and the sum of the forces acting on part P is

{x+l:J.x a ( au ) r+l:J.x
ix A ax k(s) ax (s, t) ds + ix Af(s, t) ds.

Newton's second law states that the total force acting on P must equal the
mass of
mass of P times
times its
its acceleration.
acceleration. This law
law takes
takes the
the form
form
r+l:J.x a (
ix
au )
A ax k(s) ax (s, t) ds + x
x
l
+l:J.X
Af(s, t) ds = x
x
l
+l:J.X a2u
Ap(s) at 2 (s, t) ds,

p(x) is the density of the bar at x (in units of mass per volume). We can
where p(x)
rewrite this as
x 2

lx
+l:J.X [ aatu (s, t) - ax
p(s) 2
a ( k(s) a ut)) - f(s, t) ] ds = 0
ax (s,

for every xx E
(note how the factor of A cancels). This integral must be zero for e [0,
[0,£)
£)
Ax > O.
and every ~x 0. It follows (by the reasoning introduced on page 12)
12) that the
integrand must be identically
integrand identically zero; this gives the equation
2
a u a ( au)
p(x) at 2 - ax k(x) ax - f(x, t) = 0,
or
(2.14)

PDE (2.14) is called the wave


The PDE wave equation.
equation.
If the bar is in equilibrium,
If equilibrium, then the displacement does not depend on t, t, and
we can
we write uu = u(x].
can write In this case,
u(x). In case, the acceleration ad22 u/dt
the acceleration u/at22 is
is zero,
zero, and
and the
the forcing
forcing
function f/ must
function must also
also be
be independent
independent of of time. We then
time. We obtain the
then obtain the following
following ODE
ODE
for the equilibrium displacement of the bar:
for the equilibrium displacement of the bar:

--d ( k(x)-
dx dx
dU) = f(x). (2.15)

This is the same equation that governs


governs steady-state
steady-state heat flow!
flow! Just as in the case
steady-state heat flow,
of steady-state flow, the resulting BVPs can be solved with two integrations
integrations
Examples 2.2 and 2.3).
(see Examples
24
24 Chapter 2. Models in one dimension

If the
If the bar
bar is
is homogeneous,
homogeneous, soso that and k are
that pp and are constants, these last
constants, these last two
two
differential equations can be written as
differential equations can be written as

and
and
J2u
-k dx 2 = I(x),

respectively.
respectively.

2.2.1
2.2.1 Boundary conditions
Boundary conditions for the hanging bar
bar
Equation (2.15)
Equation (2.15) by
by itself
itself does
does not
not determine
determine aa unique
unique displacement;
displacement; we we need
need bound-
bound-
ary conditions, as
ary conditions, as well
well as initial conditions
as initial conditions if if the
the problem
problem is is time-dependent.
time-dependent. The The
statement of
statement of the
the problem explicitly gives
problem explicitly gives us one boundary
us one boundary condition: u(0) == 00 (the
condition: u(O) (the
top end of
top end of the bar cannot
the bar cannot move).
move). Moreover,
Moreover, we we can
can deduce
deduce aa second
second boundary
boundary
condition from force
condition from force balance
balance at at the
the other end of
other end of the bar. If
the bar. If the
the bottom
bottom ofof the bar
the bar
is unsupported, then
is unsupported, then there
there is no contact
is no contact force
force applied
applied at = e.
at xx = t. On the other
On the hand,
other hand,
the analysis that
the analysis that led
led to
to (2.13)
(2.13) shows
shows that
that the part of
the part of the bar above
the bar = e
above xx — (which is
t (which is
all of the
all of the bar) exerts an
bar) exerts an internal
internal force
force of
of

on the
on the surface
surface at = e.
at xx = Since there
t. Since is nothing
there is nothing to balance this
to balance this force,
force, we
we must have
must have

-Ak(f) ~~ (e) = 0,

or
or simply
simply

~~(f)=O.
Since the
Since the wave equation involves
wave equation involves the
the second time derivative
second time derivative of
of u,
u, we
we need
need two
two
initial conditions to
initial conditions to uniquely
uniquely determine
determine the motion of
the motion of the
the bar:
bar: the
the initial displace-
initial displace-
ment
ment andand the initial velocity.
the initial velocity. We
We thus arrive at
thus arrive at the following IBVP
the following IBVP for for the
the wave
wave
equation:
equation:
2
p(x) aatu2 -
a ( k(x) au)
ax ax = I(x, t), 0 < x < e, t> to,
u(x, to) = 'I/J(x), 0 < x < e,
au
at (x, to) = "Y(x), 0 < x < e, (2.16)
u(O, t) = 0, t> to,
au
ax (e, t) = 0, t > to·
2.2. The
2.2. The hanging
hanging bar
bar 25
25

The corresponding
The corresponding steady-state
steady-state BVP
BVP (expressing
(expressing mechanical
mechanical equilibrium)
equilibrium) is
is

d (k(x) dx
- dx dU) = f(x), 0< x < C,
u(O) = 0, (2.17)

~~(C) = o.
There are
There several other
are several other sets
sets of
of boundary
boundary conditions
conditions that
that might
might be
be of interest
of interest
in connection
in connection with
with the
the differential
differential equations or (2.15). For
equations (2.14) or example, if
For example, both
if both
ends of
ends of the bar are
the bar are fixed (not allowed
fixed (not allowed to
to move),
move), we
we have
have the
the boundary
boundary conditions
conditions

U(O) = 0, u(C) =0
(recall that
(recall that u
section at
section
u is
at the
is the
the end
end of
displacement, so
the displacement,
of the
the bar
so the condition u(C)
the condition
corresponding to
bar corresponding to xx == C
t does
°
= 0 indicates
u(i] = indicates that
not move
does not
that the
move from
from its
cross-
the cross-
original
its original
position). both ends
position). If both ends of
of the bar are
the bar are free,
free, the
the corresponding
corresponding boundary conditions
boundary conditions
are
are
du du
dx (0) = 0, dx (C) = o.
Any
Any of
of the above boundary
the above boundary conditions
conditions can
can be
be inhomogeneous.
inhomogeneous. For For example,
example,
we
we could
could fix
fix one
one end
end ofof the
the bar at xx == 00 and
bar at and stretch
stretch the
the other
other to
to xx ==C t ++ A^.
I::!.L
This experiment
This experiment corresponds
corresponds to to the
the boundary w(0) =
conditions u(O)
boundary conditions = 0, u(t] = A£
0, u(C) tJ..£. AsAs
another example,
another example, if
if one end of
one end of the
the bar (say xx =
bar (say is fixed
= 0) is fixed and
and aa force
force F isis applied
applied
to
to the other end
the other end (x == C),
£), then
then the applied force
the applied force determines
determines thethe value
value ofof du/dx(C).
du/dx(i}.
Indeed, as
Indeed, as indicated
indicated above,
above, the restoring force
the restoring force of the bar
of the the xx = C
on the
bar on cross-section
t cross-section
is
is
-Ak(C) ~~ (C),
and this
and this must
must balance
balance the
the applied force F:
applied force F:
du
-Ak(C) dx (C) +F = O.

This leads
This leads to
to the
the boundary condition
boundary condition

and the
and quantity F
the quantity / A has
F/A units of
has units of pressure (force per
pressure (force unit area).
per unit area). For mathematical
For mathematical
purposes, it is
purposes, it is simplest
simplest to write an
to write inhomogeneous boundary
an inhomogeneous boundary condition of this
condition of type
this type
as
as
:~ (C) = c,
but for solving
but for solving aa practical
practical problem, it is
problem, it is essential to recognize
essential to recognize that
that
F
C = Ak(C)"
26 Models in one dimension
Chapter 2. Models dimension

Exercises
1. Consider
1. Consider the following experiment:
the following experiment: A bar is
A bar hanging with
is hanging with the top end
the top end fixed
fixed
at xx == 0,
at 0, and
and the
the bar
bar is stretched by
is stretched by aa pressure (force per
pressure (force unit area)
per unit area) pp
applied uniformly
applied uniformly to to the free (bottom)
the free (bottom) end. What are
end. What are the
the boundary
boundary conditions
conditions
describing this
describing situation?
this situation?

2. Suppose that
2. Suppose that aa homogeneous
homogeneous bar (that is,
bar (that is, aa bar
bar with
with constant
constant stiffness A;) of
stiffness k) of
length £i has
length has its
its top end fixed
top end at xx = 0,
fixed at 0, and
and the
the bar is stretched
bar is stretched toto aa length
length
+ Il£ by
£1+A£. by aa pressure applied to
pressure pp applied to the
the bottom end. Take
bottom end. Take down
down to be the
to be the positive
positive
x-direction.
x-direction.
(a)
(a) Explain
Explain why
why pp and A^ have
and Il£ have the same sign.
the same sign.
(b) Explain
(b) Explain why
why p and Il£ cannot
and \t cannot both
both be
be chosen
chosen arbitrarily
arbitrarily (even
(even subject
subject
to
to the
the requirement
requirement that
that they
they have
have the same sign).
the same sign). Give
Give both
both physical
physical
and mathematical
and reasons.
mathematical reasons.
(c) Suppose
(c) Suppose pp is specified. Find
is specified. A^ (in
Find Il£ (in terms
terms of
of p, and C).
k, and
p, k, i).
(d) Suppose
(d) Suppose Il£
Al is
is specified. Find pp (in
specified. Find (in terms of A£,
terms of Il£, fc, and C).
k, and t}.
3. A
3. A certain
certain type
type of stainless steel
of stainless steel has
has aa stiffness
stiffness of 195 GPa.
of 195 GPa. (A (Pa) is
(A Pascal (Pa) is
the standard unit
the standard of pressure,
unit of or force
pressure, or force per
per unit
unit area. The Pascal
area. The Pascal is
is aa derived
derived
unit: one Pascal
unit: one Pascal equals
equals one
one Newton
Newton per square meter.
per square meter. The Newton is
The Newton the
is the
standard unit of force:
standard force: one
one Newton equals
equals one kilogram
kilogram meter per second-
second-
squared. Finally,
squared. Finally, GPa
GPa isis short
short for
for gigaPascal, or 10 1099 Pascals.)
Pascals.)
(a)
(a) Explain in words
Explain in (including units)
words (including units) what
what aa stiffness
stiffness of
of 195
195 GPa
GPa means.
means.
(b) Suppose
Suppose aa pressure
pressure ofof 11 GPa
GPa is is applied
applied to thethe end
end of aa homogeneous,
circular
circular cylindrical
cylindrical bar
bar of
of this stainless steel,
this stainless steel, and that the
and that other end
the other end is
is
fixed. If the
fixed. If the original length of
original length of the
the bar is 11 m
bar is m and
and its
its radius
radius is
is 11 cm, what
cm, what
will its
will its length
length be, in the
be, in equilibrium state,
the equilibrium state, after the pressure
after the pressure has
has been
been
applied?
applied?
(c) Verify
(c) Verify the
the result
result of 3b by
of 3b formulating and
by formulating and solving
solving the
the boundary
boundary value
value
problem representing this
problem representing experiment.
this experiment.
4. Consider aa circular
4. Consider circular cylindrical bar, of
cylindrical bar, of length
length 11 m and radius
m and radius 11 cm,
cm, made from
made from
an aluminum alloy with stiffness 70 GPa. If the top end of the bar
an aluminum alloy with stiffness 70 GPa. If the top end of the bar (x = 0)
0)
is fixed,
is fixed, what
what total force must
total force must bebe applied
applied to
to the
the other
other end
end (x = = 1)
1) to
to stretch
stretch
the
the bar
bar to
to aa length of 1.01
length of 1.01 m?
m?
5. Write
5. Write the
the wave
wave equation for the
equation for the bar of Exercise
bar of Exercise 3,
3, given
given that
that the density of
the density of
the stainless steel
steel is
is 7.9 g/cm33.. (Warning: Use
7.9 g/cm Use consistent units!) What
What must
must
the units of
the units of the forcing function
the forcing function f/ be?
be? Verify
Verify that the two
that the two terms on the
terms on left
the left
side of
side of the
the differential
differential equation
equation have
have the same units
the same as f./.
units as

6. Suppose
6. Suppose that a i m bar
that aIm of the
bar of the stainless steel described
stainless steel described inin Exercise 3, with
Exercise 3, with
density
density 7.9 g/ cm33,, is
7.9g/cm is supported
supported at
at the
the bottom
bottom but free at
but free at the
the top.
top. Let the
Let the
cross-sectional area of
cross-sectional area of the
the bar
bar be
be 0.1 m22 .• A
O.lm A weight of 1000
weight of 1000 kgkg is
is placed
placed on
on
2.3. The wave
wave equation for a vibrating string 27

top of the bar, exerting pressure on it via gravity (the gravitational


gravitational constant
is 9.8m/s22 ).
is 9.8m/s ).

The purpose of this problem is to compute and compare the effects


effects on the bar
of the mass
maBS on the top and the weight of the bar itself.

(a) Write down three BVPs:


i. First, take into account the weight of the bar (which
1. (which means that
gravity induces
gravity induces aa body
body force),
force), but
but ignore
ignore the
the mass
maBS on the top
on the (so the
top (so the
top
top end
end ofof the
the bar is free-the
bar is free—the boundary
boundary condition
condition is
is aa homogeneous
homogeneous
Neumann
Neumann condition).
condition).
ii. Next,
ii. Next, take
take into
into account
account the
the mass
mass onon the
the top,
top, but ignore the
but ignore the effect
effect of
of
the weight of the bar (so there is no body force).
iii. Last,
iii. LaBt, take
take both effects into
both effects account.
into account.
(b) Explain
(b) Explain why
why the third BVP
the third BVP can
can be solved by
be solved by solving
solving the
the first
first two and
two and
adding
adding the
the results.
results.
(c)
(c) Solve
Solve the
the first
first two
two BVPs
BVPs by
by direct
direct integration. Compare the
integration. Compare the two
two dis-
dis-
placements. Which is more significant,
significant, the weight of the bar
bar or the mass
maBS
on top?
(d) How
(d) How would
would the situation change
the situation change if the
the cross-sectional
cross-sectional area
area of
of the
the bar
bar were
were
changed to 0.2
changed to 0.2mm 22 ??

7. (a)
7. Show that
(a) Show that the function
function

u(x, t) = cos (c(}t) sin ((}x)

is
is aa solution
solution to
to the
the homogeneous
homogeneous wave equation
wave equation

(b) What values of 9() will cause u to also satisfy


satisfy homogeneous Dirichlet con-
ditions
ditions at =0
at xx = and xx =
0 and = tl
£?

2.3
2.3 The
The wave
wave equation for a
equation for a vibrating string
vibrating string
We
We now
now present
present anan argument
argument that the wave
that the wave equation (2.14) also
equation (2.14) also describes
describes the
the small
small
transverse vibrations of an elastic string (such as aB a guitar string). In the course
of the following derivation, we make several aa priori unjustified
unjustified assumptions whichwhich
are significant enough that the end result ought to be viewed viewed with some skepticism.
However, aa careful analysis leads
careful analysis leads to
to the same model (see(see the
the article
article by Antman [1]).
[1]).
For simplicity, we
For simplicity, we will
will assume
assume that
that the
the string
string inin question
question is
is homogeneous,
homogeneous,
so that any
so any material properties are constant
constant throughout the string.
string. WeWe suppose
that
that the string is
the string is stretched
stretched to
to length
length £I and
and that its two
that its endpoints are
two endpoints are not
not allowed
allowed
to move.
move. WeWe further suppose that the stringstring vibrates in in the xy-plane,
xy-plane, occupying
occupying
the
the interval £] on
[0,1]
interval [0, on the
the x-axis
x-axis when
when atat rest, and that
rest, and that the
the point
point at (x,0) in
at (x,O) the
in the
28 Chapter 2. Models in one dimension

reference configuration moves to (x, u(x, t)) at time t. We


configuration moves We are thus postulating that
the motion
motion of
of the
the string
string is entirely
entirely in the
the transverse direction
direction (this
(this is
is one
one of
of the
the
severe assumptions
severe assumptions that
that we mentioned in
we mentioned in the
the previous
previous paragraph). Granted
Granted this
this
assumption, we
assumption, we now derive
derive the differential
differential equation
equation satisfied
satisfied by the
the displacement
displacement u.
Since, by
Since, by assumption,
assumption, aa string
string does
does not
not resist
resist bending,
bending, the internal restoring
the internal restoring
force of the string under tension is tangent
tangent to the string itself at every point. We We
will denote
denote the magnitude of this restoring
magnitude ofthis restoring force
force by T(x,
T(x, t). In
In Figure 2.5,
2.5, we display
corresponding to the part of the string between x
a part of the deformed string, corresponding
and x + 6x
and Ax in
in the reference configuration,
the reference configuration, together
together with the internal
with the internal forces
forces at
at the
the
ends of this part, and their magnitudes. In the absence of any external forces, the
sum of these internal forces must balance the mass times acceleration of this part
of the string. To write down these equations, we we must decompose the internal force
into its horizontal and vertical components.

Figure 2.5.
Figure 2.5. A part of
of the
the deformed
deformed string.

We write
write n = n(x, t) for
for the
the force
force at
at the
the left
left endpoint and
and 0 for the
9 for the angle this
this
force vector makes with the horizontal. WeWe then have

ni + n~ = T(x, t)2,

with
with
nl = -T(x, t) cos (0), n2 = -T(x, t) sin (0).

Assuming
Assuming that \du/dx «
that lou/oxl <C 11 at every point,
at every point, and
and noting
noting that
that

au
tan (0) = 8x(x,t),
aa reasonable
reasonable approximation
approximation is
is

cos (0) == 1, sin (0) == tan (0) = ~~ (x, t).


2.3. The
2.3. The wave
wave equation
equation for a vibrating
for a string
vibrating string 29

We then
then obtain
n(x, t) === ( -T(x, t), -T(x, t) ~~ (x, t)) .

Similarly, the
Similarly, force at
the force at the
the right
right end
end of
of the
the part
part of the string
of the string under consideration is
under consideration is

n(x + Llx, t) === (T(X + Llx, t), T(x + Llx, t) ~~ (x + Llx, t)) .
We then
We see that
then see that
T(x + Llx, t) - T(x, t)
is (an
is (an approximation
approximation to)
to) the
the horizontal component of
horizontal component the total
of the total force on the
force on the part
part of
of
the string,
the string, and
and
au au
T(x + Llx, t) ax (x + Llx, t) - T(x, t) ax (x, t)

is (an
is (an approximation
approximation to)
to) the
the vertical
vertical component.
component.
By assumption, the horizontal component
By assumption, the horizontal component of of the acceleration of
the acceleration of the string is
the string is
zero, and
zero, and so
so Newton's second law
Newton's second law yields
yields
T(x + Llx, t) - T(x, t) = 0;
thus
thus the tension is
the tension constant throughout
is constant throughout the string at
the string at each
each point in time.
point in time. We will
We will
assume that
assume that the length of
the length of the string never
the string never changes
changes much from its
much from its length
length in the
in the
reference configuration (which
reference configuration (which isis f),
£), and
and therefore
therefore that
that it
it makes sense to
makes sense to assume
assume
that T is
is independent
independent ofof t as
as well, that
that is,
is, that
that T is
is aa constant.
constant. Applying
Applying Newton's
second law
second law to
to the
the vertical
vertical component
component yields
yields
t+1':!..x a 2 u au au
ix p at 2 (s, t) ds = T ax (x + Llx, t) - T ax (x, t)
{X +1':!.. x a2u
= ix T ax 2 (s, t) ds,

where is the
where pp is the density
density of the string
of the string (in
(in units
units of
of mass per length).
mass per Since this
length). Since this holds
holds
for all
for all x and
and Ax sufficiently small,
Llx sufficiently small, we
we obtain
obtain the differential equation
differential equation
a2 u a2 u (2.18)
p at 2 = T ax 2 ' 0 < x < £, t > O.
We
We recognize this as
recognize this as the
the homogeneous wave equation.
homogeneous wave equation. It
It is
is usual
usual to
to write this in
write this in
the form
the form
a2 u 2 a2 u
at 2 - c ax 2 = 0, < x < £, t > 0, °
2
where c =
where c2 = TT/p. The significance
/ p. The significance of
of the
the parameter
parameter cc will
will become
become clear in Chapter
clear in Chapter
7.
In the
In case that
the case that an
an external
external body force is
body force is applied
applied to the string
to the string (in
(in the vertical
the vertical
direction), the
direction), the equation
equation becomes
becomes
aat2 u 2 a2 u
c ax 2 = I(x, t), 0 < x < £, t> O. (2.19)
2 -
30 Chapter
Chapter 2. Models in
2. Models in one
one dimension
dimension

Exercise
Exercise 11 asks
asks the
the reader
reader to
to determine
determine the
the units
units of
of f./.
The
The natural
natural boundary
boundary conditions
conditions for
for the
the vibrating string, as
vibrating string, as suggested above,
suggested above,
are
are homogeneous
homogeneous Dirichlet conditions:
Dirichlet conditions:

u(O, t) = u(£, t) = 0, t > 0.


One can also
One can also imagine
imagine that
that one
one or
or both ends of
both ends of the string are
the string are allowed
allowed to
to move freely
move freely
in
in the
the vertical direction (perhaps
vertical direction (perhaps an
an end
end of
of the
the string
string slides along aa frictionless
slides along frictionless
pole).
pole). In
In this
this case,
case, the
the appropriate
appropriate boundary
boundary condition
condition is
is aa homogeneous
homogeneous Neumann
Neumann
condition
condition (see
(see Exercise 5).
Exercise 5).

Exercises
1. What
1. What units
units must
must ff(x, ) have
( x , t t) have in (2.19)?
in (2.19)?

2.
2. What
What are
are the
the units
units of
of the
the tension
tension T in
in the
the derivation
derivation of
of the
the wave
wave equation
equation for
for
the string?
the string?
3.
3. What are the
What are the units
units of
of the
the parameter
parameter cc in
in (2.18)?
(2.18)?

4. Suppose the
4. Suppose only external
the only external force
force applied
applied to
to the
the string
string is
is the
the force
force due
due to gravity.
to gravity.
What
What form
form does
does (2.19)
(2.19) take
take in
in this
this case?
case? (Let
(Let g be
be the acceleration due
the acceleration to
due to
gravity, and take
gravity, and g to
take g to be constant.)
be constant.)

5. Explain
5. Explain why
why aa homogeneous
homogeneous Neumann
Neumann condition
condition models an end
models an end of
of the string
the string
that is allowed
that is allowed to
to move freely in
move freely in the
the vertical
vertical direction.
direction.
6. Suppose
6. Suppose that an elastic
that an elastic string is fixed
string is at both
fixed at both ends,
ends, as
as in
in this
this section, and it
section, and it
sags
sags under
under the
the influence
influence of an external
of an external force
force ff(x)
( x ) (f is constant
(f is constant with respect
with respect
to
to time).
time). What
What differential
differential equation and side
equation and side conditions does the
conditions does the equilibrium
equilibrium
displacement
displacement ofof the string satisfy?
the string satisfy? Assume
Assume that
that f/ is given in
is given in units
units of force
of force
per length.
per length.

2.4
2.4 Suggestions for
Suggestions for further reading
further reading
If the
If the reader
reader wishes
wishes to
to learn
learn more
more about
about the
the use
use of
of mathematical
mathematical models
models in the
in the
sciences,
sciences, an
an excellent
excellent place
place to
to start
start is
is the
the text
text by
by Lin
Lin and Segel [36], which
and Segel which com-
com-
bines
bines modeling
modeling with
with the
the analysis
analysis of
of the
the models
models by
by aa number
number of different analytical
of different analytical
techniques.
techniques. Lin
Lin and Segel cover
and Segel cover the
the models
models that
that form
form the
the basis
basis for
for this
this book,
book, as
as
well as many others.
others.
A more advanced
A more advanced text,
text, which focuses almost
which focuses almost entirely
entirely on the derivation
on the derivation ofof
differential
differential equations
equations from
from the
the basic
basic principles
principles of
of continuum
continuum mechanics,
mechanics, is Gurtin
is Gurtin
[21].
[21].
Chapter
Chapter 33

Eseential
ial linear
linear algebra
algebra

The solution
The solution techniques
techniques presented
presented inin this book can
this book can be described by
be described by analogy
analogy toto
techniques for solving
techniques for solving
Ax=b,
where A isis an nn x nn matrix (A
(A 6 R n x n ) and
E RllXll) and x and
and b are n-vectors (x,
bare (x,bb E R n ).
€ Rll).
Recall that such
Recall such a matrix-vector equation represents
represents the following system
system of
of n linear
equations in the
equations in unknowns x\,
the nn unknowns Xl, #2, • • • ,, Xn:
X2, ... xn:
anXl + al2X2 + ... + alnX n bl ,
a2lXl + a22X2 + ... + a2nXn b2 ,

Before we discuss methods for solving differential


differential equations, we review
review the
the funda-
mental facts about
mental systems of
about systems of linear (algebraic) equations.
linear (algebraic) equations.

3.1
3.1 Linear systems
Linear systems as
as linear
linear operator
operator equations
equations
To fully
To fully appreciate
appreciate the
the point
point of
of view taken in
view taken in this book, it
this book, it is
is necessary
necessary to understand
to understand
the equation Ax =
the = b not just as as aa system
system ofof linear equations,
equations, but as a finite-
finite-
dimensional linear
dimensional linear operator equation. In
operator equation. In other
other words,
words, we
we must
must view
view the
the matrix
matrix AA
mapping, or simply function) from Rll
operator (or mapping,
as defining an operator Rn to Rll
Rn via matrix
multiplication: A
multiplication: A maps x E Rn to
6 Rll to Yy == Ax E R n . (More generally,
e Rll. generally, if A is
is not
mxn
say A E
square, say e RffiXll,
R , then A defines a mapping from Rll Rn to R m
, since Ax E
Rffi, GR m
Rffi
n
for each
for each x xe R .)
E Rll.)
The
The following
following language
language isis useful in discussing
useful in discussing operator
operator equations.
equations.

Definition 3.1.
Definition 3.1. Let XX and Y be function (^operator,
be sets. A function (operator, mapping,)
mapping) /f from X X
to Y is a rule for associating
associating with each xX EeXX a unique yy £E Y, denoted = ff (x)
denoted yy = (x).
The set
set X domain of
X is called the domain of ff,, and the range
range of
of f is the set
R(A) = {f(x) E Y : x E X}.

31
31
32 Chapter 3. Essential linear algebra

We write
We write ff :: X -> YY (lif
X --+ ("f maps
maps X into Y")
X into Y") to
to indicate
indicate that
that ff is
is aa function
function from X
from X
toY.
to Y.

The reader should recognize the difference difference between the range of a function
/f :: X —)• Y
X --+ and the
Y and set YY (which
the set is sometimes
(which is sometimes called
called the
the co-domain
co-domain of of /). The set
f). The set
merely identifies
Y merely
Y identifies the
the type of the
type of the output
output values
values f(x);
/(#); for
for example,
example, ifif YY == R,
R, then
then
every f/(#)
(x) isis a real number. On the other hand, the range of f/ is is the set of elements
of Y that
of that areare actually
actually attained
attained by /. As
by f. As aa simple
simple example,
example, consider
consider f/ : R --+ —> R
defined by
defined by ff(x)
(x) = =xx 22.• The
The co-domain
co-domain of of /f is
is R, but
but the
the range of /f consists
range of consists of
of the
the
set of nonnegative numbers:
R(f) = [0,00).
difficult to determine the range of a function.
In many cases, it is quite difficult function. The co-
domain, on the other hand, must be specified as part of the definition of the function.
A set
A set is
is just aa collection
collection of
of objects
objects (elements); most useful sets
(elements); most sets have
have operations
operations
defined on
defined on their elements.
elements. TheThe most
most important sets used in
important sets in this
this book are
sue vector
vector
spaces.
spaces.

Definition 3.2.
Definition 3.2. A A vector space V V isis aa set
set on
on which two operations
which two operations areare defined,
defined,
addition (if
addition (if u,
u, vv 6 then u
V, then
E V, u +v v e V) and
E V) scalar multiplication
and scalar multiplication (if
(if u
u €EVV and
and aa
is aa scalar,
is then au
scalar, then cm E€ V).
V). The
The elements
elements of of the
the vector
vector space are called
space are called vectors. (In
(In
this book, the scalars are usually real numbers, and we assume this unless
this book, the scalars are usually real numbers, and we assume this unless otherwise otherwise
stated. Occasionally
stated. Occasionally we use the
we use the set
set of
of complex numbers as
complex numbers as the
the scalars.
scalars. Vectors
Vectors will
will
always be denoted
always denoted by by lower
lower case
case boldface
boldface letters.}
letters.)
The two
The two operations
operations must
must satisfy the following
satisfy the algebraic properties:
following algebraic properties:

1. u +v = v +u for all u, v E V.

2. (u + v) +w = u + (v + w) for all u, v, wE V.

3. There is a zero vector 0 in V with the property that u +0 = u for all u E v.


4. For each u E V, there is a vector -u E V such that u + (-u) = o.
5. a(u + v) = au + av for all u, v E V and for all scalars a.
6. (a + P)u = au + pu for all u E V and for all scalars a, p.

7. a(pu) = (ap)u for all u E V and for all scalars a, p.

8. 1u = u for all u E v.

For every
For every vector
vector space
space considered
considered in
in this
this book, the
the verification of
of these vector
vector
space properties
space properties is
is straightforward
straightforward and
and will
will be
be taken
taken for
for granted.
granted.

Example 3.3.
Example 3.3. The
The most
most common
common example
example of
of aa vector
vector space is (real)
space is (real) Euclidean
Euclidean
n-space:
n-space:
3.1.
3.1. Linear
Linear systems as linear
systems as linear operator
operator equations
equations 33
33

Vectors in
Vectors R nn are
in R are usually
usually written in column
written in column form,
form,

as
as it is convenient
it is convenient at times to
at times of u
think of
to think G Rn as
u ERn as an n x
an n x 11 matrix.
matrix. Addition
Addition and
and
scalar multiplication
multiplication are defined
defined componentwise:

u + v = (Ul, U2, ... , un) + (VI, V2, ... ,Vn ) = (Ul + VI, U2 + V2, • .. ,Un + V n ),
au = a(Ul,U2, ... ,Un) = (aUl,aU2, ... ,aUn).

Example 3.4.
Example 3.4. Apart
Apart from
from Euclidean
Euclidean n-space,
n-space, the
the most
most common vector spaces
common vector spaces are
are
function spaces —vector
function spaces -vector spaces in which
spaces in which the
the vectors
vectors are
are functions.
functions. Functions (with
Functions (with
common
common domains)
domains) can
can bebe added together and
added together and multiplied
multiplied by
by scalars,
scalars, and
and the algebraic
the algebraic
properties of aa vector
properties of vector space
space are
are easily
easily verified. Therefore, when
verified. Therefore, when defining
defining aa function
function
space, one must
space, one must only check that
only check that any desired properties
any desired of the
properties of the functions
functions are
are preserved
preserved
by
by addition
addition and
and scalar multiplication. Here
scalar multiplication. Here are
are some important examples:
some important examples:
1. C[a, b]
1. b] is
is defined
defined toto bebe the
the set of all
set of all continuous,
continuous, real-valued
real-valued functions defined
functions defined
on the
on interval [a,
the interval b]. The
[a, b]. The sum
sum ofof two continuous functions
two continuous functions is
is also continuous,
also continuous,
as is
as is any
any scalar
scalar multiple
multiple of of aa continuous
continuous function. Therefore, C[a, b]
function. Therefore, b] is
is aa
vector space.
vector space.

2. C1l [a,
2. C [a, b]
b] is
is defined to be
defined to be the
the set
set of
of all
all real-valued, continuously differentiable
real-valued, continuously differentiate
functions
functions defined on the
defined on interval [a,b].
the interval (A function
[a, b]. (A function is continuously differen-
continuously differen-
tiate
tiable if if its derivative
derivative exists andand is continuous.)
continuous.) The The sum
sum ofof two continuously
continuously
differentiate functions
differentiable functions is is also
also continuously
continuously differentiate, and the
differentiable, and the same
same is is
true for
for a scalar multiple of of a continuously
continuously differentiate
differentiable function. Therefore,
function. Therefore,
C1l [a,
C [a, b]
b] is
is aa vector
vector space.
space.
3. For
3. any positive
For any positive integer
integer k, Ck[a, b]
k, Ck[a, b] is the
the space
space of
of real-valued
real-valued functions defined
functions defined
on [a,
[a, b]
b] that have k continuous derivatives.
continuous derivatives.

Many
Many vector spaces that
vector spaces that are
are encountered
encountered in
in practice
practice are
are subspaces of other
subspaces of othe
vector spaces.
vector spaces.

Definition
Definition 3.5.
3.5. Let V be
Let V be aa vector
vector space, and suppose
space, and W is
suppose W is aa subset
subset ofV
of V with the
with the
following properties:
following properties:

1. The
The zero vector
vector belongs to W.
W.
2.
2. Every linear combination
Every linear combination of
of vectors in W is also
vectors in also in That is,
in W. That if x, yyEW
is, if GW
and a,
and a, /? G R, then
j3 E then
ax + j3y E W.
34
34 Chapter
Chapter 3. Essential linear
3. Essential linear algebra
algebra

Then we
Then we call W aa subspace of
call W ofV.
V.

A subspace of
A subspace of aa vector
vector space
space isis aa vector space in
vector space in its
its own
own right, as the
right, as reader
the reader
can verify by
can verify checking that
by checking all the
that all the properties of aa vector
properties of space are
vector space are satisfied for aa
satisfied for
subspace.

Example 3.6.
Example 3.6. We
We define
define
C1[a, b] = {u E C 2[a, b] : u(a) = u(b) = o}.
The set
The C^ja, bj
set Cb[a, b] is
is aa subset
subset of C22[a,b],
of C and this
[a, b], and this subset
subset contains
contains the
the zero function
zero function
(hopefully this
(hopefully this is obvious
obvious to
to the
the reader).
reader). Also, if u,v
Also, if e Cb[a,b],
u,v E 6%[a, b], a,f3
a,j3 GE R, and
and
w
w = au + f3v,
= au then
f3v, then
2 2
• w
wEeC
C2[a, b] (since
[a, bj (since C
C 2[a,b]
[a, bj is aa vector
vector space);
space); and
and

w(a) =
• w(a) au (a) + /3v(a)
— au(a) a-Q + 0-Q
f3v(a) = 0.·0 f3 . 0 = Q, and similarly
0, and similarly w(b) o.
w(b) = 0.
Therefore, w € Cb[a,
Therefore, wE Cp[a,b],
b], which
which shows that Cb[a,
shows that C^a,b]bj is aa subspace C22[a,b].
of C
subspace of [a, bj.

Example 3.7. We
Example 3.7. We define
define
C~,[a,bj={uEC2[a,bj: ~~(a)=~~(b)=O}.

The set
The C^[a,b]bj is also
set CF,-[a, also aa subset
subset of C22[a,b],
of C [a, bj, and
and it can be
it can be shown
shown toto be
be aa subspace.
subspace.
Clearly the
Clearly the zero
zero function
function belongs to C;'
belongs to Cj^[a,b].
[a, bj. If u,vv E
If u, € C;'
C^[a,b], a,/?
[a, b], a, R, and
£ R,
f3 E and
w au + f3v,
w == au fiv, then
then
dw du dw
dx (a) = a dx (a) + f3 dx (a) =a ·0+ f3 . 0 = o.

Similarly,
Similarly,
~: (b) = 0,
and so
and so w e C;'[a,bj.
w E C^[a,b]. This
This shows that C;'[a,bj
shows that C^[a,b] is aa subspace C22[a,b].
of C
subspace of [a, bj.

The previous two examples will be used throughout


throughout this book. The letters
"D" and
"D" "N" stand
and "N" stand for
for Dirichlet
Dirichlet and
and Neumann,
Neumann, respectively
respectively (see Section 2.1,
(see Section 2.1, for
for
example).
The following provides an important nonexample
nonexample of a subspace.
subspace.

Example 3.8.
Example 3.8. We
We define
define
W = {u E C 2 [a,bj : u(a) = 'Y, u(b) = 8},
where 7 and
where'Y are nonzero
and 8 are real numbers.
nonzero real numbers. Then,
Then, although
although W W is aa subset
subset of C22[a,b],
of C [a, bj,
it
it is not a subspace. For example, the zero function does not belong to W, since
not a subspace. For example, the zero function does not belong to W, since
it
it does not satisfy
does not satisfy the
the boundary
boundary conditions.
conditions. Also, u, vv e
if u,
Also, if W and a,
E Wand € R,
a, J3f3 E then,
R, then,
with
with w au + f3v,
w = au flv, we
we have
have

w(a) = au(a) + f3v(a) = a'Y + f3'Y = (a + (3)"(.


3.1. Linear systems as
as linear operator equations
equations 35
35

Thus w(a)
Thus w(a) does
does not equal 7,
not equal except in
,,(, except in the
the special case that
special case a + (3
that a = 1.
j3 = I. Similarly,
Similarly,
w(b) does not satisfy the boundary condition at the right endpoint.
w(b) does not satisfy the boundary condition at the right endpoint.

The concept of
The concept of aa vector
vector space
space allows
allows us to define
us to define linearity,
linearity, which describes
which describes
many
many simple
simple processes and is
processes and is indispensable
indispensable in
in modeling
modeling and analysis.
and analysis.

Definition 3.9.
Definition 3.9. Suppose
Suppose XX and Y are vector
and Yare vector spaces, and ff :: X
spaces, and —>• Y
X -+ Y isis an operator
an operator
(or function,77 or mapping)
(or with domain X and range
mapping) with Y. Then f is
range Y. linear if
is linear if and
only if
only if
f(ax + j3z) = af(x) + j3f(z) for all a, j3 E R, x, z E X. (3.1)
This condition
This condition can be expressed
can be expressed as
as the
the following two conditions,
following two conditions, which
which together
together are
are
equivalent
equivalent to (3.1):
to (3.1):

1. f(ax) = af(x) for all x E X and all a E R;

2. f(x + z) = f(x) + f(z) for all x,z E X.

A linear operator
A linear operator is
is thus
thus aa particularly simple kind
particularly simple of operator;
kind of operator; itsits simplicity
simplicity
can be
can appreciated by
be appreciated comparing the
by comparing the property
property of
of linearity f ( x ++y)y}==f(x)
(e.g. f(x
linearity (e.g. f ( x ) ++
f(y)) with
f(y)} with common
common nonlinear
nonlinear operators: -:j:. -/X
Jx + y ^
operators: ^/x + v:y, sin
^-\-^Jy-> sin (x
(x + y) ^ -:j:. sin (x) +
sin (x)
sin(?/),
sin (y), etc.
etc.

Example
Example 3.10. The operator
3.10. The operator defined
defined by matrix A
by aa matrix GR
A E R ffixn
mxn
via matrix-vectoi
via matrix-vector
multiplication,
multiplication,
ff(x) Ax,
(x) == Ax,
is
is linear; the reader
linear; the reader should verify this
should verify if necessary
this if (see Exercise
necessary (see 7). Moreover,
Exercise 7). Moreover, itit
can be
can be shown
shown that every linear
that every linear operator
operator mapping
mapping RnRn into Rm can
into Rffi can be
be represented
represented
by
by aa matrix R mxn in
matrix A €E Rffixn in this
this way
way (see
(see Exercise This explains
Exercise 8). This explains why
why the study
the study
of (finite-dimensional)
of (finite-dimensional) linear
linear algebra
algebra is
is largely
largely the
the study of matrices.
study of matrices. In this book,
In this book,
matrices will be denoted by upper
upper case boldface letters.
boldface letters.

Example 3.11.
Example 3.11. To
To show
show that the sine
that the sine function is not
function is not linear, we observe
linear, we observe that
that

sin (2i) = sin (7f) = 0,

while
while
2sin(~) =2·1=2.

Example 3.12. Differentiation


Example 3.12. Differentiation defines
defines an operator
an operator

d~ : C 1 [a, b] -+ C[a, b],


7
The word
7The word "operator"
"operator" is
is preferred
preferred over
over "function"
"function" in
in this
this context,
context, because
because the
the vector
vector spaces
spaces
themselves
themselves are
are often
often spaces
spaces of
of functions.
functions.
36 Chapter 3.
Chapter 3. Essential
Essential linear
linear algebra
algebra

and this
and this operator
operator is
is well
well known
known to
to be
be linear.
linear. For
For example,
example,

d~ [2 sin (x) - 3e X ] = 2 cos (x) - 3e x ,

since
since
d~ [sin (x)] = cos (x), d~ [eX] = eX.
In
In general, the kth
general, the kth derivative
derivative operator defines aa linear
operator defines linear operator
operator mapping
mapping Ck Ck[a,
[a, bb]
into C[a,b]. This is why linearity is so important in the study of differential
into C[a, b]. This is why linearity is so important in the study 01 differential equa- equa-
tions.
tions.

Since a matrix A E R n x n defines a linear operator


e Rnxn operator from Rn Rn to Rn,
Rn, the linear
system Ax
system Ax = = bb can
can be regarded as
be regarded as aa linear
linear operator
operator equation. From this
equation. From point of
this point of
view, the
view, the questions
questions posed by the
posed by the system
system are:are: Is there aa vector
Is there vector x Rn whose
G Rn
xE whose image
image
under A
under A is
is the
the given vector b?
given vector b? IfIf so,
so, is
is there
there only
only one
one such
such vector
vector x?
x? In the next
In the next
section, we
section, we will explore these
will explore these questions.
questions.
The point
The of view
point of view of
of aa linear
linear operator
operator equation
equation isis also
also useful
useful in
in discussing
discussing
differential equations.
differential equations. For
For example,
example, consider
consider thethe steady-state
steady-state heat
heat flow
flow problem
problem
(Pu
-/1, ox 2 = I(x), 0 < x < C,
u(O) = 0, (3.2)
u(e) = 0
from Section
from Section 2.1.
2.1. We
We define
define aa differential
differential operator
operator L
LD C|,[0,^] -> C[O,C]
D :: C1[0,C]-+ by
C[Q,l] by
~u
LDu = -/1, dx 2 '

Then the
Then the BVP
BVP (3.2)
(3.2) is
is equivalent
equivalent to
to the
the operator
operator equation
equation
LDU=I
(the reader
(the should notice
reader should notice how
how the Dirichlet boundary
the Dirichlet boundary conditions
conditions are
are enforced
enforced by
by
the definition
the definition of
of the
the domain
domain ofof LD). This and
LD)' This and similar
similar examples
examples will
will be
be discussed
discussed
throughout this
throughout this chapter
chapter and
and in
in detail
detail in
in Section
Section 5.1.
5.1.

Exercises
Exercises
1. In
1. In elementary
elementary algebra
algebra and
and calculus
calculus courses,
courses, it
it is
is often
often said that 1
said that / :R ->• R
R -+ R
is linear
is linear if
if and only if
and only if it
it has
has the
the form
form f(x)
I(x) =— axax ++ b,
&, where
where aa and
and bb are
are
constants. Does
constants. Does this
this agree
agree with
with Definition
Definition 3.9?
3.9? IfIf not,
not, what
what is
is the
the form
form of
of aa
linear function / : R —^
linear function 1 R -+ R? R?
2. Show explicitly
2. Show explicitly that
that 1
/ :R
R -+
-> R
R defined
defined by
by f(x) = v'x
I(x) = ^/x is
is not linear.
not linear.
3. For
3. For each
each of
of the following sets
the following sets of
of functions,
functions, determine
determine whether
whether or
or not it is
not it is aa
vector space.
vector space. (Define
(Define addition
addition and
and scalar
scalar multiplication
multiplication inin the obvious way.)
the obvious way.)
If it
If it is
is not, state what
not, state property of
what property of aa vector
vector space
space fails
fails to hold.
to hold.
3.1. Linear systems as linear operator equations
Linear equations 37

(a) {J E C[O, 1] : 1(0) = O}


(b) {J E C[O, 1] : 1(0) = I}

(c) {1 E C[O, 1] 1
: 10 1(x) dx = O}
Pnn,, the set of all polynomials of degree n or less.
(d) P
(e) The set of all polynomials of degree exactly n.
n.

the differential
4. Prove that the operator L : C1l[a,
differential operator b] -+
[a, b] —> C[a, b]
b] defined by

du
Lu=u-
dx
operator.
is not a linear operator.

5. Prove
5. Prove that
that the
the differential operator L : Cl1[a,b]
differential operator —>• C[a,
[a, b] -+ defined by
C[a,b]b] defined by

du 3
Lu = - +u
dx
is not
is not aa linear
linear operator.
operator.

the differential
6. Prove that the M : C22[a,
differential operator M —)• C[a,
b] -+
[a, b] <7[a, b]
b] defined by

d2 u du
Mu= --2-+3u
2 dx dx
operator.
is a linear operator.

(a) Let
7. (a) Let A E R 2x2 . Prove that
e R2x2.

A(ax + f3y) = aAx + f3Ay for all a,f3 E R, X,y E R2.

(Write

and write
and out A(ax +
write out + f3y)
/3y) explicitly.)
Now repeat
(b) Now repeat part 7a for A E R n x n . The proof is not difficult
e Rnxn. difficult when
when one
(i, j)-entry of A is denoted
uses summation notation. For example, if the (i,
then
aij, then
aij,
n
(Ax)i = L aijXj.
j=1

Write (A
Write (ax + f3Y))i
(A(ax /?y)) i and (o:Ax + f3AY)i
and (aAx /5Ay)i in
in summation
summation notation,
notation, and
and
show that
show the first
that the can be
first can rewritten as
be rewritten as the
the second
second using
using the
the elementary
elementary
properties of arithmetic.
38 Chapter 3. Essential linear algebra

8. (a)
8. R2 -t
Suppose f/ : R2
(a) Suppose R2 is
—>• R2 is linear.
linear. Prove that there
Prove that there is
is aa matrix
matrix AAE €R 2x2
R 2X2
2
such that
such that /f is
is given
given by
by /(x)
f(x) == Ax.
Ax. Hint:
Hint: Each
Each xx E e R2
R satisfies
satisfies xx ==
xiei +X2e2,
Xlel + #262, where
where

Since f/ is
Since is linear,
linear, we
we have
have

The desired
The matrix A
desired matrix A can
can be
be expressed in terms
expressed in of the
terms of vectors f/(ei),
the vectors (et),
/(e 2 ).
f(e2).
(b)
(b) Now show that
Now show that if R n -t
if f/ : R II Rm
—>• R is linear,
m is linear, then
then there
there exists
exists aa matrix
matrix
mxn
AE<E RmXll
R such that /(x)
f(x) == Ax for
for all
all x E Rn.
e Rll.

3.2 Existence and


Existence and uniqueness of solutions to Ax
Ax == b
We will now
now discuss
discuss the
the linear
linear system
system Ax
Ax == b, where
where A R n x n and
A eE RllXll R n , as
and bb eE Rll, as a
linear operator equation.
linear operator equation. We consider three
We consider fundamental questions:
three fundamental questions:
1. Does
1. Does aa solution
solution to
to the equation exist?
the equation exist?

2. If
2. If aa solution
solution exists,
exists, is it unique?
is it unique?

3. If aa unique
3. If unique solution
solution exists,
exists, how can we
how can we compute it?
compute it?

It turns
It out that
turn~ out the first
that the two questions
first two questions are intimately linked;
are intimately linked; the
the purpose of this
purpose of this
section is
section is to shed some
to shed some light
light on
on these
these two questions and
two questions and the
the connection
connection between
between
them.
them. We
We will also briefly
will also briefly discuss
discuss how
how this
this point of view
point of view can
can be carried over
be carried over to the
to the
case of
case of aa linear
linear differential
differential equation.
equation. The
The third
third question
question will
will be deferred to
be deferred to later
later in
in
this chapter.
this chapter.

3.2.1
3.2.1 Existence
Existence
The existence
The of aa solution
existence of solution to Ax == b
to Ax is equivalent
b is equivalent to the condition
to the condition that
that b lie in
b lie in
72-(A), the
R(A), the range
range ofof A. This begs
A. This the question:
begs the question: What
What sort
sort of
of aa set
set is
is 7£(A)?
R(A)?
If y,
If y, w
wE6 R(A),
72.(A), say
say y
y =
= Ax,
Ax, ww = Az, then
= Az, then

ay + {3w = aAx + {3Az


= A(ax + (3z).
This shows that
This shows that ayay ++ /3w
(3w € 72-(A). Moreover,
E R(A). Moreover, the the zero
zero vector lies in
vector lies in 7£(A), since
R(A), since
AO = = o.0. It follows that R(A)7£(A) is a subspace of Rll Rn (possibly the entire space Rll-Rn—
every vector
every space is
vector space is aa subspace
subspace ofof itself).
itself). Every linear operator
Every linear operator has this property;
has this property;
if
if ff :: X -»
-t Y is aa linear
Y is linear operator,
operator, then 72-(f) is
then R(f) is aa subspace
subspace of the vector
of the vector space
space Y.
Y.
(The same
(The same need not be
need not true for
be true for aa nonlinear operator.)
nonlinear operator.)
3.2. Existence and
3.2. Existence uniqueness of
and uniqueness of solutions
solutions to
to Ax
Ax = b
= b 39
39

The geometry
The geometry of
of subspaces
subspaces of Rn is
of Rll is particularly simple: the
particularly simple: the proper subspaces
proper subspaces
n
of
of RRII (i.e.
(Le. those that are
those that are not
not the entire space)
the entire space) are
are lower-dimensional
lower-dimensional spaces: spaces: lines
lines
in R2, lines
in R2, lines and
and planes in R33,, and
planes in so forth
and so (we cannot
forth (we cannot visualize
visualize these
these objects
objects in
in
dimensions greater
dimensions greater than three, but we we can understand
understand them them by analogy).
analogy). Since
every
every subspace must contain
subspace must contain the
the zero
zero vector,
vector, not
not every
every line in R
line in R 22 ,, for
for example,
example, is
is
a subspace,
subspace, but
but only
only those
those passing
passing through
through the
the origin
origin are.
are.
n
With this understanding
With understanding of the geometry of R Rll, , we
we obtain
obtain the following con-
clusions:
clusions:

If 7£(A)
• If R n , then Ax = b has a solution
R(A) = Rll, solution for
for each b E R n . (This is
e Rll. is a
tautology.)
tautology. )

• If 7£(A) i-
If R(A) R n , then Ax =
^ Rll, = b fails to have a solution for almost every b E
for almost Rn.
e Rll.
n
This is because a lower-dimensional subspace comprises very little of RR II (think
of a line contained
contained in the three-dimensional
the plane or in three-dimensional space).

Example
Example 3.13. We consider
3.13. We consider the equation Ax =
the equation = b, where
where A 6
ERR2X2
2x2
is given
is given by
by

A=[~ ~].
2
For any x 6
ERR2,, we
we have

Xl + 2X2
- [ 2Xl + 4X2
= (Xl + 2X2) [ ~ ] .

This calculation
This calculation shows that every
shows that vector b in
every vector the range
in the of A is
range of is aa multiple of the
multiple of the
vector
vector

Therefore, the
Therefore, the subspace
subspace 'R-(A)
R(A) isis aa line
line in
in the
the plane R22 (see
plane R (see Figure
Figure 3.1). Since
Since this
this
2
line is
line is aa very
very small
small part
part of R 2 ,, the
of R system Ax
the system Ax == b fails
fails to
to have
have aa solution for
solution for
2
almost every b
almost every bEeRR2. .

As
As mentioned
mentioned at the beginning
at the of this
beginning of this chapter,
chapter, there
there is
is aa close
close analogy
analogy between
between
linear (algebraic) systems
linear (algebraic) systems and
and linear differential equations.
linear differential The reader
equations. The should think
reader should think
carefully about the similarities between the following example and the previous one.
carefully about

Example 3.14. We
Example 3.14. We define the linear
define the linear differential
differential operator LN :'•e1[o,
operator LN -» e[O,
C^[Q,f\£] -+ (7[0,£j
£]
by
by
40 Chapter 3. Essential
Essential linear algebra

Figure
Figure 3.1. The range of the matrix A
3.1. The in Example 3.13.
A in 3.13.

where
where
CMO,l] = {u E C2 [0,l] : ~~(O) = ~~(l) = O}
(as defined If f e
defined in the previous section). If E 7£(Ljv),
R(L N ), then there exists u €E Ch[O,l]
C^[0,l]
such that LNU
such that LNu == f.f. It
It follows that
follows that

rl rl cPu
io f(x) dx = - io dx (x) dx 2

dU ]1
= -
[-(x)
dx 0

= _ du (l) + du (0)
dx dx
= 0.

This shows
This that f e
shows that C[0,^]
E C[O, l] cannot
cannot belong to the
belong to range of
the range of LN
LN unless
unless it
it satisfies the
satisfies the
special condition
special condition
11 f(x) dx = 0. (3.3)

In
In fact, R(LN) i-iss the
fact, 7£(Ljv) the set
set of
of all
all such
such ff,, as the reader
as the is asked
reader is asked to
to show
show in
in Exercise
Exercise
12.
12.
Because
Because the
the space C[0,^]
space C[O, l] is
is infinite-dimensional,
infinite-dimensional, we cannot visualize
we cannot this situ-
visualize this situ-
ation (as
ation (as we could in
we could the previous
in the previous example).
example). However, the reader
However, the reader should appreciate
should appreciate
that
that most
most functions
functions ff E e C[0,
e[O, £]
l] do
do not
not satisfy
satisfy the
the condition
condition (3.3).
(3.3). (For example,
(For example,
3.2. Existence and
and uniqueness of solutions to Ax
Ax = b 41
41

down a quadratic
the reader is invited to write down quadratic polynomial at random and call it
/(#). Chances are that this quadratic
f(x). Chances quadratic will not satisfy (3.3).) Therefore,
satisfy (3.3).) Therefore, the range
range
of
of LN
LN is only
only a small part of C[0,i],
of C[O, and for
f], and for most choices of
most choices G C[O,
of f E C[0, £],
f], there is
no solution to
to L^u
LNU = f.
= f.

Example 3.15. We now


Example 3.15. define L
now define LD C^[Q,l] ->• C[O,f]
D : Cb[O,f]-+ C[Q,f\ by
d2 u
LDU = - dx 2 '
where
Cb[O,f] = {u E C2[0,f] : u(O) = u(f) = O}.
The reader should recall from the previous section that the BBVP
VP
~u
- dx 2= f(x), < x < f, °
u(O) = 0,
u(f) = °
be written as the linear operator
can be operator equation Lj^u — f .. We will show that 'R-(A)
L DU = R( A) is
of C[O,
all of C[Q,(]f] by showing that we can solve Lpu
LDu == f for
for every £ C[O,
every f E C[0,£].
fl. The idea
is to integrate twice and use the boundary
boundary conditions to determine the constants of of
intearation. We have
integration.
~U
dx 2 (x) = -f(x), °< x < f,
so
du
dx (x) = - l 0
X

f(s) ds + Cb a < x < f.


We write
du
dx(X) = -F(x) °
+c1 , < x < f,
where
F(x) = fox f(s) ds.
We then integrate to obtain

u(x) = -loX F(z) dz + C x + C = -loX Io


1 2
z
f(s) dsdz + C1 x + C2, °< X < f.
The reader should notice the use of the dummy variables
variables of integration ssand
and z.
z.
The first boundary w(0) =
boundary condition, u(O) = 0, implies that C
Ci2 = 0. We then have
= O.

u(f) = -10£ l z
f(s) dsdz + C1 f;
since u(i] 0, we obtain
— 0,
u(f) =

C1 = e1111Z f(s)dsdz
0 0
42
42 Chapter
Chapter 3. Essential linear
3. Essential linear algebra
algebra

and so
and so

u(x)=-
r r f(s)dsdz+ x r 10r f(s)dsdz,
1010
l
O<x<l. (3.4)
e10
The reader
The reader can
can verify
verify directly
directly (by
(by differentiating twice) that
differentiating twice) that this
this formula
formula defines
defines aa
solution
solution ofof the
the BVP
BVP represented by LDU
represented by Lnu = = ff.. This
This shows
shows that
that we can solve
we can solve LDU
Lnu == ff
for any ff e
for any C[0,4 and
E C[O,l], and so
so K(L
R(Ln)D) == C[O,l].
C[Q,l}.

3.2.2 Uniqueness
The linearity of a matrix operator
operator A implies that nonuniqueness of solutions to
Ax = = b, if it occurs, has a special structure. Suppose
Suppose x and Rn are both
and z in Rll both
solutions
solutions to
to Ax
Ax ==b (i.e. Ax
b (Le. Ax =
= b and Az
band Az == b
b both
both hold). Then
hold). Then

Ax = Az => Ax - Az = 0
=> A(x - z) = 0,
the
the last
last step following from
step following from the linearity of
the linearity of A. If x
A. If x^=I z,
z, then
then w
w== x
x—- zz is
is aa nonzero
nonzero
vector satisfying
satisfying Aw
Aw == o.
0.
On the other hand, suppose
suppose x is a solution
solution to Ax = = b and w is a nonzero
vector
vector satisfying
satisfying Aw
Aw = 0. Then
= o. Then

A(x+w) =Ax+Aw
=b+O
=b,

and in this case there cannot


cannot be a unique solution to Ax == b.
Because of the
the above observations, we define the
the null space of A to be

N(A) = {x E Rll : Ax = O}.

Since AO
AO == 0 always holds for a linear operator
operator A, we
we always have 0 E
e -A/"(A).
N(A).
Moreover,
Moreover, if
if x,z
x,z e
E A/"(A)
N(A) and
and a, ft €
a,{3 E R,
R, then
then

Ax = 0, Az = 0

and so
and so
A (ax + {3z) = aAx + {3Az = a . 0 + {3 ·0= o.
Therefore, axax + {3z € A/"(A).
/3z E N(A). This shows
shows that A/"(A) Rn. If 0 is
N(A) is a subspace of Rll.
the
the only vector in A/"(A),
N(A), we say that A/"(A)
N(A) is trivial.
trivial.
Our
Our observations above lead
observations above lead to
to the
the following conclusion: If
following conclusion: If Ax
Ax =
= bb has
has aa
solution, it is unique if and only if wV(A)
N(A) is trivial. Furthermore, nothing in thethe
above discussion depends on A'sA's being a matrix operator; the same arguments can
be made for any linear operator, such as a differential
differential operator.
and uniqueness
3.2. Existence and Ax = bb
uniqueness of solutions to Ax 43

If N(A)
If JV(A) is
is nontrivial and Ax
nontrivial and Ax == b has aa solution,
b has solution, then the equation
then the equation has
has in
in
fact infinitely
fact infinitely many solutions. To
many solutions. To see
see this, suppose xx e
this, suppose Rn satisfies
E RD Ax =
satisfies Ax = b and
band
w e N(A),
wE A/"(A), ww =F
7^ O.
0. Then,
Then, for
for each
each 0:
a EG R,
R, wewe have
have

A(x + o:w) = Ax + o:Aw = Ax + 0:0 = Ax = b.

Since xx +
Since + o:w is different
aw is different for
for each
each different
different choice
choice of
of the real number
the real number 0:,a, this
this shows
shows
that the
that the equation
equation has infinitely many
has infinitely many solutions.
solutions. Moreover, it easily
Moreover, it easily follows
follows that
that the
the
set of
set of all
all solutions
solutions to Ax
Ax == b is,
is, in
in this
this case,
case,

x+N(A) = {x+w : w EN(A)}.

Once again,
Once again, the
the same
same properties
properties hold
hold for
for any
any linear
linear operator
operator equation.
equation.

Example 3.16.
Example 3.16. Let
Let A R4x4 be
A Ee R be defined
defined by
by

Consider the
Consider equation Ax
the equation Ax == b, where b
b, where b e R4 is
E R4 is arbitrary.
arbitrary. Using
Using the
the standard
standard
88
elimination algorithm,
elimination algorithm, the the system Ax ==
system Ax bb can
can be
be shown
shown to
to be
be equivalent
equivalent to
to the
the
system
system
Xl 13X3 4X4 bl - 3b2,
X2 + 4X3 + 2X4 b2,
0 b3 - b2 - 2b l ,
0 b4 - b2 - bl .
We see
We that the
see that the system is inconsistent
system is inconsistent unless
unless the
the conditions
conditions

b3 - b2 - 2b 1 = 0, (3.5)
b4 - b2 - b1 = 0

hold.
hold. If these conditions
If these conditions are
are satisfied by b.
satisfied by then
b, then

Xl = bl - 3b 2 + 13x3 + 4X4,
X2 = b2 - 4X3 - 2X4,

where x%
where and x±
X3 and can take
X4 can take on
on any
any value. Setting #3
value. Setting = ssand
X3 = and #4 = t, every
X4 = every vector
vector of
of
the form
the form

~2o3b 1~1 ] +t [ - 0~ 1
2

x= bl ] [
+s
[
001
8
We assume
8We assume that
that the
the reader
reader is
is familiar
familiar with
with Gaussian
Gaussian elimination,
elimination, the
the standard
standard row
row reduction
reduction
algorithm for
algorithm for solving
solving AxAx == b. For aa review,
h. For see any
review, see any introductory
introductory text
text on
on linear algebra, such
linear algebra, such as
as
the text
the text by Lay [34].
by Lay [34].
44 Essential linear algebra
Chapter 3. Essential algebra

is aa solution
is of the
solution of the system.
system. We
We have
have that
that

is one
is one solution of Ax
solution of = b,
Ax = b, and
and

Example 3.17. We
Example 3.17. We compute
compute thethe null
null space of the
space of the operator
operator LN
LN defined in Example
defined in Example
3.14- If
3.14. If LNU
LNU == 0,
0, then
then uu satisfies the BVP
satisfies the BVP
d2 u
- dx 2 = 0, °< x < f,

du (0) = 0,
dx
~~(f) = 0.

The differential
The differential equation
equation implies
implies that
that u(x]
u(x) = = C 1x + C
C\x C%2 for
for some
some constants
constants C C\1
and C^-
and C 2 • The
The two
two boundary
boundary conditions
conditions each
each lead
lead to
to the
the conclusion
conclusion that
that C\
C 1 =
= 0;
0,-
however, the
however, the constant
constant C C%2 can
can have
have any value and
any value and both
both the
the differential
differential equation
equation
and the two
and the two boundary conditions will
boundary conditions will be
be satisfied. This shows
satisfied. This that every
shows that every constant
constant
function u(x) = C
function u(x) C<z2 satisfies LNu = 0.
satisfies LNU 0. That
That is,
is, the
the null
null space
space ofof LN
LN isis the
the space
space of
of
constant functions.
constant functions.

Since the
Since null space
the null space of
of LTV is not
LN is not trivial,
trivial, we
we know
know from the above
from the above discussion
discussion
that the operator
that the operator equation
equation L^u cannot have
LNU = ff cannot have aa unique
unique solution-if
solution—if there
there is
is one
one
solution, there
solution, there must in fact
must in fact be infinitely many.
be infinitely many. However,
However, sincesince the
the null
null space
space is the
is the
set of constant
set of constant functions,
functions, all
all solutions
solutions to
to L^u
LNu = differ by
= ff differ by aa constant.
constant.

Example
Example 3.18.
3.18. TheThe null space of
null space of the
the operator
operator Lp
LD defined
defined in
in Example
Example 3.15 is
is
trivial. To
trivial. To see
see this, the reader
this, the reader should
should note that the
note that the differential
differential equation
equation
d2 u
--= 0
dx
2

again implies that


again implies that u(x)
u(x] = 1x + C
C\x
= C C%; however, now
2 ,- however, now the
the boundary
boundary conditions u(O) =
conditions w(0) =
u(l)
u(f) =
function.
function.
°
— 0 force
force C C2 == 0.
C\1 == C^ Therefore, the
O. Therefore, only solution
the only of LDU
solution of = 00 is
LDU = is the
the zero
zero

Since the
Since the null space of
null space LD is
of LD is trivial,
trivial, we see that
we see that LDU = f has
LDu = at most
has at one
most one
solution for
solution for any
any right-hand side f./.
right-hand side
and uniqueness of solutions to Ax
3.2. Existence and Ax = b 45
45

3.2.3
3.2.3 The Fredholm alternative
The Fredholm alternative
One
One ofof the
the fundamental
fundamental results
results ofof linear algebra is
linear algebra is that,
that, in
in aa certain sense, existence
certain sense, existence
and
and uniqueness
uniqueness areare equivalent
equivalent for for aa square
square system.
system. To To be
be precise, if Ax
precise, if Ax — = bb has
has
aa solution
solution for
for each b G Rn (i.e.
each bERn (i.e. if
if R(A) R n ), then
7£(A) == Rn), then the
the solution
solution is is unique
unique for
for
each b 6 Rn (i.e.
each bERn (i.e. A/"(A)
N(A) is is trivial).
trivial). On On the other hand,
the other hand, if
if the
the solution
solution to to Ax
Ax = b,
= b,
whenever
whenever it it exists,
exists, is
is unique
unique (i.e.
(i.e. if
if A/"(A)
N(A) is is trivial),
trivial), then
then AxAx == bb has
has aa solution
solution
b 6 Rn (i.e. R(A)
for each bERn ft(A) = R n ).
= Rn).
Moreover, in
Moreover, in the case that
the case that A/"(A)
N(A) is is not
not trivial,
trivial, we
we can
can give
give aa condition
condition that
that
b G Rn must
bERn satisfy in
must satisfy in order
order for
for AxAx = = bb to
to have
have aa solution.
solution. We
We collect
collect these
these facts
facts
in
in the
the following theorem.
following theorem.

Theorem
Theorem 3.19.
3.19. (The
(The Fredholm alternative) Suppose
Fredholm alternative) Suppose A R n x n . Then exactly
6 Rnxn.
A E exactly
one of
of the following
following is true.
1. The null space of A
A is trivial and for G R n , there exists a unique
b ERn,
for each b
n
solution x
x G R to Ax
E R n
Ax == b.
b.
2. The
2. The null space ofof A Ax =
A is nontrivial, and the equation Ax = bb has a solution ifif
and only if bb satisfies
only if satisfies the following
following condition:

wE Rn, ATw = 0 :::} W· b = 0, (3.6)

or, equivalently,
or, equivalently,
(3.7)

IfIf this condition is satisfied, equation Ax


satisfied, then the equation = b has infinitely
Ax = infinitely many
solutions.

T
In
In the statement of
the statement of the Fredholm alternative,
the Fredholm alternative, we
we used
used the
the transpose of A,
transpose of A, A
AT, ,
which
which is
is the
the matrix
matrix whose
whose rows
rows are
are the columns of
the columns of A and vice
A and vice versa.
versa. We also used
We also used
the dot
the dot product,
product, defined for two
defined for two vectors
vectors in Rn:
in Rn:
n
w· b = LWibi.
i=l

We
We will
will discuss
discuss the
the dot
dot product and its
product and its significance
significance in Section 3.4.
in Section 3.4.
We
We will
will have
have more
more to say later
to say later about
about the condition (3.6).
the condition (3.6). For
For now
now it is sufficient
it is sufficient
to
to understand
understand that,
that, if
if -A/"(A)
N(A) is is not
not trivial,
trivial, then
then Ax
Ax = = bb has
has aa solution only if
solution only if the
the
right-hand side vector
right-hand side vector bb satisfies
satisfies aa certain
certain compatibility
compatibility condition.
condition.

Example 3.20. In
Example 3.20. In Example 3.16, J\f(A)
Example 3.16, N(A) is is nontrivial,
nontrivial, and
and we
we saw
saw directly
directly that
that
Ax
Ax == bb has a solution if
if and only
only ifb
if b satisfies
satisfies conditions {3.5}.
(3.5). These conditions
can be
can be written
written as
as

WI' b = 0,
W2' b = 0,
46 Chapter 3. Essential linear algebra

where
where

It is
is straightforward
straightforward to show
show that
that

(3.8)

Example
Example 3.21.3.21. InIn Examples
Examples 3.14
3.14 and
and 3.17, wewe showed that A/"(L/v)
showed that N(LN) is is nontrivial
nontrivial
and
and that
that L^u
LNu == ff has
has aa solution
solution if
if and
and only if the
only if the compatibility
compatibility condition
condition (3.3)
(3.3) is
is
satisfied.
satisfied. Although
Although the
the Fredholm
Fredholm alternative,
alternative, as
as stated
stated in Theorem 3.19,
in Theorem 3.19, does
does not
not
apply
apply toto this
this situation,
situation, an analogous statement
an analogous statement can
can in
in fact
fact bebe made.
made. We We will
will see
see
how close
how the analogy
close the analogy is
is when
when we
we define
define aa "dot
"dot product"
product" for
for functions (see Sections
junctions (see Sections
3.4.1
3.4.1 and 6.2.3).
and 6.2.3).
nxn
If A
If eR
A E Rnxn and JV(A) is
and N(A) is trivial,
trivial, then
then A
A is
is called nonsingular (or
called nonsingular invertible),
(or invertible),
and
and there exists aa matrix
there exists A- 11 G
matrix A" ER
nxn
R nxn (the inverse
(the of A),
inverse of A), with
with the
the property
property that
that

The matrix
The matrix II is
is the n x
the n xn matrix; it
identity matrix;
n identity it has
has the
the property
property that Ix =
that Ix = x for all
x for all
Rn.
xx eERn 1
If we
If we know
know A"
A -1,, and
and we
we wish
wish to
to solve
solve Ax
Ax = b, b, we
we need
need only compute aa
only compute
matrix-vector
matrix-vector product,
product, as
as the
the following calculation shows:
following calculation shows:
Ax
::::} A-lAx
::::} Ix
::::} x

Thus the solution


Thus solution of of Ax = = b is = A -1x b.
is x =
1
Since A"
Since defines aa linear
A -1 defines linear operator,
operator, wewe see
see that
that the
the solution
solution x x to
to Ax
Ax = = b b
depends
depends linearly
linearly on on the
the right-hand
right-hand sideside b.
b. In fact, we
In fact, can demonstrate
we can demonstrate this this for
for
any
any linear
linear operator
operator equation.
equation. We We assume
assume that
that XX and
and Y are vector
Y are vector spaces
spaces and
and
f :X
f: X -t-» YY is
is aa linear
linear operator
operator with with aa trivial
trivial null
null space.
space. Then,
Then, for
for each
each yy E € R(f),
7?.(f),
there
there is
is aa unique solution x
unique solution x e EX X to
to ff(x)
(x) == y.
y. Let
Let us
us define
define the
the solution operator
solution operator
S :: R(f)
S 7£(f) -t -» XX by by the
the condition
condition thatthat xx = Sy Sy isis the
the solution
solution to f (x) = y.
to f(x) y. (If
(If
1
K(f)
R(f) = — Y, so so that
that ff is is invertible,
invertible, then
then S S is
is nothing
nothing more
more than
than f"
f-1.).) WeWe wish
wish toto
show
show that
that S S is linear.
is linear.
We
We willwill show
show thatthat ifif y,
y, zZ eE 7£(f) and a, (3
R(f) and € R,
ft E then
R, then

S(ay + (3z) = aSy + (3Sz.


3.2. Existence
3.2. and uniqueness
Existence and of solutions
uniqueness of solutions to
to Ax
Ax =
= bb 47

We define
We define xx = Sy
Sy and
and w Sz; then
w = Sz; then
f(x) = y, f(w) = z.
By the
By the linearity
linearity of
of f, we have
f, we have
f(ax + (3w) = af(x) + (3f(z) = ay + (3z.
This last
This last equation
equation is
is equivalent
equivalent to
to
S(ay + (3z) = ax + (3w = aSy + (3Sz.
Thus, the
Thus, linearity of
the linearity of f implies
implies that
that the
the solution
solution operator
operator is
is also
also necessarily linear.
necessarily linear.
To put
To put itit another
another way, the solution
way, the solution to
to aa linear
linear operator
operator equation
equation depends
depends linearly
linearly
on the
on right-hand side
the right-hand side of
of the equation. In
the equation. In the
the context
context of
of differential
differential equations,
equations, this
this
property
property isis usually called the
usually called the principle of superposition.
principle of superposition.

Example 3.22.
Example 3.22. The
The BVP
BVP
d2 u
-/1, dx 2 = f(x), 0 < x < f,
u(O) = 0,
u(f) = 0
can be
can be written
written as
as the
the linear
linear operator
operator equation
equation LDuLpu == /, as explained
f, as explained in
in Examples
Examples
3.15 and
3.15 and 3.18,
3.18, and
and wewe showed
showed inin those
those examples
examples that
that there
there is
is aa unique
unique solution
solution uu
for each ff E
for each e C[O, fl. Since
C[0,£]. integration is
Since integration is aa linear
linear operation,
operation, Formula shows
Formula (3.4) shows
that uu depends
that depends linearly
linearly on f.
on f.

For many
For many linear
linear differential
differential equations,
equations, we cannot find
we cannot an explicit
find an explicit formula
formula for
for
the solution
the solution that
that makes
makes this linear dependence
this linear dependence obvious.
obvious. Even
Even in
in those cases, we
those cases, we
know from
know from the
the above
above argument
argument that
that the
the solution
solution depends
depends linearly
linearly on
on the
the right-hand
right-hand
side.
side.

Exercises
Exercises
1. Let
1. Let
A=[
Graph R(A)
Graph H(A) in
in the plane.
the plane.
2.
2. (a) Fill
(a) Fill in
in the
the missing steps in
missing steps in Example
Example 3.16.
3.16.
(b) Let
(b) Let A
A by
by the matrix in
the matrix in Example
Example 3.16.
3.16. Compute
Compute the solution set
the solution set of
of the
the
equation ATw
equation AT w =
= 0,
0, and
and show
show that
that the
the result is (3.8).
result is (3.8).
3. For
3. For each
each ofof the
the following
following matrices A, determine
matrices A, determine ifif Ax
Ax == bb has
has aa unique
unique
solution for
solution for each
each b,
b, that
that is, determine if
is, determine if A is nonsingular.
A is For each
nonsingular. For each matrix
matrix
A which
A which isis singular,
singular, find
find aa vector
vector bb such
such that
that Ax
Ax = =b has aa solution
b has solution and
and aa
vector cc such
vector such that
that Ax
Ax = = cc does
does not have aa solution.
not have solution.
48 Essential linear algebra
Chapter 3. Essential

(a) A = [ 1 -1]
-2 4

(b) A = [! ~]
(c) A = [~ ~]
4.
4. For each of
For each the following
of the following matrices A, determine
matrices A, determine if if Ax
Ax = = bb has
has aa unique
unique
solution
solution for
for each b, that
each b, that is, determine if
is, determine if A
A isis nonsingular. For each
nonsingular. For each matrix
matrix
A
A which
which isis singular,
singular, find
find aa vector
vector b such that
b such that Ax
Ax = = bb has
has aa solution
solution and
and aa
vector
vector cc such
such that
that Ax
Ax = — cc does
does not
not have
have aa solution.
solution.

(e) A ~[
1
2
2 -1
4 -2
1
-11 -2 1

5. Suppose
Suppose A R nxn and
A €E Rnxn and b € Rn, b
bERn, ^ O.
b '" 0. Is
Is the solution set
the solution set of the equation
of the equation
Ax = b,
Ax=b,
{x ERn : Ax = b} ,
aa subspace
subspace of Rnn ?? Why
of R Why or
or why
why not?
not?

6.
6. Let Cl[a,b]b] -+
Let D : CI[a, —»• C[a, b]
b] be
be the derivative operator.
the derivative operator. What
What is the null
is the space
null space
of Dl
D?

7. Let L : C22[a,
7. Let —» C[a, b]
b] -+
[a, b] b] be
be the
the second
second derivative
derivative operator. What is
operator. What is the
the null
null
space of L?
space L?

8. As
8. shown in
As shown in Chapter
Chapter 2,
2, differential equations involving
differential equations involving the second derivative
the second derivative
operator
operator are sometimes paired
are sometimes paired with
with mixed
mixed boundary conditions. Define
boundary conditions. the
Define the
set
set
C![a,b] = {u E C2 [a,b] : u(a) = ~~(b) = O}
and define Lm : C![a, b]-+ C[a, b] by

The reader should


The reader should note
note that C^[a, b]
that C![a, is aa subspace
b] is of C22[a,
subspace of [a, b].
(a) Determine
(a) Determine the
the null
null space
space of Lm.
of Lm.
3.2. Existence
3.2. Existence and
and uniqueness
uniqueness of
of solutions
solutions to
to Ax = b
Ax = b 49
49

(b) Explain
(b) Explain how
how to solve L
to solve mu = f for
Lmu for u,
w, when
when f/ isis aa given
given function
function in
in
C[a,b].
C[a, (Hint: Integrate
b]. (Hint: Integrate twice.) Is this
twice.) Is this differential
differential equation
equation solvable
solvable for
for
every f/ E
every £ C[a, &]?
C[a, b]?
9. Repeat
9. Exercise 8,
Repeat Exercise 8, but
but with
with

C~[a,b] = {u E C 2 [a,b] ~~(a) = u(b) = o}


and Lm : C~.[a, b] -+ C[a, b] defined by

cPu
Lm u = - dX2·

10. Consider
10. Consider the following system
the following system of
of nonlinear equations:
nonlinear equations:

xi + x~ = 1,
X2 - xi = o.

This system
This system can
can be written as
be written as f(x)
f (x) =
= b, where f:
b, where R2 -+
f : R2 R22 is
—> R is defined
denned by
by
2 2
f(x) = Xl X~
+
[ X2 - Xl

and
and
b=[~].
(a) Show
(a) Show that
that f(x)
f (x) == bb has
has exactly
exactly two solutions.
solutions. (Hint:
(Hint: A
A graph
graph is
is useful.)
useful.)
(b) Show
(b) Show that
that the only solution
the only solution to
to f(x)
f(x) == 00 is = o.
is xx = 0. (Yet,
(Yet, as
as Part lOa
Part lOa
shows, the
shows, the solution
solution to f(x)
f (x) =
= b is
is not
not unique.)
unique.)
This example
This example illustrates
illustrates that
that the properties of
the properties of linear
linear systems
systems do
do not
not necessar-
necessar-
ily carryover
ily carry over to
to nonlinear
nonlinear systems.
systems.
11. Let
11. Let D CIl[a,
D :: C -> C[a,
b] -+
[a, b] be the
C[a,b]b] be differentiation operator:
the differentiation operator:

Df = df.
dx
(a) Show
(a) Show that
that the
the range
range of
of D is all
D is all of
of C[a, b].
(b) Part
(b) lla is
Part 11a is equivalent
equivalent to
to saying
saying that,
that, for
for every
every f/ E
e C[a, b],
b], the (differen-
the (differen-
tial) equation
tial) equation Du = has aa solution.
= f has solution. Is
Is this
this solution
solution unique? Why or
unique? Why or
why not?
why not?
12. Let
12. Let LN
LN be defined as
be defined as in
in Example
Example 3.14,
3.14, and
and suppose
suppose f/ E
e C[O,
C[Q,l]l] satisfies
satisfies

1£ f(x) dx = o.
Show that
Show that f/ E
e R(Ln).
n(Ln}.
50 Chapter 3. Essential linear algebra

3.3 Basis and dimension


Basis dimension
The matrix-vector
The matrix-vector product Ax is
product Ax equivalent to
is equivalent to aa linear
linear combination
combination of
of the
the columns
columns
of the
of the matrix
matrix A. If A
A. If has columns
A has columns YI,
VI, V
V2,2 ,...
. . . ,, Vvnn ,, then
then

The reader
The should write
reader should out aa specific
write out specific example
example if if this
this is
is not clear (see
not clear Exercise
(see Exercise
x
1). The
1). The quantities
quantities £i,#2, • • • ,Xn
XI,X2, ••• are scalars
i n are scalars and
and VI,V2,
YI, V2,...., vn are
... ,Vn are vectors; an ex-
vectors; an ex-
pression such as
pression such as XiVi
Xl Vl + #2V2X2 V2 + cldots
cldots + x nv
Xn is called
Vnn is called aa linear
linear combination
combination of of the
the
vectors YI , V2,
vectors Vl, v 2 , ...
. . . ,, v because the
Vnn because the vectors
vectors are
are combined
combined using
using the linear operations
the linear operations
of addition
of addition and
and scalar
scalar multiplication.
multiplication.
When A £ R n x n is
E RDXD is nonsingular, each b E£ RD Rn can be written in a unique way way
as aa linear
as linear combination
combination of of the
the columns
columns ofof A
A (that
(that is,
is, the Ax =
equation Ax
the equation = bb has
has aa
unique solution).
unique solution). The The following
following definition
definition is
is related.
related.

Definition 3.23.
Definition 3.23. Let
Let VV bebe aa vector
vector space, and suppose
space, and suppose Vl, vi,V V2,2 ,...
. . .,v are vectors
, Vnn are vectors
in V
in V with
with the
the property that each
property that each Vv E6 V V can
can be written in
be written in aa unique
unique way way asas aa lin-
lin-
ear combination
ear combination of (YI, V2,···,
of {Vl, v 2 , . . . , vvn }. {vi, V
Then {Vb
}. Then V2,2 ,...
. . . ,, v
v nn )} is
is called basis of
called aa basis of V.
V.
Moreover, we say
Moreover, we say that
that nn is
is the dimension of
the dimension of V.
V.

A vector
A vector space
space can
can have
have many
many different
different bases,
bases, but
but it
it can
can be shown that
be shown that each
each
contains the
contains same number
the same of vectors,
number of vectors, so
so the
the concept
concept of
of dimension
dimension is
is well-defined.
well-defined.
We
We now
now present several examples
present several examples ofof bases.
bases.

Example 3.24.
Example 3.24. The
The standard basis for
standard basis Rn is
for RD (ei,e2,...
is {el,e2, ,en}},; where
... ,e where every
every entry
entry
n
of GJ is zero except the jth, which is one. Then we obviously have, for any x 6 R
of ej is zero except the jth, which is one. Then we obviously have, for any x E RD, ,

and it
and it is
is not
not hard
hard to
to see that this
see that this representation
representation is
is unique.
unique. For for xx E
example, for
For example, £RR 33;,

Example 3.25.
Example 3.25. An alternate basis
An alternate basis for R3 is
for R3 {vi,V2,V3J
is {Vb where
V2, V3},; where

It may not
It may not be obvious to
be obvious to the
the reader
reader why one would
why one would want to use
want to this basis
use this basis instead
instead of
of
the much
the much simpler
simpler basis {61,62,63}.
basis {el, e2, e3} . However, it is
However, it is easy
easy to
to check
check that
that

Vl . V2 = 0, Vl . V3 = 0, V2· V3 = 0,
3.3. Basis
3.3. Basis and
and dimension
dimension 51
51

and
and this
this property
property makes the basis
makes the {vi,V2,vs}
basis {VI, V2, V3} almost
almost as easy to
as easy use as
to use {61,62,63}.
as {el, e2, e3}.
We explore
We this topic
explore this in the
topic in the next section.
next section.

Example
Example 3.26. The set
3.26. The set PP n isis thethe vector
vector space
space of
of all
all polynomials
polynomials of of degree
degree nn or
or
n
less (see
less (see Exercise 3.1.3). The
Exercise 3.1.3). The standard
standard basisbasis is {l,x,x22,...
is {1,x,x ,xn}.
, ... ,x To see
}. To see that
that this
this
is indeed
is indeed aa basis,
basis, we first note
we first note that that every
every polynomial
polynomial ppEP€ Pn can can be
be written
written as
as aa
2
2 n
linear combination of 1, x, x , . . .
linear combination of 1, X, x , ... , xn: , x :
p(x) = co' 1 + CIX + C2X 2 + ... + cnx n
(this is
(this is just
just the definition of
the definition of polynomial
polynomial of
of degree
degree n).
n). Showing that this
Showing that this representa-
representa-
tion is unique is a little subtle. If we also
tion is unique is a little subtle. If we also had had
p(x) = do' 1 + dlx + d2x2 + ... + dnxn,
then, subtraction
then, subtraction would
would yield
yield
(eo - do) + (Cl - ddx + ... + (c n - dn)x n =0
for every x.
for every x. However,
However, a a nonzero
nonzero polynomial
polynomial of of degree
degree n can have
n can at most
have at most nn roots,
roots,
so it must
so it be the
must be case that
the case that (CQ
(eo —- do)
do) + 4- (GI
(CI — - di)x
ddx + + ...
••• +
+ (c dn)xnn is
(cnn -— dn)x is the
the zero
zero
polynomial. That is,
polynomial. That CQ=—do,
is, Co do,Clci == dd1,i ...
, . . ., ,Ccnn== ddnn must
must hold.
hold.

Example 3.27.
Example 3.27. An
An alternate
alternate basis
basis for
for P^
P 2 is
is

{ I , x-~2' X2_X+~}
6
(the advantage
(the advantage of this basis
of this basis will
will be
be discussed
discussed in
in Example
Example 3.39
3.39 in
in the
the next
next section).
section). To
To
2
show
show that this is
that this is indeed
indeed aa basis, we must
basis, we must show that, given
show that, any p(x]
given any p(x) =— Co
CQ+cix+C2X
+CIX+C2X2,,
there is aa unique
there is unique choice
choice of
of the scalars ao,ai,fl2
the scalars ao, aI, a2 such
such that
that

ao . 1 + al (x - ~) + a2 (X2 - X + ~) = Co + CIX + C2X2.


This equation
This equation is
is equivalent
equivalent to
to the
the three
three linear
linear equations
equations
1 1
ao - '2a1 + 6'a2 = Co,

al - a2 = CI,

a2 = C2·
The reader
The reader can
can easily
easily verify
verify that
that this
this system
system has
has aa unique
unique solution, regardless of
solution, regardless the
of the
values 0/co,ci,C2.
values of eo,Cl,C2·

Example 3.28.
Example Yet another
3.28. Yet basis forP?
another basis for P 2 is {1/1,1/2,1^3},
is {L 1, L 2, L 3 }, where
where

LI(X) = 2 (x -~) (x -1),


L2(X) = -4x(x - 1),

L3 (x) = 2x (x - ~) .
52 Chapter
Chapter 3.
3. Essential linear
Essential linear algebra
algebra

//
If we Xl = 0,
write x\
we write X22 =
Q, # = 1/2,
1/2, and X3 = 1,
and x% I , then the property
then the property

1, i
L i (Xj ) = { 0,
= j, (3.9)
i ¥- j
holds.
holds. From
From this
this property, the properties
property, the of aa basis
properties of can be
basis can be verified (see Exercise
verified (see 5).
Exercise 5).

There are
There are two
two essential
essential properties of aa basis
properties of basis {v
{vi, v2,
1,V 2 ,...,v n } of
... , V n} of aa vector space
vector space
V. First, every vector
First, every vector inin V can
can be represented as
be represented as aa linear
linear combination
combination of of the
the basis
basis
vectors. Second,
vectors. Second, this
this representation
representation is unique. The
is unique. The following
following two
two definitions
definitions provide
provide
concise ways
concise to express
ways to express these
these two properties.
two properties.

Definition 3.29.
Definition 3.29. Let be aa vector
Let V be vector space, and suppose
space, and {YI, V2,
suppose {Vl, v 2 , ...
. . . ,, v n } is
V n} is aa col-
col-
lection
lection of
of vectors in V. The
vectors in span of
The span {YI, V2,
of {Vl, v 2 , ...
. . . ,, v
v nn} is the
} is the set
set of
of all
all linear
linear combi-
combi-
nations of
nations of these
these vectors:
vectors:

spon{vi,v 2 ,...,v n } = {o!iVi+Q!2V2 + h anvn : c*i, a 2 , • • •, an e R}

Thus, one
Thus, one of
of the
the properties of aa basis
properties of {YI, v
basis {v!, 2 , ...
V2, . . . ,, v n } of
V n} of aa vector space V is
vector space is
that
that
V = span{vi,v 2 ,...,v n }.
The reader
The should also
reader should also be aware that,
be aware for any
that, for vectors vVl,
any vectors i,V 2 ,...
V2, . . . ,, Vn
v n in
in aa vector
vector
space V, span
space span{vi, V 2 ,...
{Vl' V2, . . . ,, v
V n}
n } is
is a
a subspace
subspace of
of V (possibly
(possibly the
the entire
entire space
space V, as in
as in
the case
the case of
of aa basis).
basis).

Definition 3.30. A
Definition 3.30. set of
A set of vectors {YI, v
vectors {Vl' 2 , ...
V2, . . . ,, v n } is
V n} is called linearly independent
called linearly independent ifif
the only
the only scalars Cl, c
scalars c\, 2 ,•••
C2, . . . ,,Ccnn satisfying
satisfying

are Cl = C2 = ... = Cn = o.
It can
It can be shown that
be shown the uniqueness
that the part of
uniqueness part the definition
of the definition of
of aa basis is equiva-
basis is equiva-
lent to the
lent to the linear
linear independence
independence of of the
the basis
basis vectors. Therefore, aa basis
vectors. Therefore, basis for
for aa vector
vector
space is
space is aa linearly independent spanning
linearly independent spanning set.
set.
A third quality
A third quality of
of aa basis
basis is
is the number of
the number of vectors
vectors inin it-the
it—the dimension
dimension of of the
the
vector space.
vector space. It It can
can be
be shown
shown that
that any two of
any two of these
these properties imply the
properties imply third.
the third.
That is,
That is, ifif V has dimension n,
has dimension n, then
then any
any two
two of the following
of the statements about
following statements about
{vi, V2,
{Vl, . . . ,, vvd
v 2 , ... fc } imply
imply the
the third:
third:

• k =n;

• {Vl, V2, ... , vd is linearly independent;


3.3. Basis and dimension 53
53

Thus if
Thus {vi, v
if {Vl' 2 , .•.
V2, vd isis known
. . . ,, Vfc} known to satisfy two
to satisfy of the
two of above properties,
the above properties, then it is
then it is aa
basis
basis for V.
for V.
Before
Before leaving
leaving the the topic
topic of
of basis,
basis, we
we wish
wish to remind the
to remind the reader
reader of
of the fact
the fact
indicated
indicated in
in the
the opening
opening paragraphs of this
paragraphs of section, which
this section, which is
is so
so fundamental
fundamental that
that
we express
we express itit formally
formally as as aa theorem.
theorem.

Theorem 3.31.
Theorem 3.31. Let
Let A be an
A be an nn x
x n
n matrix. Then A
matrix. Then is nonsingular
A is nonsingular if
if and
and only
only ifif
the of A form
columns of
the columns form aa basis
basis for R nn ..
for R

Thus, when
Thus, when A A is is nonsingular,
nonsingular, its columns form
its columns form aa basis R n , and
for Rn,
basis for and solving
solving
Ax =
Ax =b b is
is equivalent
equivalent to to finding the weights
finding the weights that
that express
express bb as
as aa linear
linear combination
combination
of this
of basis. This
this basis. This fact answers the
fact answers the following
following important question. 99 Suppose
important question. Suppose we we
n n
have
have aa basis
basis YI,
Vl, v 2 , ...
V2, . . . ,, v
Vnn for R and
for Rn and aa vector b G R . Then,
vector bERn. Then, ofof course,
course, b b is
is aa
linear combination
linear combination of of thethe basis
basis vectors.
vectors. How How dodo we find the
we find weights in
the weights in this linear
this linear
combination? How How expensive is it to do so (that is, how much work is required)?
To find
find the scalars #1,
the scalars Xl, #2, • • • ,X
X2, ..• in the
, xn in equation
the equation

10
we define
definelO

and solve
and solve
Ax=b

via Gaussian elimination.


via Gaussian elimination. The The expense
expense of computing xx can
of computing can be
be measured
measured by count-
by count-
ing the
ing the number
number ofof arithmetic operations—the number
arithmetic operations-the of additions,
number of subtractions,
additions, subtractions,
multiplications, and divisions—required.
multiplications, and The total
divisions-required. The number of
total number of operations
operations required
required
to solve
to solve Ax
Ax == bb isis aa polynomial
polynomial in
in n, and
and it
it is convenient to
is convenient to report
report just
just the leading
the leading
term
term in
in the
the polynomial,
polynomial, whichwhich can
can be shown to
be shown to be
be

2 3
-n
3

(the lower-order
(the lower-order terms are not
terms are not very significant when
very significant when nn is
is large).
large). We
We usually express
usually express
this saying
this saying that
that the
the operation
operation count
count is
is

("on the order of


the order (2/3)n33").
of (2/3)n ").
In
In the
the next section, we
next section, discuss aa certain
we discuss certain special type of
special type of basis for which
basis for which it
it is
is
much easier to
much easier to express
express aa vector in terms
vector in of the
terms of the basis.
basis.
9
If the
91f the importance
importance of
of this
this question
question isis not
not apparent
apparent to
to the
the reader
reader at
at this
this point,
point, it
it will
will be be after
after
he
he or she reads
or she reads the next two
the next sections.
two sections.
10
This notation
lOThis notation means
means that
that A is the
A is the matrix
matrix whose columns are
whose columns are the vectors VI,
the vectors vi, V 2 ,..•
V2, . . . ,, v n.
Vn.
54
54 Chapter
Chapter 3. Essential linear
3. Essential linear algebra
algebra

Exercises
Exercises
1. (a) Let

Compute boteAx
A

ax and
and
~ -~ -~
[ -n, ~ -n x [

Compute both

and
and verify
verify that
that they are equal.
they are equal,
nxn
(b) Let
(b) Let A 6 R x n and
A ERn and x e R n , and
x ERn, and suppose
suppose the columns of
the columns of A
A are
are

so that
so that the
the (i, j)-entry of
(i,j)-entry of A
A is
is (vj)j. Compute both
(vjk Compute both (Ax)j and (XlVI
(AX)i and (#iVi +
2V2 + ... +
xX2V2 1- xnvn)i, and
XnVn)i, and verify
verify that
that they
they are equal.
are equal.
2. Is
2. Is

aa basis
basis for R3? (Hint:
for R3? (Hint: As
As explained
explained in
in the
the last
last paragraphs
paragraphs of
of this
this section,
section, the
the
three
three given
given vectors
vectors form
form aa basis
basis for Rn if
for Rn and only
if and only if
if Ax
Ax == bb has
has aa unique
unique
solution for
solution for every
every b 6 R n , where
b ERn, where A
A is
is the
the 33 x
x33 matrix
matrix whose columns are
whose columns are the
the
three
three given vectors.)
given vectors.)
3. Is
3. Is

aa basis
basis for R3? (See
for R3? (See the
the hint
hint for
for the
the previous
previous exercise.)
exercise.)

4. Show that
4. Show that
{X2 + 1, X + 1, X2 - X + I}
is
is aa basis
basis for P2, the
for P%, space of
the space of polynomials
polynomials of
of degree
degree 22 or less. (Hint:
or less. Verify
(Hint: Verify
directly
directly that
that the
the definition
definition holds.)
holds.)
5. Show that
5. Show {L1?
that {L L22 ,,L
I ,L L33}, defined in
}, defined in Example
Example 3.28, is aa basis
3.28, is for P
basis for P22-. (Hint:
(Hint: Use
Use
(3.9) to
(3.9) show that
to show that

holds for every p E P2 .)


3.4. Orthogonal
Orthogonal bases and projections
projections 55

6. Let
6. Let V bebe the space of
the space all continuous,
of all continuous, complex-valued
complex-valued functions defined on
functions defined the
on the
real
real line:
line:
V = {f : R -+ C : f is continuous}.
lx
Define W to be the subspace of V spanned spanned by e e lx, where
ei:v and e-i:v, = A.
where ii = ^/^l.
Show that
Show {cos (x),
that {cos (x), sin is another
(x}}} is
sin (x) another basis
basis for (Hint: Use
for W. (Hint: Use Euler's formula:
Euler's formula:
eiIJ = cos (0) + i sin (0).)

3.4
3.4 Orthogonal bases
Orthogonal bases and
and projections
projections
At
At the
the endend ofof the
the last
last section,
section, we
we discussed
discussed the the question
question of of expressing
expressing aa vector
vector in in
terms
terms ofof aa given
given basis.
basis. This question is
This question is important
important for for the
the following
following reason,
reason, which
which
we can only describe
describe in general
general terms at at the moment: Many problems problems that are are
posed in vector spaces admit admit a special
special basis, in in terms of which the problem is is easy
easy
to
to solve.
solve. ThatThat is,is, for
for many
many problems,
problems, there
there exists
exists aa special
special basis
basis with
with the property
the property
that
that if
if all
all vectors
vectors areare expressed
expressed inin terms
terms of of that
that basis,
basis, then
then aa very
very simple calculation
simple calculation
will
will produce
produce the the final solution. For
final solution. For this
this reason,
reason, itit is
is important
important to to be
be able
able to
to take
take aa
vector (perhaps expressed
vector (perhaps expressed in in terms
terms ofof aa standard
standard basis)
basis) and express it
and express it in
in terms
terms of of aa
different
different basis. In the latter part of this section, we we will study
study one
one type of problem
problem
for which it is advantageous
advantageous to use aa specialspecial basis, and we will discuss another another such
problem
problem in in the
the next section.
next section.
is quite
It is quite easy
easy to express aa vector
to express vector inin terms
terms ofof aa basis
basis ifif that
that basis
basis isis orthogonal
orthogonal.
We
We wish
wish to to describe
describe the the concept
concept of of an
an orthogonal
orthogonal basisbasis and show some
and show important
some important
examples.
examples. BeforeBefore we we can
can do so, we
do so, we must
must introduce
introduce the idea of
the idea an inner
of an inner product,
product,
which
which is is aa generalization
generalization of of the
the Euclidean
Euclidean dot product.
dot product.
The dot product plays a special role in the geometry of R R22 and R 3
R3.. The
2 3
reason
reason forfor this
this isis the fact that
the fact that two
two vectors
vectors x,y in R
x, y in R2 or or RR3 areare perpendicular
perpendicular ifif
and only
and only ifif
x·y =0.
Indeed, one can show that
Indeed, one can show that
x . y = Ilxllllyll cos (0),
where
where 09 is
is the
the angle
angle between
between the
the two
two vectors
vectors (see
(see Figure
Figure 3.2).
3.2).
From
From elementary
elementary Euclidean
Euclidean geometry,
geometry, we
we know
know that,
that, if
if x
x and
and y
y are
are perpen-
perpen-
dicular, then
dicular, then
Ilx + yW = IIxl1 2+ IIyl12
(the
(the Pythagorean
Pythagorean theorem).
theorem). Using
Using the
the dot
dot product,
product, we
we can
can give
give aa purely algebraic
purely algebraic
proof
proof of the
the Pythagorean
Pythagorean theorem. By definition,
definition,
Ilull=~,
so
Ilx + Yl12 = (x + y) . (x + y)
=x,x+x·y+y·x+y·y
=x·x+2x·y+y·y
= IIxl12 + 2x . y + IIYI12.
56
56 Chapter
Chapter 3. Essential
Essential linear algebra

e x

Figure 3.2. The


Figure 3.2. The angle
angle between two vectors.
between two vectors.

This calculation
This shows that
calculation shows that

holds if
holds if and
and only
only ifif x .• y =
= 0.
O.
Seen this
Seen this way,
way, the
the Pythagorean theorem is
Pythagorean theorem is an
an algebraic
algebraic property
property that can be
that can be
deduced in
deduced Rn, n
in RD, n > 3, 3, even
even though
though inin those spaces we
those spaces cannot visualize
we cannot vectors or
visualize vectors or
what it
what it means
means forfor vectors
vectors toto be
be perpendicular.
perpendicular. We We prefer to use
prefer to the word
use the word orthogonal
orthogonal
instead of
instead of perpendicular: Vectors xx and
perpendicular: Vectors and y y in Rn are
in RD are orthogonal
orthogonal ifif x
x·• y
y == 0.
O.
In
In the course of
the course of solving
solving differential
differential equations,
equations, we deal with
we deal with function
function spaces
spaces
in addition
in addition to Euclidean spaces,
to Euclidean spaces, and our methods
and our methods areare heavily
heavily dependent
dependent on on the
the
existence of
existence of an
an inner
inner product—the analogue of
product-the analogue of the
the dot
dot product
product in in more
more general
general
vector spaces.
vector spaces. Here
Here isis the
the definition:
definition:

Definition 3.32.
Definition 3.32. Let V be
Let V be aa real
real vector
vector space. space. A inner product
(real) inner
A (real) product on V is
on V is aa
function, usually denoted
function, usually (•,•)
denoted (', .) or ( - , -.)) vv,> taking
or (., taking two vectors from
two vectors from VV and
and producing
producing
aa real
real number.
number. This
This function must satisfy
function must satisfy the the following three properties:
following three properties:
1. (u,
1. (u, v)
v) = (v, u)
= (v, u) for
for all vectors uu and
all vectors v;
and Vi
2. (cm +
2. (au w) =
/?v, w)
+ fiv, a(u, w)
= a(u, + /?(v,
w) + fi(v, w)
w) and
and (w, cm +
(w, au /?v) =
+ fiv) = a(w,
a(w, u)
u) + /?(w, v)
+ fi(w, v) for
for
all vectors u,
all vectors u, v,
v, and w, and
and w, and all
all real numbers aa and
real numbers /3;
and fii
3. (u,
3. (u, u) 2': 00 for
u) > all vectors
for all vectors u,
u, and (u, u)
and (u, u) = 0 if
= 0 if and
and only if uu is
only if is the
the zero
zero vector.
vector.

should be easy
It should easy to check
check that these properties hold forfor the ordinary
ordinary dot
dot
product on Euclidean
product on Euclidean n-space.
n-space.
Given an
Given an inner
inner product (a vector
space (a
product space vector space
space with an inner
with an product), we
inner product), define
we define
orthogonality just
orthogonality as in
just as in Euclidean space: two
Euclidean space: two vectors are orthogonal
vectors are orthogonal if
if and
and only
only ifif
their dot product is zero.
their It can
zero. It can then
then be shown
shown that
that the
the Pythagorean
Pythagorean theorem holds
holds
(see Exercise
(see Exercise 3).
3).
3.4. Orthogonal
Orthogonal bases and projections
projections 57

An orthogonal
An basis for
orthogonal basis an inner
for an inner product space V
product space is aa basis
V is {vi, v
basis {VI, 2 ,...,
V2, ... , v
v nn}}
with the property
with the property that
that
i =I- j '* (Vi,Vj) = 0
(that is, every
(that is, every vectorvector inin the
the basis is orthogonal
basis is orthogonal to to every
every other
other vector
vector in
in the
the basis).
basis).
We
We now demonstrate the
now demonstrate the first
first special
special property
property of of an
an orthogonal
orthogonal basis.
basis. Suppose
Suppose
{vi, v
{VI, 2 , ...
V2, . . . ,, vvn }} is
is an orthogonal basis
an orthogonal for an
basis for an inner
inner product space V and
product space and x
x is
is any
any
vector
vector inin V. Then Then there
there exist
exist scalars ai, 0:2,
scalars aI, • • • ,, a
a2, ... such that
ann such that

(3.10)

To deduce
To deduce the
the value
value of
of Q:J, we take
ai, we take the inner product
the inner product of
of both
both sides
sides of (3.10) with
of (3.10) with
Vi:

(Vi,X) = (Vi,aIVI + a2v2 + ... + anv n )


= al (Vi, vd + a2 (Vi, V2) + ... + an(Vi, Vn )
= ai(Vi, Vi).

The last
The last step follows from
step follows from the
the fact
fact that every inner
that every inner product (v^, YJ)
product (Vi, Vj) vanishes except
vanishes except
(vj,Vj).
(Vi, Vi). We then obtain
We then obtain

(Vi, x)
ai = ( )' i = 1,2, ... , n,
Vi, Vi

and so
and so
(VI,X) (V2,X) (vn,x)
X= VI + V2 + ... + Vn. (3.11)
(VI, VI) (V2, V2) (V n , v n )
This formula shows
This formula shows that
that itit is
is easy
easy to
to express
express aa vector
vector in terms of
in terms of an
an orthogonal
orthogonal
basis.
basis. Assuming
Assuming that
that we
we compute
compute (VI,(vi, vi),
vt), (v2, V 2 ) ...
(V2, V2), , . . .,,(V
(vnn,,Vvnn)) once
once and
and for
forall,
all, itit
requires just nn inner products to to find the weights in in the linear linear combination. In the the
case of
case of Euclidean
Euclidean n-vectors,
n-vectors, aa dotdot product
product requires
requires 2n — - 11 arithmetic operations (n
arithmetic operations
multiplications
multiplications and
and nn -— 1I additions),
additions), so so the
the total
total cost
cost is is just
just

If n is
If large, this
is large, this is
is much less costly
much less costly than
than the O(2n33/3)
the O(2n /3) operations
operations required for aa
required for
nonorthogonal
nonorthogonal basis.
basis. We also remark
We also remark that if the
that if the basis
basis is basis
orthonormal—each basis
is orthonormal-each
vector is
is normalized
normalized to have
have length one-then
one—then (3.11) simplifies
simplifies to
to

(3.12)

Example 3.33. The basis {vi,v 2 ,v 3 } forH3, where


58 Chapter
Chapter3.3. Essential
Essentiallinear algebra
linear bra
algebra

is orthonormal, as
is as can
can be
be verified
verified directly. If
If

then

3.4.1
3.4.1 L22 inner product
The L
We have
We seen that
have seen that functions
functions can
can be
be regarded
regarded asas vectors,
vectors, at
at least
least in
in aa formal
formal sense:
sense:
functions can be added together
together and multiplied by scalars. (See Example 3.4 in
3.1.) We will now show more directly that functions
Section 3.1.) functions are not so different
different
from Euclidean
from Euclidean vectors.
vectors. In
In the process, we
the process, show that
we show that aa suitable
suitable inner
inner product
product can
can
be
be defined
defined for
for functions.
functions.
Suppose we
Suppose we have
have aa function G era,
function 9g E C[a, b]—a continuous function
b]-a continuous defined on
function defined on the
the
interval [a,
interval &]. By sampling 9g on a grid, we
[a, b]. we can produce a vector that approximates
approximates
the function g. Let Xi Xi = i~x, A#
= a + iAx, ~x = (b —
= (b a)/N, and define a vector
- a)/N, vector G E RN by
G RN
Gi=g(Xi), i=O,l, ... ,N-1.
Then
Then G can
can be
be regarded
regarded as
as an
an approximation
approximation to 9 (see
to g Figure 3.3).
(see Figure 3.3). Given
Given another
another
function f(x)
function and the
f(x) and the corresponding
corresponding vector F € R N , we
vector FERN, have
we have
N-l

F·G= L FiGi
i=O
N-l

=L f(xi)g(x;).
i=O

Refining the
Refining discretization (increasing
the discretization (increasing N) leads to aa sampled
leads to sampled function
function that
that obviously
obviously
represents the original
original function more accurately. Therefore, wewe ask: What happens
to F
to G as
F .• G ->• oo?
as N -t oo? The
The dot
dot product
product
N-l

F .G = L f (Xi) 9 (Xi)
i=O

does not
does converge to
not converge any value
to any value as
as N -t oo, but
—>• 00, but aa simple
simple modification induces
modification induces
convergence. We replace the ordinary dot product by the following scaled dot
product, for which
product, for which we introduce aa new
we introduce new notation:
notation:
N-l

(F, G) = L FiGi~X,
i=O
3.4. Orthogonal bases and projections
projections 59

o 0.2 0.4 0.6 0.8


x

Figure 3.3. Approximating


Approximating a
a function
function g(x]
g(x) by
by a
a vector € RN.
vector G ERN.

Then, when F and G are sampled functions as above, we


we have

(F, G) =
N-l
L
i=O
f(xi)g(xi)6.x -+ 1 a
b
f(x)g(x) dx as N -+ 00.

Based
Based on
on this
this observation,
observation, we
we argue
argue that
that aa natural
natural inner
inner product
product (•,
(.,.)•) on
on
era,
C[a, b] is
b] is
(f,g) = lb I(x)g(x) dx. (3.13)

Just
Just as the dot product
the dot product defines
defines aa norm on Euclidean
norm on n-space (11xll
Euclidean n-space (\\x\\ =
= ^/x • x], so
y'X-X), the
so the
inner product (3.13) defines a norm for functions:
functions:

11111 = v(f, f) = foC II(x)1 2 dx. (3.14)

For completeness, we give the


the definition of norm. Norms
Norms measure the
the size or magni-
tude
tude of
of vectors,
vectors, and
and the
the definition
definition is
is intended
intended to
to describe abstractly the
describe abstractly properties
the properties
that any reasonable
reasonable notion of size ought to have.

Definition 3.34.
3.34. Let V be
Let V be a
a vector
vector space.
space. A A norm on on V
V is
is aa real-valued function
real-valued function
with
with domain V, usually
domain V, usually denoted by II\\ .• II\\ or
denoted by or II\\ .• Ilv,
\\v, and
and satisfying
satisfying the following
the following
properties:
properties:
60 Chapter 3. Essential linear algebra

1. Ilvll ~ 0 for all v E V and Ilvll = 0 if and only if v = o.


2. Ilavll = lalllvil for all scalars a and all v E V.
3. Ilu + vii ~ Ilull + IIvll for all u, v E V.

The last
The last property
property is called the triangle inequality.
called the

For Euclidean vectors in the plane, the triangle inequality expresses


For expresses the fact
fact
that one side
side of a triangle cannot be longer than the sum of the other two sides.
11
The inner product defined by (3.13) is the so-called L L22 inner product.l1 Two
functions inin era,
C[a, b] are said
b] are said to be orthogonal if if (f,
(/,#)
g) = 0. O. This condition does
does
not have a direct geometric meaning, as the analogous condition does for Euclidean
vectors in R R22 or RR3,3
, but, as wewe argued above, orthogonality is still important
important
algebraically.
When we we measure norm in the L L22 sense, we
we say that functions f/ and g 9 are
close (for
close (for example,
example, that 9 is
that g is aa good
good approximation
approximation to to /)
f) ifif

2
is small. This does not mean that (f(x) (/(#) - g(x})
g(X))2 is
is small for
for every x €E [a,
[a, b]b]
2
_g(X))2 can be large in places, as long as this difference
((f(x) —g(x))
((f(x) difference is large only over very
small intervals), but
but rather it implies that (f(x)
(f(x) — g(x)}2 is small on the
- g(x))2 the average over
the interval [a,
the interval [a, 6].
b]. For this reason, we often
often -use
use the
the term "mean-square"
"mean-square" in in referring
referring
to the
the LL22 norm (for(for example,
example, we
we might saysay "g close to f/ in
"# is close in the mean-square
mean-square
sense"}.
sense").

Example 3.35.
Example 3.35. //
If /f ;: [0,1] —> R
[0,1] --t R is defined
defined by f(x) =
by f(x) = x(l
x(1 —
- x), then
then

Ilfll = t x2(1- x)2 dx = V35


10
fT = _1_ == 0.1826.
v'3O
With [0,1]
With g9 ;: [0, 1] -» defined by
--t R defined by

g(x) = 83 sin (1I"x) ,


11"
we have
we have

1
Ilf-gll= fo (X(1-X)-:3 sin (1I"X)r dx= (11"6 - 960) == 0.006940.
3011"6

These two
These two functions
functions differ
differ by less than
by less than 4% in the mean-square
in the mean-square sense (cf. Figure
sense (cf. Figure
3.4).
3·4)·
11
The "L"
llThe "L" refers
refers to
to the
the French
French mathematician Lebesgue, and
mathematician Lebesgue, and the "2" to
the "2" to the
the exponent
exponent in the
in the
formula for the
formula for the LL22 norm
norm of
of aa function.
function. The
The symbol L22 is
symbol L is read "L-two."
read "L-two."
3.4. Orthogonal bases and projections 61
61

0.3r-------..---~---_r_;::=:::::::::;::3r:=;;===iI

....... -- .......

0.1

0.2 0.4 0.6 0.8


x

Figure 3.4. The


Figure 3.4. The functions of Example
functions of Example 3.35.
3.35.

3.4.2
3.4.2 The projection theorem
The projection
The projection theorem
theorem is about approximating
is about approximating aa vector in aa vector
vector vv in space V by
vector space by
aa vector
vector from
from aa subspace
subspace W. More specifically,
W. More specifically, the
the projection
projection theorem
theorem answers
answers the
the
question: Is
question: Is there
there aa vector
vector w w E£W closest to
W closest (the best
to vv (the best approximation
approximation to to vv from
from
and if
W), and
W), if so,
so, how can it
how can it be computed? Since
be computed? Since this
this theorem
theorem is so important,
is so important, and its
and its
proof is
proof is so
so informative,
informative, we will formally
we will formally state
state and
and prove
prove the theorem.
the theorem.

Theorem 3.36.
Theorem 3.36. Let V be
Let V be aa vector
vector space
space with
with inner product (-,-),
inner product let W
(', .), let W be
be aa
finite-dimensional
finite-dimensional subspace o f VV,, and
subspace of letv^V.
and let v E V.

1. There
1. There is unique uu G
is aa unique EWW such that
such that

Ilv - ull = min Ilv - wll·


wEW

That is,
That is, there is aa unique
there is best approximation
unique best to v
approximation to v from W. We
from W. We also call uu
also call
the projection
the o/v
projection of onto W,
v onto W, and
and write
write

u = projwv.

2.
2. A
A vector u E
vector u EWW is
is the
the best to vv from
approximation to
best approximation W if
from W if and
and only
only ifif

(v - u, z) = 0 for all z E W. (3.15)


62 Chapter 3.
Chapter 3. Essential
Essential linear
linear algebra
algebra

3.
3. If {wi, W2,
If {WI, w 2 ,..., wnn}} is
... , w is aa basis
basis for W, then
for W, then
n
projw v = LXiWi, (3.16)
i=1

where
where
Gx = b, G ij = (Wj, Wi), bi = (Wi, v). (3.17)
The equations
The equations represented
represented by Gx =
by Gx = bb are
are called
called the normal equations,
the normal equations, and
and
the matrix
the G is
matrix G is called
called the Gram matrix.
the Gram matrix.
4- If
4· (w1; W2,···,
If {Wl, w2,..., w
wnn}} is
is an
an orthogonal
orthogonal basis
basis for W, then
for W, then the
the best
best approximation
approximation
to vv from
to from W
W is
is
. ~ (Wi'V)
proJw v = ~ ( . .)Wi. (3.18)
i=1 W" W,

IfIf the
the basis
basis is
is orthonormal,
orthonormal, this
this simplifies to
simplifies to
n
projw v = L(Wi, V)Wi. (3.19)
i=l

Proof.
Proof. WeWe will
will prove the second
prove the second conclusion
conclusion first.
first. Suppose
Suppose that
that u
uEe W, and
and zz is
is any
any
other vector
other in W. Then,
vector in Then, since
since W isis closed
closed under
under addition
addition and
and scalar
scalar multiplication,
multiplication,
we
we have that uu +
have that + tz
tz E€W for all
W for all real
real numbers
numbers t. On On the
the other
other hand,
hand, every
every other
other
vector W
vector w in
in W can
can be written as
be written as uu +
+ tz for some
tz for some zz E and some
£ W and some tt E
€RR (just
(just take
take
zz =— W
w -— uu and
and tt == 1).
1). Therefore,
Therefore, uu E €WW isis closest
closest to
to vv if
if and
and only
only if
if

Ilv - ull s: IIv - (u + tz)11 for all z E W, t E R. (3.20)


2
Since IIxl1
Since ||x|| == (x,x),
2
(x,x), this
this last
last inequality
inequality is
is equivalent
equivalent to
to
(v - u, v - u) s: (v -
(u + tz), v - (u + tz))
= ((v - u) - tz, (v - u) - tz)
= (v - u, v - u) - 2t(v - u,z) + e(z,z)

or to
or to
t 2 (z, z) - 2t(v - u, z) 2': 0 for all z E W, t E R.
If we
If regard zz as
we regard as fixed,
fixed, then
then
e(z,z)+2t(v-u,z)

is aa simple
is simple quadratic
quadratic inin t, and
and thethe inequality
inequality holds
holds ifif and
and only
only if
if (v
(v -- u, z) =
u, z) = 0.
O.
It follows
It follows that
that the
the inequality
inequality holds
holds for all zz and
for all and all
all tt if
if and
and only
only if
if (3.15)
(3.15) holds.
holds.
In addition,
In addition, provided
provided zz i-/ 0,
0, (3.20)
(3.20) holds
holds asas an
an equation
equation only when tt =
only when = 00 (since
(since
(z, z)
(z, for zz i-
z) > 00 for ^ 0).
0). That
That is,
is, if
if W
wE € W and
and W w i-
^ u,
u, then
then

IIv-ull < IIv-wlI·


3.4. Orthogonal
Orthogonal bases and projections
projections 63

Thus, if
Thus, if the
the best approximation problem
best approximation problem has
has aa solution,
solution, it it is
is unique.
unique.
We now
We now prove the remaining
prove the remaining conclusions
conclusions to to thethe theorem. Since W is
theorem. Since is aa finite-
finite-
dimensional subspace, it
dimensional subspace, it has
has aa basis {wi, w
basis {WI, W2,
2 , . .
... . ,
, w
w n }.
}. A
A vector
vector u
u e
E W solves
solves the
the
best
best approximation
approximation problem
problem if if and
and only if (3.15)
only if (3.15) holds;holds; moreover,
moreover, itit is straightfor-
is straightfor-
ward to show
ward to show that
that (3.15)
(3.15) is
is equivalent to
equivalent to

(v - u, Wi) = 0 for i = 1,2, ... , n (3.21)

(see
(see Exercise
Exercise 5). Any
Any vector
vector uu E
G W can
can be
be written as
written as
n
u= LXjWj. (3.22)
j=1

Thus, uu 6E W
Thus, W is
is aa solution
solution if
if and only if
and only (3.22) holds
if (3.22) and
holds and

V- "tXjWj, Wi) = 0, i = 1,2, ... ,n, (3.23)


( )=1

which simplifies to
which simplifies to
n
L(Wj,Wi)Xj = (Wi,V), i = 1,2, ... ,n. (3.24)
j=1

nxn
If we
If define G
we define G 6 R nxn by
ER Gy
by G ij =
= (Wj,
(w j? Wj)
Wi) and
and b 6 Rn by
bERn by bit = (w
(Wi,i? v), then (3.24)
then (3.24)
is equivalent
is equivalent to
to
Gx=b.
It can
It can be
be shown
shown that
that GG is
is nonsingular
nonsingular (see
(see Exercise 6), so
Exercise 6), so the
the unique
unique best approx-
best approx-
imation
imation toto v
v from
from W is given
W is given by (3.22), where
by (3.22), where x solves Gx
x solves Gx = = b.
b.
If
If the
the basis is orthogonal,
basis is orthogonal, then
then (Wj, Wi) =
(wj, w;) = 00 unless
unless jj = i. In
= i. In this case, G
this case, G is
is
the diagonal matrix with diagonal entries
entries

and
and Gx
Gx —
= b
b is equivalent to
is equivalent to the simple equations
the n simple equations

that
that is, to
is, to
(v, Wi)
Xi = (Wi,Wi )' i = 1,2, ... ,n.

This completes
completes the proof. 0

We now
We now present
present two
two examples
examples of
of best
best approximation
approximation problems
problems that
that commonly
commonly
occur in scientific
scientific and computational practice.
computational practice.
64 Chapter
Chapter 3.
3. Essential
Essential linear algebra

Example
Example 3.37. We assume
3.37. We assume that
that data points
data points

(xi,yi)
(xl,yd =
= (0.10,1.7805),
(z 2 ,!fe)
(X2, Y2) = (0.30,2.2285),
(z 3 ,2/Y3)
(X3, 3) = (0.40,2.3941),
= (0.40,2.3941),
(0:4,2/4)
(X4, Y4) = (0.75,3.2226),
= (0.75,3.2226),
(a*,2/5)
(X5,Y5) -(0.90,3.5697)
= (0.90,3.5697)

have
have been collected in
been collected in the laboratory, and
the laboratory, and there
there is
is aa theoretical
theoretical reason
reason to
to believe
believe
that
that Yiyi = aXi + bb ought
= axi ought to to hold
hold for
for some
some choices
choices ofof a, b6
a, b E R.
R. Of Of course,
course, due
due to
to
measurement error,
measurement this relationship
error, this relationship isis unlikely to hold
unlikely to exactly for
hold exactly for any
any choice
choice of
of aa
and
and b,b, but
but we would like
like to find aa and
and bb that
that come as close
close as
as possible to satisfying
satisfying

I
we would to find come as possible to
it. If
it. If we define
we define

Y=[H~:~ ,x~
1
0.10
0.30 1
0.40 ,e = 1
3.2226 0.75 1
3.5697 0.90 1

then one
then one way
way toto pose this problem
pose this is to
problem is to choose
choose aa and
and bb so
so that ax +
that ax + be is as
be is as close
close
as
as possible to yy in
possible to in the
the Euclidean
Euclidean norm.
norm. That is, we
That is, find the
we find the best
best approximation
approximation to
to
y
y from
from WW= = span{x, e).
span{x, e}.
The Gram
The Gram matrix
matrix is
is

G = [ x· x e· x ] = [1.6325 2.45]
x .e e· e 2.45 5 '

and the right-hand


and the right-hand side of the
side of the normal
normal equations
equations is
is

b = [ x· y ] == [ 7.4370 ]
e· y 13.196·

Solving
Solving the normal equations
the normal equations yields
yields

[ a]
b
== [ 2.2411 ]
1.5409'

The resulting
The linear model
resulting linear model is displayed, together
is displayed, together with the original
with the original data,
data, in
in Figure
Figure
3.5.

Example 3.38.
Example 3.38. One
One advantage
advantage of of working
working withwith polynomials instead of
polynomials instead of transcen-
transcen-
dental functions
dental functions like eXx is
like e is that
that polynomials
polynomials are are very easy to
very easy to evaluate—only
evaluate~only the the basic
basic
arithmetic operations
arithmetic operations are
are required.
required. For this reason,
For this reason, it is often
it is desirable to
often desirable approx-
to approx-
imate
imate aa more
more complicated
complicated function
function byby aa polynomial.
polynomial. Considering
Considering f(x]f(x) == eXex as
as aa
function in (7[0,1],
function in C(O, 1], we find the
we find the best
best quadratic
quadratic approximation,
approximation, in in the mean-square
the mean-square
sense,
sense, to
to ff.. A basis for
A basis the space
for the space V^
P2 ofof polynomials
polynomials of of degree
degree 22 or
or less
less is x, x 22 }.
{l,x,x
is {I, }.
3.4. Orthogonal bases and projections 65

4~------~------~------~~------~------~

Figure 3.5.
Figure 3.5. The
The data
data from
from Example 3.37 and
Example 3.37 the approximate
and the approximate linear
linear re-
re-
lationship.
lationship.

It is easy
It is easy to
to verify
verify that
that the
the normal
normal equations
equations for the problem
for the of finding
problem of finding the
the best
best
approximation to
approximation to f from p2 are
from P2 are (in
(in matrix-vector form)
matrix-vector form)
Ga = b,
Ga=b,
where
where

1~2
1/2
1/3 ] [ e- 1 ]
G =[ 1/3 1/4 ,b = 1 .
1/3 1/4 1/5 e - 2
Since
Since
1.013]
G-1b == 0.8511 ,
[ 0.8392
the best
the best quadratic
quadratic approximation
approximation is
is
eX == JJ2{x) = 1.013 + 0.8511x + 0.8392x2.
The exponential
The exponential function and the
function and the quadratic
quadratic approximation are graphed
approximation are in Figure
graphed in Figure
3.6.
3.6.

3.39. An
Example 3.39. orthonormal basis for
An orthonormal for p2 [0,1]J is {ql,
interval [0,1])
P 2 (on the interval {^1,^25^3};
Q2, Q3},
where
where
66 Chapter 3. Essential linear algebra

2.8
x
- y=e
2.6 - _. y=P2(X)

2.4

2.2

2
>-
1.8

1.6

1.4

1.2

1
0 0.2 0.4 0.6 0.8
x

Figure 3.6.
Figure The function
3.6. The function f(x) = eeXx and
f(x) — and the
the best
best quadratic
quadratic approximation
approximation
yy —
= Pi(x)
p2(X) (see
(see Example
Example 3.38).
3.38).

The best
The best approximation
approximation p^ to eeXx (which
P2 to (which was
was calculated
calculated in the previous
in the previous exercise)
exercise) can
can
be computed by
be computed the formula
by the formula

P2(x) = (qij)qi(x) + (q2,f}qi(x) + (tfs,/)^).


A
A direct
direct calculation
calculation shows
shows that
that the
the same
same result
result is
is obtained.
obtained. (See
(See Exercise
Exercise 10.)
10.)

The
The concept
concept of
of best approximation is
best approximation is central
central in
in this
this book,
book, since
since the
the two
two main
main
solution
solution techniques
techniques we
we discuss, Fourier series
discuss, Fourier and finite
series and finite elements,
elements, both
both produce
produce aa
best approximation to
best approximation to the
the true
true solution of aa BVP.
solution of BVP.

Exercises
1. (a)
1. Show that
(a) Show that the
the basis {vi,vV2,
basis {VI, 2 ,V3} from Example
V3} from Example 3.33
3.33 is
is an orthonormal
an orthonormal
basis
basis for R33..
for R
(b) Express
(b) Express the
the vector
vector

as
as aa linear combination of
linear combination of YI
VI,, V2,
V2, \s.
V3.

2. Is the
2. Is the basis {1/1,1/2,1/3}
basis {L I ,L 2 ,L 3 } for
for P
P2 (on the
2 (on interval [0,1])
the interval [0,1]) given
given in
in Example 3.28
Example 3.28
an orthogonal
an orthogonal basis?
basis?
3.4. Orthogonal
Orthogonal bases and projections
projections 67

3. Let V be an inner product space. Prove that x, yy e


E V satisfy

ifif and only if


and only if (x,
(x, y) =
= 0.
O.

4. Use the results of


of this section
section to show
show that any
any orthonormal
orthonormal set containing
containing
n vectors in RRnn is a basis for
for R n
Rn. . (Hint: Since the dimension of RRnn is
is n, it
suffices to show either that the orthogonal
suffices orthogonal set spans RnRn or that it is linearly
independent. Linear independence is probably easier.)

5. Let
5. Let W be
be aa subspace of an
subspace of an inner
inner product space V and
product space let {Wi,
and let {wi, w 2 , ...
W2, ..., w
w n }}
be a basis for
for W. Show that, for
for y e V,
E V,

z) = 00 for
(y, z) for all
all zz E
GW

holds if and
and only ifif
(y,Wi) =0, i=1,2, ... ,n
holds.
holds.

6. Let {Wi,
6. {w1; w 2 , ...
W2, ..., w
w n}
} be a linearly independent
independent set
set in an
an inner
inner product space
space
nxn
y, and
V, and define G E eRR nxn by
by

Gijij =
G (wj-jWj), i,j
= (Wj,Wi), i,j = 1 , 2 ,...
= 1,2, . . . ,,n.
n.

Prove that G is invertible. Hint: By the Fredholm alternative,


alternative, it suffices
suffices to
show that the only solution to Gx = 0 is Rn satisfies
= O.0. Assume that x EE Rn
is x =
Gx = 0. This implies that
= O.
x·Gx = O.
Show
Show that
that x
X·• Gx = (u, u), where
Gx = where u E
€ V is
is given
given by
by

and show that


and show that u
u cannot
cannot be
be the
the zero
zero vector
vector unless
unless x
x= o.
= 0.
7. Consider the following data:

x
X yy
1.0000 2.0087
1.2500 2.4907
1.4000 2.8363
1.5000 2.9706
1.9000 3.9092
3.9092
2.1000 4.1932
4.1932
2.2500 4.5057
4.5057
2.6000 5.2533
2.9000 5.8030
68 Chapter 3. Essential linear algebra

Find the
Find the relationship
relationship yy = mx + Cc that
= mx that best
best fits these data.
fits these data. Plot
Plot the
the data
data and
and
the best fit line.

8. Consider
8. Consider the
the following data:
following data:

x
X y
Y
1.0000
1.0000 1.2475
1.2475
1.2500
1.2500 1.6366
1.6366
1.4000
1.4000 1.9823
1.9823
1.5000 2.2243
1.9000 3.4766
2.1000
2.1000 4.2301
2.2500 4.8478
2.6000 6.5129
2.9000 8.2331

Find the
Find the relationship
relationship yy = c^x22 +
= C2X C1X + CQ
+C\X Co that
that best
best fits
fits these data. If
these data. If possible,
possible,
plot the data and the best fit
fit parabola.
parabola.

9. Using the
9. the orthonormal
orthonormal basis
basis {Ql,Q2,q3}
{^1,^2,^3} for P2 given in
P% given in Example 3.39, find
find
the
the quadratic
quadratic polynomial p(x] that best approximates
p(x) that approximates g(x) = sin (nx),
— sin (TTX), in the
the
mean-square sense, over the interval [0,1]. Produce a graph of 9g and the
quadratic approximation.
quadratic approximation.

10. (a)
10. (a) Verify that {Ql,
Verify that (<7i, Q2,
#2) Q3},
#3}, defined
defined in
in Example 3.39, is
Example 3.39, an orthonormal
is an orthonormal basis
basis
for P2 on
for on the interval
interval [0,1].
[0,1].
(b) Using
(b) Using this orthonormal basis,
this orthonormal basis, find
find the best approximation
the best approximation toto ff(x) = eeXx
(x) =
(on the
(on the interval
interval [0,1])
[0,1]) in
in the
the mean-square sense, and
mean-square sense, and verify
verify that
that the same
the same
result is
is obtained
obtained as
as in
in Example 3.38.
3.38.

3.5 Eigenvalues and eigenvectors of a symmetric


matrix
matrix
The eigenvectors
eigenvectors ofof a matrix
matrix operator
operator are
are special
special vectors for
for which
which the action
action of
of
the matrix is
the is particularly simple.
simple. InIn this section,
section, we discuss the
we discuss the properties ofof
eigenvalues and
eigenvalues and eigenvectors
eigenvectors ofof symmetric
symmetric matrices.
matrices. Understanding
Understanding thisthis topic
topic will
will
set the
set stage for
the stage for the
the Fourier
Fourier series
series method
method for solving differential
for solving differential equations,
equations, which
which
takes
takes advantage
advantage of of the simple action
the simple action of
of aa differential
differential operator on its
operator on eigenfunctions.
its eigenfunctions.
nxn
Definition
Definition 3.40.
3.40. Let A E 6RRnxn. . We say that the scalar A is an eigenvalue of
of A
if there
if exists aa nonzero
there exists vector xx such
nonzero vector such that
that

Ax = AX.

As we discuss
As we discuss below,
below, the scalar A may
the scalar may be
be complex
complex even if A has
even if has only real entries;
only real entries;
if A is
if is complex, then xx must
complex, then must have complex entries.
have complex entries.
3.5. Eigenvalues
Eigenvalues and eigenvectors
eigenvectors of a symmetric
symmetric matrix 69

As we
As we are
are about
about to to demonstrate, eigenvalues are
demonstrate, eigenvalues are naturally expressed as
naturally expressed the
as the
roots of aa polynomial,
roots of polynomial, withwith the coefficients of
the coefficients of the
the polynomial computed from
polynomial computed from the
the
entries in
entries in the matrix. A
the matrix. A polynomial with real
polynomial with coefficients can
real coefficients can have
have complex roots.
complex roots.
For
For this
this reason,
reason, it it is
is natural
natural to
to allow complex eigenvalues
allow complex and eigenvectors
eigenvalues and eigenvectors in the
in the
above definition. However, we will show below that a symmetric
above definition. However, we will show below that a symmetric matrix can have matrix can have
only real
only real eigenvalues,
eigenvalues, which will simplify
which will matters. Moreover,
simplify matters. Moreover, the
the eigenvalues and
eigenvalues and
eigenvectors of
eigenvectors of aa symmetric
symmetric matrix
matrix have other useful
have other useful properties, which we
properties, which also
we also
explore below.
explore below.
The following
The calculation is
following calculation is essential for understanding
essential for understanding eigenvalues
eigenvalues and
and eigen-
eigen-
vectors:
vectors:

Ax= .>.x, x:f:.O


{:} .>.x - Ax = 0, x :f:. 0
{:} (.>.1 - A)x = 0, x:f:. o.

This last
This condition is
last condition is possible
possible if
if and
and only if 'AI
only if >'1 -— A is aa singular
A is singular matrix;
matrix; that
that is,
is, if
if
and only
and only ifif
det (.>.1 - A) = 0,
12
where
where det(B)
det(B) isis the determinant12
the determinant of the
of square matrix
the square matrix B.B. In In principle,
principle, then,
then, we
we
can find
can find the
the eigenvalues
eigenvalues ofof A by solving
A by solving the
the equation
equation detdet (AI
(.>.1 -— A)
A) = 0.
O.
It is
It is not hard to
not hard to show
show that PA (A) =
that PA('>') det (.>.1
= det (AI — - A) is aa polynomial
A) is polynomial of of degree
degree nn
(the characteristic polynomial of A), and so A has n eigenvalues (counted
(the characteristic polynomial of A), and so A has n eigenvalues (counted according according
to
to multiplicity
multiplicity as as roots of PA
roots of (A)). Any
PA('>')). Any or all of
or all of the eigenvalues can
the eigenvalues can be
be complex,
complex,
even if
even if A
A has real entries,
has real entries, since
since aa polynomial
polynomial with
with real coefficients can
real coefficients have complex
can have complex
roots.
roots.

Example 3.41. Let

Then
Then

PA('>') = det (.>.1 - A)


'>'-1 -1
- 1
-1 .>. - 2
= (.>. - 1)('>' - 2) -1
=.>.2 _ 3'>' + 1.

Therefore, the
Therefore, the eigenvalues
eigenvalues are
are
3± v'5
2
12
We assume
12We assume that
that the
the reader
reader is
is familiar
familiar with
with the elementary properties
the elementary properties of
of determinants
determinants (such
(such as
as
the computation of
the computation of determinants
determinants of of small matrices). The
small matrices). The most
most important
important of
of these
these is
is that
that aa matrix
matrix
is singular
is singular if
if and
and only
only if its determinant
if its determinant is is zero.
zero. Any introductory text
Any introductory on linear
text on linear algebra,
algebra, such
such as
as
[34], can
[34], can be
be consulted
consulted for details.
for details.
70 Chapter 3.
Chapter 3. Essential linear algebra
algebra

Example 3.42.
Example 3.42. Let
Let

Then
Then

PA (A) = det (AI - A)


=1 A-I
1
-1
A-I
= (A - 1)2 +1
= A2 - 2A + 2.

Therefore, the
Therefore, the eigenvalues
eigenvalues are
are
1 ± i,
where i = ^f—^..
wherei=A·

Example
Example 3.43.
3.43. Let
Let

Then
Then

PA(A) = det (AI - A)


-1 -1
A-I -1
o A-I

Therefore,
Therefore, the only
only eigenvalue is 1,
I, which is an eigenvalue of
of multiplicity
multiplicity 3. In
In this
example,
example, itit is
is instructive
instructive to
to compute
compute the
the eigenvectors. We must
eigenvectors. We must solve
solve (XI
(AI —- A.)x
A)x == 0
for A
for A= = 1,
1, that is, (I
that is, (I —
- A)x
A)x == 0. We have
O. We have

I- A = 01 01 00
[ 001
1- [10 1 1 III = [00 -10 -1
-1 1,
001 000

and
and aa straightforward
straightforward calculation
calculation shows
shows that
that the
the solution
solution space (the eigenspace)
space (the eigenspace) is
is

{(a,O,O) : a E R} = span{(I,O,O)}.
Thus, in spite of
of the fact
fact that
that the eigenvalue has multiplicity
multiplicity 3,
3, there is
is only
only one
linearly
linearly independent
independent eigenvector corresponding to the eigenvalue.

The
The fact
fact that
that the
the matrix
matrix in
in the
the previous
previous example
example has
has only
only one
one eigenvector
eigenvector for
for
an
an eigenvalue
eigenvalue of
of multiplicity
multiplicity 33 is
is significant.
significant. It
It means
means that
that there
there is
is not
not aa basis
basis of
of
3
R
R3 consisting
consisting of
of eigenvectors
eigenvectors of A.
of A.
3.5.
3.5. Eigenvalues and
Eigenvalues and eigenvectors
eigenvectors of
of a
a symmetric matrix
symmetric matrix 71
71

3.5.1
3.5.1 The
The transpose of a
transpose of a matrix
matrix and
and the dot product
the dot product
The
The theory
theory of eigenvalues and
of eigenvalues eigenvectors is
and eigenvectors greatly simplified
is greatly simplified when
when aa matrix
matrix AAe E
nxn
R
Rnxn is symmetric,
is symmetric, that is, AT == A. In order to appreciate
is, when AT appreciate this, we
we need
to
to understand
understand the
the relationship of the
relationship of the transpose
transpose ofof aa matrix
matrix to to the
the Euclidean inner
Euclidean inner
product (or dot
product (or dot product).
product).
mxn
We consider aa linear
linear operator defined by A E
operator defined eRRm x n,, and perform the following
following
calculation:
calculation:

n m
= LLAijViUj
j=l i=l

j=l

(The above
(The manipulations are
above manipulations are just
just applications
applications of
of the elementary properties
the elementary properties of
of
arithmetic—basically that
arithmetic-basically that numbers can be
numbers can added in
be added in any
any order,
order, and multiplication
and multiplication
distributes over addition.) Thus the transpose AT AT of AA E€ R mxn
Rmxn satisfies the
following fundamental
following property:
fundamental property:

(3.25)
nxn
For
For aa symmetric
symmetric matrix
matrix A eR
A E R nxn ,, this
this simplifies
simplifies to
to

(Au) . v = u· (Av) for all u, vERn.

When
When we
we allow for complex
allow for complex scalars and vectors
scalars and vectors with
with complex entries, we
complex entries, we must
must
modify the dot
modify the dot product.
product. IfIf x,
x, y
y E C n , then
6 en, then we define
we define
n
x·y = LXiYi.
i=l

The second vector


The second in aa dot
vector in dot product must thus
product must thus be
be conjugated;
conjugated; thisthis is necessary so
is necessary so
that
that x-x
X·X will
will be
be real,
real, allowing
allowing the
the norm
norm to
to be defined. We
be defined. We will
will use
use the same notation
the same notation
for the
for the dot
dot product whether the
product whether vectors are
the vectors are in Rnn or
in R en.n . The
or C The complex dot product
complex dot product
has
has the following properties,
the following properties, which form the
which form definition of
the definition of an
an inner
inner product on aa
product on
complex vector
complex space:
vector space:
1. xX·• x >
1. ~ 0 for all x E C n , and x .• x = 0 if and only if x =
6 en, = o.
0.
n
2.
2. x
X·• y
Y== y
Y .• x for all
x for x, yy E
all x, 6Cen..
72 Essential linear algebra
Chapter 3. Essential

3. (ax /3y) .• zz = ax·


(ax + f3y) ax • zz +
+ f3y
0y .• zz for
for all
all x,
x,y,
y, zz E C n , a, f3ft E
6 en, £ e.
C. Together
Together with
with
the second
the second property,
property, this
this implies
implies that
that
z . (ax + f3y) = az . x + f3z . y
all x,y,z
for all x,y,z £ C n , a,f3
E en, a,/3 E C.
£ e.
Complex vector
Complex vector spaces
spaces and
and inner
inner products are discussed
products are discussed in
in more
more detail
detail in
in Section
Section
9.1.
9.1.

3.5.2
3.5.2 Special properties
Special properties of
of symmetric
symmetric matrices
matrices
We can
We can now
now derive
derive the special
special properties of
of the
the eigenvalues
eigenvalues and
and eigenvectors
eigenvectors of
of aa
symmetric matrix.
symmetric matrix.

Theorem 3.44.
Theorem 3.44. //A
If A E R n x n is symmetric,
e Rnxn symmetric, then
then every
every eigenvalue
eigenvalue of
of A is real.
real.
Moreover, each eigenvalue
Moreover, each eigenvalue corresponds
corresponds toto aa real
real eigenvector.
eigenvector.

Suppose Ax
Proof. Suppose
Proof. Ax == Ax,
AX, xx =P
/ 0,
0, where for the
where for the moment
moment we do not
we do not exclude
exclude the
the
possibility that A
possibility that A and
and xx might
might be complex. Then
be complex. Then
(Ax) . x = (AX) . x = A(X . x)

and
and
x· (Ax) = x . (AX) = X(x . x).
But (Ax)
But (Ax). •xx== xx. •(Ax)
(Ax) when
whenAA isissymmetric,
symmetric,soso
A(X . x) = X(x . x).
Since x .•xx i:-/ 0,0,this
this yields
yields
A = A,
which implies that A is real.
real.
Let xx =
Let =uU + iv,
iv, where
where u, v £ R n . Then
u, vERn. Then
Ax = AX <=> A(u + iv) = A(U + iv)
<=> Au + iAv = AU + iAV
<=> { Au = AU,
Av = AV.

Since i:- 0,
Since xx 7^ 0, we
we must
must have
have either
either U
u =P or vv f:-
/ 00 or ^ 00 (or
(or both), so one
both), so one of
of u,
u, v (or both)
v (or both)
must be aa real
must be eigenvector of
real eigenvector of A corresponding to
A corresponding to A.
A. 0

Prom this
From point on,
this point on, we will only
we will only discuss
discuss eigenvalues
eigenvalues and
and eigenvectors
eigenvectors for
for real
real
symmetric
symmetric matrices.
matrices. According
According to the last
to the last theorem,
theorem, then,
then, we
we will not need
will not need to
to use
use
complex numbers or vectors.

Theorem 3.45.
Theorem 3.45. Let
Let AA E R n x n be
£ Rnxn be symmetric, and
and let xi, X2
let Xl, x2 be eigenvectors of
be eigenvectors of AA
corresponding to
corresponding to distinct
distinct eigenvalues
eigenvalues \i, Then xi
\2- Then
AI, A2. Xl and X2 are
and X2 are orthogonal.
orthogonal.
3.5. Eigenvalues
Eigenvalues and eigenvectors
eigenvectors of
of a symmetric
symmetric matrix
matrix 73
73

Proof.
Proof. We have

But

and
and

Therefore
Therefore
Al(XI . X2) = A2(Xl . X2),
and since AI i- AA2,2 , this implies
Al ^ implies that (xi,x 2) =
(Xl,X2) = 0.
0. D

Example
Example 3.46. Consider
3.46. Consider

1/3 1/3
1/3]
A = 1/3 1/3 1/3 .
[ 1/3 1/3
1/3

A straightforward
straightforward calculation shows that

so
so the
the eigenvalues
eigenvalues of
of A are 0,0,1.
A are 0,0, 1. Another
Another straightforward
straightforward calculation
calculation shows that
shows that
there
there are
are two
two linearly
linearly independent
independent eigenvectors
eigenvectors corresponding
corresponding to
to X = 0,
,\ — namely,
0, namely,

and
and aa single (independent) eigenvector
single (independent) eigenvector for A=
for ,\ = 1,
1,

We can
We can verify
verify by
eigenvector for
eigenvector
by observation
for A =
observation that
= 1.
that the
the eigenvectors
eigenvectors for X=
for A = 0 are°
are orthogonal
orthogonal to
to the
the

special property
Here is another special property of symmetric matrices.
matrices. Example 3.43
3.43 shows
for nonsymmetric
that this result is not true for nonsymmetric matrices.
matrices.
nxn
Theorem 3.47.
Theorem 3.47. Let A E
Let A 6 RRnxn be symmetric,
be symmetric, and
and suppose
suppose A A has
has anan eigenvalue
eigenvalue
IJL of
J1- of (algebraic)
(algebraic) multiplicity
multiplicity kk (meaning
(meaning that
that J1-
fj, is
is aa root
root of
of multiplicity
multiplicity kk of
of the
the
characteristic polynomial
characteristic polynomial ofof A).
A). Then
Then AA has
has kk linearly
linearly independent
independent eigenvectors
eigenvectors
corresponding to J1-.
corresponding [L. .
74 Chapter 3. Essential linear algebra
Chapter

The proof
The of this
proof of this theorem is rather
theorem is rather involved
involved and does not
and does generalize to
not generalize differ-
to differ-
ential operators
ential operators (as(as do
do the
the proofs
proofs given above). We
given above). therefore relegate
We therefore it to
relegate it to Appendix
Appendix
A.
A.
If n
If /L is
is an eigenvalue of
an eigenvalue of multiplicity k, as
multiplicity k, in the
as in the previous
previous theorem,
theorem, then
then we can
we can
choose
choose the
the kk linearly
linearly independent eigenvectors corresponding
independent eigenvectors corresponding toto // to be
/L to orthonor-
be orthonor-
13
mal.
mal. 13 We
We thus obtain the
thus obtain the following corollary.
following corollary.

Corollary 3.48.
Corollary 3.48. (The spectral theorem
(The spectral for symmetric
theorem for symmetric matrices)
matrices) Let Let A
A GE
R nxn
Rnxn be symmetric.
be symmetric. Then
Then there
there is
is an
an orthonormal
orthonormal basis {ui,u
basis {Ul' U2,2 ,... ,u n ) of
... ,un} Rnn
of R
consisting of eigenvectors
consisting of eigenvectors of A.
of A.

3.5.3
3.5.3 The spectral
The spectral method
method for solving Ax
for solving = bb
Ax =
When A e R nxn is symmetric
E Rnxn symmetric and
and the eigenvalues
eigenvalues and eigenvectors
eigenvectors of A are known,
14
there
there is
is aa simple
simple method
method 14 for solving
for Ax =
solving Ax = b.
b.
Let
Let A A be
be symmetric
symmetric with eigenvalues AI
with eigenvalues AI,, \A2,
2,..., An and
... ,An and orthonormal
orthonormal eigen-
eigen-
vectors
vectors ui,
Ul, U 2 ,...
U2, . . . ,,Un'
un. For any b
For any e R n , we
b ERn, can write
we can write

We
We can also write
can also write

(Of course, ai
(Of course, = Uj
o,i = Ui .• x,
x, but,
but, as
as we are thinking
we are thinking of
of xx as
as the
the unknown,
unknown, we cannot
we cannot
compute from this
o>i from
compute ai this formula.)
formula.) We
We then
then have
have

Ax = b::::} A (alul + ... + anun ) = + ... + (un' b)un


(Ul . b)Ul
::::} alAul + ... + anAun = (Ul . b)UI + ... + (un' b)u n
::::} alAlUl + ... + anAnUn = (Ul . b)Ul + ... + (un' b)un .

Since b
Since can have
b can only one
have only one expansion in terms
expansion in terms of the basis
of the {ui,...
basis {Ul, ... ,u n }, we
, un}, must
we must
have
have
aiAi = (Ui' b), i = 1,2, .. . ,n,
that is,
that is,

Thus we
Thus we obtain
obtain the solution
the solution

(3.26)
13
It is
13It is always
always possible
possible to
to replace any linearly
replace any linearly independent
independent setset with
with an
an orthonormal set spanning
orthonormal set spanning
the
the same subspace. The
same subspace. The technique for doing
technique for doing this is called
this is called the
the Gram-Schmidt
Gram-Schmidt procedure;
procedure; it
it is
is
explained
explained in elementary linear
in elementary linear algebra
algebra texts
texts such as [34].
such as
14
This method
14This method isis not
not normally
normally taught
taught in elementary linear
in elementary linear algebra courses or
algebra courses or books,
books, because it
because it
is more difficult
is more difficult to
to find
find the eigenvalues and
the eigenvalues and eigenvectors
eigenvectors of of A
A than
than to
to just
just solve
solve Ax
Ax == bb by other
by other
means.
means.
3.5.
3.5. Eigenvalues and eigenvectors
Eigenvalues and eigenvectors of
of a symmetric matrix
a symmetric matrix 75
75

We
We see
see that
that all
all of
of the
the eigenvalues
eigenvalues of of AA must
must be
be nonzero
nonzero inin order
order to apply this
to apply this
method,
method, which
which is is only sensible: if
only sensible: if 00 is
is an
an eigenvalue
eigenvalue of
of A,
A, then
then AA is singular and
is singular and
Ax = bb either
Ax either has
has no solution or
no solution or has infinitely many
has infinitely solutions.
many solutions.
If we already
If already have the eigenvalues
eigenvalues and and eigenvectors
eigenvectors of A, then this method
method for
solving Ax
solving Ax = = bb is simpler and
is simpler and less
less expensive
expensive than
than the
the usual
usual method
method of Gaussian
of Gaussian
elimination.
elimination.

Example 3.49.
3.49. Let
Let

A = 11
-4
[ -1
-4
14 -1
-4 1 =[ 1
,b 12
-4 11 1

A
A direct
direct calculation
calculation shows
shows that
that the
the eigenvalues of A
eigenvalues of A are
are

A1 = 6, A2 = 12, A3 = 18,

and the corresponding


corresponding (orthonormal)
(orthonormal) eigenvectors are

(According to
(According Theorem 3.45,
to Theorem 3.45, the
the eigenvectors
eigenvectors are
are automatically
automatically orthogonal
orthogonal in
in this
this
case; however, we had to ensure that each eigenvector was normalized.) The solution
case; however, we had to ensure that each eigenvector was normalized.) The solution
to Ax
to Ax == bb isis

Exercises
1. Let
1.
164 -48] [ 116 ]
A = [ -48 136 ,b = 88 .
Compute,
Compute, by
by hand,
hand, the
the eigenvalues and eigenvectors
eigenvalues and eigenvectors of
of A, and use
A, and use them to
them to
solve
solve Ax = bb for
Ax — for xx (use
(use the "spectral method").
the "spectral method").
2. Repeat
2. Exercise 11 for
Repeat Exercise for

3 -1 11 ] .
A= -1 3 ] ,b = [ -9
76 Chapter 3. Essential linear algebra

3.
3. Repeat
Repeat Exercise
Exercise 11 for
for

4.
4. Repeat
Repeat Exercise
Exercise 11 for
for

A =
[ 7 -2 1]
-2
1
10
-2
-2
7
,b = [ 6]
12
18
.

nxn
5.
5. Let
Let A
A E€RR nxn be
be symmetric,
symmetric, and
and suppose
suppose the
the eigenvalues and (orthonormal)
eigenvalues and (orthonormal)
eigenvectors
eigenvectors of
of A are already
A are already known.
known. How
How many arithmetic operations
many arithmetic operations are
are
required
required to solve Ax
to solve Ax = = b
b using
using the
the spectral method?
spectral method?
nxn
6.
6. A
A symmetric matrix A eR
A E Rnxn is called positive definite
definite ifif

x =I 0 ~ (Ax) . x > O.

Use the spectral theorem to show


the spectral show that A is positive definite if and only if all
of the
of eigenvalues of
the eigenvalues of A
A are positive.
are positive.

7. Let
7. Let L
L be
be the n x nn matrix
the n defined by
matrix defined by the
the condition
condition that
that

p,
2
i = j,
Lij = -b, li-jl=1,
{
0, otherwise,

where
where h = l/(n + 1).
= 1j(n 1). For example, with
For example, = 5,
with n = 5,

72
-36
-36
72 -36
° 0
0 o
L = 0
o
-36
0
72
-36
-36
72
01
o .
-36
[
o 0 0 -36 72

(a)
(a) For
For each
each jj =
= 1,2, ... ,n,
1,2,..., n, define
define the
the discrete sine wave
discrete sine wave s^ of frequency
s(j) of frequency jj
by
s~) = sin (jk7rh).
J
Show
Show that
that s(
s(j) ) is
is an
an eigenvector
eigenvector ofof L,
L, and
and find
find the
the corresponding eigen-
corresponding eigen-
J
value Aj. (Hint:
value Xj. Compute Ls(
(Hint: Compute Ls(j) ) and
and apply
apply the
the addition formula for
addition formula the
for the
sine function.)
sine function.)
(b) What
(b) What is
is the
the relationship
relationship between
between the frequency j and
the frequency and the
the magnitude
magnitude of
of
A,-?
Aj?
solving ODEs and PDEs
3.6. Preview of methods for solving 77

(c) The
(c) The discrete sine
sine waves are orthogonal
orthogonal (since
(since they are the eigenvectors
eigenvectors
of aa symmetric
of symmetric matrix
matrix corresponding to distinct eigenvalues)
eigenvalues) and
and thus
thus
form an
form orthogonal basis
an orthogonal basis for R n . Moreover,
for Rn. Moreover, it
it can
can be shown that
be shown that every
every
s(^ has the same norm:
s(j)

I s 11-- V2h'
(j) 1 J. -- 1, 2 , .. . ,n.

V2hs^l\, V2hS(2),
Therefore, {I V2hs(1) ^/2hs^2\ . .... ,,V2hs(n)}
\/2hs^ > is an orthonormal basis for
n n
R . We
Rn. We will
will call
call aa vector
vector xx E
e Rn
R smooth
smooth or or rough
rough depending
depending on
on whether
whether
its
its components
components in in the
the discrete sine wave
discrete sine wave basis are heavily
basis are heavily weighted toward
weighted toward
the
the low or high
low or frequencies, respectively.
high frequencies, respectively. ShowShow that
that the solution x
the solution x of
of
Lx
Lx = =b is smoother
b is smoother thanthan b.b.

3.6
3.6 Preview of
Preview of methods
methods for
for solving
solving ODEs
ODEs and
and PDEs
PDEs
The close formal
The close relation between
formal relation between the
the concepts
concepts of linear differential
of linear differential equation and
equation and
linear algebraic system
linear algebraic system suggests
suggests that ideas about
that ideas about linear
linear operators might playa
operators might play a role
role
in solving the
in solving the former,
former, asas is
is the case for
the case for the latter. In
the latter. order to
In order to make
make this parallel
this parallel
explicit, we will
will apply
apply the
the machinery
machinery of of linear algebra
algebra in the context of
the context of differential
differential
equations: view
view solutions
solutions as
as vectors
vectors in
in aa vector space,
space, identify
identify the
the linear
linear operators
operators
which define linear
which define differential equations,
linear differential equations, andand understand
understand how facts such
how facts such as
as the
the
Fredholm alternative
Fredholm appear in
alternative appear in the
the context
context of of differential
differential equations.
equations.
In the
In the chapters to follow
chapters to follow we
we will accomplish all
will accomplish all of
of this. In the
this. In the process,
process, we
we will
will
develop three
develop three general classes of
general classes methods for
of methods for solving
solving linear ODEs and
linear ODEs and PDEs, each
PDEs, each
one closely
one closely analogous
analogous toto aa method
method for
for solving
solving linear
linear algebraic
algebraic systems:
systems:
22
The method
1. The
1. method ofof Fourier series: Differential
Fourier series: operators, like
Differential operators, like dd?/dx
2
can have
/ dx ,, can have
eigenvalues and eigenfunctions;
eigenvalues and eigenfunctions; for example
for example

;:2 [sin(wx)] = _w 2 sin(wx).

The method
The method ofof Fourier series is
Fourier series is aa spectral
spectral method,
method, using
using the
the eigenfunctions
eigenfunctions
the differential
of the differential operator.
operator.

2. The
2. The method
method of of Green's functions: A
Green's functions: A Green's
Green's function for aa differential
function for differential
equation is
equation is the solution
solution to
to aa special
special form
form of
of the
the equation
equation (just
(just as A"1 is
as A-I is the
the
solution to
solution to AB = /) that allows
J) that allows one
one to
to immediately
immediately write
write down
down the solution
the solution
-1
to the
to the equation (just as
equation (just as we
we could
could write down x
write down x= =A b).
A -lb).

3. The
3. The method
method of of finite
finite elements:
elements: This
This isis aa direct
direct numerical
numerical method that
method that
can be
can be used when (1)
used when (1) or
or (2)
(2) fails (or is
fails (or is intractable).
intractable). It can
can be compared
be compared
with Gaussian
with elimination, the
Gaussian elimination, the standard
standard direct
direct numerical
numerical method
method for
for solving
solving
Ax = h.b. Like
Like Gaussian
Gaussian elimination,
elimination, finite element methods
finite element methods do
do not produce
not produce
aa formula
formula for
for the
the solution;
solution; however,
however, again
again like
like Gaussian
Gaussian elimination,
elimination, they
they are
are
applicable.
broadly applicable.
t78 Chapter 3. Essential linear algebra

In
In this
this book,
book, we
we concentrate on Fourier
concentrate on series and
Fourier series and finite element methods.
finite element methods. WeWe
will
will also
also explain
explain the idea of
the idea of aa Green's function and
Green's function and derive
derive aa few
few specific
specific Green's
Green's
functions that we will find useful.

3.7
3.7 Suggestions for
Suggestions for further
further reading
reading
A good
A good introductory
introductory text,
text, which
which assumes
assumes nono prior
prior knowledge
knowledge of of linear
linear algebra
algebra and
and
is written at
is written at aa very
very accessible
accessible level,
level, is
is Lay
Lay [34].
[34]. An alternative is
An alternative is Strang
Strang [44];
[44]; this
this
book
book also assumes no
also assumes background in
no background in linear
linear algebra,
algebra, but it is
but it written at
is written at aa somewhat
somewhat
more demanding level.
more demanding level. ItIt is
is noteworthy
noteworthy for its many
for its many insights
insights to to the
the applications
applications of of
linear algebra and
linear algebra and for its conversational
for its conversational tone.
tone. A more advanced
A more advanced text text is
is Meyer [40].
Meyer [40].
Anyone seriously interested
Anyone seriously interested inin applied
applied mathematics
mathematics mustmust become familiar with
become familiar with
the computational aspects
the computational aspects of of linear
linear algebra.
algebra. TheThe text by Strang
text by Strang mentioned above
mentioned above
includes material
includes material onon the numerical aspects
the numerical aspects ofof the
the subject.
subject. ThereThere are
are also
also more
more
specialized references. A good introductory
introductory text is Hager [23], [23], while more advanced
advanced
treatments include Demmel
treatments include Demmel [13] [13] and
and Trefethen
Trefethen and
and Bau [49]. An
Bau [49]. An encyclopedic
encyclopedic
reference is Golub and Van Loan [19].
Chapter 4
Chapter 4

Jsseiitial
tial ordinary
ordinary
differential
eal equations

differential equation
In an ordinary differential equation (ODE), there is a single independent variable.
Commonly ODEs model change over time, so the independent variable is tt (time).
Our interest in ODEs derives from the following fact: both the Fourier series method
and the finite element method reduce time-dependent
time-dependent PDEs into systems of ODEs.
In the
In the case
case of
of the Fourier series
the Fourier series method,
method, the
the system
system is
is completely
completely decoupled,
decoupled, so
so the
the
"system" is really just a sequence of scalar ODEs. In In Section 4.2, we
we learn how to
solve the scalar ODEs that arise in the Fourier series method.
The finite element method, on the other hand, results in coupled systems of of
ODEs. In Section 4.3, we we discuss the solution of linear, coupled systems of first-
order ODEs. Although we we present an explicit solution technique in that section,
the emphasis isis really on the properties of the solutions, as the systems that arise
in practice are destined to be solved by numerical rather than analytical
analytical means. In
Sections 4.4 and 4.5, we
we introduce some simple numerical methods that are adequate
adequate
for our purposes.
We close this chapter
chapter by interpreting our simple solutions in terms of Green's
functions. Although we do not emphasize the method of Green's function in this
book, we
book, we do
do explain
explain the
the basic idea in
basic idea in Section
Section 4.6.
4.6.

4.1
4.1 Converting a
Converting a higher-order
higher-order equation
equation to
to a
a
first-order system
first-order system
We begin our discussion of ODEs with a simple observation: It is always possible
to convert a single ODE of order two or more to a system of first-order
first-order ODEs. We
illustrate this
illustrate this on
on the following second-order
the following second-order equation:
equation:
cPu du
a dt 2 + b dt + cu = f(t). (4.1)

We define

Xl (t) = u(t),

79
80 Chapter 4. Essential
Essential ordinary differential equations

Then we
Then have
we have
dXl
dt =X2,
dX2 ~u C b du 1 c b 1
dt = dt2 = --;;,u - -;;, dt + -;;,f(t) = --;;,Xl - -;;,X2 + -;;,f(t).

We can
We can write this as
write this as aa first-order
first-order system
system using
using matrix-vector
matrix-vector notation:
notation:

dx =Ax+f(t), A= [ 0c
-d (4.2)
t - -a

In (4.2),
In (4.2), xx is
is the vector-valued function
the vector-valued function

The same
The same technique
technique will
will convert
convert any
any scalar
scalar equation
equation to
to aa first-order
first-order system.
system.
If the
If the unknown
unknown is
is u and
and the equation is
the equation is order
order m,
m, we
we define
define
du dm-lu
Xl = U, X2 = -dt ' ... , Xm = -t md
-
1 .

The first
The first m -— 1 equations
equations will
will be
be
dx l dX2 dXm-l
dt = X2, dt = X3, ... , - - - =X m ,
dt
and the
and the last
last equation
equation will
will be
be the original ODE
the original ODE (expressed
(expressed in
in the new variables).
the new variables). If
If
the original scalar
the original scalar equation
equation is
is linear,
linear, then
then the
the resulting system will
resulting system will also
also be
be linear,
linear,
and it
and it can
can be
be written in matrix-vector
written in matrix-vector form
form ifif desired.
desired.
An mth-order ODE
An mth-order ODE typically has infinitely
typically has infinitely many solutions; in
many solutions; in fact,
fact, an
an mth-
mth-
order linear
order linear ODE
ODE has an m-dimensional
has an m-dimensional subspace
subspace of of solutions.
solutions. ToTo narrow
narrow down
down
aa unique
unique solution,
solution, m auxiliary conditions
m auxiliary conditions are
are required.
required. When
When thethe independent
independent
variable is
variable is time,
time, the auxiliary conditions
the auxiliary conditions are
are initial
initial conditions:
conditions:
du ~-lU
u(to) = ao, dt (to) = al,···, dt m- l (to) = am-l·

These initial
These initial conditions
conditions translate
translate immediately
immediately into
into initial
initial conditions
conditions for
for the
the new
new
unknowns Xl,
unknowns x\, x%,..., xm:
X2, ... , Xm:

We can
We can apply
apply aa similar
similar technique
technique to
to convert
convert an
an mth-order
mth-order system
system of
of ODEs
ODEs
to aa first-order
to first-order system.
system. For
For example,
example, suppose
suppose x(t)
x(i) is
is aa vector-valued
vector-valued function,
function, say
say
x(t) 6 R n . Consider
x(£) ERn. Consider aa second-order
second-order system:
system:

~x
dt
( dX)
t, x, dt . (4.3)
2 = f
l.l. Converting
4.1. Converting a higher-order equation
a higher-order equation to
to a
a first-order
first-order system
system 81
81

We define
yet) = x(t),
dx
z(t) = dt (t).

We then have
We then have
dy
dt = z,
dz
dt = f(t,y,z).
The original system (4.3) consists of n second-order ODEs in n unknowns (the
components of
components x(i)).
of x( t)). We
We have
have rewritten this original
rewritten this original system
system asas In first-order ODEs
2n first-order ODEs
in In
in 2n unknowns
unknowns (the(the n components of
n components of y(t) and the
yet) and the nn components
components of of z(t)).
The fact that
The fact that any
any ODE
ODE can
can be
be written as aa first-order
written as first-order system
system has
has the follow-
the follow-
ing benefit:
ing benefit: Any
Any theory
theory or
or algorithm developed for
algorithm developed for first-order
first-order systems
systems ofof ODEs
ODEs is is
automatically
automatically applicable
applicable to ODE. This
any ODE.
to any leads to
This leads to aa considerable
considerable simplification
simplification in
in
the study of
the study of this
this subject.
subject.

Exercises
1. Write
1. Write the
the ODE
ODE
rPu
2 dx 2 +u =0
as
as aa system
system of first-order ODEs.
of first-order ODEs.
2. Write the ODE
rPu
dx 2 + csin (u) = 0
as aa system
system of first-order
first-order ODEs.
3.
3. Write
Write the
the ODE
ODE
d4 u d2 u
dt 4 - 2 dt 2 + u = sin (t)
as
as aa system
system of first-order ODEs.
of first-order ODEs.
4. Write the ODE
d2 u du 2
- 2 -2u- +t u=O
dt dt
as
as aa system
system of first-order ODEs.
of first-order ODEs.
5. Write the following system of second-order ODEs as a system of first-order
first-order
ODEs:
ODEs:
82 Chapter 4. Essential ordinary
ordinary differential equations
equations

Here mi and
Here ml and m^
m2 are
are constants,
constants, and j\ and
and II /2 are
and fz are real-valued
real-valued functions
functions of four
of four
variables.

4.2 Solutions
Solutions to some simple ODEs
In this
In section, we
this section, show how
we show how to solve some
to solve some simple first- and
simple first- and second-order
second-order ODEs
ODEs
that
that will
will arise later in
arise later in the
the text.
text.

4.2.1
4.2.1 The
The general
general solution
solution of a second-order
of a homogeneous ODE
second-order homogeneous ODE
with constant coefficients
with constant coefficients
In the ensuing
In the ensuing chapters,
chapters, we
we will often encounter
will often encounter the
the second-order
second-order linear
linear homoge-
homoge-
neous ODE
ODE with constant coefficients,
constant coefficients,

d2u du
a dt 2 + b dt + cu = 0, (4.4)

so we
we will present
present aa simple
simple method
method for
for computing
computing its
its general
general solution.
solution. The
The method
method
is
is based
based on the following
on the following idea:
idea: When
When faced
faced with
with aa differential
differential equation,
equation, one can
one can
sometimes guess
guess the general form
form of the solution
solution and, by substituting
substituting this general
form into the equation, determine the specific
specific form.
form.
In this
In case, we assume that
this case, that the
the solution
solution of (4.4)
(4.4) is of the
the form
form

Substituting into
Substituting into (4.4)
(4.4) yields
yields

since the
since the exponential is never
exponential is zero, this
never zero, this equation
equation holds
holds if and only
if and only ifif

ar2 + br + c = O.
This quadratic
This quadratic is
is called
called the
the characteristic polynomial of
characteristic polynomial of the
the ODE (4.4), and
ODE (4.4), its roots
and its roots
are
are called
called the
the characteristic roots of
characteristic roots of the ODE.
the ODE.
The characteristic
characteristic roots are given by the
the quadratic
quadratic formula:
formula:

-b - Vb 2 - 4ac -b + v'b 2 - 4ac


rl = , r2 =
2a 2a
We distinguish
We distinguish three cases.
three cases.

1. The
1. characteristic roots
The characteristic roots are
are real
real and
and unequal
unequal (i.e. b22 —
(Le. 6 4ac >
- 4ac > 0).
0). In
In
rit r2t
this
this case, since the
case, since the equation
equation isis linear, any linear
linear, any combination of
linear combination of e
er1t and eer2t
and
is also
also aa solution
solution of
of (4.4). In
In fact, as
as we now show,
show, every
every solution
solution of
of (4.4) can
(4.4) can
be
be written
written asas
(4.5)
4.2. Solutions to
4.2. Solutions to some simple ODEs
some simple ODEs 83

for
for some choice of
some choice ci, C2-
of Cl, In fact,
C2. In fact, we
we will
will show
show that,
that, for
for any
any &i,
kl' £2,
k2, the initial
the initial
value problem (IVP)
(IVP)
d2 u du
a dt 2 + b dt + cu = 0,
u(O) = kl' (4.6)
du(O) = k
dt 2

has a unique solution


solution of the form (4.5).
(4.5).
With uu given by (4.5),
(4.5), we have

u(O) = CI + C2,
du
dt (0) = rlCI + r2 C2,
and
and we
we wish
wish to
to choose
choose c\, C2 to
CI, c^ to satisfy
satisfy

CI + C2 = kl'
rlCI + r2C2 = k2'

that
that is,
is,
ll]C_k
[ rl r2
The coefficient
The coefficient matrix in this
matrix in this equation
equation is obviously nonsingular
is obviously (since r\
nonsingular (since rl /
:j:. r-2),
r2),
and so
and so there
there is
is aa unique solution c\,C2
unique solution CI, C2 for
for each
each fci,
kl' fo
k 2•.
Since every
Since every solution
solution of
of (4.4)
(4.4) can
can be
be written in the
written in the form (4.5), we
form (4.5), we call
call (4.5) the
(4.5) the
solution of
qeneral solution
general of (4.4).
(4.4).
2. The characteristics
2. The characteristics roots roots are
are complex
complex (Le. (i.e. b22 — 4ac <
- 4ac < 0). In this
0). In this
case, the
case, the characteristics
characteristics roots
roots are
are also
also unequal;
unequal; in fact, they
in fact, form aa complex
they form complex
conjugate pair. The analysis of the previous case applies, and we could write
the general solution
the general solution in in the
the form
form (4.5) in this
(4.5) in case as
this case as well.
well. However,
However, with
with 7*1,
rl, r<2
r2
ri r2
complex, ee T1 *,e
t ,eT2t* are complex-valued functions,
functions, and this is undesirable.
With rl = f.L - Ai, r2 = f.L + Ai, we have (by Euler's formula)
e T1t = el-'t (cos (At) - i sin (At)),
e
T2t
= el-'t (cos (At) + i sin (At)),
and so
and so
1
2" (eTlt+eT2t) = el-'t cos (At),

~ (e T1t _ e
T2t
) = el-'t sin (At).
This shows
This shows (because
(because the equation is
the equation is linear)
linear) that
that
el-'t cos (At), el-'t sin (At)
84 Chapter 4. Essential ordinary differential
differential equations

are also solutions of (4.4)


(4.4) in this case. We will write the general solution in
the form
Cle Pt cos (At) + C2ept sin (At).
As in the previous case, we
we can show that every solution
solution of (4.4) can be written
in this form (see
(seeExercise
Exercise 2).
2).
3. The
3. The characteristic
characteristic polynomial
polynomial hashas aa single (repeated) real
single (repeated) real root
root (i.e.
(Le.
b2 -— 4ac =
4ac = 0). In this case the root isis r =— -b/(2a). We cannot write the
—b/(2a). We
solution with the single solution eeTtrt;; by an inspired guess, we
general solution tert
we try teTt
rt
as the second solution. Indeed, with u(t)
u(t) = te , we
— teTt, we have

du ~u
dt (t) = (1 + rt)e Tt , dt 2 (t) = (2 + rt)reTt ,
and so
~u du
+ b dt (t) + cu(t)
a dt 2 (t)
= a(2 + rt)re Tt + b(1 + rt)e Tt + cte Tt
= (ar2 + br + c) teTt + (2ar + b) eTt
= 0 (since ar2 + br + c = 0 and 2ar + b = 2a( -b/(2a)) + b = 0).
rt
This shows that te teTt we write the general
is also a solution of (4.4), and we
solution in this case as

where r == -b/(2a).
—b/(2a). Once again, it is not hard to show that every solution of
of
(4.4) can be written in this form (see Exercise3).
(see Exercise 3).

4.1. The characteristic


Example 4.1. characteristic polynomial of
of

~u du
- -2 - + u = O
dt dt
is rr22 -— r + 1,
I, which
which has roots

1
rl = - + -v'3.
z
1 v'3.
r2 = - - -z.
2 2' 2 2
Therefore this
Therefore this example falls in case
falls in case 22 above,
above, and
and the
the general solution of the ODE
of the ODE is

= (Cl cos (2v'3 ) + C2 sm


. (v'3
t t
et /
2
u(t) -2- ) ) •

Example 4.2. The ODE


4.2. The
~u du
--2-+u=0
2
dt dt
4.2. Solutions to some simple ODEs 85

has characteristic polynomial rr22 — 2r +


- 2r + 1.
1. The characteristic roots are

ri = r2 = 1,

so case 3 above applies. The general


general solution is
is

4.2.2
4.2.2 A
A special inhomogeneous second-order
special inhomogeneous second-order linear
linear ODE
ODE
In Chapter
In Chapter 7,
7, we
we will
will encounter
encounter the following inhomogeneous
the following inhomogeneous IVP:
IVP:

d2 u
dt 2 + ()2U = f(t),
u(to) = a, (4.7)
du
dt (to) = {3.

The
The coefficient 02 is
coefficient ()2 is aa positive real number.
positive real number. In In this section, we
this section, we will
will present
present aa
surprisingly simple formula
surprisingly simple formula for the solution.
for the solution.
By the
By the principle
principle of superposition, we
of superposition, can solve
we can solve the
the two
two IVPs
IVPs

~u 2
dt 2 + () u = 0,
u(to) = a, (4.8)
du
dt (to) = {3

and
and
d2 u
dt 2 + (Pu = f(t),
u(to) = 0, (4.9)
du
dt (to) = 0

and add the


and add solutions to
the solutions get the
to get solution to
the solution (4.7). It is
to (4.7). is straightforward
straightforward to apply the
to apply the
techniques
techniques of Section 4.2.1
of Section 4.2.1 to derive the
to derive solution of
the solution of (4.8):
(4.8):

Ul (t) = a cos (()( t - to)) + ~ sin (()( t - to)) (4.10)

(see
(see Exercise 12).
Exercise 12).
The solution
The solution of (4.9) is
of (4.9) is more difficult to
more difficult derive, although
to derive, although the
the final answer has
final answer has
aa pleasingly
pleasingly simple
simple form:
form:

U2(t) = (j llt to
sin (()(t - s))f(s) ds. (4.11)
86 Chapter 4. Essential
Essential ordinary
ordinary differential
differential equations
equations

The
The derivation of this
derivation of formula is
this formula is outlined
outlined inin Exercise
Exercise 4.3.10
4.3.10 ofof the
the next section.
next section.
For now, we
For now, we will
will content ourselves with
content ourselves with verifying
verifying that (4.11) really
that (4.11) solves (4.9).
really solves (4.9).
To
To verify
verify the solution, we
the solution, we must differentiate U2(t),
must differentiate W2(i), which
which is
is aa bit
bit tricky since the
tricky since the
independent variable
independent appears both
variable appears both in
in the integrand and
the integrand and as
as an integration limit.
an integration limit. To
To
make
make the
the computation
computation of of the derivative clear,
the derivative clear, we
we write
write

h(x,y) = (j 11 X

to
sin (O(y - s))f(s)ds,

and note
and note that
that U2(t)
u^t) = h(t,
h(t,t). By the
t). By chain rule,
the chain rule, then,
then,
dU2 ah dt ah dt
di(t) = ax (t, t) dt + ay (t, t) dt
ah ah
= ax (t, t) + ay (t, t).
By the
By the fundamental
fundamental theorem of calculus,
theorem of calculus,

~~ (x, y) = ~ sin (O(y - x))f(x),


and, by
and, Theorem 2.1,
by Theorem 2.1,
ah
a(x,y)
y
= (j 11 o to
x
cos (O(y - s))f(s)ds

= l x

to
cos (O(y - s))f(s) ds.

Therefore,
Therefore,
dU2 1.
dt (t) = (j sm (O(t - t))f(t)
rt cos (O(t - s))f(s) ds
+ lto

= it cos (O(t - s))f(s) ds.


to
A similar
A similar calculation
calculation then
then shows
shows that
that
~u22 (t) = cos (O(t - t))f(t) - 0 it sin (O(t - s))f(s) ds
dt to

= f(t) - 0 t sin (O(t - s))f(s) ds.


lto
We
We then have
then have

~~2 (t) + 02 U2 (t)


t
= f(t) - 0 rt sin (O(t - s))f(s) ds + 0 ltort sin (O(t - s))f(s) ds
lto
= f(t),

U2(tO) = (jlito sin (O(t - s))f(s) ds = 0,


to
du
2 (to) = ito cos (O(t - s))f(s) ds = O.
dt to
4.2. Solutions to
4.2. Solutions to some simple ODEs
some simple ODEs 87

Thus U2 solves
Thus U2 (4.9), which
solves (4.9), which is
is what
what we
we wanted
wanted toto show.
show.
We
We have
have now
now shown
shown that
that the solution to
the solution to (4.7)
(4.7) is
is

u(t) = a cos (O(t - to)) + 7i(3 sin (O(t - to)) + (jlit sin (O(t - s))f(s) ds. (4.12)
to
Example
EXaJIlple 4.3. The solution to
4.3. The to
~u
dt 2 +u = cos (t),
u(O) = 0,
du(O) = 0
dt
i<t
is
to

u(t) = lot sin (t - s) cos (s) ds = ~ sin (t)


(the integral
(the integml can
can be computed using
be computed using the
the subtraction
subtmction formula
formula for
for sine and simplified
sine and simplified
using
using other trigonometric identities).
other trigonometric identities).

4.2.3
4.2.3 First-order linear
First-order linear ODEs
ODEs
Another type
Another type of ODE for
of ODE for which
which we
we can
can find
find the general solution
the general solution is
is the first-order
the first-order
linear ODE:
linear ODE:
du
dt - au = f(t). (4.13)
(We could
(We could treat
treat the
the case
case of
ofaa nonconstant
nonconstant coefficient
coefficient similarly;
similarly;however,
however,wewehave
havenon
need
need to.)
to.)
The solution is
The solution is based
based on
on the
the idea
idea of
of an
an integmting
integratingfactor:
factor: wewemultiply
multiplythe
th
equation by
equation by aa special
special function
functionthat
that allows
allowsusustotosolve
solvebybydirect
directintegration.
integration.WeWenote
not
that
that

Therefore, we
Therefore, have
we have
du du
- - au = f(t) =} e- at _ - ae-atu = e-atf(t)
dt dt
d
=} - [e-atu(t)] = e- at f(t)
dt
=} e-atu(t) = e-atOu(to) + it e- as f(s) ds
to

=} u(t) = ea(t-to)u(to) + it ea(t-s) f(s) ds.


to
This immediately
This immediately gives
gives us
us the solution to
the solution to the
the IVP
IVP
du
dt - au = f(t), (4.14)
u(to) = Uo.
88 Chapter 4. Essential ordinary
ordinary differential equations
equations

Example
Example 4.4.
4.4. The IVP
The IVP

du . ()
dt +u = sm t,
u(O) = 2
has solution
has solution

u(t) = 2e- t + lot e-(t-s) sin (s) ds


1
= 2e- t + '2 (sin (t) - cos (t) + e- t )
= ~e-t + ~ (sin (t) - cos(t))

(the integral
(the can be
integral can be computed
computed by two applications
by two of integration
applications of integration by parts).
by parts).

It should
should be appreciated that,
be appreciated that, although
although wewe have
have an
an explicit formula for
explicit formula for the
the
solution of
solution (4.13), it
of (4.13), it will
will be
be impossible in many
impossible in many cases
cases to
to explicitly
explicitly evaluate the
evaluate the
integrals
integrals involved in terms
involved in terms of
of elementary
elementary functions.
functions.

Exercises
1. Let
1. Let S
5 be
be the solution set
the solution set of
of (4.4).
(4.4).
(a) Show that
(a) Show is aa subspace
S is
that S subspace ofof C22 (R),
(R), the set of
the set of twice-continuously differ-
twice-continuously differ-
entiable
entiable function defined on
function defined R.
on R.
(b) Use
(b) Use the
the results
results of this section
of this section to show S is
to show is two-dimensional
two-dimensional for any values
for any values
of
of a,
a, 6, and c,
b, and c, provided only that
provided only a^
that a ¥ 0.
O.
2. Suppose (4.4)
2. Suppose (4.4) has characteristic roots
has characteristic roots /z± \i, where
/-l±>..i, where /i,
/-l, A
>.. e R and A /
E Rand>.. 0. Show
¥ O. Show
that, for any
that, for any ki, £2, there
kl' k2, there is
is aa unique
unique choice
choice of ci, C2
of Cl, such that
C2 such that the solution oi
the solution of
(4.6) is
(4.6)
CleP,t cos (>..t) + C2eP,t sin (>..t).
3. Suppose (4.4)
3. Suppose (4.4) has
has the single characteristic
the single characteristic root = -bj(2a).
root r = Show that,
-b/(2a). Show that, for
for
any fei,
any fo, there
kl' k2' there is
is aa unique choice of
unique choice of ci,C2
Cl, C2 such
such that
that the solution of
the solution of (4.6)
(4.6) is
is
Clert + C2 tert .
4.
4. For each of
For each of the following IVPs,
the following IVPs, find
find the general solution
the general solution of
of the ODE and
the ODE and use
use
it to
it to solve
solve the
the IVP:
IVP:
(a)
d2 u du
dt 2 + 2 dt + u = 0,
u(O) = 1,
du(O) = 0
dt
4.2. Solutions to
4.2. Solutions some simple
to some simple ODEs
ODEs 89

(b)
dlu du
3 dt 2 + 2 dt + u = 0,
u(o) = -1,
du(O) = 3
dt
(c)
dlu du
2 dt 2 + 2 dt + u = 0,
u(O) = 0,
du (0) = 1
dt
(d)
d2 u du
dt 2 + 3 dt + u = 0,
u(O) = 1,
du (0) = 2
dt
5.
5. The following differential
The following differential equations
equations are accompanied by
are accompanied by boundary
boundary conditions-
conditions—
auxiliary conditions that
auxiliary conditions that refer
refer to
to the
the boundary
boundary ofof aa spatial
spatial domain
domain rather
rather
than
than toto an
an initial
initial time. By using
time. By using the
the general solution of
general solution the ODE,
of the determine
ODE, determine
whether
whether aa nonzero
nonzero solution
solution to the boundary
to the boundary value
value problem (BVP) exists,
problem (BVP) and
exists, and
if so, whether
if so, whether thethe solution
solution is
is unique.
unique.
(a)
d2 u
dx 2 - 2u = 0,
u(O) = 0,
u(l) = 0
(b)
d2 u
dx 2 + 2u = 0,
u(O) = 0,
u(l) = 0
(c)
dlu 2
dx 2 + 7r U = 0,
u(O) = 0,
u(l) =0
90 Chapter 4.
Chapter 4. Essential
Essential ordinary differential equations
ordinary differential equations

Determine the values of A E


6. Determine e R such that the BVP
d2 u
dx 2 + AU = 0,
u(o) = 0,
u(l) = °
has
has aa nonzero
nonzero solution.
solution.
7. Prove
7. directly (that
Prove directly (that is,
is, by
by substituting
substituting uu into
into the
the differential
differential equation
equation and
and
initial condition)
initial that
condition) that

u(t) = ea(t-to)uo + i t ea(t-s) /(s) ds


to

solves
solves
du
dt - au = /(t),
u(to ) = Uo·
8. Solve
8. Solve the
the following IVPs:
following IVPs:

(a)

du
dt = 2u - 0.1,
u(O) = 1.0

(b)

du
dt = -2u + O.lt,
u(O) = 0

(c)
du
dt +u = t,
u(O) = 0

9. Find the solution


9. solution to the
the IVP
~u
dt 2 + 4u = 1,
u(o) = 0,
du
dt (0) = O.
4.3. Linear systems with constant coefficients 91
91

10. Find the


10. the solution
solution to the IVP
IVP
d2 u
dt 2 + 9u = t,
u(O) = 0,
du(O) = O.
dt
11. Find
11. Find the solution to
the solution to the
the IVP
IVP
d2 u -t
dt 2 +u = e ,
= 1,
u(O)
du(O) = O.
dt
12. Use
12. Use the
the techniques
techniques of of Section
Section 4.2.1
4.2.1 to
to derive
derive the
the solution
solution to (4.8), and
to (4.8), verify
and verify
that
that you
you obtain (4.10). (Hint:
obtain (4.10). (Hint: One
One way way to to do this is
do this to write
is to write the general
the general
solution of
solution of the
the ODE
ODE as u(t) = c\
as u(t) Cl cos (9t] +
cos (Ot) + C2 sin (Ot) and
02 sin and then solve for
then solve for Cl
c\
and C2-
C2. If you do this, you will then have to apply trigonometric identities identities
to put the solution in the form given in (4.10). It is simpler to recognize
at the beginning that the general solution could just as well be written as
u(t) = Cl
u(t) ci cos t0})++C2c2sin
(0(t -- to))
cos (O(t sin(O(t
(0(t- -to)).)
t0)).)

4.3 Linear systems with constant coefficients


coefficients
We now consider
We now consider aa first-order
first-order linear system of
linear system of ODEs with constant
ODEs with coefficients.
constant coefficients.
Such aa system
Such system can
can be written
be written
dXl
dt = anXl + a12 X2 + ... + alnXn + /1 (t),
dX2
dt = a21 Xl + a22 x 2 + ... + a2n Xn + h(t), (4.15)

dX n
(it = anlXl + an2X2 + ... + annXn + fn(t).

As with
As with aa linear
linear algebraic
algebraic system, there is
system, there is aa great
great advantage
advantage in
in using matrix-vector
using matrix-vector
notation. System
notation. System (4.15)
(4.15) can be written as
dx
- =Ax+f(t), (4.16)
dt
where
an a12 al n

A=
a21 a22 a2n
.
1, x(t) = [ X2(t)
x,(t) 1
. , f(t) =
[ h(t)
j,(t) 1
. .
anl an2 a~n xn·(t) fn·(t)
92 Essential ordinary differential equations
Chapter 4. Essential

Although it
Although it is
is possible
possible to to develop
develop aa solution
solution technique
technique that
that is
is applicable
applicable for
for any
any
matrix
matrix A AE R n x n , it
€ Rnxn, it is
is sufficient
sufficient for
for our
our purposes
purposes toto discuss
discuss the
the case
case in
in which there
whkl1 there
is aa basis
is basis for
for R Rnn consisting
consisting of of eigenvectors
eigenvectors of of A,
A, notably
notably the
the case
case in
in which
which AA is
is
symmetric. In
symmetric. In this
this case,
case, we can develop
we can develop aa spectral much like
spectral method, much like the spectral
the spectral
15
method
method forfor solving
solving Ax Ax = = bb in
in the case that
the case that AA is
is symmetric.
symmetric.15
As we
As develop an
we develop an explicit
explicit solution
solution for
for (4.16),
(4.16), the
the reader should concentrate
reader should concentrate onon
the qualitative
the qualitative properties
properties (of(of the
the solution)
solution) that
that are
are revealed.
revealed. These
These properties turn
properties turn
out to
out to be
be more
more important
important (at (at least
least in
in this
this book)
book) than
than the
the formula
formula for the solution.
for the solution.

4.3.1
4.3.1 Homogeneous systems
Homogeneous systems
We begin
We begin with the homogeneous
with the version of
homogeneous version of (4.16),
(4.16),
dx
dt = Ax. (4.17)

We will
We look for
will look for solutions
solutions to
to (4.16)
(4.16) of
of the
the special
special form
form
x(t) = a(t)u,
where uf:.O
where u ^ 0 is
is aa constant
constant vector.
vector. We
We have
have
dx da
x(t) = a(t)u, dt = Ax => dt u = aAu.
This last
This last equation
equation states
states that two vectors
that two vectors are
are equal,
equal, which
which means
means that
that Au
Au must
must
be
be aa multiple
multiple of
of uu (otherwise,
(otherwise, the
the two
two vectors
vectors would
would point in different
point in different directions,
directions,
which is
which is not possible if
not possible if they
they are
are equal).
equal). Therefore,
Therefore, uu must
must be
be an
an eigenvector
eigenvector of
of A:
A:
Au=)"u.
We
We then obtain
then obtain
da = ),,0: => a(t) = Ce),(t-to)
dt '
where C
where is aa constant.
C is constant. Therefore,
Therefore, if
if )",
A,uu isis any
any eigenvalue-eigenvector
eigenvalue-eigenvector pair,
pair, then
then
x(t) = e),(t-to)u
is aa solution
is solution of
of (4.17).
(4.17).

Example 4.5.
Example 4.5. Let
Let

A = ~ [-: -: ! ].
6 1 4-5
eigenvalues of
Then the eigenvalues of A
A are \i =
are),,1 0, A2
= 0, = -1,
),,2 = —1, and),,3
and AS == -2,
—2, and the corresponding
corresponding
eigenvectors are

15
See Section
15See Section 3.5.3.
3.5.3.
4.3. Linear
4.3. Linear systems
systems with constant coefficients
with constant coefficients 93

We therefore
We therefore know three independent
know three independent solutions
solutions of
of

dx
dt = Ax,
namely,
namely,

X1(t)=U1,
X2(t) = e-(t-t O )U2,
X3(t) = e- 2 (t-t O)U3.

If,
If, as in the previous example, there is a basis for R
previous example, R nn consisting of eigenvectors
{ui, U2,
{U1' u 2 , ...
. . . ,, u n} of
un} of A,
A, with corresponding eigenvalues
with corresponding eigenvalues AI,
AI, A 2,..., A
A2,"" n , then
An, we can
then we can
write
write the
the general
general solution of (4.17). Indeed,
solution of Indeed, it
it suffices
suffices to show that
to show that wewe can
can solve
solve

dx -A (4.18)
dt - x,
x(to) = Xo·
n
Since {U
Since {ui,
1, 112,..., un} is
U2, ... , Un} is aa basis
basis for Rn,
for R , there exists aa vector
there exists vector cc G Rn such
ERn such that
that

The solution to
The solution to (4.18) is then
is then

(4.19)

This is verified by computing dx/ dt:

~~ (t) = cIAle A1 (t-t o)UI + c2A2eA2(t-to)U2 + ... + CnAneAn(t-to)un


= cle),dt-to) AUI + c2e),2(t-t O) AU2 + ... + cne),n(t-t o) AUn

= A (C1e),1(t-to)U1 + c2e A2 (t-t o )U2 + ... + CneAn(t-tO)un)


= Ax(t).

We also have
We also have

by construction.
by construction.

Example
Example 4.6. Let A
4.6. Let A be
be the matrix
matrix in
in Example 4.5,
4-5, and let
94 Chapter 4. Essential
Essential ordinary differential equations
ordinary differential equations

Since the
Since basis of
the basis of eigenvectors {111,112,113}
eigenvectors {Ul, U2, U3} o/A is orthonormal,
of A is orthonormal, as
as is
is easily checked,
easily checked,
we have
we have

We can then immediately write down the


We the solution to
to
dx
-=Ax,
dt
x(O) = xo.

It is
is

If, as
as in
in the
the previous
previous example,
example, A
A is symmetric, then
is symmetric, then the
the eigenvectors
eigenvectors

{ui,u 2 ,...,u n }

can be
can be chosen
chosen toto be
be orthonormal,
orthonormal, in in which
which case
case it is particularly
it is simple to
particularly simple compute
to compute
the
the coefficient ci,C2,..
coefficient Cl, C2, ...- ,,c expressing Xo
Cn expressing x0 in
in terms
terms of of the eigenvectors. We
the eigenvectors. obtain
We obtain
the following simple
the following simple formula
formula forfor the solution of
the solution of (4.18):
(4.18):
n
x(t) = 2)xo . ui)e"i(t-to)Ui.
i=l

We
We have
have derived
derived the solution to
the solution (4.18) in
to (4.18) in the case that
the case A has
that A has n linearly in-
n linearly in-
dependent eigenvectors.
dependent eigenvectors. We remark that
We remark that formula
formula (4.19)
(4.19) might
might involve
involve complex
complex
numbers
numbers if A A is
is not symmetric. However,
not symmetric. However, we we have
have aa complete
complete and satisfactory
and satisfactory
solution
solution in
in the case that
the case that AA is symmetric—there are
is symmetric-there are n linearly independent
n linearly independent eigen-
eigen-
vectors,
vectors, the eigenvalues are
the eigenvalues are guaranteed
guaranteed to to be
be real, and the
real, and basis of
the basis eigenvectors can
of eigenvectors can
be
be chosen
chosen toto be orthonormal.
be orthonormal.
We
We now
now discuss
discuss the significance of
the significance of solution
solution (4.19).
(4.19). The
The interpretation
interpretation is is very
very
simple: The
simple: solution to
The solution to (4.18)
(4.18) isis the sum of
the sum of nn components,
components, oneone inin each
each eigendirec-
eigendirec-
tion, and component
tion, and component ii isis

exponentioallyincreasing
• exponentially increasing(if yi > 0);
(if Ai 0);
exponentioallydecreasing
• exponentially decreasing(if(ifAiyi<< 0);
0); or
or
constant (if
• constant (if Ai
yi == 0).
0).
4.3. Linear systems with constant coefficients
coefficients 95
95

Moreover, the
Moreover, the rate
rate of
of increase
increase or
or decrease of
of each
each component
component is
is governed
governed by the
the
magnitude of
magnitude of the
the corresponding
corresponding eigenvalue.
eigenvalue.
We can therefore draw the following conclusions:
following conclusions:
1. If all of the
1. the eigenvalues of A are negative, then every solution x of (4.18)
satisfies
satisfies
Ilx(t)11 -t 0 as t -t 00.

2. If all of the eigenvalues of A are positive, then every solution x of (4.18)


(except the zero solution) satisfies

Ilx(t)11 -t 00 as t -t 00.

3. If any of the
the eigenvalues of A is positive, then, for most initial values XQ, the
xo, the
solution x
solution of (4.18)
x of satisfies
(4.18) satisfies

Ilx(t)11 -t 00 as t -t 00.

The only statement which requires justification is the third. Suppose an eigenvalue
Aj of
\j A is
of A is positive,
positive, andand suppose
suppose AA has
has k linearly
linearly independent
independent eigenvectors
eigenvectors corre-
corre-
sponding to
sponding Aj. Then,
to \j. unless XQ
Then, unless lies in
Xo lies in the (n -— kk)-dimensional
the (n subspace of
)-dimensional subspace Rnn
of R
spanned by the other n -— kk eigenvectors, the solution x of (4.18) will contain a
Aj
factor of eeAj(t-t
(*~*°), the
O ), guaranteeing the

||x(£)|| —> 00
Ilx(t)ll-t oo as
as tt —> oo.
-t 00.

Even if kk == 1,
1, an (n — Rnn is a very small part of Rn
fc)-dimensional subspace of R
- k)-dimensional Rn
3
(comparable to a plane or a line in R3).
R ). Therefore, most initial vectors do not lie
in this subspace.

Example
Example 4.7.
4.7. Let
Let

Jl
1
-1
1
Then the
Then the eigenvalues
eigenvalues of
of A are AI
A are Al = 1,
1, A2 = -1,
A2 = —1, and A3 = -2,
and \s —2, and
and the
the corresponding
corresponding
eigenvectors are
eigenvectors are

The solution
The of (4.18)
solution of (4-18) is
is

where
where
96 Essential ordinary differential equations
Chapter 4. Essential

only initial values that lead to a solution x that does not


The only not grow without bound
are
are
Xo E S = span{U2' U3}.
But
But S is
is aa plane, which is
plane, which is aa very small part
very small of Euclidean
part of 3-space. Thus
Euclidean 3-space. Thus almost
almost
every initial
every initial value leads
leads to
to a solution
solution that grows exponentially.
exponentially.

Another
Another conclusion
conclusion that
that we can draw
we can draw is
is somewhat
somewhat more
more subtle
subtle than those
than those
given above,
given above, but it will
but it will be
be important
important in
in Chapter
Chapter 6.
6.

4. If
4. If A
A has eigenvalues of
has eigenvalues of very different magnitudes,
very different magnitudes, then solutions of
then solutions of (4.18) have
(4.18) have
components whose
whose magnitudes change at very different
different rates. Such solutions
can be difficult
difficult to compute efficiently
efficiently using numerical methods.
methods.
We will
We will discuss
discuss this
this point
point in
in more
more detail
detail in
in Section
Section 4.5.
4.5.

4.3.2
4.3.2 In homogeneous systems
Inhomogeneous systems and
and variation of parameters
variation of parameters
We can now explain how to solve the inhomogeneous
inhomogeneous system
system
dxdt = Ax + f(t), (4.20)

again only considering the case in which Rn consisting of eigen-


which there is a basis of Rn
vectors of A. The method is a spectral method, and the reader may wish to review
Section 3.5.3.
Section 3.5.3.
If {Ul'
If {ui, U2,
u 2 ,...,
... , u n} is a basis for
un} R nn,, then every vector in R
for R R nn can be written
uniquely as a linear combination of these vectors. In particular, for each t, £, we
we can
write f(t) as aa linear
write linear combination
combination of ui, 112,...,
Ul, U2, ... , u n:
Un:

Of course,
Of course, since
since the vector f(t)
the vector f (t) depends
depends on
on £, so do
t, so do the
the weights
weights Cl (£), C2(t),
c\ (t), C2(t),..., cn(t).
... ,en(t).
These weights can be computed explicitly from f, f, which of course is considered to
be known.
be
We can also write the solution of (4.20) in terms of thethe basis vectors:

(4.21)

x(£) is unknown,
Since x(t) unknown, so areare the
the weights al(t),a2(t),
ai(i),«2(*), ...
• • • ,a,
,ann(t). However,
However, when
these basis vectors are eigenvectors of A, it is easy to solve for the unknown
unknown weights.
Indeed, substituting (4.21)
Indeed, substituting (4.21) in
in place
place of
of x
x yields
yields

dxdt d[n
- - A x = - "'a·u-
dt~"
1-A (n"'a-u-
~ ••
)
i=l i=l
n d n
= L ~Ui - LaiAui
i=l dt i=l
4.3. Linear systems with constant coefficients
Linear 97

The ODE
The ODE
dx
- - Ax
dt
= f(t)
then implies that
then implies that
n
'"'
L...J
{d~
dt - A·a·
} ~ ~ U·~
n
L...J c·(t)u·
= '"' ~ ~,
i=1 i=1

which can only


which can only hold
hold if
if

~i _ Aiai = Ci(t), i = 1,2, ... ,no (4.22)

Thus, by
Thus, by representing
representing the
the solution
solution in in terms
terms of of the
the eigenvectors,
eigenvectors, we
we reduced
reduced the
the
system of
system of ODEs
ODEs to to nn scalar
scalar ODEs
ODEs that that can can be independently.16 The
solved independently.16
be solved The com-
com-
putation of
putation of the
the functions
functions C1ci(£), C 2(t),
(t), C2 . . . ,, C
( t ) ,... cnn(t) is simplest
(t) is simplest when
when A is symmetric,
A is symmetric, so
so
that the
that the eigenvectors can be
eigenvectors can be chosen
chosen to to be be orthonormal.
orthonormal. In In that case,
that case,

Ci(t) = f(t) . Ui, i = 1,2, ... ,n.

We will
We will concentrate
concentrate on on this case henceforth.
this case henceforth.
The initial
The initial condition
condition x(£ 0) =
x(to) = Xo
x0 provides
provides initial
initial values
values for
for the
the unknowns
unknowns
ai(t],a-2,(t},...
a1 (t), a2(t), ... ,a Indeed, we
n(t}. Indeed,
, an(t). we can
can write
write

so x(£
so 0) =
x(to) = Xo
XQ implies
implies that
that

or
or
ai(to) = bi , i = 1,2, ... ,no
When the basis is orthonormal, the coefficients
coefficients b&1i ,, &b22 ,j .••
- - - >, &bnn can be computed in
the usual
the usual way:
way:
bi = Xo . Ui, i = 1,2, ... ,n.

Example 4.8.
Example 4.8. Consider
Consider the
the IVP
IVP
dx
= Ax + f(t),
dt
x(O) = 0,
16
This is
16This is just
just what
what happened in the
happened in spectral method
the spectral method for
for solving
solving Ax
Ax == b—the system of
b-the system of nn
simultaneous equations
simultaneous equations was
was reduced to nn independent
reduced to independent equations.
equations.
98
98 Chapter
Chapter 4. Essential ordinary
ordinary differential equations
equations

where
A= [11 1]
l'
f(t) = [ C?S (t)
sm (t)
] .
2
The matrix A is symmetric, and an orthonormal basis for R
R2 consists of the vectors
consists of vectors

U1 = [ _;, l' U2 = [ ; , l·
The corresponding
corresponding eigenvalues are
are \i
A1 = 0, X%
= 0, = 2.
A2 = 2.
We now express f(t) in terms of
express f(t) of the eigenvectors:
f(t) = Cl(t)Ul + C2(t)U2,
1 .
Cl(t) = f(t) . U1 = J2(cos (t) - sm (t)),
1 .
C2(t) = f(t) . U2 = J2(cos (t) + sm (t)).
The solution is

where
dal 1 .
dt = J2 (cos (t) - sm (t)), a1(0) = 0,
da2 1 .
dt = 2a2 + J2 (cos (t) + sm (t)) , a2(0) = O.

We obtain
obtain
1
aI(t) = J2 it
0 {CDS(S) -sines)} ds

= ~ (sin (t) + cos (t) - 1)

and

a2(t) = J2
1 it
0 e2(t-s) {cos (s) + sin (s)} ds
1 .
= 5y2 2t
In (3e - 3cos(t) - sm(t)).

Finally,
/0 (2cos(t) +4sin(t) +3e 2t -5) 1
x(t) = a1 (t)U1 + a2(t)u2 = [ 110 (-8 cos (t) _ 6 sin (t) + 3e2t + 5) .

The technique
The technique for solving (4.20)
for solving (4.20) presented in this
presented in this section,
section, which
which we
we have
have
described as aa spectral
described as spectral method,
method, isis usually
usually referred
referred to as the
to as the method
method ofof variation of
of
parameters.
4.3. Linear systems with constant
constant coefficients 99

Exercises
1. Consider
1. Consider the
the IVP
IVP (4.18),
(4.18), where
where A
A is
is the
the matrix
matrix in
in Example
Example 4.5.
4.5. Find the
Find the
solution for
solution for

2.
2. Consider
Consider the
the IVP
IVP (4.18),
(4.18), where
where A
A is
is the
the matrix
matrix in
in Example 4.5.
Example 4.5.

(a)
(a) Explain
Explain why,
why, no
no matter
matter what
what the
the value
value of
of x 0 , the
xo, the solution
solution x(£)
x(t) converges
converges
to
to aa constant
constant vector
vector as -+ oo.
as tt —> 00.

(b)
(b) Find
Find all
all values
values of
of x Xo0 such
such that
that the solution x
the solution x is
is equal to aa constant
equal to vector
constant vector
for
for all
all values
values of
of t.t.

3.
3. Find
Find the
the general
general solution to
solution to
dx
dt = Ax,

where
where

A=[~ ~].
4.
4. Find
Find the
the general
general solution
solution to
to
dx
dt = Ax,

where
where

5.
5. Let
Let A
A be
be the
the matrix
matrix in
in Exercise
Exercise 3.
3. Find
Find all
all values of XQ
values of Xo such
such that
that the solution
the solution
to (4.18) decays exponentially
exponentially to zero.

6.
6. Let
Let A
A be
be the
the matrix
matrix in
in Exercise
Exercise 4.
4. Find
Find all
all values
values of
of XQ
Xo such
such that
that the
the solution
solution
to
to (4.18) decays exponentially
(4.18) decays exponentially to
to zero.
zero.

7.
7. Let
Let A
A be
be the
the matrix
matrix of
of Example
Example 4.5.
4.5. Solve
Solve the IVP
the IVP

dx
dt = Ax + ret),
x(O) = 0,

where
where

ret) = [ ~
sin (t)
l.
100
100 Chapter 4. Essential
Essential ordinary differential equations

8. Let
8. Let
-4
2
2
-4 -4 -4] .
-4 -4 2
Solve the
Solve the IVP
IVP
dx
dt = Ax + f(t),
x(o) = xo,
where
where
COS (t) ] [ 1]
f(t) = 1 , Xo = 1 .
[
sin (t) 1
9. The
9. The following system has
following system has been
been proposed as aa model
proposed as model of
of the
the population dynam-
population dynam-
ics of
ics of two species of
two species of animals
animals that compete for
that compete for the
the same
same resource:
resource:
dx
dt = ax - by, x(O) = Xo,
~~ = -ex + dy, y(O) = yo.

Here o,
Here 6, e,
a, b, c, dd are
are positive constants, x(t]
positive constants, is the
x(t) is the population
population ofof the
the first species
first species
at time
at time t,£, and
and y(t] is the
yet) is corresponding population
the corresponding population ofof the
the second
second species
species
and yy are
(x and
(x are measured
measured in in some
some convenient
convenient units, say thousands
units, say thousands or or millions
millions
of
of animals).
animals). The The equations
equations areare easy
easy to
to understand:
understand: either
either species increases
species increases
(exponentially)
(exponentially) if if the other is
the other not present,
is not present, but,
but, since the two
since the two species compete
species compete
for
for the
the same resources, the
same resources, the presence
presence of one species
of one species contributes negatively to
contributes negatively to
the growth rate
the growth of the
rate of the other.
other.
(a) Solve the
(a) Solve the IVP with 6b =
IVP with = ec == 2, o=
2, a = dd == l1,, x(0)
x(O) == 2,2, and yeO) =
and j/(0) = 1,
1, and
and
explain (in
explain (in words)
words) what
what happens
happens to to the
the populations
populations of of the
the two
two species
species
in the
in long term.
the long term.
(b) With the
(b) With the values
values of
of a,
a, 6, c, dd given
b, e, given in
in part 9a, is
part 9a, is there
there an
an initial
initial condition
condition
which will
which will lead
lead to
to aa different
different (qualitative) outcome?
(qualitative) outcome?
10. The
10. The purpose of this
purpose of exercise is
this exercise to derive
is to derive the solution (4.11)
the solution (4.11) of
of the IVP
the IVP
J2u 2
dt 2 + B u = J(t),
u(to) = 0, (4.23)
du
dt (to) = o.
The solution
The solution
u(t) =~ rt sin (B(t - 8»J(8) d8
ito
can be
can be found
found using
using the
the techniques of this
techniques of this section,
section, although
although the computations
the computations
are more
are more difficult
difficult than any of
than any of the
the examples
examples wewe have presented.
have presented.
4.4. Numerical methods
methods for initial value problems 101
101

(a)
(a) Rewrite (4.23) in
Rewrite (4.23) in the form
the form
dx
dt = Ax + F(t), x(to) = O.
Notice that the matrix
matrix A is not symmetric.
(b)
(b) Find
Find the
the eigenvalues
eigenvalues AI,
Al, A2
A2 and
and eigenvectors
eigenvectors Ui,u of A.
Ul, U22 of A.
(c)
(c) Write
Write the
the vector-valued
vector-valued function
function F(t) in
in the form
the form
F(t) = Cl(t)Ul +C2(t)U2.
Since the
Since the eigenvectors
eigenvectors uiUl and
and u are not
2 are
U2 not orthogonal,
orthogonal, this
this will require
will require
solving aa (2
solving (2 xx 2)
2) system
system of equations to
of equations to find c\ (t} and
find Cl(t) c2 (t).
and C2(t).
(d) Write
(d) Write the
the solution
solution in
in the form
the form
x(t) = al(t)ul + a2(t)u2,
and solve
and solve the scalar IVPs
the scalar IVPs to get ai
to get a2 (t}.
(t}, a2(t).
al(t),
(e) The desired
(e) The desired solution
solution is u(t) = xi(t).
is u(t] Show that
Xl(t). Show that the
the result is (4.11).
result is (4.11).

4.4 methods for initial value problems


Numerical methods problems
So far
So far in
in this
this chapter,
chapter, we we have
have discussed simple classes
discussed simple classes ofof ODEs,
ODEs, for for which
which itit is
is
possible to produce an explicit formula for the solution. However, However, most differential
differential
equations
equations cannot
cannot be be solved
solved inin this sense. Moreover,
this sense. sometimes the
Moreover, sometimes the only
only formula
formula that
that
can be found is difficult
difficult to evaluate, involving integrals that cannot cannot be computed in
terms of elementary functions,
functions, eigenvalues and eigenvectors that cannot cannot be found
exactly,
exactly, and
and soso forth.
forth.
In cases
In cases like
like these,
these, itit may
may bebe that
that the
the only
only way
way to to investigate
investigate the
the solution
solution is to
is to
approximate
approximate it it using
using aa numerical method,method, which
which isis simply
simply anan algorithm
algorithm producing
producing
an approximate
an solution. We
approximate solution. We emphasize
emphasize thatthat the
the use
use ofof aa numerical
numerical method
method always
always
implies
implies that
that the
the computed solution will
computed solution will be
be in
in error.
error. ItIt is
is essential
essential toto know something
know something
about
about the
the magnitude
magnitude of of this error; otherwise,
this error; otherwise, one
one cannot
cannot use use the
the solution
solution with
with any
any
confidence.
confidence.
Most numerical methods for IVPs in ODEs are designed for first-order first-order scalar
equations. These can be applied, almost almost without change, to first-order systems, and
hence
hence to
to higher-order
higher-order ODEsODEs (after
(after they
they have
have been
been converted
converted to first-order systems).
to first-order systems).
Therefore, we begin by discussing the the general first-order
first-order scalar
scalar IVP, which is of of the
the
form
form
du
dt = !(t, u), u(to) = Uo· (4.24)
We shall discuss time-stepping methods, which seek seek to find approximations
approximations toto
n(ti),^(£2),
U(tl), • • • ,u(t
U(t2),"., u(tnn},), where
where to < titl < t^ • • • < ttnn define
t2 < ... define the grid. The
the grid. quantities
The quantities
ti —
it to,t2
- to, t2 -— ti,..., tn-i are
tl,···, ttnn -— tn-l are called
called the
the time steps.
The
The basic
basic idea
idea of
of time-stepping
time-stepping methods
methods is is based
based onon the
the fundamental theorem
fundamental theorem
of calculus, which implies that if if
du
dt (t) = !(t,u(t)),
102 Chapter 4. Essential
Chapter Essential ordinary
ordinary differential equations
equations

then
then
(4.25)

Now, we cannot (in general) hope to evaluate


we cannot evaluate the integral
integral in (4.25)
(4.25) analytically;
analytically;
however, any numerical method for approximating the value of a definite integral
(such methods are often
often referred to as quadrature
quadrature rules) can be adapted to form the
basis of a numerical method of IVPs. By the way,way, equation (4.25) explains why the
process of
process of solving
solving an
an IVP
IVP numerically
numerically is
is often referred to
often referred to as
as integrating the ODE.
integrating the ODE.

4.4.1 Euler's method


Euler's
simplest method of integrating
The simplest integrating an ODE is based
based on the left-endpoint
left-endpoint rule:
rule:

lb f(x) dx == f(a)(b - a).

Applying this to (4.25), we obtain


(4.25), we obtain
(4.26)
course, this is not a computable formula, because, except possibly on the first
Of course,
step (i = 0), we
we do not know U(ti)
u(ti) exactly. Instead, we
we have an approximation,
approximation,
Ui ==
Ui = U(ti)' Formula (4.26)
u(ti). Formula (4.26) suggests
suggests how
how to
to obtain
obtain an
an approximation
approximation Ui+1 to U(ti+1):
m+\ to u(ti+i):
(4.27)
The reader should notice that (except for ii == 0) 0) there are two sources of error in
the estimate
the estimate UHl.
MJ+I. First
First of
of all,
all, there
there is
is the
the error
error inherent
inherent in
in using formula (4.26)
using formula (4.26) to
to
advance the integration by one time step. Second, Second, there is the accumulated error
due to
due to the
the fact
fact that
that we do not know
we do know u(
u(ti] in (4.26),
ti) in (4.26), but
but rather
rather only
only an
an approximation
approximation
to it.
to it.
The method (4.27) is referred to as Euler's
Euler's method.
method.

Example 4.9.
Example 4.9. Consider
Consider the
the IVP
IVP
du u
dt I + t2' u(O) = 1. (4.28)

The exact
The exact solution
solution is
is 1
u(t) = etan - t,
and we
and we can
can use
use this
this formula to determine
formula to determine the
the errors
errors in
in the
the computed
computed approximation
approximation
to u(t).
to u(t). Applying
Applying Euler's method with
Euler's method with the
the regular
regular grid t{ = iLlt,
grid ti Llt = lOin,
iAt, Ai 10/n, we
we
have
have
4.4. Numerical
4.4. Numerical methods
methods for
for initial value problems
initial value problems 103
103

For example, with


For example, UQ = 11 and
with Uo and nn =
= 100,
100, we
we obtain
obtain

Ul ~ 1.1000, U2 ~ 1.2089, U3 ~ 1.3252, ....

In
In Figure
Figure 4-1, we graph
4.1, we graph thethe exact
exact solution
solution and the approximations
and the computed using
approximations computed using
Euler's
Euler's method
method for for nn = 10,20,40. As
= 10,20,40. As wewe should expect, the
should expect, the approximation
approximation produced
produced
by
by Euler's
Euler's method
method gets
gets better as At
better as (the time
IJ..t (the time step) decreases. In
step) decreases. In fact, Table 4-1,
fact, Table 4.1,
where we
where collect the
we collect the errors
errors inin the
the approximations
approximations to w(10), suggests
to u(10), that the
suggests that the global
global
error (which comprises
error (which comprises the the total
total error
error after
after aa number
number ofof steps) is O(At).
steps) is The symbol
O(lJ..t). The symbol
0(At) ("big-oh
O(lJ..t) ("big-oh of of At")
IJ..t") denotes
denotes aa quantity that is
quantity that is proportional
proportional to or smaller
to or than
smaller than
At as
IJ..t as At
IJ..t ~ 0.
->• O.

5~------~-------r------~--------~------,
o
4.5 o ~. I!. ~ .
~ ".!,. '! . . . . .

4 , ..
~. I! . . . .

3.5

:::J 3

2.5

2
- exact
o n=10
It n=20
n=40
2 4 6 8 10

Figure 4.1.
Figure 4.1. Euler's
Euler's method
method applied
applied to (4-28).
to (4.28).

Proving that the


Proving that of Euler's
order of
the order Euler's method
method is is really O(At) is
really O(lJ..t) is beyond
beyond thethe scope
scope
of
of this
this book,
book, but
but we can easily
we can sketch the
easily sketch the essential ideas of
essential ideas of the
the proof.
proof. ItIt can
can be be
proved that
proved that the
the left-endpoint
left-endpoint rule, applied to
rule, applied to an
an interval of integration
interval of integration of of length
length
At, has an
IJ..t, has an error
error that
that is 0(lJ..t 22 ).
is O(At ). In integrating an
In integrating IVP, we
an IVP, we apply
apply the left-endpoint
the left-endpoint
rule repeatedly,
rule repeatedly, in fact, nn =
in fact, = 0(l/At)
0(1/ IJ..t) times.
times. Adding
Adding up I/At
up 1/ errors of
IJ..t errors of order
order At IJ..t 22
gives aa total
gives error of
total error of O(lJ..t).
0(At). (Proving
(Proving that that this
this heuristic
heuristic reasoning
reasoning is is correct
correct takes
takes
some
some rather involved but
rather involved elementary analysis
but elementary analysis that
that can
can be found in
be found in most
most numerical
numerical
analysis textbooks.)
analysis textbooks.)
104
104 ordinary differential
Chapter 4. Essential ordinary differential equations
equations

n
n Error in
Error in u(10)
w(10) Error in
Error in u(10)
w(io)
At
At

10
10 -3.3384.10- 11
-3.3384 • 1Q- 1Q-11
-3.3384 • 10-
-3.3384.
20 -1.8507 -KT 11
-1.8507.10- -3.7014 -10-11
-3.7014.10-
40 -1.0054 -HT 11
-1.0054.10- -4.0218 -HT
-4.0218. 10- 11
80
80 -5.2790· 1Q-22
-5.2790 • 10- HT11
-4.2232 .- 10-
160 -2.7111 -1Q-22
-2.7111.10- -4.3378. lO"11
-4.3378 • 10-
320 -1.3748 -HT 22
-1.3748.10- -4.3992. 1Q-11
-4.3992 • 10-
640 10~33
-6.9235 .• 10- 1Q-11
-4.4310 .• 10-

Table 4.1.
Table Global error
4.1. Global error in
in Euler's method for
Euler's method (4-28).
for (4.28).

4.4.2
4.4.2 on Euler's method: Runge-Kutta methods
Improving on
If the
If the results
results suggested
suggested in in the
the previous
previous section
section are
are correct,
correct, Euler's
Euler's method can
method can
be used
be used to
to approximate
approximate the solution to
the solution to an IVP to
an IVP to any
any desired
desired accuracy
accuracy byby simply
simply
making At small
making tlt small enough.
enough. Although
Although this is true
this is true (with
(with certain
certain restrictions),
restrictions), we
we might
might
hope for aa more
hope for more efficient
efficient method-one
method—one that would not
that would not require
require asas many time steps
many time steps
to achieve aa given
to achieve given accuracy.
accuracy.
To improve
To improve Euler's
Euler's method,
method, we we choose
choose aa numerical
numerical integration
integration technique
technique that
that
is more
is accurate than
more accurate the left-endpoint
than the left-endpoint rule.
rule. The
The simplest
simplest is
is the
the midpoint
midpoint rule:
rule:

lar
b
(a+b)
f(x) dx == (b - a)f -2- .

If At =
If tlt = bb -— aa (and
(and the
the integrand
integrand f/ is
is sufficiently
sufficiently smooth),
smooth), then the error
then the error inin the
the
midpoint rule
midpoint rule is O(A£33).
is O(tlt Following the
). Following reasoning in
the reasoning in the previous section,
the previous section, we expect
we expect
that
that the corresponding method
the corresponding method forfor integrating
integrating an an IVP
IVP would
would have O(A£22 )) global
have O(tlt global
error.
error.
It is
It is not
not immediately
immediately clear
clear how
how to
to use the midpoint
use the midpoint rule for quadrature
rule for quadrature to to
integrate an
integrate an IVP.
IVP. The
The obvious
obvious equation
equation is is

However, after
However, after reaching time ti
reaching time in the
ti in integration, we
the integration, we have an approximation
have an approximation forfor
but none
u(ti), but
U(ti), none for u(ti + A£/2).
for U(ti tlt/2). To use the
To use the midpoint
midpoint rule requires that
rule requires that we
we first
first
generate an
generate an approximation
approximation for u(ti + tlt/2);
for U(ti Ai/2); the
the simplest
simplest way
way to
to do
do this is with
this is an
with an
Euler step:
Euler step:
U (ti + ~t) == u (ti) + ~t f (ti,U (ti)).

Putting this
Putting this approximation
approximation together
together with
with the
the midpoint
midpoint rule,
rule, and
and using
using the
the approx-
approx-
imation Ui
imation Ui ==
= U(ti), we obtain
u(ti), we obtain the improved Euler
the improved method:
Euler method:
4.4. Numerical methods for initial value problems 105
105

nn Error in
Error in u(10)
it (10) Error in
Error in2 u(lO)
«(io)
At 2
lJ.t

10
10 -2.1629 • 10~22
-2.1629.10- -2.1629-1Q-22
-2.1629.10-
20
20 10- 22
-1.2535 .-Mr -5.0140 -1Q-22
-5.0140.10-
40
40 1Q-333
-4.7603 .• 10- -7.6165 -1Q-22
-7.6165.10-
80
80 -1.4746 -nr 43
-1.4746.10- -9.4376. 10~22
-9.4376 • 10-
160
160 -4.1061 .• 10-4
-4.1061 10~ -10.512 -1Q-22
-10.512.10-
320
320 10-4
-1.0835 .• 10-4 -11.095 -i(r 222
-11.095.10-
640
640 -2.7828 • 10~55
-2.7828.10- -11.398 -10- 2
-11.398.10-

Table 4.2.
Table 4.2. Global
Global error
error in
in the
the improved
improved Euler
Euler method
method for (4-28).
for (4.28).

Figure 4.2
Figure 4.2 shows
shows the
the results of the
results of the improved
improved Euler
Euler method,
method, applied
applied to
to (4.28)
(4.28) with
with
n = 10, n = 20,
— 10, and n = 40.
20, and 40. The
The improvement
improvement in in accuracy
accuracy can
can be
be easily
easily seen
seen by
by
comparing to
comparing to Figure 4.1. We
Figure 4.1. can see
We can see the O(At2) convergence
the O(~t2) convergence inin Table 4.2—when
Table 4.2-when
At is
~t is divided
divided by
by two
two (Le.
(i.e.nnisisdoubled),
doubled),the
theerror
errorisisdivided
dividedby
byapproximately
approximately four.
four.

4.5~------~-------r------~--------r-----~

- exact
o n=10
• n=20
n=40

8 10

Figure 4.2.
Figure 4.2. Improved
Improved Euler method applied
Euler method applied to
to (4.28).
(4-28).

The improved
The improved Euler
Euler method
method is
is aa simple
simple example
example of
of aa Runge-Kutta
Runge-Kutta (RK)
(RK)
106 Chapter 4.
Chapter 4. Essential
Essential ordinary
ordinary differential
differential equations
equations

method. An (explicit)
method. An (explicit) RK
RK method
method takes the following
takes the following form:
form:
m

ui+1 = Ui + D.t L (}:jkj ,


j=l

kl = 1 (ti' Ui) ,
k2 = 1 (ti + 'Y2D.t, Ui + f321D.tkl) '
k3 = 1 (ti + 'Y3D.t, Ui + f331D.tk l + f332D.tk2) , (4.29)

km = 1 (ti + 'YmD.t,ui + ~ f3mlD.tkl) ,

with certain restrictions on the values of the parameters


parameters (}:j,
ctj, PM, 7^ (e.g.
f3kl, and "0 a\ +
(e.g. (}:l
... +h (}:m
am = —1).
!)• Although (4.29) looks complicated, it is not hard to understand the the
idea. A general form for a quadrature rule is

where WI,
wi,W2,.--, wmm are the quadrature
W2, ... ,W quadrature weights and Xl,
xi, x%,..., G [a,
xmm E
X2, ... ,X [a, b] axe the
b) are
quadrature nodes.
quadrature nodes. InIn the
the formula
formula for
for Ui+l in (4.29),
Ui+i in (4.29), the
the weights are
weights are

and values
and values fci,
kl' £2, • • • ,,kkm
k2, ... are estimates
m are estimates of
of fI(t, ( t ) ) at
( t , uu(t)) at ra
m nodes in the
nodes in the interval
interval
[ti,ti
[ti' We will
+i]. We
ti+1)' will not
not use the general
use the general formula
formula (4.29),
(4.29), but
but the
the reader should ap-
reader should ap-
preciate the
preciate following point:
the following there are
point: there are many
many RK RK methods, obtained by
methods, obtained by choosing
choosing
various values for the parameters in (4.29). This fact is used in designing algo-
rithms that
rithms that attempt to to automatically control the the error. We We discuss
discuss this
this further
further in
Section 4.4.4
Section below.
4.4.4 below.
The most popular RK method is analogous to Simpson's rule for quadrature:

i b
I(x) dx == b ~ a(f(a) + 41 (a; b) + f(b)) .
Simpson's rule
Simpson's rule has
has an
an error
error of O(A£5)) (D.t
of O(D.t (At == bb -— a), and
and the
the following
following related
related
method for
method for integrating
integrating an
an IVP has global
global error
error of O(A£ 4 ):
of O(D.t4):
D.t
Ui+l = Ui +6 (k l + 2k2 + 2k3 + k4) ,
kl =f (ti' Ui) ,
D.t D.t)
k2 = 1 ( ti + 2' Ui + 2 kl , (4.30)

D.t D.t)
k3 = 1 ( ti + 2' Ui + 2 k2 ,
k4 = 1 (ti+l,Ui + D.tk 3).
4.4. Numerical methods
Numerical methods for initial value problems 107
107

n
n Error in
Error in u(10)
w(10) Error
Error in
in4 u(io)
u(10)
At4
.6.t

10 10~22
1.9941 .• 10- 10~22
1.9941 .• 10-
20 1.0614 -Hr
1.0614. 10-33 10~22
1.6982 .• 10-
40 10~55
6.5959 .• 10- 10~22
1.6885 • 10-
1.6885.
80 10~66
4.0108 .• 10- 10~22
1.6428 .• 10-
160 2.4500. 1Q-77
2.4500 • 10- 10-22
1.6057 -10-
1.6057.
320 10-88
1.5100 -l(r
1.5100. 10- 22
1.5833 .-10-
640 9.3654 • 10- 10
9.3654. 10 10- 22
1.5712 .-ID"

Table 4.3.
Table 4.3. Global error in the fourth-order Runge-Kutta method (RK4)
(RK4)
for (4.28).
for (4.28).

We call this the RK4 method. Figure 4.3 and Table 4.3 demonstrate
demonstrate the accuracy
of RK4;
of RK4; dividing
dividing A£
D..t by
by two
two decreases
decreases the error by
the error by (approximately)
(approximately) aa factor
factor of
of 16.
16.
This is
This is typical
typical for O(At 4 ) convergence.
for O(D..t4) convergence.

4.5r-------~-------r------~--------r_----__,

- exact
o n=10
.. n=20
n=40

8 10

Figure 4.3. Fourth-order


Figure Fourth-order Runge-Kutta
Runge-Kutta method (RK4)
(RK4) applied
applied to (4.28).
(4-28).

We
We must
must note
note here
here that
that the improvement in
the improvement in efficiency
efficiency of
of these
these higher-order
higher-order
methods is not as dramatic as it might appear
appear at first glance. For instance, com- com-
paring Tables 4.1
paring Tables and 4.3,
4.1 and 4.3, we
we notice
notice that
that just 10 steps
just 10 steps of
of RK4 gives aa smaller
RK4 gives smaller errorerror
than 160
than 160 steps
steps of
of Euler's
Euler's method. However, the
method. However, improvement in
the improvement in efficiency
efficiency is is not
not aa
factor of
factor of 16,
16, since
since 160
160 steps
steps of
of Euler's method use
Euler's method 160 evaluations
use 160 evaluations of
of ff(t, ) , while
( t , uu), while
108
108 Chapter 4. Essential
Essential ordinary
ordinary differential equations

10 steps
10 steps of
of RK4 use 40
RK4 use 40 evaluations
evaluations ofof ff(t,
( t , uu). In problems
) . In problems ofof realistic complexity,
realistic complexity,
the evaluation
the evaluation ofof ff(t,u)
( t , u ] is
is the most expensive
the most expensive part of the
part of calculation (often
the calculation (often /f isis
defined by
defined by aa computer simulation rather
computer simulation rather thanthan aa simple
simple algebraic
algebraic formula),
formula), andand so
so
aa more
more reasonable
reasonable comparison
comparison of of these
these results
results wouldwould conclude
conclude that
that RK4
RK4 isis 44 times
times
as efficient
as efficient as Euler's method
as Euler's method for for this
this particular
particular example
example and level of
and level of error.
error. Higher-
Higher-
order methods
order methods tend
tend to to use
use enough
enough fewer
fewer steps
steps thanthan lower-order
lower-order methods
methods that they
that they
are
are more efficient even
more efficient even though they require
though they require more more work
work per step.
per step.

4.4.3
4.4.3 Numerical methods for systems
systems of ODEs
The numerical
The numerical methods
methods presented above can
presented above be applied
can be applied directly
directly to
to aa system
system of
of
ordinary differential
ordinary differential equations.
equations. Indeed,
Indeed, when the system
when the system is
is written
written in
in vector
vector form,
form,
the notation
the notation is
is virtually identical. We
virtually identical. We now
now present an example.
present an example.

Example 4.10.
Example 4.10. Consider
Consider two species of
two species of animals
animals that share aa habitat,
that share and suppose
habitat, and suppose
one species
one species is
is prey
prey to
to the other. Let
the other. x\ (t)
Let Xl (t) be
be the
the population
population ofof the
the predator
predator species
species
at time
at time t, and let
t, and let X2(t) be the
X2(t) be the population
population of of the
the prey
prey at the same
at the time. The
same time. The Lotka-
Lotka-
Volterra predator-prey
Volterra model for
predator-prey model these two
for these two populations
populations is is
dXl
dt = e2 e l XI X2 - qXI,
dX2
dt = rX2 - elXIX2,

where ei,
where el, 62, #, rr are
e2, q, are positive
positive constants. The parameters
constants. The parameters have the following
have the interpre-
following interpre-
tations:
tations:

BI
• el describes the
describes attack rate
the attack rate of the predators
of the (the rate
predators (the at which
rate at which the
the prey
prey are
are
killed bv the
killed by the predators
vredators is
is elxlx2);
e^ x-\ x? );
• 62
e2 describes the growth
describes the rate of
growth rate the predator
of the predator population
population based
based on the number
on the number of
of
prey killed (the
prey killed (the efficiency of predators
efficiency of predators at converting predators
at converting to prey);
predators to prey);
• qq is
is the
the rate
rate at
at which
which the
the predators
predators die;
die;
• rr is
is the
the intrinsic
intrinsic growth
growth rate
rate of
of the
the prey population.
prey population.

The equations
The equations describe
describe thethe rate of population
rate of population growth (or decline)
growth (or decline) of
of each species.
each species.
The rate
The rate of
of change
change of of the
the predator
predator population
population isis the
the difference
difference between
between the rate of
the rate of
growth
growth due
due toto feeding
feeding on on the
the prey and the
prey and the rate
rate ofof death.
death. The The rate
rate ofof change
change of
of
the prey
the prey population
population is the difference
is the difference between
between the
the natural
natural growth rate (which
growth rate (which would
would
govern in the
govern in the absence
absence of of predators)
predators) and the death
and the rate due
death rate due toto predation.
predation.
2
Define ff :: R x R 2 -+
Define -» R22 byby

f(t,x) = [ e2 e l Xl X2 - qXl ]
rX2 - elXIX2

(f is
(f is actually
actually independent
independent ofof t;
t; however,
however, we include tt as
we include as an independent variable
an independent variable
so that
so that this
this example
example fits
fits into
into the
the general
general form
form discussed above). Then,
discussed above). Then, given initial
given initial
4.4. methods for initial value problems
Numerical methods 109
109

values #1,0
values and #2,0
Xl,O and of the
X2,O of the predator
predator and
and prey
prey populations,
populations, respectively, the IVP
respectively, the IVP of
of
interest is
interest is
dx
dt = f(t,x), (4.31)

x(O) = xo,

where
where
xo = [ Xl,O ] .
X2,O
Suppose
Suppose

e 0.01, e2
= 0.01,
ell = 0.2, rr == 0.2,
e2 == 0.2, 0.2, qq == 0.4,
0.4, Xl,O
XI,Q == 40, x2,o == 500.
40, X2,O 500.

usmg the
Using the RK4
RK4 method
method described
described above,
above, wewe estimated
estimated the
the solution
solution ofof (4.31)
(4-31) on
on the
the
time
time interval [0,50]. The
interval [0,50]. The implementation
implementation is is exactly
exactly as described in
as described in (4.30),
(4-30), except
except
that
that now the various
now the various quantities (lcj,Uj,f(tj,Ui)J
quantities (ki, Ui, f(ti' Ui)) are
are vectors. The time
vectors. The time step
step used
used was
was
Llt =
At = 0.05 (for aa total
0.05 (for total of
of 1000
1000 steps).
steps). InIn Figure 4.4, wwe
Figure 4-4> & plot
plot the
the two populations
two populations
versus time; this
versus time; this graph
graph suggests that both
suggests that both populations vary periodically.
populations vary periodically.

600
I "',
I
500 I

400 : I
c I I
0 I

~300
c.. I
I
I
0 I I
c.. I

I
200 I
I
I
,, I

,, I
, ,,
I

100 ,,
.. .. .. /

10 20 40 50

Figure 4.4.
Figure The variation
4.4. The of the
variation of the two
two populations
populations with time (Example
with time (Example 4.10).
4-10).

Another
Another wayway to
to visualize the results
visualize the is to
results is to graph
graph x^
X2 versus x\; such
versus Xl; such aa graph
graph
is meaningful
is meaningful because,
because, for
for anan autonomous
autonomous ODE ODE (one
(one in
in which
which tt does
does not appear
not appear
explicitly), the curve
explicitly), the curve (xi(t)jX^(t}} is determined
(Xl (t), X2 (t)) is determined entirely be the
entirely be the initial
initial value XQ (see
value xo (see
Exercise
Exercise 55 for
for aa precise
precise formulation
formulation of of this
this property).
property). In
In Figure
Figure 4-5, we graph
4.5, we graph x%X2
versus x\. This
versus Xl. This curve
curve is
is traversed
traversed inin the clockwise direction
the clockwise (as can
direction (as be determined
can be determined
110
110 Chapter 4. Essential ordinary
Chapter ordinary differential
differential equations
equations

by comparing
by comparing with
with Figure
Figure 4-4)- Forr example,
4.4}. F° example, when the prey
when the prey population
population isis large
large
and the
and the predator
predator population
population isis small (the upper
small (the upper left
left part of the
part of the curve),
curve), the
the predator
predator
population
population will begin to
will begin to grow.
grow. As it does,
As it the prey
does, the prey population begins to
population begins to decrease
decrease
(since more
(since more prey are eaten).
prey are eaten). Eventually, the prey
Eventually, the prey population
population gets small enough
gets small enough that
that
itit cannot
cannot support
support aa large
large number
number ofof predators (far right
predators (far right part of the
part of the curve), and the
curve), and the
predator
predator population decreases rapidly.
population decreases When the
rapidly. 'When the predator
predator population
population gets small, the
gets small, the
prey population begins to grow,grow, and the
the whole cycle
cycle begins again.
again.

600r---~----'---~~---r----~--~----~--~

10 20 30 40 50 60 70 80
predator population

Figure 4.5.
Figure The variation
4.5. The of the
variation of the two
two populations (Example 4.10).
populations (Example 4-10).

4.4.4
4.4.4 Automatic step control and
and Runge-Kutta-Fehlberg
methods
As the above examples
As examples show,
show, it
it is possible to design numerical
numerical methods which which give aa
predictable improvement in
predictable improvement in the error
error as
as the
the time stepstep is
is decreased.
decreased. However,
However, thesethese
methods do
methods do not
not allow
allow the user to
the user choose the
to choose the step
step size
size in order to
in order to attain
attain aa desired
desired
level of
level of accuracy.
accuracy. For
For example,
example, we we know thatthat decreasing
decreasing At from 0.1
D..t from 0.1 to 0.05
0.05 willwill
decrease the
decrease the error in 0(At 4 ) method
in an O(D..t4) method by approximately
approximately aa factor of 16, 16, but this this
does not tell
does tell us that either
either step
step size
size will
will lead
lead to a global
global error
error less than 10~33..
than 10-
It would
It would be desirable to have have aa method .that,
that, given
given aa desired
desired level
level of
of accuracy,
accuracy,
could choose the step
could step size
size in an
an algorithm so so asas to attain
attain that accuracy.
accuracy. While
While no
method guaranteed
method guaranteed to do do this is
is known,
known, there
there is is aa heuristic technique that that is
is usually
successful in
successful in practice. TheThe basic ideaidea is
is quite
quite simple.
simple. When an algorithm wishes
to integrate
to integrate from
from tn
tn to it uses
tn+i, it
to tn+!, uses two different methods,
two different methods, one one ofof order D..tfek and
order Ai and
fc+1
another of order A£
another D..t +!.. It then regards the more accurate
k
accurate estimate
estimate (resulting from from
4.4. Numerical methods for initial value problems 111
111

fe+1
the
the O(At
O(~tk+l)) method)method) as as the exact value,
the exact value, and
and compares
compares it it with
with the the estimate
estimate from from
the
the lower-order
lower-order method. method. If If the
the difference
difference is is sufficiently small, then
sufficiently small, then it it isis assumed
assumed
that
that the step size
the step size is sufficiently small,
is sufficiently small, andand the step is
the step is accepted.
accepted. (Moreover,(Moreover, if the
if the
difference is
difference is too
too small,
small, thenthen it is assumed
it is assumed that that the step size
the step size is
is smaller
smaller than than it it needs
needs
to
to be,
be, and
and it it may
may be be increased
increased on on the
the next
next step.)
step.) On On the
the other
other hand,
hand, if if the difference
the difference
is
is too large, then
too large, then it it is assumed that
is assumed that the
the step
step isis inaccurate.
inaccurate. The The step
step is is rejected,
rejected, and and
At,
~t, the step size,
the step size, isis reduced.
reduced. This This is called automatic
is called automatic step control, and
step control, and it it leads
leads toto
an approximate
an approximate solution solution computed
computed on on anan irregular
irregular grid, since At
grid, since ~t can can vary
vary fromfrom one one
step to
step to the
the next. This technique
next. This technique is is not
not guaranteed
guaranteed to to produce
produce aa globalglobal error error below
below
the desired level,
the desired since the
level, since the method
method only only controls
controls the the local error (the
local error (the error
error resulting
resulting
from aa single
from single step step ofof the
the method).
method). However,
However, the the relationship
relationship betweenbetween the the local and
local and
global error is
global error is understood
understood in in principle,
principle, and and this
this understanding
understanding leads leads to to methods
methods
that
that usually achieve the
usually achieve desired accuracy.
the desired accuracy.
A
A popular
popular class class of of methods
methods for for automatic
automatic step step control
control consists
consists of of the
the Runge-
Runge-
Kutta-Fehlberg (RKF)
Kutta-Fehlberg (RKF) methods,
methods, which which use use two
two RK RK methods
methods together
together to control
to control
the
the local
local error
error as as described
described in in the
the previous
previous paragraph.
paragraph. The general form
The general form of of RKRK
methods,
methods, given given in in (4.29),
(4.29), shows
shows that
that there
there are
are many
many possible
possible RK RK formulas;
formulas; indeed,indeed,
for aa given
for given order At fc , there
order !ltk, are many
there are different RK
many different RK methods
methods that that can can be be derived.
derived.
This
This fact
fact is is used
used in in the RKF methodology
the RKF methodology to choose pairs
to choose pairs of formulas that
of formulas evaluate
that evaluate
/, the
f, function defining
the function defining the the ODE,
ODE, as as few
few times
times as as possible.
possible. For For example,
example, it it can
can bebe
proved
proved thatthat everyevery RK RK method
method of of order
order !ltAt55 requires
requires at at least six evaluations
least six evaluations of of f./.
It is
It is possible
possible to to choose
choose six six points (i.e. the
points (Le. the values
values ti,ti,ti ... ,, ttij +
72/1,...
ti + 12h, + 16h
^h in in (4.29))
(4.29))
so
so that
that five
five of of the
the points
points can can be be used
used in in an O( !lt 44 )) formula,
an O(At formula, and and the the six points
six points
together define an
together define O(At 55 )) formula.
an O(!lt formula. (One (One suchsuch pair
pair ofof formulas
formulas is is the
the basis
basis of the
of the
popular
popular RKF45
RKF45 method.)method.) This This allows
allows aa very efficient implementation
very efficient implementation of automatic
of automatic
step control.
step control.

Exercises
1. The
1. The purpose of this
purpose of this exercise
exercise is
is to
to estimate
estimate the
the value of u(0.5),
value of u(0.5), where u(t) is
where u(t) is
the solution of
the solution of the IVP
the IVP

du t
dt = u + e , u(O) = O. (4.32)

The solution is
The solution is w(t)
u(t) =
= te*, and so
te t , and so w(0.5) = ee 11//22 /2
u(0.5) = /2 =
== 0.82436.
0.82436.

(a)
(a) Estimate
Estimate w(0.5)
u(0.5) by
by taking
taking 44 steps
steps of
of Euler's method.
Euler's method.
(b) Estimate
(b) Estimate w(0.5)
u(0.5) by
by taking
taking 22 steps
steps of
of the
the improved
improved Euler's
Euler's method.
method.
(c)
(c) Estimate
Estimate w(0.5)
u(0.5) by
by taking
taking 11 step
step of
of the
the classical fourth-order RK
classical fourth-order method.
RK method.

Which
Which estimate
estimate is
is more
more accurate?
accurate? How
How many
many times
times did each evaluate
did each evaluate ff(t,
( t , u) =
=
u
u++ eetet ??

2.
2. Reproduce
Reproduce the
the results
results of
of Example
Example 4.10.
4.10.
112 Chapter 4. Essential
Essential ordinary differential equations

17
3. 17 The
The system of
of ODEs
ODEs

/-LI(X - /-L2)
(4.33)
T2(X,y)3
/-LlY
T2(X,y)3'

where

TI (X,y) = V(X + /-LI)2 + y2,


T2(X,y) = V(X - /-L2)2 + y2,
models the
the orbit
orbit of
of aa satellite
satellite about two heavenly
heavenly bodies, which we
we will
will assume
assume
to be the earth and the moon.
earth and
In these
these equations,
equations, (x(t),y(t))
(x(t),y(t)) are the the coordinates
coordinates of of the
the satellite
satellite at at time
time t.t.
The origin
The origin of
of the
the coordinate
coordinate system
system is the center
is the center of of mass
mass ofof the
the earth-moon
earth-moon
system, and
system, and the
the x-axis
ar-axis is is the
the line
line through
through thethe centers
centers of of the
the earth and the
earth and the
moon.
moon. TheThe center
center of of the
the moon
moon is is at the point
at the point (1
(1 — - /^i,0)
/-LI,O) and
and thethe center
center of
of
the
the earth is at
earth is at (-
(—//i, 0), where
/-LI, 0), where IJL\
/-LI = 1/82.45 is
= 1/82.45 is the
the ratio
ratio ofof mass
mass of of the
the moon
moon
to the mass
to the mass of the earth.
of the earth. TheThe unit
unit ofof length
length is the distance
is the distance from the center
from the center
of the
the earth to the
earth to the center of the the moon. We write ^2 = 11 -— A*i
/-L2 = /-L1.•
If the satellite
If satellite satisfies the following initial conditions, then its orbit is known
known
to be with period T = 6.19216933:
be periodic with 6.19216933:

dx
x(O) = 1.2, dt (0) = 0,

y(O) = 0, ~~ (0) = -1.04935751.

(a) Convert
(a) Convert the
the system
system (4.33)
(4.33) of
of second-order
second-order ODEs
ODEs to
to aa first-order
first-order system.
system.
(b) Use
(b) Use aa program that implements
implements an an adaptive (automatic
(automatic step
step control)
method18 (such as RKF45)
RKF45) to follow the orbit
orbit for one period. Plot the
orbit in the
orbit in the plane, and make
plane, and sure that
make sure that the
the tolerance used by
tolerance used the adaptive
by the adaptive
algorithm is small
algorithm small enough that
that the orbit
orbit really appears in
in the plot
plot to
to be
periodic. Explain
periodic. Explain the
the variation
variation in
in time
time steps
steps with
with reference to the
the motion
of the satellite.
(c) Assume
(c) Assume that, inin order to obtain
obtain comparable accuracy
accuracy with
with aa fixed step
fixed step
size, it
size, it is
is necessary
necessary to use the
to use the minimum step chosen
minimum step chosen by the adaptive
by the adaptive
algorithm. How
algorithm. many steps
How many steps would
would be
be required by an
required by an algorithm
algorithm with
with
19
fixed How many steps were used by the adaptive algorithm?
fixed step size? How algorithm?19
17
17 Adapted from
Adapted from [16],
[16], pages 153-154.
pages 153-154.
18
Both MATLAB
18Both MATLAB and and Mathematica provide such routines,
provide such ode45 and
routines, ode45 and NDSolve,
NDSolve, respectively.
respectively.
19
It is
19It is easy
easy to determine the
to determine the number
number ofof steps
steps used
used by
by MATLAB's ode45 routine.
MATLAB's ode45 routine. It is possible
It is possible
but tricky to
but tricky to determine
determine the
the number
number of steps used
of steps used by Mathematica's NDSolve
by Mathematica's routine.
NDSolve routine.
4.4. Numerical methods
methods for initial value problems 113

4. Let
A=![ll 48]
5 48 39 .
The problem is to produce a graph, on the interval [0,20], of the two compo-
nents
nents of
of the solution to
the solution to
du
dt = Au, (4.34)
u(O) = 110,
where

(a) Use
Use the RK4 method with a step size of At
Llt = 0.1 to compute the solution.
= 0.1
Graph both components on the interval [0,20].
(b) Use the techniques of the previous section to compute the exact
exact solution.
Graph both components
Graph components on on the interval [0,20].
[0,20].
(c) Explain the difference.
difference.

5. (a) Suppose tto0 E


G [a, &]
b] and Rn -t
f : Rll
and f: R n , u : [a, 6]
->• Rll, Rn satisfy
->• Rll
b]-t
du
dt = f(u),
u(t o) = Uo·

Show that v : [a + (it - to), b + (h - to)] -t Rll defined by

v(t) = u(t - (tl - to))

satisfies
satisfies
dv
dt = f(v),
v(td = 110·

Moreover, show that


Moreover, show that the
the curves
curves

{u(t) tE[a,b]}

and
and
{v(t) t E [a + (tl - to), b + (tl - to)]}
are the same.
(b) Show, by
(b) Show, by producing
producing anan explicit
explicit example (a scalar
example (a scalar IVP
IVP will
will do),
do), that the
that the
above property does not hold for a differential
differential equation
equation that depends
explicitly
explicitly on
on tt (that
(that is,
is, for
for aa nonautonomous ODE).
ODE).
114
114 Chapter 4. Essential ordinary differential equations
Chapter equations

6. Consider
6. Consider the
the IVP
IVP
dx
dt = cos (t)x,
x(O) = 1.
Use both
Use Euler's method
both Euler's and the
method and the improved Euler method
improved Euler method to estimate #(10),
to estimate x(lO),
using step sizes
using step 1,1/2,1/4,1/8, and
sizes 1,1/2,1/4,1/8, and 1/16.
1/16. Verify
Verify that
that the
the error
error inin Euler's
Euler's
2
method is O(A£),
method is while the
O(~t), while error in
the error in the improved Euler
the improved Euler method
method isis O(Ai
O(~t2). ).

7. Consider
Consider the
the IVP
IVP

-dx
dt
= 1+ lx-II '
x(O) = O.

(a) Use
(a) Use the
the RK4 method with
RK4 method with step
step sizes
sizes 1/4,1/8,1/16,1/32,1/64,
1/4,1/8,1/16,1/32,1/64, and 1/128
and 1/128
to estimate
to estimate x(l/2) and verify
x(1/2) and verify that
that the error is
the error O(Af 4 ).
is O(~t4).
(b) Use
(b) the RK4
Use the RK4 method
method with step sizes
with step sizes 1/4,1/8,1/16,1/32,1/64,
1/4,1/8,1/16,1/32,1/64, and 1/128
and 1/128
to
to estimate
estimate x(2). Is the
x(2). Is the error O(A£ 4 ) in
error O(~t4) in this
this case as well?
case as well? If
If not,
not, speculate
speculate
as
as to
to why
why it
it is not.
is not.

8. Let
8. Let

A~
[ -2
l
1
0 o -11 2
0 -1 1 -1
-31 .
-1 1 0 0
-3 2 -1 0-2

The matrix
The A has
matrix A an eigenvalue
has an eigenvalue A = -0.187;
A == —0.187; let
let x
x be
be aa corresponding
corresponding eigen-
eigen-
vector. The
vector. The problem
problem isis to
to produce
produce aa graph
graph on
on the interval [0,20]
the interval [0,20] of the five
of the five
components of
components of the
the solution
solution to
to

du
dt = Au,
u(O) = x.

(a) Solve
(a) Solve the
the problem
problem using
using the
the RK4 method (in
RK4 method (in floating
floating point arithmetic)
point arithmetic)
and graph the
and graph results.
the results.
(b) What
(b) What is
is the exact solution?
the exact solution?
(c) Why
(c) Why isis there
there aa discrepancy
discrepancy between the computed
between the computed solution
solution and
and the exact
the exact
solution?
solution?
(d) Can
(d) Can this discrepancy be
this discrepancy be eliminated
eliminated by decreasing the
by decreasing the step size in
step size in the
the
RK4
RK4 method?
method?
4.5. Stiff systems of
of ODEs 115
115

4.5 Stiff systems of ODEs


The numerical methods
The numerical methods described
described in
in the
the last
last section, while adequate
section, while adequate for many IVPs,
for many IVPs,
can be unnecessarily
can be unnecessarily inefficient for some
inefficient for some problems.
problems. WeWe begin
begin with
with aa comparison
comparison of
of
two
two IVPs,
IVPs, and
and the
the performance
performance of of aa state-of-the-art automatic step-control
state-of-the-art automatic step-control algo-
algo-
rithm
rithm on them.
on them.

Example 4.11.
Example 4.11. We
We consider
consider the
the following two IVPs:
following two IVPs:
dx
dt = Alx, (4.35)
x(O) = Xo,

dx
dt = A 2 x, (4.36)
x(O) = Xo.

For both IVPs,


For both the initial
IVPs, the initial value
value is
is the
the same:
same:

We will
We will describe
describe the matrices AI
the matrices and A
Al and by their
A22 by their spectral
spectral decompositions. The two
decompositions. The two
matrices are
matrices are symmetric, with the
symmetric, with the same
same eigenvectors but different
eigenvectors but eigenvalues. The
different eigenvalues. The
eigenvectors
eigenvectors are
are

while the
while eigenvalues of
the eigenvalues of AI are AI
Al are Al == -1,
—I, AA22 =
= -2, = -3
—1, XA33 = —3 and
and the eigenvalues of
the eigenvalues of
A Al = -1,
are AI
A22 are A22 = -10,
-I, A A3 = -100.
-10, A3 -100.
Since
Since the
the initial value x
initial value Xo0 is an eigenvector
is an of both
eigenvector of both matrices,
matrices, corresponding to
corresponding to
the eigenvalue
the eigenvalue -1
—I inin both cases, the
both cases, the two
two IVPs
IVPs have exactly the
have exactly the same solution:
same solution:

We solved
We both systems
solved both using the
systems using the MATLAB
MATLAB command ode45, which
command ode45, implements aa
which implements
20
state-of-the-art
state-of-the-art automatic
automatic step-control
step-control algorithm based on
algorithm based on aa fourth-fifth-order scheme. 2o
fourth-fifth-order scheme.
The results
The results are
are graphed
graphed in in Figure
Figure 4-6, where, as
4.6, where, expected, we
as expected, we see
see that the two
that the two com-
com-
puted
puted solutions
solutions are
are the
the same (or at
same (or at least
least very similar).
very similar).
However, examining the the results
results of
of the
the computations performed
performed by by ode45
ode45 re-
veals aa surprise:
veals the algorithm
surprise: the algorithm used only 52
used only 52 steps
steps for
for IVP
IVP (4-35)
(4.35) but 1124 steps
but 1124 for
steps for
(4-36)1
(4·36)!
20
20The routine ode45
The routine ode45 was implemented by
was implemented Shampine and
by Shampine and Reichelt.
Reichelt. See [42] for
See [42] details.
for details.
116
116 Chapter
Chapter 4. Essential ordinary
4. Essential ordinary differential equations
differential equations

2 4 6 8 10

2 4 6 8 10

Figure
Figure 4.6. The computed
4.6. The computed solutions
solutions to
to IVP (4.35) (top)
IVP (4.35) (top) and
and IVP (4-36)
IVP (4.36)
(bottom). (Each
(bottom). (Each graph
graph shows
shows all
all three
three components of the
components of the solution; however, the
solution; however, the
exact
exact solution,
solution, which
which is the same
is the same for
for the
the two
two IVPs,
IVPs, satisfies
satisfies xi(t] = £X2(t)
Xl(t) = 2 (£) =
= xs(t)•)
X3(t).)

A detailed explanation
A detailed explanation ofof these results is
these results is beyond
beyond thethe scope
scope ofof this
this book, but
book, but
we
we briefly
briefly describe the reason
describe the reason for
for this
this behavior.
behavior. These comments are
These comments are illustrated
illustrated
by
by an example below.
an example below. Explicit
Explicit time-stepping
time-stepping methodsmethods for for ODEs, such as
ODEs, such as those
those
that form the
that form the basis
basis of ode45, have
of ode45, have an an associated
associated stability region for
stability region the time
for the step.
time step.
fc
This
This means that the
means that expected O(At
the expected O(~tk)) behavior
behavior of of the
the global
global error
error is
is not
not observed
observed
unless
unless A£ is small
~t is small enough
enough to
to lie in the
lie in stability region.
the stability region. For
For larger values of
larger values of At,
~t,
the
the method
method is unstable and
is unstable and produces computed solutions
produces computed solutions that "blow up"
that "blow up" as the
as the
integration proceeds.
integration proceeds. Moreover,
Moreover, this stability region
this stability region isis problem
problem dependent
dependent and and gets
gets
21
smaller as
smaller as the eigenvalues of
the eigenvalues of the
the matrix
matrix A A get large and
get large and negative.
negative. 21
If A
If has large
A has large negative eigenvalues, then
negative eigenvalues, then the system being
the system being modeled
modeled has has some
some
transient
transient behavior
behavior that
that quickly
quickly dies
dies out.
out. ItIt is the presence
is the presence ofof the
the transient behavior
transient behavior
21
If
21 If the
the system of ODEs
system of ODEs under consideration is
under consideration is nonlinear,
nonlinear, say
say

x= f(x,t),
then it is
then it is the eigenvalues of
the eigenvalues of the
the Jacobian matrix 8f
Jacobian matrix / ax that
df/dx determine the
that determine the behavior.
behavior.
4.5. Stiff systems
systems of ODEs
ODEs 117

that
that requires
requires aa small
small time
time step—initially,
step-initially, the solution is
the solution is changing
changing over
over aa very small
very small
time scale, and
time scale, and the
the time step must
time step must bebe small
small to to model
model this
this behavior accurately.
behavior accurately.
If, at
If, at the same time,
the same time, there are small
there are small negative eigenvalues, then
negative eigenvalues, then the system also
the system also
models components
models components that that die out more
die out more slowly. Once the
slowly. Once the transients
transients have
have died out,
died out,
one ought to
one ought to be able to
be able increase the
to increase the time step to
time step to model
model the more slowly
the more slowly varying
varying
components of
components of the solution. However,
the solution. However, this
this is
is the
the weakness
weakness of of explicit
explicit methods
methods likelike
Euler's method,
Euler's method, RK4, RK4, and and others:
others: the
the transient
transient behavior inherent in
behavior inherent in the
the system
system
haunts the
haunts numerical method
the numerical method even even when
when the
the transient components of
transient components of the
the solution
solution
have died
have died out.
out. A A time step that
time step ought to
that ought to be small enough
be small enough to accurately follow
to accurately follow the
the
slowly varying components produces instability in the numerical method and ruins
slowly varying components produces instability in the numerical method and ruins
the computed
the computed solution.
solution.
A system with
A system negative eigenvalues
with negative eigenvalues ofof widely
widely different
different magnitudes
magnitudes (that(that is,
is, aa
system that
system that models components that
models components that decay
decay atat greatly
greatly different
different rates)
rates) is
is sometimes
sometimes
22
called stiff.
called stiJJ.22 Stiff problems
Stiff problems require special numerical
require special methods; we
numerical methods; we give examples
give examples
below
below inin Section
Section 4.5.2.
4.5.2. First,
First, however,
however, wewe discuss
discuss aa simple
simple example
example forfor which
which thethe
ideas presented
ideas presented aboveabove can can be
be easily understood.
easily understood.

4.5.1
4.5.1 A simple example of a stiff system
The IVP

d~l = -107Ul, Ul(O) = 1, (4.37)


dU2
dt = -U2, U2(0) = 1

has solution
has solution
107t
(t) = [ ul(0)e- ]
u u2(0)e- t '

and the
and system qualifies
the system qualifies as stiff according
as stiff to the
according to the description given above.
description given above. WeWe will
will
apply Euler's
apply Euler's method, since it
method, since it is simple enough
is simple that we
enough that we can
can completely
completely understand
understand
its behavior.
its However, similar
behavior. However, similar results
results would
would bebe obtained
obtained with
with RK4
RK4 or another
or another
explicit method.
explicit method.
To
To understand
understand the behavior of
the behavior of Euler's
Euler's method
method on
on (4.37),
(4.37), we write it
we write it out
out ex-
ex-
plicitly. We
plicitly. have
We have

with
with

that is,
that is,

U~n+1) = u~n) _ 107 ~tu~n) = (1 - 107 ~t) u~n),


u~n+1) = u~n) _ ~tu~n) = (1 - ~t) u~n).
22
Stiffness is a surprisingly subtle concept. The definition we follow here does not capture all of
22Stiffness of
this subtlety; moreover,
moreover, there is is not aa single,
single, well-accepted
well-accepted definition
definition of
of a stiff
stiff system.
system. See
See [33],
Section 6.2,
Section 6.2, for
for aa discussion
discussion of
of the
the various
various definitions
definitions of stiffness.
of stiffness.
118
118 Chapter 4.
Chapter 4. Essential
Essential ordinary
ordinary differential
differential equations
equations

It follows
It follows that
that

u~n) = (1 - 107 b.t) U~n-l)


= (1 - 107 b.t)2 U~n-2)
= (1-10 7 b.t)3 U~n-3)

= ... = (1 - 107b.tt uiO)


= (1 - 107 b.tt

and, similarly,
and, similarly,

Clearly, the
Clearly, the computation
computation depends
depends critically
critically on
on

11 - 107 b.tl, 11 - b.tl·

If one
If one of
of these
these quantities
quantities is
is larger
larger than
than 1,
1, the
the corresponding
corresponding component
component willwill grow
grow
exponentially as
exponentially as the
the iteration
iteration progresses.
progresses. At
At the
the very
very least,
least, for
for stability (that is,
stability (that is, to
to
avoid spurious
avoid spurious exponential
exponential growth),
growth), we
we need
need

11 -10 7 b.tl :::; 1, 11- b.tl :::; 1.

The first
The first inequality
inequality determines
determines the
the restriction
restriction on on b.t, and aa little
At, and little algebra
algebra shows
shows that
that
we must
we must have
have
o < b.t :::; 2 . 10- 7 .
Thus aa very
Thus very small
small time
time step
step isis required
required forfor stability,
stability, and
and this
this restriction
restriction on
on b.t
Af is
is
imposed by
imposed by the
the transient
transient behavior
behavior in in the
the system.
system.
As we
As we show
show below,
below, it it is
is possible
possible toto avoid
avoid the
the need
need for
for overly
overly small
small time
time steps
steps
in aa stiff
in stiff system;
system; however,
however, we we must
must use
use implicit methods. Euler's
implicit methods. Euler's method
method andand the
the
RK methods
RK methods discussed
discussed in in Section
Section 4.4
4.4 are
are explicit,
explicit, meaning
meaning thatthat the
the value w(n+1) is
value u(n+l) is
defined by
defined by aa formula
formula involving
involving onlyonly known
known quantities.
quantities. InIn particular,
particular, only
only urn)
u^ ap-ap-
pears in
pears in the
the formula;
formula; in in some
some explicit
explicit methods
methods (multistep
(multistep methods), u^n~l\ u(n-2),
methods), u(n-I), u^n~2\
n+1
... may
... may appear
appear in in the
the formula,
formula, but but u(n+l)
w( ) itself
itself does
does not.
not.
On the other hand, an implicit method defines u(n+l)
On the other hand, an implicit method defines u^n+l^ byby aa formula
formula that
that in-
in-
n+1
volves u(n+l)
volves w( ) itselfitself (as
(as well
well as
as urn)
u^ andand possibly
possibly earlier
earlier computed
computed values
values of
of u). This
u). This
means that,
means that, atat each
each step
step of
of the
the iteration,
iteration, anan algebraic
algebraic equation
equation (possibly
(possibly nonlinear)
nonlinear)
must be
must be solved
solved to to find
find the
the value
value of u( n+1 ). In
of u(n+l). In spite
spite of
of this
this additional
additional computational
computational
expense, implicit
expense, implicit methods
methods are are useful
useful because
because of of their
their improved
improved stability
stability properties.
properties.

4.5.2
4.5.2 The backward
The backward Euler
Euler method
method
The simplest
The simplest implicit
implicit method
method is
is the
the backward
backward Euler
Euler method. Recall that
method. Recall that Euler's
Euler's
method for
method for the
the IVP
IVP
du
dt = f(t, u), u(to) = Uo
4.5. Stiff systems
4.5. Stiff systems of ODEs
of ODEs 119
119

was derived from the equivalent formulation

by applying the left-endpoint


left-endpoint rule for quadrature:

lb hex) dx == h(a)(b - a).

The result is
U n +1 = Un + Atf(tn, Un)
(see
(see Section 4.4.1). To obtain
obtain the backward Euler method, we
we apply the right-hand
right-hand
rule,
rule,
lb hex) dx == h(b)(b - a),

instead. The result is


(4.38)
This method is indeed
This indeed implicit.
implicit. It is necessary to solve the equation
equation (4.38) for
unn+
U i.
+1. In the
In the case
case of
of aa nonlinear
nonlinear ODE
ODE (or
(or aa system
system of
of nonlinear
nonlinear ODEs),
ODEs), this
this may
may be
be
difficult (requiring
difficult (requiring aa numerical
numerical root-finding
root-finding algorithm
algorithm such
such as
as Newton's
Newton's method).
method).
However, it
However, it is
is not
not difficult to implement
difficult to implement the the backward Euler method
backward Euler method for
for aa linear
linear
system. We We illustrate
illustrate this for the linear, constant-coefficient system:

dx
dt = Ax + f(t), (4.39)
x(O) = Xo.

The backward Euler method takes the form

X n +1 + At(Axn+1 + f(t n+ 1 ))
= Xn
=} X n +1 - AtAxn+1 = Xn + Atf(tn+d

=} (1 - AtA)xn+l = Xn + Atf(tn + 1 )

=} Xn+1 = (1 - AtA)-l (x n + Atf(tn+d) .

Example
Example 4.12.
4.12. Applying the backward
Applying the backward Euler method to
Euler method to the
the simple example (4.37)
simple example (4-37)
gives some insight into
into the
the difference
difference between
between the implicit
implicit and explicit
explicit methods. We
methods. We
obtain the
the following
following iteration for the first
first component:
(n+1) _
U1
(n) _
- U1
AtU (n+1)
107 ~
1

=} (1 + 107 At) u~n+1) = uin)


=} ui n
+1) = (1 + 107 At) -1 uin )
=} uin ) = (1 + 107 At) -n .
120 Chapter 4. Essential ordinary differential equations

Similarly,
Similarly, for the second
for the second component,
component, we
we obtain
obtain

For any
any positive value
value of A£; we
of ilt, we have

and
and so
so no
no instability can arise.
instability can arise. The
The step
step size A£ will
size ilt will still have to
still have to be small enough
be small enough
for the solution
for the to be
solution to be accurate, but we
accurate, but do not
we do not need
need to
to take Ai excessively
take ilt excessively small to
small to
avoid spurious exponential
avoid spurious exponential growth.
growth.

Example 4.13. We
Example 4.13. We will
will apply
apply both
both Euler's
Euler's method and the
method and the backward
backward Euler
Euler method
method
IVP
to the IVP
dx
dt = A 2 x, (4.40)
x(O) = xo,

where A.%
where A2 is the matrix
is the matrix from
from Example
Example 4-11 o,nd
4.11 and

We integrate
We integrate over
over the
the interval [0,2] with
interval [0,2) with aa time
time step of ilt
step of 0.05 (40
At =— 0.05 (40 steps)
steps) in
in both
both
algorithms. TheThe results are
are shown inin Figure 4-7-
4.7. Euler's method "blows
Euler's method "blows up"
up" with
this time
this time step,
step, while the backward
while the backward Euler method produces
Euler method produces aa reasonable approximation
reasonable approximation
to the
to the true solution.
true solution.

Remark There
Remark There are
are higher-order methods designed
higher-order methods designed for
for use
use with stiff ODEs,
with stiff ODEs, no-
no-
tably the
tably the trapezoidal
trapezoidal method. It is
method. It is also
also possible
possible to
to develop
develop automatic step-control
automatic step-control
23
methods for stiff
methods for stiff systems.
systems.23

Exercises
1. Let
1. Let
A=[
and consider
and consider the IVP
the IVP
dx
dt = Ax,
x(O) = xo.

(a) Find
(a) Find the exact solution
the exact solution x(£).
x(t).
23
MATLAB includes
23MATLAB includes such routines.
4.5. Stiff systems of ODEs 121
121

0
x
-1

-2

-3
0 0.5 1.5 2

x
1l
0,

-1
0 0.5 1.5 2

Figure 4.7. The computed solutions to IVP (4-40) using Euler's method
IVP (4.40) method
(top) and the backward
(top) backward Euler method (bottom). (Each graph shows all three com-
ponents of the solution.)
solution.)

(b) Estimate x(l)


(b) Estimate x(l) using 10 steps
using 10 steps of Euler's method
of Euler's and compute
method and compute the norm
the norm
of the error.
of the error.
(c) Estimate
(c) Estimate x(l)
x(l) using 10 steps
using 10 steps of
of the
the backward
backward Euler
Euler method
method and compute
and compute
the norm
the norm of
of the
the error.
error.
2. Repeat
2. Repeat Exercise
Exercise 11 for
for

3. Let
3. Let
-113 -80 -107]
A = ~ -80 -140 -80 .
[ -107 -80 -113
Find the
Find the largest value of
largest value of At such that
Ilt such Euler's method
that Euler's is stable.
method is stable. (Use
(Use numerical
numerical
experimentation.)
experimentation. )
122
122 Chapter 4.
Chapter 4. Essential
Essential ordinary
ordinary differential equations
differential equations

4.
4. Let
Let ff:: R
R x
xRR22 -+ R22 be
->• R defined by
be defined by

The
The nonlinear IVP
nonlinear IVP
dx
dt = f(t,x),
x(o) =[~ ]
has solution
has solution
te-t ]
x(t) = [ e- t .

(a) Show
(a) Show by
by example
example that
that Euler's
Euler's method is unstable
method is unstable unless
unless At is chosen
D..t is chosen
small enough.
small enough. Determine
Determine (by
(by trial
trial and
and error)
error) how small At
how small D..t must
must be
be in
in
order that
order that Euler's
Euler's method
method is stable.
is stable.
(b)
(b) Apply
Apply the
the backward
backward Euler
Euler method.
method. Is
Is it stable for
it stable for all
all positive
positive values
values of
of
At?
D..t?

5. Let
5. Let
A = [-50.5 49.5 ]
49.5 -50.5 .
(a) Find
(a) Find the exact solution
the exact to
solution to

~: = Ax, x(O) = [ ~ ].
(b)
(b) Determine
Determine experimentally
experimentally (that
(that is,
is, by
by trial
trial and
and error)
error) how
how small
small At must
D..t must
be
be in order that
in order that Euler's
Euler's method
method behaves
behaves in in aa stable
stable manner on this
manner on IVP.
this IVP.
(c) Euler's
(c) Euler's method
method takes
takes the form
the form

Xi+1 = Xi + D..tAxi, i = 0,1,2, ....


Let
Let the eigenpairs of
the eigenpairs of A
A be AI, ui
be .A1, U1 and
and A2,
.A2, 112.
U2. Show
Show that
that Euler's method
Euler's method
is
is equivalent to
equivalent to

y~i+l) = (1 + D..t.Ady~i),
y~i+l) = (1 + D..t.A2)y~i),
where
where
(i) _ (i) _
YI - Xl . UI, Y2 - Xi . U2·

y~i), y%
Find explicit formulas for y^', y~i),, and derive an upper bound on At
D..t that
guarantees
guarantees stability
stability of Euler's method.
of Euler's method. Compare
Compare with
with the experimental
the experimental
rpsiilt.
result.
4.6. Green's functions 123

(d) Repeat with


(d) Repeat the backward
with the backward Euler method in
Euler method in place
place of
of Euler's
Euler's method.
method.
nxn
6. Let
6. Let A €R
A E R nxn be symmetric with
be symmetric with negative
negative eigenvalues
eigenvalues AI,
Al, A
A2,2 ,...
..., A n.
An.
(a) Consider
(a) Consider Euler's
Euler's method
method and
and the
the backward Euler method
backward Euler applied to
method applied to the
the
homogeneous linear
homogeneous linear system
system
dx
dt = Ax.

Show that
Show Euler's method
that Euler's method produces
produces aa sequence
sequence xo,xi,X2,... where
XO, Xl, X2, ... where

while the
while the backward Euler method
backward Euler method produces
produces aa sequence
sequence x 0 ,xi,x
Xo, 2 ,...
Xl, X2, ...
where
where
Xi = (I - AtA)-ixo.

(b) What
(b) are the
What are the eigenvalues of 1I +
eigenvalues of + AtA?
AtA?
(c) What
(c) What condition
condition must
must At satisfy
satisfy in
in order
order that
that Euler's method be
Euler's method stable?
be stable?
(Hint: See
(Hint: See the
the previous exercise.)
previous exercise.)
(d) What
(d) are the eigenvalues
What are eigenvalues of
of (I -— At A)"1?
AtA)-l?
(e) Show
(e) Show that
that the
the backward Euler method
backward Euler method is
is stable
stable for
for all
all positive
positive values
values of
of
At.
At.

4.6 functions
Green's functions
The Green's
The function for
Green's function an IVP,
for an IVP, BVP,
BVP, oror IBVP
IBVP hashas aa fairly
fairly simple
simple meaning,
meaning, al-al-
though
though the details can
the details can getget complicated,
complicated, particularly for PDEs.
particularly for PDEs. A A homogeneous
homogeneous
linear ODE always
linear always has the zero
has the solution; nonzero
zero solution; solutions arise
nonzero solutions arise only
only when the ini-
when the ini-
tial conditions
tial conditions are are not zero, or
not zero, or when
when the differential equation
the differential equation has
has aa nonzero forcing
nonzero forcing
function (that
function is, is
(that is, is inhomogeneous).
inhomogeneous). The initial values
The initial values and
and the
the forcing
forcing function
function can
can
be called the
be called the data ofof the
the problem.
problem. TheThe Green's
Green's function
function represents
represents the contribution
to
to the
the solution
solution of of the
the datum
datum at at each
each point in time.
point in time.
In the
In the remainder
remainder of this section,
of this we explain
section, we explain this
this statement for two
statement for IVPs that
two IVPs that
we first considered
we first considered in in Section
Section 4.2. We also
4.2. We also explain
explain how the Green's
how the Green's function
function can
can
be
be interpreted
interpreted as as aa special
special solution
solution to
to the
the differential equation, and
differential equation, and introduce the
introduce the
concept of
concept the Dirac
of the Dirac delta
delta function. Finally, we
function. Finally, comment on
we comment on how the form
how the form of the
of the
Green's function
Green's function will change when
will change when wewe consider PDEs.
consider PDEs.

4.6.1
4.6.1 The Green's function
The Green's for a
function for a first-order
first-order linear
linear ODE
ODE
The solution
The solution to
to
du
dt - au = f(t), t> 0, (4.41)
u(to) = uo,
124 Chapter 4.
Chapter 4. Essential
Essential ordinary differential equations
ordinary differential equations

as derived in Section 4.2, is

u(t) = ea(t-to)UO + rt ea(t-s) f(s) ds.


lto

We define
We define
a(t-s) t>
(j(t;s) ={ e , s, (4.42)
0, t < s.
Then we
Then can write
we can write the formula for
the formula for the
the solution u as
solution u as

u(t) = (j(t; to)uo + {'XI (j(t; s)f(s) ds. (4.43)


lto

The function
The function G (j is
is called
called the (causal) Green's function for
the (causal) (4.41), and
for (4.41), and formula
formula (4.43)
(4.43)
already hints
already hints atat the significance of
the significance G. The
of (j. effect of
The effect of the
the initial
initial datum
datum Uo on the
UQ on the
solution u at
solution at time
time tt isis (j(t;
G(t] to)uo, while
while the effect of
the effect of the
the datum ( s ) on
datum ff(s) on the solution
the solution
24
at time
u at time tt is
is (j(t; s)/(s)ds.24
G(t] s)f(s)ds.
As
As aa concrete
concrete example,
example, the IVP (4.41)
the IVP (4.41) models
models the
the growth
growth of of aa population
population (of(of aa
country, say),
country, say), where
where a is is the
the natural
natural growth
growth rate and ff(t)
rate and ( t ) is the rate
is the of immigration
rate of immigration
at time t. 25
at time For the sake of definiteness, suppose the population is measured in
25 For the sake of definiteness, suppose the population is measured in

millions of
millions of people
people andand tt isis measured
measured in in years. Then Uo
years. Then UQ is
is the
the population
population at at time
time to
(in millions)
(in millions) and
and ff(t) is the
( t ) is the rate, in millions
rate, in millions ofof people
people per year, of
per year, of immigration
immigration at at
time t. We
time We cancan see
see that u(t) = (j(t;
that u(t) to) is
G(t;to) the solution
is the solution toto the
the following IVP:
following IVP:
du
- - au
dt
= 0' t > to, (4.44)
u(to) = 1.
That is,
That is, u(t) = G(t;to)
= (j(t; is the
to) is population function
the population function resulting from an
resulting from an initial popula-
initial popula-
tion of 11 (million)
tion of and no
(million) and immigration (here
no immigration consider only
(here consider only times
times tt after
after to). We can
to). We can
also recognize
also u(t) =
recognize u(t) = (j(t; as the
G(t; s) as the population function corresponding
population function corresponding to to aa certain
certain
pattern
pattern ofof immigration,
immigration, namely,
namely, when
when 11 million
million people immigrate at
people immigrate at the
the instant
instant
tt = s!
si OfOf course,
course, this
this is
is an
an idealization,
idealization, but
but there
there are
are many
many situations
situations when
when we we
wish
wish to
to model
model aa phenomenon
phenomenon that that takes
takes place at an
place at an instant
instant inin time or at
time or at aa sin-
sin-
gle
gle point
point in space (such
in space (such as as aa point force in
point force in mechanics).
mechanics). We We now explore this
now explore this idea
idea
further.
further.
We consider
We consider aa country
country whose
whose population
population isis modeled
modeled byby the differential equation
the differential equation
du
dt - au = f(t).

We assume that
We assume that initially there are
initially there are no
no people
people in in the
the country (u(to) =
country (u(to) = 0),
0), and
and 11 million
million
people immigrate over
people immigrate over thethe time
time interval [s, s + 6.tj
interval [s,s At] (at
(at aa constant
constant rate, during that
rate, during that
24
The data
24The data represented
represented by the function
by the function f/ has different units
has different than that
units than that represented
represented by UQ. Indeed,
by Uo. Indeed,
an examination of
an examination of the differential equation
the differential shows that
equation shows that the
the units of f/ are
units of are the
the units of Uo
units of divided
UQ divided
by
by time. Therefore, f/ is
time. Therefore, is aa rate, and it
rate, and must be
it must multiplied by
be multiplied the time
by the time "interval"
"interval" ds prior to
ds prior to being
being
multiplied
multiplied by G(t; s).
by G(t;
25
This model
25This model of
of population
population growth
growth is
is not
not aa particularly good one,
particularly good one, since
since it
it assumes
assumes that the
that the
growth rate remains
growth rate constant over
remains constant over time.
time. In
In reality,
reality, the
the growth rate changes
growth rate due to
changes due to changing
changing birth
birth
rates,
rates, life spans, etc.
life spans, etc.
4.6. Green's
Green's functions 125

interval, of
interval, of 1/
I/At people per
D..t people per year). We a.ssume
year). We assume that
that ss > to. The resulting
to. The resulting population
population
satisfies the IVP
du
dt - au = dl'>.t(t - s), t> to,
u(to) = 0,
where
where
It, 0< t < D..t,
dto,.t(t) = {
0, t < °
or t > D..t.
The solution
The solution is
is

This la.st
This last expression
expression is
is the
the average
average of
of G
G(t; over the
r] over
(t; T) [s, s + D..t].
interval [s,
the interval At]. As we take
As we take
At smaller
D..t smaller and
and smaller,
smaller, we
we obtain
obtain

u(t) -+ G(t; s) as D..t -+ 0.


But what
But what forcing
forcing function
function do
do we
we obtain
obtain in
in the
the limit?
limit?

4.6.2 The Dirac delta function


The function
The function dto,.t
d&t has the following
has the following properties,
properties, the
the first two of
first two of which
which are
are just the
just the
definition:
definition:

• dto,.t(t) = 0, t ~ [0, D..t].


• dto,.t(t) = l/D..t, t E [O,D..t].
• J: dto,.t(t) dt = Joto,.t It
dt = 1 for all D..t > 0, provided [0, D..tj c [a, b], and
J: dto,.t(t) dt =° if D..t < a or > b. °
• If 9 is a continuous function, and [0, D..tj c [a, bj, then
{b 1 (to,.t
ia dto,.t(t)g(t) dt = D..t io g(t) dt,

which is the
which is the average
average value of 9g on
value of on the
the interval
interval [0,
[0, D..tj.
At].
Since the
Since the limit,
limit, as
as At ->• 0,
D..t -+ 0, of
of the
the average
average value of 9g over
value of over [0,
[0, D..t]
At] isis g(O)
<?(0) when
when 9 is
g is
continuous, these properties
continuous,
the properties
the properties
properties suggest
suggest that we
we define
define the
the limit
limit 6"6 of
of dto,.t
d&t asas At °
—^ 0 by
D..t -+ by

• 6"(t) = °if t :j:. 0.


• 8(0) = 00.
126 Chapter 4. Essential ordinary
ordinary differential equations

• J: 8(t) dt = 1 if 0 E [a, b], and J: 8(t) dt = 0 if 0 ~ [a, bj .

• If 9 is a continuous function and 0 E [a, bj, then J: 8(t)g(t) dt = g(O). If


o ~ [a, b], then J: 8(t)g(t) dt = O.

There
There isis no
no ordinary
ordinary function
function 6 satisfying the
8 satisfying above properties;
the above properties; for example,
for example,
if 8(t) = 00 for
if 8(t) all t :j;
for all / 0, then J 8(t)
0, then 6(t) dt = 00 should
should hold. However, it
hold. However, it is
is useful
useful to
to
consider 6,
consider as defined
8, as defined by by the
the above
above properties,
properties, to
to be
be aa generalized function. It It is
is
called
called the
the Dirac delta function, and sometimes referred
and sometimes referred to
to as
as aa unit point source oror
unit impulse.
impulse. The The last
last property implies that,
property implies that, when is continuous,
when 9g is continuous,

(b 8(t _ s)g(t) dt = {g(s), 8 E [a, bj, (4.45)


Ja 0, 8 ~ [a, bj

(see
(see Exercise
Exercise 6).6). Moreover,
Moreover, 86 is
is formally
formally an
an even
even function,
function, 6(—t) = 6(t]
8( -t) = for all
8(t) for all t, so
so
viro also
we a1cr» Vicnro
have
(b 8(8 _ t)g(t) dt = {9(8), 8 E [a, b], (4.46)
Ja 0, 8~[a,bj.
This is
is called the sifting
sifting property of the Dirac deltadelta function. Incidentally,
Incidentally, aa se-
quence
quence of functions such
of functions such as
as {d
{di/ }, which
1 / nn}, converges to
which converges the delta
to the delta function, is called
function, is called
aa delta-sequence.
delta-sequence.
Our
Our analysis
analysis now
now suggests
suggests that
that the IVP
the IVP

du
- - au = 8(t - 8)
dt '
u(to) = °
has solution u(t)
has solution u(t) == G(t; 8).
s).
Indeed,
Indeed, this
this follows from our
follows from our formula
formula for
for the
the solution of (4.41)
solution of (4.41) (with
(with Uo
UQ == 0)
0)
and from
and from the
the sifting
sifting property of the
property of delta function:
the delta function:

Since G(t;
Since 8) is
G(t',s) is zero for tt < 8s anyway,
zero for anyway, we obtain simply
we obtain simply u(t)
u(t) == G(t;
G(t]s). This
8). This
again emphasizes
again emphasizes the
the meaning
meaning of of G(t; 8): it
G(t;s): it is
is the
the response (of the
response (of system under
the system under
consideration) at
consideration) time t to
at time to aa (unit)
(unit) point source at
point source at time
time s > to-
2: to.

4.6.3 The Green's


Green's function
function for a
a second-order
second-order IVP
In Section 4.2.2,
In Section 4.2.2, we saw that
we saw that the solution to
the solution to

d2 u
dt 2 + ()2U = !(t),
u(to) = 0, (4.47)
du
dt (to) = 0
4.6. Green's functions 127

is
is
u(t) = ~ t sin (O(t - s))f(s) ds.
ito
Therefore, the
Therefore, the (causal)
(causal) Green's
Green's function
function for (4.47) is
for (4.47) is
sin (1I(t-s))
G(t;S) = II 0'
t> s,
{ , t < S.

4.6.4
4.6.4 Green's functions for PDEs
We
We cancan now
now briefly
briefly preview
preview the the form
form of of the Green's function
the Green's function for for an
an IVP
IVP or or IBVP
IBVP
defined by
defined by aa PDE.
PDE. We We will assume that
will assume that any
any boundary conditions are
boundary conditions are homogeneous
homogeneous
for simplicity.
for simplicity. Both
Both the the initial
initial values
values and the forcing
and the forcing function
function willwill be
be prescribed
prescribed overover
the spatial domain
the spatial domain of of the
the problem,
problem, and and wewe will
will have
have to to "add
"add up" up" the contributions
the contributions
across space as
across space as well
well as as across
across time. Therefore, the
time. Therefore, Green's function
the Green's function will
will have
have thethe
form
form G(x,
G(x, £; £, s), giving
t;~, giving the influence of
the influence of the
the datum
datum at at the
the space-time
space-time point
point (£, s) on
(~, s) on
the solution at
the solution at (x, t}. Moreover,
(x, t). Moreover, the the solution formula will
solution formula will involve
involve an an integral
integral over
over
space
space as as well
well as
as time,
time, since
since we we must
must addadd upup the
the contributions
contributions acrossacross thethe spatial
spatial
domain
domain as as well
well asas over
over the the time
time interval.
interval. A A similar
similar notion
notion of of Green's
Green's function
function
applies
applies in in the case of
the case of static
static problems,
problems, that that is,
is, PDEs
PDEs in in which
which the independent
the independent
variables are only space variables; then G(x; £) defines the influence of the
variables are only space variables; then G(x;~) defines the influence of datum
the datum
at
at the
the space
space point
point £ on the
~ on the solution
solution at at x.
x. This
This reasoning
reasoning also also hints
hints at
at one
one of the
of the
l
analogies
analogies mentioned in Section 3.6. The inverse matrix A~
matrix A-I defines the influence
of each component
of each component bj bj inin the
the data (right-hand side)
data (right-hand side) of the linear
of the linear system
system Ax. Ax = = b
b onon
component
component Xi Xi of
of the solution: bj
the solution: bj contributes
contributes (A-I (A~1)ijbj
)ijbj toto Xj, and we
Xi, and get the
we get full
the full
result
result byby adding
adding up over the
up over the position
position jj of of the
the datum
datum component.
component. This This story
story isis in
in
precise correspondence with
precise correspondence with the
the wayway in in which
which the Green's function
the Green's function G(t;
G(£; s) defines
s) defines
the
the influence
influence of of the
the datum
datum at at "position"
"position" (time)
(time) ss onon thethe solution
solution at "position"
at "position"
(time)
(time) t. So So GG isis presumably
presumably in some sense
in some sense anan inverse operator; we
inverse operator; we will
will develop
develop
this
this point of view
point of view further
further in Chapter 5.
in Chapter 5.

Exercises
1. Find
1. Find the
the Green's
Green's function
function for the following
for the following IVP:
IVP:
du
dt + 2u = f(t),
u(to) = Uo·

2. Suppose
2. Suppose aa certain
certain population
population grows
grows according
according to
to the
the ODE
ODE
dP
dt = 0.02P + f(t),

where
where /f is
is the
the immigration.
immigration. IfIf the
the population
population at
at the
the beginning of 1990
beginning of 1990 is
is 55.5
55.5
million
million and immigration during
and immigration during the
the next 10 years
next 10 is given
years is given by
by the function
the function
(t) =
ff(t) 1—
= 1 Q.2t (in
- 0.2t (in millions),
millions), where
where tt =
= 00 represents
represents the
the beginning of 1990,
beginning of 1990,
128 Chapter 4. Essential ordinary differential
differential equations

what
what will
will the
the population
population be
be at
at the
the beginning
beginning of
of 2000
2000 (t 10)? Use
(t = 10)? the
Use the
Green's function to find P(t)
P(t) and then P(10).

3. A certain radioactive isotope decays exponentially according to the law


dm
-=-km
dt '
where
where k = = In
In (2)/2. Here m(t) is
Here m(t) is the
the mass
mass ofof the
the isotope at time
isotope at time tt (seconds),
(seconds),
and the
and the differential
differential equation
equation indicates
indicates that
that aa constant
constant fraction
fraction of
of the
the atoms
atoms are
are
disintegrating at
disintegrating at each
each point
point inin time.
time. The
The above
above differential equation holds,
differential equation holds, of
of
course, when
course, when none
none ofof the isotope is
the isotope is being
being added
added or or taken away by
taken away by other means.
other means.
Suppose that
Suppose initially 10
that initially 10 gg of
of the
the isotope are present,
isotope are present, and
and mass
mass isis added from
added from
an external
an external source
source atat the constant rate
the constant rate of
of 0.1
0.1 g/s. Solve
Solve the
the IVP
IVP modeling
modeling this
this
situation, using
situation, using the
the Green's
Green's function,
function, and
and determine
determine thethe long-time
long-time behavior
behavior
of m(t).
of m(t).
4.
4. Find
Find the
the Green's
Green's function
function for
for the IVP
the IVP
rf2u
dt 2 + 4u = f(t),
u(O) = 0,

~~(O) = O.
5. Use the Green's function from the previous exercise to solve

d2 u
dt 2 + 4u = cos (t),
u(O) = 0,
~~ (0) = O.

6. Use the property


property
o E [a, b]:::} lab 8(t)g(t) dt = g(O)

and a change of variables to justify


justify (4.45),
(4.45).

4.7
4.7 Suggestions for
Suggestions for further
further reading
reading
There
There are
are many
many introductory
introductory textbooks
textbooks on
on ODEs, such as
ODEs, such as the
the text
text by
by Goldberg
Goldberg andand
Potter [18]. An
Potter [18]. An introductory
introductory text
text with
with aa particularly strong emphasis
particularly strong emphasis onon applied
applied
mathematics
mathematics is Boyce and DiPrima DiPrima [5]. A more advanced book that focuses on
the
the theory
theory ofof ODEs
ODEs (and
(and the
the necessary
necessary linear
linear algebra)
algebra) is
is Hirsch
Hirsch and Smale [26].
and Smale [26].
The
The reader
reader is
is referred
referred to
to Hirsch
Hirsch and Smale for
and Smale for aa complete description of
complete description of the theory
the theory
of linear, constant-coefficient
of linear, constant-coefficient systems. (We covered
systems. (We covered only
only aa special
special case, albeit an
case, albeit an
important one, in
important one, Section 4.3.)
in Section 4.3.)
4.7. Suggestions for further reading 129

For more information on numerical methods for ODEs, the reader is referred to
Shampine [43]
Shampine [43] or
or Lambert [33]. Most
Lambert [33]. Most books
books on
on numerical
numerical analysis,
analysis, such as Atkinson
such as Atkinson
[2] and
[2] and Kincaid
Kincaid and
and Cheney [30], also
Cheney [30], also cover
cover numerical
numerical methods
methods for
for ODEs,
ODEs, asas well
well
as
as the
the background
background material
material on quadrature and
on quadrature interpolation.
and interpolation.
The
The text
text by
by Mattheij
Mattheij and
and Molenaar [38] gives
Molenaar [38] gives an
an integrated
integrated presentation
presentation of the
of the
theory and numerical analysis of ODEs, as well as their use for modeling physical physical
systems.
This page intentionally
This page intentionally left
left blank
blank
Chapter 5
Chapter 5

Boundary
dary value problems
In statice

Our first
Our first examples
examples of of partial
partial differential
differential equations
equations (PDEs)
(PDEs) will arise in
will arise in the
the study
study of
of
static (equilibrium)
static (equilibrium) phenomena
phenomena in in mechanics
mechanics and
and heat
heat flow. To make
flow. To make our
our introduc-
introduc-
tion to
tion to the subject as
the subject as simple
simple asas possible, we begin
possible, we with one-dimensional
begin with one-dimensional examples;
examples;
that is,
that is, all
all of
of the
the variation
variation is is assumed
assumed to to occur
occur in
in one
one spatial
spatial direction.
direction. Since
Since the
the
phenomena
phenomena are are static,
static, time
time is
is not involved, and
not involved, and the
the single
single spatial
spatial variable
variable isis the
the only
only
independent variable.
independent variable. Therefore,
Therefore, the "PDEs" are
the "PDEs" are actually
actually ODEs!
ODEs! Nevertheless,
Nevertheless, thethe
techniques we
techniques we develop
develop for the one-dimensional
for the one-dimensional problems generalize to
problems generalize to real
real PDEs.
PDEs.

5.1 and linear algebraic


The analogy between BVPs and
systems
As mentioned in
As mentioned in Chapter
Chapter 3, 3, the
the solution
solution methods
methods presented
presented inin this
this book
book bear
bear strong
strong
resemblance, at
resemblance, at least
least in
in spirit,
spirit, to
to methods
methods useful for solving
useful for solving aa linear
linear system
system of
of the
the
form Ax
form Ax == b.b. InIn the
the exercises
exercises and
and examples
examples ofof Chapter
Chapter 3,3, we
we showed
showed some
some of of
the similarities
the similarities between linear systems
between linear systems and
and linear
linear BVPs.
BVPs. We We now
now review
review these
these
similarities, and
similarities, and explain
explain the
the analogy
analogy further.
further.
We will use
We will use the
the equilibrium
equilibrium displacement.
displacement uu ofof aa sagging
sagging string
string as
as our
our first
first
example. In
example. In Section
Section 2.3,
2.3, we
we showed
showed that
that u satisfies
satisfies the
the BVP
BVP

d2u
-T dx 2 = f(x), 0 < x < £,
u(O) = 0, (5.1)
u(£) = 0,
where T is
where is the
the tension
tension in in the
the string
string and
and f/ is
is an
an external
external force
force density
density (in
(in units
units of
of
force per
force per length).
length).
If A
If A E R m x n , then
e RIDxn, then AA defines
defines an
an operator
operator mapping
mapping RnRn into R m , and
into RID, and given
given
m
b e RID,
bE R , we can ask
we can ask the following questions:
the following questions:

Is there
• Is there an e Rn which
an xx ERn which is
is mapped to bb by
mapped to A?
by A?

131
131
132 Chapter 5. Boundary value
value problems
problems in statics

If so,
• If so, is
is x
x unique?
unique?
• How
How can
can such an x
such an x be computed?
be computed?
In
In much
much the
the same
same way,
way,
d2
-T-2
dx
defines an
defines an operator-usually
operator—usually referred
referred to
to as
as aa differential
differential operator. For
For convenience,
convenience,
we
we will
will refer
refer to
to this
this operator
operator as
as L. ItIt maps
maps oneone function
function to
to another,
another, and the
and the
differential ermation
differential equation
d2 u
- T dx 2 = f (x), < x < £ ° (5.2)
can be
can be interpreted
interpreted as as the
the following question: Given
following question: Given a a function
function /f defined on the
defined on the
interval
interval [0,^], does there
[0,£], does there exist
exist aa function
function u u which
which isis mapped
mapped to to /f by
by L?
L? That
That is,
is,
does there
does there exist
exist aa function satisfying Lu =
function u satisfying /?
= f?
The
The analogy
analogy between
between Ax Ax = =b and Lu =
b and is strengthened
= f is strengthened by by the
the fact
fact that
that
the
the differential
differential operator
operator L is linear,
L is linear, just
just as
as is
is the
the operator
operator defined
defined byby the
the matrix A.
matrix A.
Indeed,
Indeed, if
if u and
and v are
are two
two functions
functions and
and a and {3
a and are scalars,
(3 are scalars, then
then
~
L(au + (3v) = -T dx 2 [au + (3v]
~u ~v
=-aT--(3T-
dx 2 dx 2
= aLu + (3Lv.

Underlying
Underlying thisthis calculation
calculation isis the
the fact
fact that
that aa space
space of functions can
of functions can be
be viewed
viewed as
as
aa vector
vector space-with
space—with functions
functions asas the
the vectors.
vectors. The
The operator
operator L is naturally
L is naturally defined
defined
on
on the the space
space C(722[0,£|
[0,£] introduced
introduced in in Section
Section 3.1. Thus L takes
3.1. Thus takes asas input
input aa twice-
twice-
continuously
continuously differentiable function u
differentiable function u and
and produces
produces asas output
output aa continuous function
continuous function
Tjii..
Lu.

Example
Example 5.1. Consider the
5.1. Consider function uu :: [0,1]
the function [0,1] —>
---+ R
R defined
defined by
by

°< x < ~,
~<x<1.

The function
The function uu is
is continuous
continuous on [0,1] (we
on [0,1] (we need
need only check that
only check the two
that the two cubic
cubic pieces
pieces
have the same value at x = 1/2, which
— 1/2, which they do).
do). We have

du { ~ (x - x ) ,
2
°< x < ~,
dx(x)= ~(x2_X+~), ~ < x < 1,
and
and it
it is
is easy to see
easy to see that
that both
both quadratic
quadratic pieces
pieces defining
defining du/dx
du/dx have
have value 1/8 at
value 1/8 at
= 1/2.
xx — 1/2. Therefore,
Therefore, du/dx
du/dx is
is continuous on [0,1]. Finally,
continuous on Finally,

~u2 (x) = {
dx
l-x
2 ' °< x < ~,
~ < x < 1,
1
x- 2'
5.1. The analogy between BVPs and
5.1. and linear algebraic systems
systems 133
133

that is,
that is,
::~(x) = Ix - ~I·
Thus cPu/dx
Thus 22
d?u/dx isis also
also continuous
continuous and EC
anduu E C22[0,1]. In fact, uu is
[0, 1]. Infact, is "exactly"
"exactly" in C 22[0,1],
in C [0, 1],
k
in the
in the sense
sense that,
that, because
because the
the third
third derivative
derivative of
of uu is
is discontinuous,
discontinuous, uu $. C [Q,
f/. Ck 1] for
[0, 1] for
2:
any kk > 2:
any
3
d u X _ {-I, 0< x < ~,
dx 3 ( ) - 1, ~ < x < 1.
Figure 5.1 shows
Figure 5.1 shows the
the graphs of uu and
graphs of and its
its first
first three
three derivatives.
derivatives.

0.15

0.1

0.1
0.05

0
0 0.5 1 0.5 1
X X

0.5

-0.5
0.1
-1
0.5 1 0 0.5 1
X X

Figure 5.1.
Figure 5.1. A A function
function in
in C (722[0,1]
[0, 1] (see
(see Example
Example 5.1): = u(x)
5.1): yy = u(x) (top left),
(top left),
the first
the first derivative
derivative of
of uu (top
(top right),
right), the
the second
second derivative of uu (bottom
derivative of (bottom left),
left), and
and the
the
third derivative
third derivative of
of uu (bottom
(bottom right).
right).

The
The reader should notice
reader should notice that
that the
the function
function uu defined
defined in Example 5.1
in Example is the
5.1 is the
solution of
solution of Lu for aa certain
Lu == f for certain f/ E
6 C[O,
C[0,1], namely,
1], namely,

f(x) = -Tlx - ~I·


134 Boundary value problems
Chapter 5. Boundary problems in statics

On the
On the other
other hand,
hand, ifif we define vv =
we define = du/dx,
du/dx, then
then vv is is not
not the solution of
the solution of Lu
Lu == fJ
22
for any / £ C[0,1] (because d?v/dx is discontinuous). Indeed, Lv is not defined,
for any J E C[O, 1] (because rPv/dx is discontinuous). Indeed, Lv is not defined,
strictly speaking,
strictly speaking, since
since dv/dx
dv/dx is not differentiable
is not differentiable on on the entire interval
the entire [0,1]. Thus
interval [0,1]. Thus
22
it makes
it sense to
makes sense to regard
regard the
the domain
domain of of L as C
Las (7 [0,1]:
[0, 1]:

L: C 2 [0, 1]-t C[O, 1].

It is
It is possible
possible to
to take
take the
the analogy
analogy of Lu = f with
of Lu with Ax = bb even
even further.
further. If
If
A E R m x n , then
G Rffixn, then Ax = = bb represents m equations
equations in
in n unknowns,
unknowns, each
each equation
equation
having the form
having the form

In the
In the same
same way,
way, LuLu = — jJ represents
represents aa collection
collection ofof equations,
equations, namely,
namely, the
the conditions
conditions
that, the
that the functions
functions
_T rPu
dx 2
and /J must
and must be equal at
be equal at each
each xx Ee [0, fl. Here,
[0,£J. Here, though,
though, we we see
see aa major
major difference:
difference:
Lu
Lu == f represents
represents an an infinite
infinite number
number of of equations,
equations, since
since there
there is
is an
an infinite
infinite number
number
of points
of points x e [0,
x E fl. Also,
[0,£j. Also, there are infinitely
there are infinitely many unknowns, namely,
many unknowns, the values
namely, the values
u(x),xe [0,4
u(x), x E [O,f].
The role of
The role the boundary
of the conditions is
boundary conditions is not difficult to
not difficult explain in
to explain in this
this context.
context.
Just as
Just as aa matrix
matrix A E R m x n can
6 Rffixn can have
have aa nontrivial
nontrivial null
null space,
space, inin which case Ax ==
which case =
b
b cannot
cannot have
have aa unique solution, so
unique solution, so aa differential
differential operator
operator can have aa nontrivial
can have nontrivial
null space.
null space. It isis easy
easy toto verify
verify that the null
that the null space
space ofof L consists
consists of all first-degree
of all first-degree
polynomial functions:
polynomial functions:

N(L)=={u: u(x)=ax+b, a,bER}.

Therefore, Lu
Therefore, Lu = /J cannot
cannot have
have aa unique solution, since
unique solution, since if u is
if u is one
one solution
solution and
and
w(x] ==
w(x) ax + b,
= ax then uu + w
b, then w is another solution.
is another On the
solution. On the other
other hand,
hand, Lu = ff does
Lu = does
have solutions for
have solutions for every
every f/ E
e C[O,f];
C^O,^]; for
for example,
example,

u(x)
1rr
= -Iji 10 10 J(z)dzds

solves
solves Lu f . This
= f.
Lu = is equivalent
This is equivalent to
to saying
saying that
that the
the range
range of L is
of L all of
is all of C[O,£].
C[0,4

Example 5.2. Let


Example 5.2. G C[O,
Let ff E C[0,1] be defined
1] be defined by
by ff(x)
(x) —
== x. Then, for
x. Then, for every a, bE
every a, b e R,
R,

1
u(x) == - 6Tx3 + ax + b
is a solution of
is of Lu = ff.. That
Lu = That is, the
the general solution ofof Lu
Lu —== f consists of
of
u(x) =
u(x) -x33/(6T)
= —x /(6T) plus any
any function from the
the null
null space of
of L. (See
(See page 43.)
43.)

The fact
The fact that the null
that the null space
space of
of L is
is two-dimensional suggests that
two-dimensional suggests that the
the operator
operator
equation
equation Lu
Lu == is closely
= f is closely analogous
analogous toto aa linear
linear algebraic
algebraic equation
equation Ax = == b,
b, where
where
A (n — 2) x n matrix and R(A)
A is an (n-2) H(A) == R n ~ 2 (that is, the columns of A
= Rn-2 R n ~ 2 ).
A span Rn-2).
5.1. The
5.1. The analogy
analogy between
between BVPs
BVPs and
and linear
linear algebraic
algebraic systems
systems 135

Such aa matrix
Such matrix AA has the property
has the property that
that Ax
Ax == bb has
has aa solution
solution for every bb E
for every Rn 2 ,
€ Rn-2,
but the
but the solution
solution cannot
cannot bebe unique.
unique. Indeed,
Indeed, in
in this
this case,
case, M(A)
N(A) is two-dimensional,
is two-dimensional,
and therefore
and therefore so
so is
is the
the solution
solution set
set of
of Ax
Ax == bb for
for every e R n . In
every bb ERn. In order
order to obtain
to obtain
aa unique
unique solution,
solution, wewe must
must restrict
restrict the
the allowable
allowable vectors
vectors xx by
by adding
adding twotwo equations.
equations.
2x4
Example 5.3.
Example 5.3. Let
Let A eR
A E R2x4 be defined
be defined by
by

A-
_[-1° 2 -1 ° ]
-1 2 -1 .

Then it
Then it is
is easy
easy to
to show
show that N (A) =
that N(A) = span{vl'
span{vi,v<2},
V2}, where
where

(It is
(It is also
also easy
easy to
to see
see that
that R(A) R2; since
"^-(A) == R2, since the
the first
first two
two columns
columns ofof A
A are
are linearly
linearly
4
independent.) Thus,
independent.) «/x
Thus, if e R4
x E R satisfies Ax =
satisfies Ax = 0,
0, then
then there
there exist
exist s,
s,tt E
€RR such
such that
that

x = SVl + tV2. (5.3)

In order to
In order to narrow
narrow down
down aa unique
unique solution,
solution, we
we must
must impose
impose additional
additional conditions
conditions
that force
that force ssand
and tt to
to both
both be
be zero.
zero. If we are
If we are to
to preserve the linear
preserve the linear nature
nature ofof the
the
problem, these conditions
problem, these conditions will
will simply
simply be
be two
two more
more linear
linear equations,
equations, of
of the
the form
form

w·x=o, (5.4)
z·x = 0,

where w,z
where are two
W, z are two vectors
vectors in R44.• There
in R There are
are many
many vectors w and z that
vectors wand that will
will work;
work;
indeed, as
indeed, as long
long as w; z, and
as w, and the
the two
two rows
rows ofof A form
form aa linearly
linearly independent
independent set,
set,
then these
then additional equations
these additional equations will
will result
result in
in aa unique
unique solution.
solution.
For example,
For example, let w=
let w = el
ei =
= (1,0,0,0)
(1,0,0,0) andand zz =
= e4
64 =
= (0,0,0,1).
(0,0,0,1). Then
Then (5.3)
(5.3) and
and
(5-4) together
(5.4) together imply
imply

s = 0,
s + 3t = 0,

and the
and the only
only solution
solution to
to this
this system 0. Therefore,
is ss == t == 0.
system is Therefore, the
the only vector xx E
only vector GRR4
satisfying (5.3)
satisfying (5.3) and
and (5.4)
(5.4) is = o.
is xx = 0.
The matrix
The matrix AAE eRR22x4
x4
defines an
defines an operator
operator mapping
mapping

(Kx. =
(Kx
and
— Ax).
Ax). One
64 -x =
and e4·X
One way
= 00 is
way to
is that
to understand
that they
understand the
they allow
allow us
us to
the role
to define
role of
of the
the additional
define aa matrix
additional equations
B eR
matrix BE 4x4
R4X4
ei .• xx =
equations el
vector cc E
and aa vector
and
= 0
R44
6R
°
136 Chapter 5. Boundary
Boundary value problems in statics

such that By
such that By == cc has
has aa unique
unique solution
solution related in aa simple
related in simple way
way to
to a
a solution
solution of
of
Ax == b. The matrix B would
The matrix would be
be

l
B=
-~
° °2 2 -1
-1
°° ° °
However, this way of looking at the situation does not generalize in a natural way to
However, this way of looking at the situation does not generalize in a natural way to
differential
differential equations. Therefore, we
equations. Therefore, we interpret the two
interpret the two side equations as
side equations as restricting
restricting
the domain of of the operator.
The equations
The equations
el . x = 0, (5.5)
e4· x = °
are satisfied
are satisfied by vectors of
of the
the form
form

(and only
(and only by
by vectors
vectors of
of this
this form),
form), where 62 =
where e2 = (0,1,0,0) and 63 =
and e3 = (0,0,1,0).
Therefore, by
Therefore, by imposing
imposing the
the equations
equations (5.5), we are allowing
we are allowing only
only solutions to Ax
solutions to Ax ==
bb that
that belong
belong to
to the subspace
the subspace

S = span{e2,e3}.
We define
We define aa new
new operator
operator KSKs : SS -t —> R R22 byby restriction: KS*.
Ksx = = Kx
Kx (so(so KS
Ks is is
the same as K, except that we
except that we restrict
restrict the set of allowable
allowable inputs). We We have thenthen
shown that the
the operator KS has a trivial
Ks has trivial null space—the
space-the onlyonly solution to
to KSX
Ksx = = 00 is
x== o.
0. By
By the
the same token, any b
token, for any bE R 2 , there
€ R2, there is
is aa unique
unique solution toto KS~X.
Ksx = = b.b.
The
The final
final step
step in this example
in this example is to interpret
is to interpret thethe operator equation K§x
operator equation Ksx = = bb
as a matrix-vector equation. After
matrix-vector equation. After all,
all, KS
Ks is a linear
linear operator defined
defined on finite-
finite-
dimensional vector spaces,
dimensional vector spaces, and
and it
it therefore
therefore must
must bebe representable
representable byby aa matrix.
matrix. We We
write vectors x
write vectors e 5 in
xES in terms
terms of their coordinates
of their coordinates with
with respect
respect to
to the
the basis {62, e
basis {e2, 3}:
e3}:

xES:::} x = Ule2 + U2e3.


2
We can
We thus identify
can thus with R
identify SS with R2: :
x = Ul e2 + U2e3 E S B u E R 2.
The matrix
The matrix revresentinq
representing K$
Ks is therefore 2 xx 22,, and
is therefore the reader
and the reader can show2266 that
can show this
that this
matrix
matrix is
is

26
c= [ 2 -1]
-1 2 .
The reader
26The reader should
should recall from Exercise
recall from 3.1.8 that
Exercise 3.1.8 that there
there is
is aa canonical
canonical method
method for
for computing
computing
the
the matrix
matrix representing
representing aa linear
linear operator
operator on
on finite-dimensional spaces: The
finite-dimensional spaces: The columns of the
columns of matrix
the matrix
are
are the
the images
images under
under the operator of
the operator of the standard basis
the standard basis vectors. If uu =
vectors. If = (1,0),
(1,0), then
then K$u
Ksu = = (2, —1),
(2, -1),
and so the
and so the first
first column of C
column of C must be
must be
[ -i ].
The
The second
second column of C
column of C is determined by
is determined computing the
by computing the image
image of
of (0,1)
(0,1) under KS-
under Ks.
5.1. The
5.1. The analogy
analogy between BVPs and
between BVPs and linear
linear algebraic
algebraic systems
systems 137

By inspection, we
By inspection, can see
we can that C is
see that is nonsingular,
nonsingular, as expected, and,
as expected, and, as
as an
an added
added
bonus, C
bonus, C is
is aa symmetric
symmetric matrix,
matrix, whereas
whereas the
the matrix B; obtained
matrix B, obtained from the other
from the other
point of view
point of view described
described above, is not
above, is symmetric.
not symmetric.

We now
We show that
now show that the
the role of the
role of the boundary
boundary conditions
conditions in (5.1) is
in (5.1) exactly
is exactly
analogous to the role of the extra equations el . x = 0, e2 . x = in the above
analogous
example. We
example.
to the role
view the
We view
of the extra
the boundary
equations
conditions
boundary conditions
ei • x = 0, 62 • x = 0 in the above°
u(o) = u(£) = °
as restricting
as restricting the domain of
the domain the operator
of the operator I/, and define
L, and define

LD : C1[0,£]-+ C[O,£],

where
where
c1[0,£] = {u E C 2 [0,£] : u(O) = u(£) = O},
by
by
d2 u
LDu = Lu = -T dx 2 '

This new
This new operator
operator LD
LD has
has aa trivial null space.
trivial null space. Indeed, e C22[0,l]
if u E
Indeed, if satisfies
[0, £] satisfies

~u
-T =0,
dx2

then u(x)
then u(x) = ax ax ++ bb for
for some
some a, e R. If
a, bb E If uu also
also satisfies w(0) =
satisfies u(O) = u(£) 0, then
u(t] == 0, then
0, and
aa == bb == 0, and uu is is the
the zero
zero function.
function. TheThe operator
operator LD, like L,
L D , like has the
L, has the property
property
that LDu = f has
that LDU has aa solution
solution for each f/ E
for each € C[O,
(7[0,1] (that is,
£] (that is, the
the range of LD
range of is C[O,
LD is C[0, £]),
and this
and this solution
solution isis unique because the
unique because the null
null space
space ofof LD
LD is is trivial.
trivial.
We next show
We next show that
that LD is aa symmetric
LD is operator, and,
symmetric operator, and, as such, it
as such, it has
has many
many of of
the properties of
the of aa symmetric
symmetric matrix. Before we we can
can demonstrate
demonstrate this, of of course,
we must
we must explain
explain what symmetry means
what symmetry for aa differential
means for differential operator.
operator. In In Section
Section 3.5,
3.5,
we saw
we saw that
that aa matrix
matrix A R n x n is
A €E Rnxn is symmetric
symmetric if and only
if and only ifif
(Ax)· y = X· (Ay) for all x,y ERn.

We can
We can make
make the analogous definition
the analogous definition for
for aa differential operator, using
differential operator, using the L22 inner
the L inner
product in place
product in of the
place of dot product.
the dot product.

Definition 5.4.
Definition 5.4. Let S be
Let 5 be aa subspace
subspace of Ck[a, b],
of Ck[a, and let
bj, and let K
K :: 5
S -+
—>• C[a,
C[a, bj
b] be
be aa linear
linear
operator. We
operator. We say that K
say that symmetric ifif
is symmetric
K is

(Ku, v) = (u,Kv) for all u,v E 5, (5.6)

where (-,-) represents


where (.,.) represents the L22 inner
the L inner product on the
product on the interval
interval [a,b].
[a, b]. That is,
That is, K
K is
symmetric if,
symmetric if, whenever
whenever u,v
u,v E€ 5,
S, and
and w = Ku,
w = Ku, zZ == Kv, then
Kv, then

lb w(x)v(x) dx = lb u(x)z(x) dx.


138
138 Chapter
Chapter 5. Boundary
Boundary value problems in statics

In working
In working with differential operators
with differential operators and
and symmetry,
symmetry, integration
integration by
by parts
parts is
is
an
an essential
essential technique, as the
technique, as the following
following examples show.
examples show.

Example
Example 5.5.
5.5. Let
Let LD
LD be the operator
be the operator defined above. Then,
defined above. Then, if € C1[0,
u,vv E
if u, Cf^O,^],
f], we
we
have
have

{l d2u
(LDu, v) = -T 10 dx 2 (x)v(x) dx

du ] l {l du dv
= [ -T dx (x)v(x) 0 + T 10 dx (x) dx (x) dx

~ ~ r~ ~
= -T dx (f)v(f) + T dx (O)v(O) + T 10 dx (x) dx (x) dx

{i du dv
= T 10 dx (x) dx (x) dx (since v(O) = v(f) = 0)

=
dV]l r ~v
[Tu(x) dx (x) 0 - T 10 u(x) dx 2 (x) dx
dv du (l ~v
= Tu(f) dx (f) - Tu(O) dx (0) - T 10 u(x) dx 2 (x) dx

(l ~v
= -T 10 u(x) dx 2 (x) dx (since u(O) = u(f) = 0)
= (U,LDV).

Therefore, LD
Therefore, LD is a symmetric
is a symmetric operator.
operator.

Example 5.6. Define


Example 5.6. Define

c1[0,ij = {u E C 1 [0,f] : u(O) = u(f) = O}


and MD : C1[0, f) -+ C[O, f) by

Then
Then

(l du
(MDu,v) = 10 dx(x)v(x)dx

= u(x)v(x)l~ -
r
10 dv
u(x) dx (x) dx

(l dv
= u(f)v(f) - u(O)v(O) - 10 u(x) dx (x) dx

(i dv
= - 10 u(x) dx (x) dx (since u(O) = u(f) = 0)

= -(U,MDV).
5.1. The analogy between BVPs and linear algebraic systems
systems 139

Therefore, MD
Therefore, MD is not symmetric.
is not symmetric.

A symmetric matrix
matrix A
A E R n x n has the following
G Rnxn following properties
properties (see Section 3.5):
All eigenvalues
• All eigenvalues of
of A
A are real.
are real.
Eigenvectors of
• Eigenvectors of A corresponding
corresponding to
to distinct eigenvalues are
distinct eigenvalues are orthogonal.
orthogonal.
There exists
• There exists aa basis
basis of R nn consisting
of R consisting of
of eigenvectors
eigenvectors of
of A.
A.
Analogous properties exist for
properties exist for a symmetric differential
differential operator.
operator. In fact, the first
27
two properties can be proved
proved exactly as they were for symmetric
symmetric matrices.
matrices. 27
k
In the
the following discussion, SS is a subspace of Ck[a, and K : S
C [a,b]b] and S —> C[a,b]
-t C[a, b]
operator. A scalar
is a symmetric linear operator. scalar A is an eigenvalue
eigenvalue of KK if there exists a
function u such that
nonzero function
Ku = AU.
Just as in the case of matrices, we
we cannot
cannot assume aa priori that A is real, or that the
the
eigenfunction u is real-valued. When working with complex-valued
eigenfunction complex-valued functions,
functions, the
L22 inner product on [a, b]
L 6] is defined by

(f,g) = lb f(x)g(x) dx. (5.7)

The properties
properties
(al,g) =a(f,g), (f,ag) =a(f,g)
hold, just as for the complex dot product.
product.
We immediately show that there is no need to allow complex numbers when
working with symmetric operators.
operators. Indeed, suppose u is a nonzero function and AA
is a scalar satisfying
Ku = AU.
Then, since (Ku,u)
(Ku,u) = (u,Ku) holds for complex-valued
= (u,Ku) complex-valued functions as well as real-
valued functions
functions (see Exercise 4), we have

(Ku,u) = (u,Ku)
=? (AU,U) = (U,AU)
=? A(U,U) = X(u,u)
=?A=X
=?AER.

It is easy to show that there must be a real-valued eigenfunction corresponding


corresponding to
AA (the proof is the same as for matrices; see Theorem
Theorem 3.44). Therefore, we do not
need to consider complex numbers any longer when we are dealing with symmetric
operators.
operators.
27
The third
27The third property is more
property is more difficult. We discuss
difficult. We discuss an analogous property
an analogous property for
for symmetric
symmetric dif-
dif-
ferential operators
ferential in the
operators in subsequent sections
the subsequent sections and
and delay
delay the
the proof
proof of
of this property until
this property Chapter
until Chapter
9.
9.
140 Chapter 5. Boundary
Chapter Boundary value problems in statics
statics

We
We now assume that
now assume that AI,
A1, A2 € R
A2 E R are
are distinct
distinct eigenvalues
eigenvalues of
of the
the operator K,
operator K,
with
with corresponding
corresponding eigenfunctions wi,W2
eigenfunctions U1, G S.
U2 E S. We
We then
then have
have

A1(U1,U2) = (A1U1,U2)
= ( KU1,U2)
= (U1, Ku 2)
= (U1' A2U2)
= A2(Ut, U2).

Since AI
Since ^ A2,
A1 =I A2, this
this is
is only
only possible if (U1'
possible if (^1,^2)
U2) == 0,
0, that
that is,
is, if u\ and
if U1 and U2 are orthog-
u^ are orthog-
onal. Therefore,
onal. Therefore, aa symmetric
symmetric differential operator has
differential operator has orthogonal
orthogonal eigenfunctions.
eigenfunctions.
The symmetric differential
The symmetric differential operator
operator LD has has aa special
special property
property not not shared
shared by
by
every symmetric
every symmetric operator. Suppose Aisisan
operator. Suppose an eigenvalue
eigenvalueofofLD and Uu isisaacorresponding
LD and corresponding
eigenfunction, normalized
eigenfunction, normalized so so that
that (u,u) = 1. Then
— 1. Then

A = A(U,U) = (AU,U) = (LDU,U)


£d2u
= -T l0 dx 2 (x)u(x) dx (5.8)

=T 1£ ~~ ~~(x) (x) dx (integration by parts)

=T 1£ (~~(x)) 2 dx
> 0.
Therefore, every eigenvalue
Therefore, every eigenvalue of
of LD is
is positive. (This explains
positive. (This explains why
why we
we prefer
prefer to
to work
work
with
with the second derivative
negative second
the negative derivative operator—the eigenvalues are
operator-the eigenvalues are then
then positive.
positive.
Actually,
Actually, in
in the
the computation above, it
computation above, it is
is only obvious that
only obvious that

and
and therefore
therefore that
that A >2: 0.
0. How
How can
can we
we conclude
conclude that,
that, in fact, the
in fact, inequality must
the inequality must
be strict? See
be strict? See Exercise
Exercise 5.)
5.)

Summary
Summary
We
We have
have now seen that
now seen that the differential operator
the differential operator

subject
subject to
to Dirichlet
Dirichlet conditions,
conditions, is symmetric, which
is symmetric, means that
which means that any eigenvalues
any eigenvalues
must
must be
be real and the
real and the eigenfunctions
eigenfunctions will
will be orthogonal. We
be orthogonal. have also
We have also seen
seen directly
directly
that any eigenvalues
that any eigenvalues must
must be
be positive.
positive. Assuming
Assuming we
we can
can find
find the eigenvalues and
the eigenvalues and
algebraic systems
5.1. The analogy between BVPs and linear algebraic 141
141

eigenfunctions of
eigenfunctions of LD, and that
L D , and that there
there are
are "enough"
"enough" eigenfunctions
eigenmnctions to
to represent
represent u
u
and f,
and /, we can contemplate
we can contemplate aa spectral
spectral method for solving
method for solving

tPu
-T dx 2 = f(x), 0< x < £,
u(o) = 0, (5.9)
u(£) = 0.

We develop
We develop this
this method
method in
in the
the next
next two sections.
two sections.

5.1.1
5.1.1 A note about direct integration
The BVP
The BVP (5.9)
(5.9) is
is quite
quite elementary;
elementary; indeed,
indeed, we
we already
already showed
showed in in Chapter
Chapter 22 how
how
to solve
to solve this
this and
and similar
similar problems
problems by by integrating
integrating twice
twice (see
(see Examples
Examples 2.22.2 and
and 2.3).
2.3).
There are
There are two
two reasons why we
reasons why we spend
spend this
this chapter
chapter developing
developing other
other methods
methods for
for solv-
solv-
ing (5.9).
ing (5.9). First
First of
of all,
all, the
the methods
methods we we develop,
develop, Fourier
Fourier series
series and
and finite
finite elements,
elements,
form the
form basis of
the basis of methods
methods forfor solving
solving time-dependent
time-dependent PDEs
PDEs in in one
one spatial
spatial variable.
variable.
Such PDEs
Such PDEs do do not
not admit direct solution
admit direct solution by
by integration.
integration. Second,
Second, both
both the
the Fourier
Fourier se-
se-
ries method
ries method andand the
the finite element method
finite element method generalize
generalize in
in aa fairly
fairly straightforward
straightforward wayway
to problems
to problems in in multiple spatial dimensions,
multiple spatial dimensions, whereas
whereas the
the direct
direct integration
integration method
method
does not.
does not.

Exercises
1. Let
1. Let MD be the
MD be the operator
operator defined
defined in
in Example
Example 5.6.
5.6.
(a) Show
(a) Show that
that if
if f/ Ee C[O,
C[0,£] is such
£] is such that
that Mpu has aa solution,
MDu = f has solution, then that
then that
solution is
solution is unique.
unique.
(b) Show
(b) Show that
that MDu has aa solution
Mpu =— f has solution only
only if
if f/ Ee C[O,
C[0,^] satisfies aa certain
£] satisfies certain
constraint. What
constraint. What is
is that constraint?
that constraint?
l
2. Define
2. Define C][O,
C}[Q,t]£] == {u
{u E€ C
C 1[Q,i]
[0, £] u(0) == O}
: u(O) 0} and
and MI
M7 :: C][O,
C)[0,£] ->• C[0,
£] --+ C[0,£] by
£] by
du
M1u = dx'

(a) Show
(a) Show that
that M/w
M1u == f/ hashas aa unique
unique solution
solution for
for each
each f/ E6 C[O,£].
C[0,^]. (Hint:
(Hint:
Use
Use the fundamental theorem
the fundamental of calculus.)
theorem of calculus.) This
This is
is equivalent
equivalent to
to showing
showing
that N(M
that JV(M/) is trivial
1 ) is trivial and
and R(M
ft(M/) = C[O,£].
1) = C[Q,f\.
(b) Show
(b) Show that
that MI
M/ is
is not
not symmetric.
symmetric.

3. Consider
3. Consider again
again the
the differential
differential operator
operator equation
equation Lu = discussed in
— f discussed in Section
Section
5.1. Suppose
5.1. Suppose an
an equation
equation LsuLSU = = f/ is
is produced
produced by restricting the
by restricting the domain
domain ofof
L to
to aa subspace
subspace S of C22[0,£]
of C [0,£] (that
(that is,
is, by
by defining
defining LSU
Lsu == Lu for
for all
all u € 5).
E S).

(a) Show
(a) Show that LSU == f/ has
that Lsu has at
at most one solution
most one solution for
for each
each f/ Ee C[O,
(7[0, £]
t] provided
provided
N(L)nS
N(L) n S == {O}.
{Q}.
142 Chapter 5. Boundary value problems
problems in statics

(b) Show
(b) Show that L$u =
that Lsu — fj has
has aa unique
unique solution
solution for
for each
each f/ E
e C[O,f]
C[0,1] for
for either
either
of the following choices of
of the following choices of S:
i. S={UEC2[0,f]: ~~(~)=O, f~u(x)dx=O}.
ii. S = {u E C 2[0,f] : u(O) = ~~(O) = O}.
4. Suppose S
4. Suppose 5 is
is aa subspace
subspace of Ck[a, b]
of Ck[a, and K : S
b] and S -+ 6] is
—>• C[a, b] is aa symmetric
symmetric
linear operator. Suppose u, v are complex-valued functions, with u =
linear operator. Suppose u, v are complex-valued functions, with u = f/ + ig,
ig,
w + iz,
vv == w where /,
iz, where g, w, z EG S.
f,g,w,z 5. Show
Show that
that

(Ku,v) = (u,Kv)

holds, where (.,.)


(•, •) is defined by (5.7).

5. Explain why,
why, in the last step of the calculation
calculation (5.8), the integral

must be
must positive. (Hint:
be positive. (Hint: If du/dx is
If du/dx is zero,
zero, then must be
then u must constant. What
be constant. What
constant functions
constant functions belong
belong to C£)[0,^]?)
to C1[0, f]?)

6. Define
6. Define
C![O,f] = {u E C2[0,f] u(O) = ~~(£) = O}
and Lm : C~ [0, f] -+ C[O, f] by

(a) Show
(a) Show that
that the
the null
null space
space of
of Lm is trivial.
Lm is trivial.
(b) Show
(b) Show that
that the
the range
range of
of Lm is all
Lm is all of (7[0,^].
of C[o,f].
(c) Show that
(c) Show that Lm
Lm is symmetric.
is symmetric.
(d) Show that all of the eigenvalues of Lm
Lm are positive.

7. Repeat Exercise 6 with C~[O,f] and Lift : C~[O,f]-+ C[O,f] defined by

C~[O,f] = {u E C2[0,f] : ~~(O) = u(f) = O},


J2u
Liftu = - dx 2'

8. Repeat
8. Repeat Exercise
Exercise 66 with
with K: C^[Q,f\ ->• C[O,f]
K : C1[0,f]-+ defined by
C[Q,f\ defined by

J2u
Ku=-a +bu,
dx2
where aa and
where and bb are
are positive
positive constants.
constants.
5.1. The
5.1. The analogy
analogy between BVPs and
between BVPs and linear
linear algebraic
algebraic systems
systems 143
143

the differential
9. Consider the differential operator
operator M
M :: C1[0,
C^O, 1)-+
1] —>• C[O,
C[0,1]
1) defined by
cPu du
Mu= --+ -+5u.
dx 2 dx
M is
Show that M is not symmetric by producing two functions u, 6 C1[0,1]
u, v E (7^(0,1]
such that
such that
(Mu,v) =I (u,Mv).
10. Define B : C44[0,l] -> C[O,
[0, £) -+ C[Q,£\
£) by
d4 u
Bu = dx 4 .
(a) Determine the null space of B. B.
(b) Find a set of boundary conditions such that, if 5 S is the subspace of
of
(744[0,1]
C [0, £] consisting of functions satisfying these boundary conditions, then
B, restricted to 5,
B, restricted S, is
is symmetric and has a trivial
trivial null space.
11. In this exercise, we
11. we consider a new boundary condition, more complicated
than Dirichlet or Neumann conditions, that provides a more realistic
realistic model
of certain physical phenomena. This boundary condition is called a Robin
we will introduce it in the context
condition; we context of steady-state heat flow
flow in a
one-dimensional bar.
Suppose the ends of a bar are uninsulated and the heat flux through each end
is proportional
proportional to the difference between the temperature
temperature at the end of the bar
and the
and the surrounding
constant
surrounding temperature (assumed constant).
temperature (assumed
constant of proportionality
proportionality and To,
TO, T£
constant). If we
the temperatures
TI be the
let aa > 0 be
we let be the
temperatures surrounding the
the
the
°
ends of
ends of the
the bar
bar at
conditions are
at xx = °
= 0 and
and xx = £, respectively, then
i, respectively, then the
the resulting
resulting boundary
boundary

du
K, dx (0) = -a (To - u(O)) ,
du
K, dx (£) = a (T£ - u(£)).

These can be rewritten as


du
-K, dx (0) + £lu(O) = £lTD,
du
K, dx (£) + £lu(£) = £IT£.

Define

c1[0, £] = {u E C2 [0, £] : -K, ~~ (0) + £lu(O) = 0, K, ~~(£) + £lu(£) = O},

and let LR : CMO, £] -+ C[O, £] be defined by


cPu
LRU = -K, dx 2 ·
144
144 Chapter 5. Boundary
Chapter Boundary value problems in statics

(As usual,
(As usual, we define the
we define operator in
the operator in terms
terms of
of the
the homogeneous version of
homogeneous version of the
the
boundary conditions.)
boundary conditions.)
(a) Prove
(a) Prove that
that LR is symmetric.
LR is symmetric.
(b) Find
(b) Find the
the null space of
null space of LLR.
R.

5.2
5.2 Introduction to
Introduction to the spectral method:
the spectral method;
eigenfunctions
eigenfunctions
In
In this section and
this section and the
the next,
next, we develop aa "spectral"
we develop "spectral" method
method for
for the BVP
the BVP
J2u
-T =/(x), O<x<£,
dx2
u(O) = 0, (5.10)
u(£) = O.
This BVP can
This BVP can bebe written simply as
written simply as Lpu
LDu = = /,/, where
where LD is the
LD is symmetric linear
the symmetric linear
differential operator
differential operator defined
defined in the last
in the last section.
section.
The spectral
The spectral method
method forfor aa symmetric
symmetric linear
linear system
system AxAx = = b is based
b is based on on
the fact that
the fact that aa symmetric
symmetric matrix
matrix A A E R n x n has
e RllXll has nn orthonormal eigenvectors, and
orthonormal eigenvectors, and
therefore
therefore anyany vector
vector in Rn (including
in Rll (including the right-hand side
the right-hand side b and the
b and solution x)
the solution x) can
can
be
be written,
written, in in aa simple
simple way, as aa linear
way, as linear combination
combination of of those
those eigenvectors.
eigenvectors. (The (The
reader
reader may
may wish
wish toto review Section 3.5
review Section 3.5 at this time.)
at this We have
time.) We seen, at
have seen, the end
at the end ofof
the last section,
the last section, that
that any
any eigenvalues
eigenvalues of LD must
of LD must be
be real
real and positive and
and positive and that
that
eigenfunctions of
eigenfunctions of LD corresponding to
LD corresponding distinct eigenvalues
to distinct eigenvalues must
must be orthogonal. We
be orthogonal. We
now find the
now find the eigenvalue-eigenfunction
eigenvalue-eigenfunction pairs pairs (eigenpairs
(eigenpairs for short) of
for short) of LD and explore
LD and explore
the following question:
the following question: Can
Can we
we represent
represent thethe right-hand side f(x)
right-hand side /(x) and the solution
and the solution
u(x) in
u(x) in terms
terms of of the
the eigenfunctions?
eigenfunctions?

5.2.1
5.2.1 - -j^ under
Eigenpairs of — :1:2
under Dirichlet conditions
We will
We will show
show that
that the
the operator
operator LDLD has
has an infinite collection
an infinite collection of eigenpairs. To
of eigenpairs. To
simplify the
simplify calculations, we
the calculations, we may
may asas well assume that
well assume that T
T == 1,1, since
since if
if A,
A,wu is an
is an
eigenpair of
eigenpair of
d2
dx 2
(subject to
(subject to Dirichlet conditions), then
Dirichlet conditions), then T)..,
T\,u is an
u is an eigenpair
eigenpair of
of
J2
-T-2
dx
under
under the same boundary
the same conditions.
boundary conditions.
To find the
To find the eigenpairs,
eigenpairs, we need to
we need to solve
solve
d2 u
- dx 2 = AU,
u(O) = 0, (5.11)
u(£) = O.
5.2.
5.2. Introduction
Introduction to
to the
the spectral
spectral method;
method; eigenfunctions
eigenfunctions 145
145

"Solving" this
"Solving" this problem
problem means identifying those
means identifying those special
special values
values of of AA such
such that the
that the
BVP (5.11) has
BVP (5.11) has aa nonzero
nonzero solution
solution u,u, and
and then
then determining
determining u. u. (For
(For any
any value
value of
of
A,
A, the
the zero
zero function
function is is aa solution
solution ofof (5.11),
(5.11), just
just as
as x == 00 isis aa solution
solution of
of Ax
Ax == Ax
AX
for any
for any A. In both
A. In cases, the
both cases, the eigenvalues
eigenvalues are are the
the scalars
scalars which lead to
which lead to aa nonzero
nonzero
solution.) Since
solution.) Since we we know,
know, fromfrom the
the previous
previous section,
section, that
that all such A
all such are positive,
A are positive,
we
we write
write A
A== O(J2.2. We can use
We can use the
the results of Section
results of Section 4.2
4.2 to
to write
write the general solution
the general solution
of
of the ODE
the ODE
cf2u 2
dx 2 +0 U = 0, (5.12)

and then
and then try
try to satisfy the
to satisfy the boundary conditions.
boundary conditions.
The
The characteristic
characteristic roots
roots of
of (5.12)
(5.12) are ±Oi, and
are ±0i, and the
the general
general solution
solution is
is

u(x) = Cl cos (Ox) + C2 sin (Ox).


Therefore,
Therefore,
u(O) = Cl,

and the
and the first
first boundary
boundary condition
condition implies c\ =— 0.
implies Cl O. We
We then
then have
have u(x) = C2sin(0x),
u(x] — C2 sin (Ox),
and the
and the second
second boundarv
boundary condition
condition becomes
becomes

C2 sin (Of) = O.
This
This equation
equation only
only holds in two
holds in cases:
two cases:

1. The
1. The value
value of C2 is
of C2 is zero.
zero. But
But then
then u(x) is the
u(x) is the zero function, which
zero function, cannot be
which cannot be
an eigenfunction.
an eigenfunction.
2. The value
2. The value of
of A
A= O22 is
= 0 such that
is such that sin
sin (Of.)
(Of) == 0.
O. This
This holds
holds in
in the cases
the cases

Of = ±n1f, n = 1,2, ....

Solving for
Solving for A,
A, we
we have
have
n 2 1f2
A=~, n= 1,2, ...

(we discard
(we discard the
the case
case that
that A
A== 0,
0, for
for then
then uu is
is the
the zero function). It
zero function). It turns out
turns out
that
that the
the value
value of C2 is
of c^ is immaterial;
immaterial; these
these values
values ofof A,
A, and
and no
no others,
others, produce
produce
eigenfunctions
eigenfunctions with
with the
the correct
correct boundary conditions.
boundary conditions.
We
We thus see that
thus see that the
the operator LD has
operator LD infinitely many
has infinitely eigenpairs:
many eigenpairs:

(5.13)

We
We already
already know
know that,
that, since
since the
the eigenvalues
eigenvalues of LD are
of LD are distinct,
distinct, the
the eigenfunc-
eigenfunc-
tions
tions listed
listed above
above must
must be
be orthogonal.
orthogonal. This
This can also be
can also be verified
verified directly
directly using the
using the
trigonometric identity
trigonometric identity
1
sin Qsin.B = "2 (cos (Q - .B) - cos (Q + .B))
146 Chapter 5. Boundary
Boundary value
value problems
problems in statics

(see
(see Exercise 1). Also,
Exercise 1). Also, for each n,
for each

that
that is,
is,

II1/1nll = [f, n = 1,2, ....


Thus
Thus the
the eigenfunctions are orthogonal,
eigenfunctions are orthogonal, and
and they
they can
can be
be normalized
normalized by
by multiplying
multiplying
each
each by
by ^/2/l. -/27"f.
The
The first
first four
four eigenfunctions are6 graphed
V>i, V>2, V's, V>4 a^
eigenfunctions 1/11,1/12,1/13,1/14 graphed in
in Figure
Figure 5.2.
5.2.

1 -\""'-'W"'" - .........
,,' ,- ,.,
",; " '
:, , ,,
,: i ,' ,, \
"

,:,'
:', ,
, \ \
\
\
0.5 :;
:' ,
, \
\
,',
'" \

,::.', \
,
\
, I "
\
\
:"
jl
\
\
\ ,
\ \
,: "
,
\
:"
,
\
\ ,
\ \
, ,, ,
\
\
\
, ,, :
,:
:

,, :
\
-0.5 \
. \t
"

, :
,-'
, ,,
\ , :
\
\' :'

, "','
"

: \ , :

-1 '.,'
, ' ...... ,,;
"
..
' ---; ",'
,-
.-

o 0.2 0.4 0.6 0.8 1


x

Figure 5.2. The first ^15^2,^85^4


first four eigenfunctions 1/11, = 1J-
'1/12,1/13,1/14 ft(£ — I),

5.2.2
5.2.2 Representing functions
Representing in terms
functions in terms of
of eigenfunctions
eigenfunctions
We
We have
have shown
shown that
that the -d? / dx22,, subject
operator —d?/dx
the operator subject to to Dirichlet
Dirichlet boundary condi-
boundary condi-
tions,
tions, has an infinite
has an infinite number
number of eigenpairs, and
of eigenpairs, and that
that the eigenfunctions are
the eigenfunctions orthog-
are orthog-
onal.
onal. We
We now
now must answer the
must answer crucial question:
the crucial question: is is it
it possible
possible to
to represent
represent both the
both the
solution
solution and
and right-hand
right-hand side of (5.10)
side of in terms
(5.10) in terms of of the
the eigenfunctions?
eigenfunctions?
5.2. Introduction to
5.2. Introduction to the
the spectral
spectral method; eigenfunctions
method; eigenfunctions 147
147

Let us
Let us take any function
take any function f/ e
E e[o, fl. We
<7[0,^]. We know,
know, from Section 3.5,
from Section 3.5, how
how to
to find
find
the
the best
best approximation
approximation to
to f/ from
from aa finite-dimensional subspace. We
finite-dimensional subspace. We define
define

. (7fX) ,sm
FN = span { sm e
. (27fX) . (N7fX)}
-f- , ... ,SIn -f- .

The
The best approximation to
best approximation to f/ from FN is
from FN is

Since (?/>
Since n ,V>n) =
(1/Jn,1/Jn) ^/2 for
= f/2 for all
all n,
n, we have
we have

(1/Jn, f) 2 r l
( ) . (n7fX)
Cn = (1/Jn,1/Jn) ="iJo fx sm -f- dx, n=1,2, ... ,N.

28
We
We now
now show
show several
several examples
examples of
of this
this approximation.
approximation. 28 In
In the
the following examples,
following examples,
f1 == 1.
1.

Example 5.7.
Example 5.7. Let
Let
f(x) = x(l - x).
Then
Then
4(1+ (_l)n+1)
1
1
cn =2 x(1-x)sin(n7fx)dx= 33 .
o n 7f
Figure
Figure 5.3
5.3 shows
shows the errors in
the errors approximating /(#)
in approximating f(x) byby /N(X]
fN(X) for
for N
N = 10,20,40,80.
= 10,20,40,80.
(The approximations
(The approximations are so good
are so good that, if we
that, if we were
were toto plot
plot both and /AT
both ff and fN onon the same
the same
graph,
graph, the
the two curves would
two curves would bebe virtually
virtually indistinguishable. Therefore, we
indistinguishable. Therefore, we plot the
plot the
difference
difference f(x)
f(x) —
- /N(X)
fN(x) instead.)
instead.) In this example,
In this example, thethe approximation
approximation error
error is small
is small
and
and gets
gets increasingly
increasingly small
small as
as N
N increases.
increases. It is easy
It is to believe
easy to believe that
that

fN(x) -+ f(x) as N -+ 00.

Example 5.8.
Example 5.8. Let
Let
f(x) = I-x.
Then
Then
Cn =2 r (1 -
Jo
1
x) sin (n7fx) dx = ~.
n7f
Figure
Figure 5.4 shows
shows f(x)
f(x) together
together with
with the approximations /jv(ar)
the approximations fN(X) for
for N
N = 10,20,40,80
= 10,20,40,80.

28
Many specific
28Many specific integrals
integrals must
must be computed to
be computed compute these
to compute these approximations.
approximations. It
It is
is beyond the
beyond the
scope
scope ofof this
this book
book to
to discuss
discuss methods
methods of
of integration;
integration; moreover,
moreover, modern
modern technology often allows
technology often allows us
us
to
to avoid
avoid this
this mechanical step. Computer
mechanical step. algebra software,
Computer algebra software, such
such as Mathematica, MATLAB,
as Mathematica, Maple,
MATLAB, Maple,
etc.,
etc., as
as well
well as
as the
the more
more powerful
powerful handheld
handheld calculators,
calculators, will
will compute
compute many
many integrals
integrals symbolically.
symbolically.
148
148 Chapter
Chapter 5.
5. Boundary
Boundary value
value problems
problems in
in statics
statics

-4
1.5 x 10

1
0.5
o
0
-0.5

-5~------------------~ -1
o 0.5 1 0 0.5 1
-6
X1O
2

1
2

-2~------------------~ -2~------------------~
o 0.5 1 o 0.5 1

Figure
Figure 5.3.
5.3. Error
Error inin approximating
approximating f(x}
f(x) = = x(l—x)
xCI-x) byby /N(X)
fN(X) (see
(see Example
Example
5.7).
5.7). The
The value
value of
of N
N is
is 10
10 (top
(top left),
left), 20
20 (top
(top right),
right), 40
40 (bottom
(bottom left),
left), and
and 80
80 (bottom
(bottom
right).
right).

The
The fact
fact that
that the
the approximation
approximation is is worst
worst near
near xx == 00 is
is due
due toto the
the fact
fact that
that
ff does
does not
not satisfy
satisfy the
the Dirichlet
Dirichlet condition
condition there.
there. Indeed,
Indeed, this
this example
example shows
shows that
that
/AT
fN need
need not
not converge
converge to to ff at every xx eE [0,€j;
at every here /(O)
[0,£]; here f(O) == 1, butbut /Ar(0)
fN(O) == 00 for
for
every
every N.
N. However,
However, itit seems
seems clear
clear from
from the
the graphs
graphs that
that fw
fN approximates
approximates ff in in some
some
meaningful
meaningful sense,
sense, and
and that
that this
this approximation
approximation gets gets better
better as
as NN increases.
increases.
The
The oscillation
oscillation near
near xx == 00 is
is known
known as as Gibbs's
Gibbs's phenomenon.
phenomenon.

In
In Chapter
Chapter 9, 9, we
we justify
justify the
the following
following fact:
fact: /jv
fN converges
converges toto /f as
as N -+ oo,
N —> 00, in
in
2
the
the sense
sense that Ilf —- /AT||
that ||/ fNIl —>
-+ 00 (that
(that is,
is, the
the L
L2 norm
norm ofof the
the error
error /f —- /AT
fN goes
goes to
to zero).
zero).
We
We write
write
00

f(x) = Lcnsin (n;x)


n=l

to
to indicate
indicate this
this fact.
fact. As
As wewe saw
saw inin Example
Example 5.8,
5.8, this
this does
does not
not necessarily
necessarily imply
imply
the fN(X) ->•
the /N(X) ( x ) for
-+ ff(x) for all
all xx eE [0,^].
[0,£]. ItIt does
does imply,
imply, however,
however, that fN gets
that /N gets arbitrarily
arbitrarily
5.2. Introduction
5.2. Introduction to
to the spectral method;
the spectral method; eigenfunctions
eigenfunctions 149

1.5r----------..., 1.5r----------...,

1 1

0.5 0.5 1

1.5r----------..., 1.5r----------...,

1 1

-0.5'-------------' -0.5'----------~
o 0.5 1 o 0.5 1

Figure 5.4. Approximating


Figure Approximating /(#)
f(x) == 1I-x
— x by
by /N(X) (see Example
fN(X) (see Example 5.8). The
The
value of N is
value of is 10
10 (top
(top left),
left), 20 (top right),
20 (top right), 40
40 (bottom
(bottom left),
left), and
and 80
80 (bottom
(bottom right).
right).

close to
close to f,
/, over
over the entire interval,
the entire in an
interval, in an average
average sense.
sense. This
This type of convergence
type of convergence
(in the
(in the LL22 norm)
norm) is
is sometimes
sometimes referred
referred to as mean-square
to as convergence.
mean-square convergence.
The resulting
The resulting representation,
representation,

f(x) = L
=

n=l
Cn sin (n;x), Cn = ~ 1
0
l
f(x) sin (n;x) dx, (5.14)

is referred
is to as
referred to as the
the Fourier sine series
Fourier sine of /,f, and
series of and the scalars Cl,
the scalars ci,C 2 ,••.
C2, . . . are
are called the
called the
Fourier sine coefficients of f./.
coefficients of
In the
In the next section, we
next section, we will show how
will show how to to use the Fourier
use the Fourier sine
sine series
series to solve the
to solve the
BVP (5.10).
BVP (5.10). First,
First, however,
however, wewe discuss
discuss other
other boundary conditions and
boundary conditions and the resulting
the resulting
Fourier series.
Fourier series.
150 Chapter 5. Boundary value problems in statics
value problems

5.2.3
5.2.3 boundary conditions; other
Eigenfunctions under other boundary
Fourier series
We
We now consider the
now consider the BVP
BVP with
with mixed
mixed boundary
boundary conditions,
conditions,
d'2u
-T =f(x), O<x<£,
dx2
u(O) = 0, (5.15)

~~(£)=o,
which
which models, for example,
models, for example, aa hanging
hanging bar
bar with
with the
the bottom
bottom end
end free.
free. In
In order to
order to
consider aa spectral
consider spectral method,
method, we
we define
define the subspace
the subspace

c![O,£] = {u E C 2[0,£] : u(O) = ~~(£) = O}

and
and the
the operator
operator L
Lmm :: C^[0,€]
C;, [0, £] —>
--+ C[O, £], where
C[0,l], where

d'2u
Lm u = - dx 2 '

The operator L
The operator Lmm is symmetric with
is symmetric with positive
positive eigenvalues,
eigenvalues, it
it has
has aa trivial
trivial null space,
null space,
and the
and the range of L
range of Lm m is
is all
all of
of C[0,^] (see Exercise
C[O, £] (see Exercise 5.1.6).
5.1.6). Therefore,
Therefore, L mu =
Lmu has
= f has
aa unique
unique solution
solution for
for every
every f/ Ee C[O,£],
C[0,^], and
and we
we will
will show,
show, inin the
the next
next section,
section, how
how
to compute the
to compute the solution
solution by by the spectral method.
the spectral method. First,
First, however,
however, we we must
must find the
find the
eigenvalues
eigenvalues and
and eigenfunctions
eigenfunctions of Lm.
of Lm.
2
Since L
Since Lmm has
has only
only positive eigenvalues, we
positive eigenvalues, we define
define A A== 0(J2,, where
where 9B > 0, and
0, and
solve
solve
d'2u
dx 2 +B u =
2
0, °< x < £,
u(O) = 0, (5.16)
du
dx (£) = 0.

The general solution


The general solution of
of the
the differential
differential equation
equation is
is

u(x) = Cl cos (Bx) + C2 sin (Bx).


The
The first
first boundary
boundary condition, u(O) = 0,
condition, u(Q) 0, implies
implies that = 0,
c\ —
that Cl 0, and
and hence any nonzero
hence any nonzero
eigenfunction
eigenfunction must
must be
be aa multiple
multiple of
of

u(x) = sin (Bx).

The second boundary


The second boundary condition.
condition,
du
dx (£) = 0,

yields
yields the
the condition
condition that
that
Bcos (B£) = 0.
5.2.
5.2. Introduction
Introduction to the spectral
to the spectral method; eigenfunctions
method; eigenfunctions 151

Since 0 > 00 by
Since assumption, this
by assumption, is possible
this is possible only
only if
if

cos (OC) =0
or
or
OC = ~, 37r (2n - 1)7r
2 2'···' , ....
2
Solving for
Solving for A,
A, we obtain eigenvalues
we obtain eigenvalues AI,
A1, A
A2'2 ,...
. . . ,' with
with
(2n - 1)27r 2
An = 4C2 ' n = 1,2,3, ....

The corresponding
The corresponding eigenfunctions are
eigenfunctions are

. ((2n - l)7rX)
cPn(x)=sm 2C ' n=1,2,3, ....

The eigenfunctions
The eigenfunctions are are orthogonal,
orthogonal, as
as is
is guaranteed
guaranteed sincesince L m is
Lm is symmetric,
symmetric,
and as
and as can
can bebe verified
verified directly
directly by by computing (0 n ,^>cPm).
computing (cPn, TO ). The
The best
best approximation to
approximation to
/f E
G e[O,
C[0,£],
C], using 0i,02,...,0jv,
cP1, cP2, . .. , cPN, is

(5.17)

Since
Since
r£.2((2n-1)7rX) £
(cPn, cPn) = 10sm 2C dx = 2'
(5.17) becomes
(5.17) becomes
N
f( x ) == '"' b . ((2n - l)7rX)
~ n sm 2C '
n=l

where
where
bn = ~ 1£ f(x) sin ((2n ;c1
)7rx) dx, n = 1,2,3, ....

The
The resulting representation,
resulting representation,

f( x ) -~b . ((2n-1)7rX)
- ~ n sm 2£ '
n=l

is referred
is referred to as the
to as the Fourier
Fourier quarter-wave
quarter-wave sine
sine series. It is
series. It valid in
is valid in the mean-square
the mean-square
sense.
sense.

Example 5.9.
Example 5.9. Let
Let f(x) = x and
f(x) = = 1.
and £i = 1. Then

21 o
1 .
xsm
((2n-1)7rx)d _ 8(-1)n+1
2
x- (2
n-
1)22' n=1,2,3, ... ,
7r
152 Chapter 5. Boundary
Boundary value problems
problems in statics

and the best


and the best approximation
approximation to
to ff using
using the first N eigenfunctions
the first is
eigenfunctions is
N

f N (x ) -- ""' b . ((2n -1)7fX)


~ n sm 2 .
n=l

The error
The error in
in approximating
approximating ff on [0,1] by
on [0,1] by /N,
fN, for
for N = 10,20,40,80, is
= 10,20,40,80, is graphed in
graphed in
Figure
Figure 5.5.
5.5.

X10-3
0.03,....----------, 15

0.02 10
.... ....
g
Q)
0.01 ....
0
....
Q)
5

-0.01 '---------~ -5
o 0.5 0 0.5
X x
-3
X1O
3

4 2
.... ....
g
Q)
2 ....0.... 1
Q)

a 0 ...,
.&.

-2~------------------~ -1
a 0.5 a 0.5
x x

Figure
Figure 5.5.
5.5. Approximating
Approximating ff(x)
(x) = — xx by
by aa quarter-wave
quarter-wave sine
sine series
series (see
(see
Example The value
Example 5.9). The value of
of N
N is 10 (top
is 10 (top left),
left), 20 (top right),
20 (top right), 40 (bottom left),
40 (bottom left), and
and
80 (bottom right).
80 (bottom right).

In the
In the exercises,
exercises, the reader is
the reader is asked
asked to
to derive
derive other
other Fourier series, including
Fourier series, including
the appropriate series
the appropriate series for
for the
the boundary conditions
boundary conditions
du
dx (0) = 0, u(£) = 0.
In Chapter 6,
In Chapter 6, we will present
we will present Fourier
Fourier series for the
series for the Neumann
Neumann conditions
conditions

du (0)
dx
= 0, du (£)
dx
= °
5.2. Introduction to
5.2. Introduction to the spectral method;
the spectral eigenfunctions
method; eigenfunctions 153
153

and
and the
the periodic
periodic boundary conditions
boundary conditions
du du
u( -P) = u(P), dx (-P) = dx (P)
(for
(for the
the interval [ — i , P]).
interval [-P, f \ ) . Generally speaking, given
Generally speaking, given aa symmetric
symmetric differential
differential opera-
opera-
tor,
tor, aa sequence
sequence of of orthogonal eigenfunctions exists,
orthogonal eigenfunctions exists, and it can
and it can be used to
be used represent
to represent
functions in
functions in aa Fourier
Fourier series. However, it
series. However, may not
it may not be easy to
be easy to find
find the
the eigenfunctions
eigenfunctions
in some cases
in some cases (see
(see Exercise
Exercise 4). 4).

Exercises
1. Use
1. the trigonometric
Use the identity
trigonometric identity
1
sin a sin,8 = 2 (cos (a - ,8) - cos (a + ,8))

to
to verify
verify that,
that, if ¥- m,
if nn / m, then (V>n? '¢m)
then ('¢n, V'm) = 0, where
— 0, ^1,^25^3?
where '¢l, • • • are
'1/J2, '¢3, ... are given
given in
in
(5.13).
(5.13).
2. Define
2. Define K
K as in Exercise
as in Exercise 5.1.8.
5.1.8. We
We know (from the
know (from the earlier exercise) that
earlier exercise) that K has
K has
only real,
only real, positive eigenvalues. Find
positive eigenvalues. all of
Find all of the eigenvalues and
the eigenvalues eigenvectors of
and eigenvectors of
K
K.

3-. Repeat
3·. Repeat Exercise
Exercise 22 for
for the
the differential operator Lfh
differential operator defined in
Lin defined Exercise 5.1.7.
in Exercise 5.1.7.
The resulting
The eigenfunctions are
resulting eigenfunctions are the quarter-wave cosine
the quarter-wave cosine functions.
functions.
4. (Hard) Define
4. (Hard) LR as
Define LR as in
in Exercise
Exercise 5.1.11.
5.1.11.
(a) Show that
(a) Show LR has
that LR has only
only positive eigenvalues.
positive eigenvalues.
(b) Show
(b) Show that LR has
that LR has an
an infinite sequence of
infinite sequence of positive
positive eigenvalues.
eigenvalues. Note:
Note:
The equation
The equation that determines the
that determines the positive eigenvalues cannot
positive eigenvalues cannot be solved
be solved
analytically,
analytically, but
but aa simple graphical analysis
simple graphical analysis can
can be
be used
used to
to show that
show that
they exist and
they exist and to estimate their
to estimate their values.
values.
(c)
(c) For
For o:
a = K=
= 1£ 1, find
= 1, find the
the first
first two
two eigenpairs
eigenpairs by finding accurate
by finding accurate estimates
estimates
of the
of two smallest
the two smallest eigenvalues.
eigenvalues.
5. (Hard)
5. (Hard) Consider
Consider the
the differential
differential operator
operator M : C^[0,1]
C~[O, 1] ->• C[0,1]
-+ C[O, defined by
1] defined by
cFu du
Mu=--+~+5u
dx 2 dx
2
(recall that
(recall that C£[0,1]
C~[O, 1] = {u e
E C 2[0,1]
[0, 1] :: u(O)
u(0) = g(l) 0}). Analyzetheeigen-
~~(1) = o}). Analyze the eigen-
pairs
pairs of
of MM as
as follows:
follows:
(a) Write down
(a) Write down the characteristic polynomial
the characteristic of the
polynomial of ODE
the ODE

d2 u du
dx 2 - dx + (A - 5)u = O. (5.18)

Using
Using the quadratic formula,
the quadratic formula, find
find the
the characteristic roots.
characteristic roots.
154 Chapter 5. Boundary value
value problems in statics

(b)
(b) There
There are
are three cases to
three cases to consider,
consider, depending
depending on on whether
whether the discriminant
the discriminant
in the quadratic
in the quadratic formula
formula isis negative,
negative, zero, or positive (that is, depending
zero, or positive (that is, depending
on whether
on whether the characteristic roots
the characteristic roots are complex conjugate,
are complex conjugate, oror real
real and
and
repeated, or real
repeated, or and distinct).
real and distinct). In
In each
each case,
case, write down the
write down general
the general
solution of
solution of (5.18).
(5.18).
(c) Show
(c) Show that
that in
in the
the case of
of real roots (either
real roots (either repeated
repeated or
or distinct),
distinct), there
there is
is
no
no nonzero solution.
nonzero solution.
(d) Show
(d) Show that there is
that there an infinite
is an sequence of
infinite sequence of values of A,
values of leading to
A, leading to complex
complex
conjugate roots, each
conjugate roots, each yielding
yielding aa nonzero solution of
nonzero solution of (5.18). Note: The
(5.18). Note: The
equation that
equation that determines
determines thethe eigenvalues
eigenvalues cannot
cannot bebe solved
solved analytically.
analytically.
graphical analysis is sufficient
However, a simple graphical sufficient to show the existence
of the sequence of eigenvalues.
of the sequence of eigenvalues.
(e) Find
(e) Find the
the first two eigenpairs
first two (that is,
eigenpairs (that is, those
those corresponding
corresponding to the two
to the two
smallest eigenvalues), using some numerical method to compute the first
smallest
two eigenvalues accurately.
two eigenvalues accurately.
(f)
(f) Show that the first two eigenfunctions
eigenfunctions are not orthogonal.
orthogonal.

6. Define
Define

and define Lb : GUO, £] -+ G[O, f] by

Find necessary
Find necessary and
and sufficient
sufficient conditions on the
conditions on the coefficients
coefficients au,
an,012,021?
a12, a21, #22
a22 for
for
the operator L^
the operator to be
Lb to symmetric.
be symmetric.

7. Compute
7. Compute thethe Fourier sine series,
Fourier sine series, on
on the
the interval [0,1],
interval [0, for each
1], for of the
each of the following
following
functions: 29
29

(a) g(x) = x
(b) hex) =! -Ix-!I
(c) m(x)=x-x 3
(d) k(x) = 7x - 10x 3 + 3x5

Graph the
Graph error in
the error in approximating each function
approximating each function by 10 terms
by 10 terms of
of the
the Fourier
Fourier
sine series.
sine series.
29
The use
29The use of
of Mathematica or some
Mathematica or some other
other program
program to compute the
to compute the necessary integrals is
necessary integrals is recom-
recom-
mended.
mended.
5.3. Solving the
5.3. Solving the BVP
BVP using
using Fourier
Fourier series
series 155
155

8. Explain
8. Explain why
why aa Fourier sine series,
Fourier sine series, if
if it
it converges
converges to
to aa function [0,e],
on [0,
function on £], defines
defines
an odd function
an odd function of
of x E€ R.
R. (A function
function /f : R ->•
-+ R is is odd
odd if
if f(—x)
f( -x) == - —f(x)
f(x)
for all
for all x e
E R.)

9.
9. What is the
What is the Fourier sine series
Fourier sine series of
of /(#)
f(x) == sin
sin (37fx)
(3-rrx) on
on the interval [0,
the interval [0,1]?
I]?
29
10. Repeat
10. Exercise 77 using
Repeat Exercise using the
the quarter-wave sine series
quarter-wave sine series (see
(see Section
Section 5.2.S).
5.2.3).29
29
11. Repeat
11. Exercise 77 using
Repeat Exercise using the
the quarter-wave
quarter-wave cosine series (see
cosine series (see Exercise
Exercise 3).
3).29

5.3
5.3 Solving
Solving the BVP using
the BVP using Fourier
Fourier series
series
We now
We now return
return to the problem
to the of solving
problem of solving the BVP
the BVP

cPu
-T dx 2 = f(x), °< x < e,
u(o) = 0, (5.19)
u(e) = 0,

which can be
which can expressed simply
be expressed simply as
as LDU
LDU =
= f.
f.

5.3.1
5.3.1 A
A special case
We
We begin
begin with
with aa special case that
special case is easy
that is easy to
to solve. Suppose f/ is
solve. Suppose is of
of the form
the form
N
f(x) =L Cn sin (n;x), (5.20)
n=l

where the coefficients


where the coefficients ci,
Cl, C 2 ,•••
C2, . . . ,, CN
CN are
are known.
known. We then look
We then look for
for the
the solution in the
solution in the
form
form
N
u(x) = L bn sin (n;x).
n=l

By
By construction,
construction, Uu E G C1[0,
C|j[0,£], e], and so Uu satisfies
and so satisfies the
the boundary
boundary conditions (regardless
conditions (regardless
of
of the
the values
values of bi,
of bl , 62, • • • ,, b&w)-
b2 , ..• N ). We
We therefore
therefore choose the coefficients
choose the &i,
coefficients b 622, ,.••
l ,b . . . ,, b&AT so
N so
that
that the differential equation
the differential equation is is satisfied.
satisfied.
Since uu is
Since is expressed
expressed in in terms
terms of of the eigenfunctions, the
the eigenfunctions, the expression for LDU
expression for LDu is is
very simple:
very simple:

The equation
The equation LDu then becomes
LDU == f then becomes
N 2 N
"" Tn 7f2
~~bnsm -e-
. (n7fx)
= "" . (n7fx)
~cnsm -e- .
n=l n=l
156 Chapter 5.
Chapter Boundary value
5. Boundary problems in
value problems in statics
statics

It is easy to
It find the
to find the coefficients &i,
coefficients b1,b62, • • • ?, bN
2 , ... &AT satisfying
satisfying this equation; we need
Tn 2 7r 2
~bn = cn , n = 1,2, ... ,N,
or
or
C2 Cn
bn = - T2 2' n = 1,2, ... ,N.
n7r
We
We then
then have the following
have the following solution:
solution:
N 02
'"' <- Cn (n7rX)
u (x) = ~ Tn 2 7r 2 .
8m -C- .
n=l

Example 5.10.
Example 5.10. Suppose
Suppose C
t—= 1, T = 1,
I, T I, and
and

I(x) = sin (7rx) - 2 sin (27rx) + 5 sin (37rx).


The solution
The solution to (5.19), with
to (5.19), with this
this right-hand side fI,, is
right-hand side is

u(x) == b1 sin (7rx) + b2 sin (27rx) + b3 sin (37rx),


where
where
125
b1 = 7r2'
b2 = - 47r2' b3 = 97r2 '
In Figure 5.6,
5.6, we display right-hand side If and the solution u.
display both the right-hand u.

When I/ is of
of the special
special form
form (5.20),
(5.20), the solution technique described
described above
above
is nothing more than the spectral method explained for for matrix-vector equations in
Section 3.5.
Section 3.5. Writing
Writing
2 2
Tn 7r
An =~, '¢n(X) = sin (n7rx)
-C- ,

we simply express
we simply express the
the right-hand side /I in
right-hand side in terms of the
terms of (orthogonal) eigenfunctions,
the (orthogonal) eigenfunctions,

and then
and divide the
then divide coefficients by
the coefficients the eigenvalues
by the eigenvalues to
to get
get the
the solution:
solution:

5.3.2 The general case


Now suppose that
Now suppose that I/ is
is not
not of
of the special form
the special form (5.20).
(5.20). We
We learned
learned in
in Section
Section 5.2
5.2
that we
that we can approximate /I by
can approximate by
5.3.
5.3. Solving
Solving the
the BVP
BVP using
using Fourier
Fourier series 157
157

10r--------T--------~------~--------~------_,

x
0.25
0.2
0.15
0.1
0.05

0.2 0.4 0.6 O.B


x

Figure 5.6. The


Figure 5.6. The right-hand
right-hand side (top) and
side f (top) and solution
solution uu (bottom)
(bottom) from
from
Example
Example 5.10.
5.10.

where
Cn = ~ 1£ f(x) sin (n;x) dx, n = 1,2,3, ....

This
This approximation gets better
approximation gets better and
and better
better (at
(at least
least in
in the
the mean-square
mean-square sense)
sense) as
as
TV
N -»• oo.
--+ 00.
We
We know
know how
how to
to solve
solve Lpu
LDu =— /AT; let us
fN; let call the
us call solution UN:
the solution UN-

=~
2
f Cn . (n'JTx)
UN(X) ~ Tn 2'JT2 sm -g- .
n=l

It is
It is reasonable
reasonable to
to believe
believe that, since /N
that, since fN gets closer and
gets closer closer to
and closer to /f as --+ oo,
as N —> the
00, the
function UN will
function UN will get closer and
get closer and closer
closer to
to the
the true
true solution u as
solution U as N
N —>--+ oo.
00.

Example
Example 5.11.
5.11. We consider the BVP
BVP
d2 u
- dx 2 = X, 0 < x < 1,
u(O) = 0, (5.21)
u(l) = O.
The exact
The exact solution
solution is
is easily
easily computed
computed (by
(by integration)
integration) to
to be
be
1
u(x) = 6x (1 - x 2) (5.22)
158 Chapter 5. Boundary value problems in
Chapter in statics
statics

(see Exercise
(see 5). We
Exercise 5). We begin
begin by
by computing
computing the
the Fourier sine coefficients
Fourier sine coefficients of f(x) =
of f(x] = x.
x.
We have
We have
2(_1)n+1
1
1 .
cn =2 xsm(n7fx)dx= , n=1,2, ....
o n7f
The solution
The solution to
to LDu
L&U =
— /N, with
fN, with
N
fN(X) = L Cn sin (mrx),
n=1
is then
is then
UN(X) = LN
n=1
~n 2 sin (n7fx)
n 7f
= LN
n=1
2(_1)n+1
3 3
n 7f
sin (n7fx).

We can
We can now compare UN
now compare UN with
with the
the exact
exact solution
solution u. u. In
In Figure 5.7, we
Figure 5.7, we show
show
the graphs
the graphs ofof U
u and
anduw; on this
UlOi on this scale,
scale, the
the two
two curves
curves areare indistinguishable.
indistinguishable. Figure
Figure
5.8 shows
5.8 the approximation
shows the approximation error
error u(x)
u(x) -— UlO(X).
UIQ(X).
The fact
The that UN
fact that UN approximates
approximates U u so closely is
so closely is no
no accident.
accident. If we compute
If we compute the
the
Fourier
Fourier sine
sine coefficients ai, a2,
coefficients a1, 02, a3,
as,... of u directly,
... of directly, wewe find
find that
that
1 2( _1)n+1
1
1 2.
an =2 -6x (1- x ) sm (n7fx) dx = 3 3 ' n = 1,2,3, ....
o n 7f
These are
These are precisely the
the coefficients
coefficients of
of UN!
UN'- Therefore,
Therefore, UN
UN is
is the
the best approximation
approximation
to uu using
to using the
the first
first N
N eigenfunctions.
eigenfunctions.

The last
The last example
example is is typical:
typical: By solving LDU
By solving LDU = /N, where /AT
fN, where is the
fN is best ap-
the best ap-
proximation to
proximation to f/ using
using the
the first eigenfunctions, we
N eigenfunctions,
first N we obtain
obtain the best approximation
the best approximation
to the
UN to
UN solution uu of
the solution LDU = /.
of LDU We can
f. We can demonstrate
demonstrate thisthis directly.
directly. We
We assume
assume
that Uu satisfies
that satisfies u(O)
w(0) = u(f)
u(C) == 0,0, and
and we
we write
write al,
ai,012,03,... for the
a2, a3, ... for the Fourier (sine)
Fourier (sine)
coefficients of
coefficients of u:
u:

an = ~ foi u(x) sin (n;x) dx, n = 1,2,3, ....


We can then
We can compute the
then compute the Fourier sine coefficients
Fourier sine coefficients of
of

_T~U
dx 2
by
by using integration by
using integration parts:
by parts:
2
d u
-21£ -T-(x) sin (n7fx)
- dx
£ 0 dx 2 £

-2T{[dU
= - - . (n7fx)]l
-(x)sm - - -n7f1ldU
-(x)cos (n7fx)}
- dx
£ dx £ ",=0 £ 0 dx £

-2T {dU.
= -£-
du. n7f
dx (£) sm (n7f) - dx (0) sm (0) - f 10t· du (n7fx)}
dx (x) cos -£- dx
5.3. Solving the BVP
BVP using Fourier
Fourier series 159
159

O.OB.------r-----r------r-------r------..

0.07

Figure 5.7.
Figure 5.7. The
The exact
exact solution uu of
of {5.21}
(5.21) and
and the
the approximation
approximation U10.
UIQ.

-2~---~----~---~----~---~
o 0.2 0.4 0.6 O.B 1

Figure 5.8.
Figure 5.8. The
The error
error in
in approximating
approximating the
the solution
solution u of {5.21}
U of (5.21) with
with U10'
UIQ.
160 value problems in statics
Chapter 5. Boundary value statics

2Tmr r du
i
(nnx) .
= ~ 10 dx (x) cos -e- dx (smce sm (0) = sin (nn) = 0)
.
(5.23)

= 2~~n { [u(x) cos (n;x)] :=0 + nen fo£ u(x) sin (n;x) dX}
2 2
Tn n 2 ( (nnx)
= -e-
2 -g 10 u(x) sin -e- dx (since u(O) = u(e) = 0)

Tn 2 n 2
=~an'

We thus
We thus see
see that
that the
the Fourier
Fourier sine
sine series
series of
of

_T~u
dx 2
is
is

Since -Td
Since u/dx22 =
—Td?u/dx
2
= ff by assumption, the
by assumption, Fourier sine
the Fourier sine series
series of
of the
the two
two functions
functions
must be
must be the
the same,
same, and
and so
so we
we obtain
obtain

Tn 2 n 2
~an = en, n = 1,2,3, ... ,

or
or
an = - T
e2 cn
2 2' n= 1,2,3, ....
nn
This is
This is exactly
exactly what
what we
we obtained
obtained by
by the
the reasoning
reasoning presented
presented earlier.
earlier.

Example 5.12.
Example 5.12. Consider
Consider an
an elastic
elastic string
string that,
that, when
when stretched
stretched by
by aa tension
tension of of10 N,
10 N,
has aa length
has 50 cm.
length 50 cm. Suppose
Suppose that
that the
the density
density of
of the
the (stretched)
(stretched) string
string is 0.2 g/
is pp == 0.2 cm.
g/ cm.
IfIf the
the string
string is
is fixed
fixed horizontally
horizontally and
and sags under gravity,
sags under what shape
gravity, what shape does
does itit assume?
assume*
We let
We u(x), 00 < xx < 50,
let u(x), 50, be
be the vertical displacement
the vertical displacement (in(in cm)
cm) of of the string.
the string.
To use consistent units, we convert 10 10 Newtons to 10 1066 dynes
dynes (g(gcm/s
cm/?).2
). Then u
satisfies the
satisfies the BVP
BVP

~u
-T dx 2 = -pg, 0 < x < e,
u(O) = 0,
u(e) = 0,

or
or
6~U
-10 dx 2 = -196, 0 < x < 50,
u(O) = 0,
u(50) = 0
Fourier series
5.3. Solving the BVP using Fourier series 161
161

2
(using 980 cm/
(using 980 cm/s82for the gravitational
for the gravitational constant). To solve
constant). To this, we
solve this, we first
first compute
compute the
the
Fourier sine coefficients
Fourier sine coefficients of
of the
the right-hand
right-hand side:
side:

Cn = -
21
50 0
50
. (n1rx)
-196sm - - dx = 392((-1)n -1) , n = 1,2,3, ....
50 n1r
We can then find the Fourier sine coefficients
coefficients of the solution u:
u:

50 2 cn 49(( -l)n - 1)
an = 106 2 2 = 3 3 ' n = 1,2,3, ....
n 1r 50n 1r
We plot the
We the approximate
approximate solution U20
u^o in
in Figure
Figure 5.9. The maximum
5. g. The deflection of
maximum deflection of
the string
the is quite
string is quite small, less than
small, less than half
half of
of aa millimeter. This is
millimeter. This is to
to be
be expected,
expected, since
since
the tension
the tension inin the
the string is
is much
much more
more than
than the
the total
total gravitational force acting
acting on
it.
it.

0.5

0.4

0.3

0.2

---
0.1

:::J
0 ___

-0.1

-0.2

-0.3

-0.4

-0.5
0 10 20 30 40 50
x

Figure 5.9.
Figure 5.9. The
The shape of the
shape of the sagging
sagging string in Example
string in Example 5.12.
5.12.

5.3.3 boundary conditions


Other boundary
We can
We can apply
apply the
the Fourier series method
Fourier series method to BVPs with
to BVPs with boundary conditions other
boundary conditions other
than Dirichlet conditions,
than Dirichlet conditions, provided
provided the
the differential
differential operator is symmetric
operator is symmetric under the
under the
boundary conditions,
boundary conditions, and
and provided we know
provided we know the
the eigenvalues
eigenvalues and
and eigenfunctions.
eigenfunctions.
For example,
For example, we
we consider
consider the BVP
the BVP
162 Boundary value problems in statics
Chapter 5. Boundary statics

cPu
-T dx2 = I(x), 0 < x < C,
u(O) = 0, (5.24)
du (C) = O.
dx
Written as
Written as aa differential
differential operator
operator equation,
equation, this takes the
this takes form L
the form mu = /,
Lmu I, where Lm
where Lm
is defined
is defined as
as in
in Section
Section 5.2.3,
5.2.3, but including the
but including the factor
factor of
of T:
T:
Lm : C;. [0, C] -+ C[O, CJ,
cPu
Lm u = -T dx 2 •
We saw, in that section, that the eigenvalues
eigenvalues and eigenfunctions
eigenfunctions of L
Lmm are

T(2n-1)27r 2 . ((2n-1)7rx)
An = 4C2 ' ¢n(X) = sm 2f. ' n = 1,2,3, ....

Therefore, we
Therefore, we write
write

I( x ) -- ~ . ((2n - 1)7rX)
~cnsm 2f. '
n=l
where
2 ( . ((2n-1)7rX)
C n = flo I(x) sm 2f. dx, n = 1,2,3, ....
We represent the
We represent solution as
the solution as

~ . ((2n - 1)7rX)
u(x)=~ansm 2£ '

where the coefficients


where coefficients aI,
01,02,03,... are to
a2, a3, . .. are to be
be determined.
determined. The
The Fourier
Fourier series
series of
of
L -TcPu/dx22 is
mu = —Td?u/dx
Lmu is then
then

_Td2u( )_~T(2n-1)27r2 . ((2n-1)7rX)


dX2 x - ~ 4C2 an sm 2C .
n=l
The fact
The fact that
that these
these are
are the
the correct
correct Fourier coefficients can
Fourier coefficients can be verified by
be verified by aa calculation
calculation
exactly like
exactly like (5.23)
(5.23) (see
(see Exercise
Exercise 7)
7) and is also
and is also justified below in
justified below Section 5.3.5
in Section 5.3.5 (see
(see
(5.29)).
(5.29)).
The BVP
The BVP (5.24)
(5.24) can
can now be written asas
2
~ T(2n - 1)27r . ((2n -l)7rX) _ ~ . ((2n -1)7rX)
~ 4C2 an sm 2C - ~ en sm 2f. .
n=l n=l
From this
From this equation,
equation, we
we see
see that
that
5.3. Solving the BVP using Fourier series 163

or
or
4£2Cn
an = T(2n _ 1)27f2 , n = 1,2,3, ....

Thus the solution to (5.24)


(5.24) is

~ 4£2Cn . ((2n-1)7fX)
u(x) = ~ T(2n _ 1)27f2 sm 2£ .

Example 5.13.
Example 5.13. Consider
Consider aa circular cylindrical bar,
circular cylindrical bar, of length 11 m
of length radius 1
and radius
m and
cm, made from
cm, made from anan aluminum
aluminum alloy
alloy with
with stiffness 70 CPa
stiffness 70 GPa and
and density
density 2.64 gj cm33 ..
2.64g/cm
Suppose the
Suppose the top
top end
end of
of the
the bar (x =
bar (x Oj is
= 0) is fixed
fixed and
and the
the only
only force acting on
force acting on the
the bar
bar
is the
is the force due to gravity.
force due We will
gravity. We find the
will find the displacement
displacement u of the bar
of the bar and
and determine
determine
the change
the change inin length
length of
of the bar (which
the bar (which isis just u(\}).
just u(l)).
The BBVPVP describing u is

~u
-k dx 2 = pg, 0 < x < 1,
u(O) = 0, (5.25)

~~(1)=0,
where
where kk = 1010, P
= 77 .• 1010, p=— 2640 m33,, and
kg/m
2640 kgj and 9g =
= 9.8 m/s~2.. The
9.8 mj The Fourier quarter-wave
Fourier quarter-wave
sine coefficients
coefficients of the constant
of the constant function pg are

Cn = 2
1
0
1
pg sm
. ((2n - l)7rX)
2
4pg
dx = (2n _ 1)7f' n = 1,2,3, ... ,

and the eigenvalues of


and of the differential
differential operator are
k(2n - 1)27f2
4 ' n = 1,2,3, ....

Therefore, the
Therefore, the solution
solution is
is

() = L
ux
oo
n=1
16pg
k(2n - 1)37f3
. ((2n - l)7fX)
SIn
2

. -6 ~ 1 . ((2n -l)7fX)
= (5.9136· 10 ) ~ (2n _ 1)37f3 sm 2 .

We then
We then have

. ( -6) ~ 1 . ((2n - 1)7f)


u(l) = 5.9136· 10 ~ (2n _ 1)37f3 sm 2

-6 00 (_l)n+I
= (5.9136·10 ) ~ (2n _ 1)37r3

~ 1.85 . 10- 7 .
164 Chapter 5. problems in statics
Boundary value problems

Thus the bar stretches


stretches by only about 1.85· 10~77 m,
1.85 • 10- m, or less than two ten-thousandths
of aa millimeter.
01 millimeter.

The Fourier
The series method
Fourier series method isis aa fairly
fairly complicated
complicated technique
technique for
for solving
solving such
such
aa simple
simple problem
problem as as (5.13).
(5.13). As
As we
we mentioned
mentioned inin Section
Section 5.1.1,
5.1.1, we
we could
could simply
simply
integrate the differential
integrate the differential equation twice and
equation twice and use
use the
the boundary conditions to
boundary conditions to deter-
deter-
mine the constants
mine the constants of integration. The
of integration. Fourier series
The Fourier series method
method will
will prove
prove its
its worth
worth
when
when we apply it
we apply it to
to PDEs,
PDEs, either
either time-dependent
time-dependent problems (Chapters 6
problems (Chapters and 7)
6 and 7) or
or
problems
problems with multiple spatial
with multiple spatial dimensions
dimensions (Chapter
(Chapter 8).
8). We
We introduce
introduce the
the Fourier
Fourier
series method
series method in
in this simple context
this simple context soso that
that the reader can
the reader can understand
understand itsits essence
essence
before dealing with
before dealing more complicated
with more applications.
complicated applications.

5.3.4
5.3.4 In homogeneous boundary
Inhomogeneous boundary conditions
We
We now
now consider
consider the following BVP
the following BVP with inhomogeneous boundary
with inhomogeneous conditions:
boundary conditions:

d?u
-T d,x2 = I(x), 0 < x < e,
u(O) = a, (5.26)
u(e) = b

constant). To
(T constant).
(T apply the
To apply Fourier series
the Fourier series method
method toto this problem, we
this problem, we make
make aa
transformation of
transformation the dependent
of the dependent variable to obtain
variable uu to obtain aa BVP
BVP with
with homogeneous
homogeneous
boundary conditions. We
boundary conditions. We notice
notice that
that the linear function
the linear function
b-a
p(x) = a + -e-x

satisfies the
satisfies the boundary
boundary conditions (p(0) = a,
conditions (P(O) a, p(t)
pee) = b). If we
b). If define vex)
we define v(x) = u(x) —
-
#(V), then
p(x), then
d?v d?u d2p
-T dx 2 = -T d,x2 + T d,x2 = I(x) + 0 = I(x),
since the
since second derivative
the second of aa linear
derivative of linear function
function is
is zero.
zero. Also,
Also,

v(O) = u(O) - p(O) =a- a = 0, vee) = u(e) - pee) = b - b = O.


Thus solves (5.10),
v(x) solves
Thus vex) (5.10), so
so we know how
we know how to compute vex).
to compute We then
v(x). We then have u(x) =
have u(x) =
v(x] +p(x).
vex) + p(x).
This technique,
This technique, ofof transforming
transforming the
the problem
problem toto one
one with
with homogeneous bound-
homogeneous bound-
ary conditions, is
ary conditions, is referred
referred to
to as
as the
the method of shifting
method of data.
shifting the data.

Example 5.14. Consider


Example 5.14. Consider
d?u
- dx 2 = x, 0 < x < 1,
u(O) = 1, (5.27)
u(l) = O.
Solving the BVP
5.3. Solving BVP using Fourier series 165

Let
Let p(x]
p(x) == 1I —
- x, the linear
x, the linear function
function satisfying
satisfying the boundary conditions,
the boundary and define
conditions, and define
v(x) =— u(x)
vex) u(x] -—p(x). Then v(x)
p(x). Then v(x) solves {5.21},
(5.21), and soso
2( _l)n+l
v(x) = L00

n7r
3 3 sin (ml'x).
n=l
We then
We then have
have
2(_1)n+l
L
00

u(x) = 1- x+ 3 3 sin (n7rx).


n7r
n=l

Example 5.15.
Example 5.15. Consider
Consider again
again the
the bar
bar of
of Example
Example 5.13, and suppose that
and suppose that now
now aa
mass
mass of 1000 kg
of 1000 is hung
kg is hung from
from the
the bottom end of
bottom end of the bar. Assume
the bar. that the
Assume that the mass is
mass is
evenly distributed over the end of
evenly distributed over the end of the
the bar,
bar, resulting
resulting in
in a pressure of
of
_ (1000kg) (9.8mj ?) _ 9.8· 107 Pa
p - 7r (10- 2 )2 m2 - 7r

on the
the end of
of the
the bar.
bar. The
The BVP
BVP satisfied
satisfied by the
the displacement
displacement u is
is now
now
d2 u
- k dx 2 = pg, 0 < x < 1,
u(O) = 0, (5.28)
dU(l) = E
dx k'
10
where 7 • 10
where kk =— 7· lO lD ,, pP == 2640 kgj m33,, and
2640 kg/m and gg == 9.8 mj?2. To
9.8 m/s To solve
solve this
this problem
problem using
using
the Fourier series
the series method, we we shift the data
shift the data byby finding
finding aa linear
linear function satisfying
function satisfying
the boundary
the boundary conditions.
conditions. The The function
function

q(x) = tx
satisfies
satisfies
dq p
q(O) = 0, dx (1) = 'k'
so
so we define vv = uu -— q.
we define q. It then turns
It then turns out
out that,
that, since
since d~qjdx2 = 0,
q/dx = that vv satisfies
0, that satisfies
(5.25), so
{5.25}, so

vex) ~ (5.9136.10- 6 ) f(
n=l
1)3 3 sin ((2n -l)7rX)
2n - 1 7r 2

and
and
. P -6 ~ 1 . ((2n - 1)7rX)
u(x) = 'kx + (5.9136·10 ) ~ (2n _ 1)37r3 sm 2 .

We then
We then obtain
obtain
u(1) ~ t+ 1.8 .10- 7 ~ 1.4 .10- 3 •

This isis 1.4


This 1.4 millimeters.
millimeters. The
Thedisplacement
displacement
duedue to gravity
to gravity ("1.85
{1.85· 10-•410millimeters)
millimeters}
is insignificant
is insignificant compared
compared to
to the
the displacement
displacement due to
to the
the mass
mass hanging
hanging on on the
the end
end of
of
the bar.
the bar.
166
166 Chapter 5.
Chapter 5. Boundary
Boundary value
value problems
problems in
in statics
statics

5.3.5
5.3.5 Summary
Summary
We can now summarize the method of Fourier series
We series for solving aa BVP.
BVP. We assume
assume
that the BVP has been written in the form Ku Ku —= f,
/, where, as usual, the boundary
boundary
conditions form part of the definition
definition of the domain of the differential
differential operator K.
operator K.
For the Fourier series
series method to be applicable, it
it must be the case that

K is
• K is symmetric;
symmetric;

• K has
has aa sequence
sequence of of eigenvalues
eigenvalues AI,
A1, A2,
A2, AS, ...,, with
A3, ... with corresponding eigenfunc-
corresponding eigenfunc-
tions '¢1,
Vi? 1/J2,
V% 1/J3,
V'S) ...
• • • (which are
are necessarily orthogonal);

• any function 9
any function g in
in (7[0, f] can
e[O, £] can be
be written
written in
in aa Fourier
Fourier series
series
00

g(x) = L dn1/Jn(x) ,
n=l
where

It then
then follows
follows that
that the
the function K u is
function Ku is given
given by
by the series
the series
00

(Ku)(x) = L Anan1/Jn(X) ,
n=l

where ai, 02,03,...


where al, are the
a2, a3,'" are the Fourier
Fourier coefficients
coefficients of u. This
of u. follows from
This follows from the
the symmetry
symmetry
of K
K and the
the definition of the
the Fourier coefficients
coefficients b&i,
l , 62,63,...
b2 , b3 , ..• of KKu:
u:

b = (K u, 1/Jn)
n
(1/Jn,'¢n)
(u, K1/Jn)
=-'c--'_--'--'-'':-
(1/Jn, 1/Jn)
(u, An1/Jn)
(5.29)
(1/Jn,1/Jn)
= An (u, 1/Jn)
(1/Jn,1/Jn)
= Anan·

The BVP Ku
The BVP = f then
Ku = then takes
takes the form
the form
00 00

L An an1/Jn(X) = L cn1/Jn(x),
n=l n=l

whence
whence we obtain
we obtain
Cn
an = An' n = 1,2,3, ... ,
5.3. Solving the
5.3. Solving the BVP
BVP using Fourier series
using Fourier series 167

and
and
00

u(x) = 2: ~: 1Pn(x).
n=l

Here
Here is
is aa summary of the
summary of the Fourier
Fourier series
series method for solving
method for BVPs.
solving BVPs.

0.
O. Pose the BVP a.s
as aa differential
differential operator equation.
operator equation.

1. Verify
1. Verify that the operator
that the operator is
is symmetric,
symmetric, and
and find
find the eigenvalue/eigenfunction
the eigenvalue/eigenfunction
pairs.
pairs.

2. Express
2. Express the
the unknown function u as
unknown function as aa series
series in
in terms of the
terms of the eigenfunctions.
eigenfunctions.
The coefficients
The coefficients are
are the
the unknowns of the
unknowns of the problem.
problem.

3. Express
3. Express the
the right-hand side /f of
right-hand side the differential
of the differential equation
equation as
a.s aa series
series in
in terms
terms
of the
of eigenfunctions. Use
the eigenfunctions. Use the
the formula for the
formula for the projection of f/ onto
projection of onto the
the eigen-
eigen-
functions
functions to
to compute
compute the coefficients.
the coefficients.

4. Express the
4. the left-hand side
side of the differential
differential equation
equation in aa series
series in
in terms ofof
the eigenfunctions.
the eigenfunctions. This
This is done by
is done by simply
simply multiplying the Fourier
multiplying the coefficients
Fourier coefficients
of u by
of by the
the corresponding
corresponding eigenvalues.
eigenvalues.

5. Equate the coefficients in the series for the left- and right-hand sides of the
the coefficients
differential equation, and
differential and solve for the unknowns.
unknowns.

As
As mentioned
mentioned above, the Fourier
above, the series method
Fourier series method is analogous to
is analogous to what
what we called
we called
(in Section
(in Section 3.5) the spectral
3.5) the spectral method
method for
for solving
solving AxAx = = b.
b. This
This method
method is is only
only
applicable
applicable ifif the
the matrix
matrix A is is symmetric,
symmetric, so that the
so that eigenvectors are
the eigenvectors are orthogonal.
orthogonal. In In
the same way,
the same way, the method described
the method above fails
described above fails at
at the
the first step if
first step if the
the eigenfunctions
eigenfunctions
are not orthogonal,
orthogonal, that is, if if the differential
differential operator
operator is is not symmetric.
An even
An even more
more pertinent
pertinent observation
observation isis that
that one
one rarely
rarely uses the spectral
uses the method
spectral method
to
to solve
solve Ax
Ax == 6,b, for the simple
for the simple reason
reason that
that computing
computing the the eigenpairs
eigenpairs ofof AA is
is more
more
costly, in most
costly, in most cases, than solving
cases, than solving Ax
Ax = = b b directly
directly by other means.
by other means. It It is
is only
only in in
special cases that one one knows
knows the eigenpairs
eigenpairs of a matrix. In the same same way, it is only
way, it only
for very special
for very special differential operators that
differential operators that the eigenvalues and
the eigenvalues eigenfunctions can
and eigenfunctions can be
be
found. Therefore,
found. Therefore, thethe method
method of of Fourier series, which
Fourier series, which works
works very
very well
well when
when it can
it can
be used, is applicable
applicable to onlyonly aa small set
set of
of problems. On most problems, such as
the
the BVP
BVP

d (k(x) dx
- dx dU) = f(x), 0 < x < £,
u(O) = 0,
u(£) = 0

when
when k(x) isis nonconstant, it is
nonconstant, it is more
more work
work to
to find
find the eigenfunctions than
the eigenfunctions than to
to just
just
solve
solve the
the problem
problem using
using aa different
different method.
method. For
For this
this reason,
reason, we
we discuss
discuss aa more
more
broadly applicable method,
broadly applicable the finite
method, the element method,
finite element method, beginning
beginning in Section 5.4.
in Section 5.4.
168 Chapter
Chapter 5. Boundary value problems in statics
Boundary statics

Example
Example 5.16.
5.16. (Homogeneous
(Homogeneous Dirichlet conditions) We
Dirichlet conditions) We will
will solve the fol-
solve the fol-
lowing
lowing BVP,
BVP, applying
applying the
the procedure
procedure given
given above:
above:
d2U _ 3
- 3 dx 2 - X , 0< x < 2,
u(O) = 0, (5.30)
u(2) = O.

1. We
1. We have
have already
already seen
seen that
that the eigenfunctions of
the eigenfunctions of the
the negative
negative second derivative
second derivative
operator,
operator, on the interval
on the interval [0,2] and
and subject to Dirichlet
subject to Dirichlet conditions,
conditions, are
are

sin (n;x), n = 1,2,3, ....

The effect
The of multiplying
effect of multiplying the
the operator by 3 is
operator by is to
to multiply
multiply the eigenvalues by
the eigenvalues by 3,
3,
so the eigenvalues
so the eigenvalues are
are

3n 2 7f2
An = -4-' n = 1,2,3, ....

2. We
2. We write the unknown
write the unknown solution
solution uu as
as
00

u(x) = L an sin (n;x).


n=l

The problem
The now reduces
problem now reduces to computing 0,1,0,3,0,3,
to computing —
al, a2, a3, ....

3. The
3. The Fourier
Fourier sine coefficients of
sine coefficients of f(x] = xx33 on
f(x) = on the
the interval [0,2] are
interval [0,21 are

and so

2
4- The Fourier
4. The Fourier sine
sine coefficients
coefficients of
of —3d?u/dx
-3~u/dx2 are
are just
just

Thus
Thus

5.
5. Finally,
Finally, the
the differential
differential equation
equation can
can be written as
be written as
5.3. Solving
5.3. Solving the
the BVP
BVP using
using Fourier
Fourier series
series 169
169

so we have

This yields

and so
and so

is the solution (5.30)


solution to (5.30).

5.17. (Inhomogeneous Dirichlet conditions) Next


Example 5.17. Next we
we solve a BVP
with inhomogeneous
inhomoqeneous boundary conditions:
conditions:

d2 u 1
-- = I-x 0< x < 2'
dx 2 '
u(O) = 3, (5.31)

u (~) = -1.
We must
We must first
first shift
shift the
the data to
to transform
transform the
the problem to to one
one with
with homogeneous
homogeneous
boundary conditions. The function
boundary function p(x] — 3 -— 8x
p(x) = Sx satisfies
satisfies the boundary conditions,
conditions,
so we define
define v = = u -— p and solve the BBVP
VP

d2 v 1
--= l - x 0< x < 2'
dx 2 '
v(O) = 0,
v (~) = O.
1. The eigenfunctions
1. eigenfunctions are now

sin (2mfx) , n = 1,2,3, ... ,

and the eigenvalues are

2. We write the solution


2. solution v in the form
form
00

v(x) = L an sin (2mfx).


n=l
170 Chapter 5. Boundary value problems in statics
Chapter

3. The Fourier sine coefficients (x) =


coefficients of ff(x) = 11 -— x are
2-(-1)n
1
1/2
4 (1 - x) sin (2mrx) dx = , n = 1,2,3, ... ,
o nn
and so
1- x = L00 2 - (_1)n
nn
sin (2nnx).
n=l
2
4.
4- The Fourier sine coefficients
coefficients of
of —d?v/dx
_~V/dX2 are

and so
- ~~ (x) = f: 4n n 2 2
a n sin(2nnx).
n=l

5. We thus obtain

L00 4n n a
n=l
2 2
n sin(2nnx) = L
002_(_1)n
n=l nn
sin (2nnx) ,

which implies that


22 2-(-1)n
4n n an = , n = 1,2,3, ... ,
nn
or
or
2-(-1)n
an = 4 3 3 ,n = 1,2,3, ....
nn
The solution
The solution vv is
is then
then
002_(_1)n.
v(x) = L
n=l
4 3 3 sm (2nnx).
n n

This yields
002_(_1)n
u(x)=3-8x+L 4 33 sin (2nnx).
n=l n n

Exercises
In Exercises 1-4,
In 1-4, solve
solve the
the BVPs using the method
method of of Fourier series,
series, shifting
shifting the
the data
if necessary.
if possible,30 produce
necessary. If possible,3o produce aa graph
graph ofof the
the computed
computed solution
solution by plotting aa
by plotting
partial
partial Fourier
Fourier series
series with
with enough
enough terms
terms to to give
give aa qualitatively
qualitatively correct
correct graph. (The
graph. (The
number
number ofof terms
terms can be determined
can be determined by
by trial and error;
trial and error; if
if the
the plot no longer
plot no longer changes,
changes,
qualitatively, when more
more terms are
are included,
included, it it can
can be assumed
assumed that the the partial
partial
series contains
series contains enough
enough terms.)
terms.)
30
That is,
30That is, if you have
if you have the necessary technology.
the necessary technology.
5.3. Solving the BVP
Solving BVP using
using Fourier series 171

1. (a) - ~:~ = 1, u(O) = u(l) = 0


(b) - ~:~ = 1, u(O) = 0, u(l) = 1

2. (a) -~ = eX, u(O) = u(l) = 0


(b) -~:~ = eX, u(O) = u(l) = 1
3. The
3. results of
The results of Exercises
Exercises 5.2.2
5.2.2 and
and 5.2.3
5.2.3 will
will be
be useful
useful for
for these problems:
these problems:
2
(a) - d u = X
dx2' u(O) = 0 , du
dx (1) = 0
(b) -~ = x, ~~(O) = 0, u(l) = 1
(c) -~+2u=l, u(O)=u(l)=O
2
(d) - d u
dX2 +u -
- 0, u(O) -
- 0, u(l) -- 1

4. The 5.2.2 and 5.2.3 will be useful for these problems:


The results of Exercises 5.2.2

(a) -~:~ = x 2 , u(O) = u(l) = 0


(b) -~ + 2u = ~ - x, u(O) = u(2) = 0
(c) -~:~ =x+sin(1fx), u(O) = ~~(1) =0
(d) -~:~ = f(x), ~~(O) = u(l) = 0, where

f(x) = {I, 0<< xx << ~,


0, ~ 1.

5. Solve
5. Solve (5.21)
(5.21) to
to get
get (5.22).
(5.22).
6. Suppose
6. Suppose uu satisfies
satisfies
du
u(O) = 0, dx (f) = 0,
and the
and the Fourier sine series
Fourier sine series of
of uu is
is

Show that
Show that it
it is
is not
not possible
possible to to represent
represent the
the Fourier sine coefficients
Fourier sine coefficients of
of -~u/ dx 22
—d?u/dx
in terms of b
61,6
1 , b22 ,, b
&3,
3 , •—
. .. This shows that it is not possible to use the "wrong"
eigenfunctions (that is,
eigenfunctions (that is, eigenfunctions
eigenfunctions corresponding
corresponding toto different
different boundary
boundary
conditions) to
to solve
solve aa BVP.
7. Suppose u satisfies
du
u(O) = 0, dx (£) = 0,
and has Fourier
Fourier quarter-wave
quarter-wave sine
sine series

~
u(x) = ~ansm
. ((2n -2£1)1fX) .
172 Chapter 5.
Chapter Boundary value
5. Boundary problems in
value problems in statics
statics

Show that
Show that the
the Fourier series of
Fourier series -Td 2 ufdx22 is
of —Td?u/dx is
2
_Td u( ) _ ~ T(2n - 1)27f2 . ((2n -l)7fX)
dx2 x - L..J 4£2 an sm 2f .
n=l

(Hint: The
(Hint: The computation
computation of the Fourier
ofthe coefficients of
Fourier coefficients of -Td ufdx22 is
—Td?u/dx
2 similar to
is similar to
(5.23)).
(5.23)).
8. Consider
8. Consider an an aluminum
aluminum bar bar of
of length
length 11 m
m and
and radius
radius 11 cm.
cm. Suppose
Suppose that the
that the
side of
side of the
the bar
bar is
is perfectly insulated, the
perfectly insulated, the ends
ends of
of the
the bar
bar are
are placed in ice
placed in ice baths,
baths,
and heat energy
and heat energy isis added
added throughout
throughout thethe interior of the
interior of the bar
bar at
at aa constant
constant
rate of 0.001
rate of W fcm 33.. The
0.001 W/cm thermal conductivity
The thermal conductivity ofof the aluminum alloy
the aluminum alloy is
is
1.5W/(cmK). Find
1.5W/(cmK). Find and
and graph the steady-state
graph the steady-state temperature
temperature of the bar.
of the bar. Use
Use
the
the Fourier series method.
Fourier series method.
9. Repeat
9. Repeat the
the previous exercise, assuming
previous exercise, assuming that
that the right end
the right end of the bar
of the bar is
is per-
per-
fectly
fectly insulated and the
insulated and the left is placed
left is placed in
in an
an ice
ice bath.
bath.
10. Consider
10. Consider the
the string
string of Example 5.12.
of Example 5.12. Suppose
Suppose that
that the right end
the right end of
of the string is
the string is
free to
free move vertically
to move (along aa frictionless
vertically (along frictionless pole, for example),
pole, for example), andand aa pressure
pressure ofof
2200 dynes
2200 dynes per centimeter, in
per centimeter, in the
the upward direction, is
upward direction, is applied along the
applied along the string
string
(recall that
(recall that aa dyne
dyne isis aa unit
unit ofof force-one
force—one dyne
dyne equals
equals oneone gram-centimeter
gram-centimeter
per square second).
per square second). What
What is is the
the equilibrium
equilibrium displacement
displacement of the string?
of the string? How
How
does the answer
does the answer change
change if if the
the force due to
force due gravity is
to gravity is taken into account?
taken into account?

5.4
5.4 Finite element
Finite element methods
methods for BVPs
for BVPs
As we
As we mentioned
mentioned nearnear the end of
the end of the
the last
last section,
section, the primary utility
the primary of the
utility of the Fourier
Fourier
series method
series method is for problems
is for problems withwith constant
constant coefficients,
coefficients, in
in which
which case
case the eigenpairs
the eigenpairs
can be
can found explicitly.
be found explicitly. (For
(For problems
problems in two or
in two or three
three dimensions,
dimensions, inin order
order forfor the
the
eigenfunctions to
eigenfunctions to be explicitly computable,
be explicitly computable, it it is
is also
also necessary
necessary that
that thethe domain
domain
on which
on the equation
which the equation is is to
to be solved be
be solved be geometrically simple. We
geometrically simple. discuss this
We discuss this
further in
further in Chapter
Chapter 8.) 8.) For
For problems with nonconstant
problems with nonconstant coefficients,
coefficients, it
it is
is possible
possible toto
perform analysis to
perform analysis to show
show that
that the Fourier series
the Fourier series method
method applies in principle-the
applies in principle—the
eigenfunctions exist,
eigenfunctions exist, they
they areare orthogonal,
orthogonal, andand so so forth.
forth. The
The reader
reader cancan consult
consult
Chapter
Chapter 55 ofof Haberman
Haberman [22] [22]forforan
anelementary
elementaryintroduction
introductiontotothis
thiskind
kindofofanalysis,
analysis,
which we
which we also
also discuss further in
discuss further in Section
Section 9.7.
9.7. However,
However, without explicit formulas
without explicit formulas for for
the eigenfunctions,
the eigenfunctions, it is not
it is not easy to apply
easy to apply the
the Fourier series method.
Fourier series method.
These remarks
These remarks apply, for example,
apply, for example, to to the BVP
the BVP

- d~ (k(X)~:) = f(x), 0 < x < £,


u(O) = 0, (5.32)
u(£) = 0
(where kk is
(where is aa positive
positive function). The operator
function). The operator K C?JO,£] -t
K:: Cb[O,£] —> C[O,£] defined by
C[Q,l] defined by

d(
Ku = - - k(x)- dU) (5.33)
dx dx
5.4. Finite element methods for BVPs
BVPs 173
173

is symmetric
is symmetric (see Exercise 1),
(see Exercise 1), and
and there
there exists
exists an
an orthogonal
orthogonal sequence
sequence of of eigenfunc-
eigenfunc-
tions. However, when
tions. However, when the
the coefficient
coefficient k(x)
k(x] is
is not
not aa constant,
constant, there
there isis no simple way
no simple way
to
to find
find these eigenfunctions. Indeed,
these eigenfunctions. Indeed, computing
computing the the eigenfunctions requires much
eigenfunctions requires much
more
more work than solving
work than solving the
the original
original BVP.
BVP.
Because of
Because of the limitations of
the limitations of the
the Fourier
Fourier series
series approach,
approach, wewe now introduce the
now introduce the
finite element method,
finite element one of
method, one of the
the most
most powerful methods for
powerful methods for approximating
approximating solutions
solutions
to PDEs. The
to PDEs. The finite element method
finite element method can can handle
handle both variable coefficients
both variable coefficients and,
and, in
in
multiple spatial dimensions,
multiple spatial dimensions, irregular
irregular geometries.
geometries. We We will
will still
still restrict
restrict ourselves
ourselves to
to
symmetric operators,
symmetric operators, although
although it it is
is possible
possible to apply the
to apply the finite element method
finite element method to
to
nonsymmetric
nonsymmetric problems.
problems.
The finite
The element method
finite element method is is based
based on three ideas:
on three ideas:
1. The
1. The BVP is rewritten
BVP is rewritten in its weak
in its or variational
weak or variational form, which expresses
form, which expresses the
the
problem
problem as infinitely many
as infinitely scalar equations.
many scalar equations. In
In this
this form,
form, the
the boundary
boundary con-
con-
ditions are
ditions are implicit
implicit in
in the
the definition
definition of
of the
the underlying
underlying vector
vector space.
space.
2. The
2. The Galerkin
Galerkin method is applied
method is applied to "solve the
to "solve the equation
equation on
on aa finite-dimensional
finite-dimensional
subspace." This
subspace." This results in an
results in an ordinary
ordinary linear
linear system
system (matrix-vector
(matrix-vector equation)
equation)
that
that must be solved.
must be solved.
3. A
3. A basis of piecewise
basis of piecewise polynomials
polynomials isis chosen
chosen for
for the
the finite-dimensional
finite-dimensional subspace
subspace
so that
so that the
the matrix of the
matrix of the linear system is
linear system is sparse (that is,
sparse (that is, has
has mostly
mostly zero
zero
entries).
entries).
We describe
We describe each
each of
of these
these ideas
ideas in the following
in the following sections,
sections, using
using the BVP (5.32)
the BVP (5.32) as
as
our model
our model problem.
problem. We We always
always assume
assume that the coefficient
that the coefficient k(x) is positive,
k(x] is positive, since
since
it represents
it represents aa positive
positive physical
physical parameter (stiffness or
parameter (stiffness or thermal conductivity, for
thermal conductivity, for
example).
example).

5.4.1
5.4.1 The principle of virtual work and
and the weak form of a BVP
BVP
When an
When an elastic
elastic material
material isis deformed,
deformed, it it stores
stores potential energy due
potential energy due to internal
to internal
elastic forces.
elastic It is
forces. It is not obvious from
not obvious from first
first principles
principles how
how to measure (quantitatively)
to measure (quantitatively)
this
this elastic
elastic potential however, we
energy; however,
potential energy; can deduce
we can deduce the correct definition
the correct definition from the
from the
equations of
equations of motion
motion andand the
the principle of conservation
principle of conservation of of energy.
energy.
Suppose an
Suppose an elastic
elastic bar, with its
bar, with its ends
ends fixed,
fixed, is
is in
in motion, and its
motion, and its displacement
displacement
function
function u(x, t) satisfies the
t) satisfies the homogeneous
homogeneous wave wave equation:
equation:
2
a u -Aax
Ap(x)at a ( k(x)ax
au) =0, O<x<f, t>o,
2

u(O, t) = 0, t > 0, (5.34)


u(f, t) = 0, t > 0.
We now
We now perform
perform the following calculation
the following calculation (a trick—multiply both
(a trick-multiply sides of
both sides the wave
of the wave
equation by
equation du/dt and
by au/at integrate):
and integrate):
174
174 Chapter
Chapter 5. Boundary value problems
problems in statics

Applying integration by
Applying integration by parts,
parts,

-
1£ -a ( k(x)-
o ax
au) -dx
au
ax at
= - [auau]£
k(x)-- +
ax at 0 0
2
au a u
k(x)---dx1£
ax axat
r£ 2
au a u ( . au au )
= 10 k(x) ax atax dx smce at (0, t) = at (l, t) =0 .

Also,
Also,

Therefore,
Therefore, we obtain
we obtain

1o
£ Ap(x)- [1
a - (au)2]
-
at 2 at
dx + 1£ Ak(x)-ata [1- (au)2]
0 2
-
ax
dx =0. (5.35)

Applying
Applying Theorem 2.1 to
Theorem 2.1 to (5.35)
(5.35) yields
yields

at "210 Ap(x) a~ dx + "210 Ak(x) a~


a [ 1 r£ (a ) 2 1 rl (a ) 2 ]
dx = 0, t > o. (5.36)

This equation
This implies that
equation implies the sum
that the of the
sum of the two
two integrals
integrals is
is constant
constant with
with respect to
respect to
time, that
time, that is,
is, that
that

1 r£ (a ) 2 1 r£ (a ) 2
"210 Ap(x) a~ dx + "210 Ak(x) a: dx

is conserved.
is conserved. Obviously,
Obviously, the
the first integral represents
first integral represents the
the kinetic energy (one-half
kinetic energy (one-half
mass
mass times
times velocity
velocity squared),
squared), and
and we define the
we define second integral
the second integral to
to be
be the elastic
the elastic
potential
potential energy.
energy. The elastic potential
The elastic energy is
potential energy is the internal energy
the internal energy arising from
arising from
the strain
the strain au/ax.
du/dx.
We
We now
now return
return to
to the
the bar
bar in equilibrium, that
in equilibrium, that is, to the
is, to the bar satisfying the
bar satisfying the
BVP (5.32).
BVP (5.32). We
We have
have an
an expression
expression for
for the
the elastic
elastic potential
potential energy
energy ofof the bar:
the bar:

Ak(x) d~ (x)
1 r£ (d)2
"210 dx.

The bar
The bar possesses
possesses another
another form of potential
form of potential energy,
energy, due
due to
to the external force
the external force f/
acting upon
acting it. The
upon it. The proper
proper name
name ofof this energy depends
this energy depends on
on the
the nature
nature of the force;
of the force;
if it
if it were
were the
the force due to
force due to gravity, for example,
gravity, for example, it
it would
would be
be called
called the gravitational
the gravitational
5.4. Finite element methods for BVPs 175
175

potential energy.
potential energy. We We will call this
will call this energy
energy the external potential
the external This energy
energy. This
potential energy. energy
is different
is different inin aa fundamental
fundamental way from the
way from the elastic
elastic potential energy: it
potential energy: it depends
depends on on the
the
absolute position
absolute position of of the bar, not
the bar, not onon the
the relative
relative position
position ofof parts
parts of
of the
the bar
bar to other
to other
parts. For
parts. this reason,
For this reason, we do not
we do know the
not know the external
external potential energy of
potential energy of the
the bar
bar in its
in its
"reference" (zero
"reference" (zero displacement)
displacement) position (whereas the
position (whereas the bar
bar has
has zero
zero elastic
elastic potential
potential
energy in
energy in the
the reference
reference position).
position). We We define
define Co£Q to
to be
be the external potential
the external potential energy
energy of of
the bar
the bar in
in the
the reference position, and
reference position, and we
we now
now compute
compute the the change
change ofof energy
energy between
between
the bar
the bar in its reference
in its reference position
position and
and the bar in
the bar in its equilibrium position.
its equilibrium position. TheThe change
change
in potential
in potential energy
energy due
due to the external
to the external force
force f/ isis equal
equal to the work
to the done by
work done by f/ when
when
the bar
the bar is
is deformed
deformed fromfrom its
its reference position to
reference position to its
its equilibrium
equilibrium position.
position.
The work
The work done
done by
by f/ acting
acting onon the
the part
part P of of the
the bar originally between
bar originally between xx and
and
~x is
xx + Ax approximately
is approximately
volume
,.,.-"-..
f(x) A~x u(x)
~ ~
force per unit volume distance
(recall that
(recall that u(x)
u(x) isis the displacement of
the displacement of the
the cross-section
cross-section of
of the
the bar originally at
bar originally at
u(x) is
x—thus u(x)
x-thus is the
the distance
distance traveled
traveled byby that
that cross-section).
cross-section). To
To add
add up
up the
the work
work
due to the
due to the external force acting
external force acting on
on all little parts
all little of the
parts of bar, we
the bar, integrate:
we integrate:

l' Af(x)u(x) dx. (5.37)

We now have
We now an expression
have an expression for
for the
the total potential energy
total potential energy of
of the
the bar
bar in
in its
its
equilibrium position:
equilibrium position:

Cpot(u) =~ l' Ak(x) (:~ (X)) 2 dx -1' Af(x)u(x) dx + co.

If f/ and
If and uu are
are both
both positive, for instance,
positive, for instance, then the bar
then the bar has less potential
has less energy in
potential energy in
its equilibrium
its equilibrium position (think of
position (think of gravity).
gravity). This
This accounts
accounts for
for the
the sign
sign on
on the
the second
second
integral.
integral.
Next we
Next wish to
we wish to prove
prove the
the following
following fact:
fact: the
the equilibrium
equilibrium displacement
displacement uu of of
the bar
the bar is
is the
the displacement with the
displacement with the least
least potential That is,
energy. That
potential energy. is, if
if w
w ^ is any
¥- uu is any
other displacement
other displacement satisfying
satisfying the
the Dirichlet
Dirichlet conditions,
conditions, then
then
Cpot(w) > Cpot(u).
We can
We can write
write any
any displacement
displacement w as as w = u + v (just
(just take
take v = w -— u),w), and
and
the conditions
the conditions u(O)
u(Q) = 0, w(O)
— 0, w;(0) = = 00 imply
imply that
that v(O) 0, and
v(0) =— 0, and similarly
similarly atat x =
= £.t.
Thus vv must
Thus must belong to c1
belong to [0, fl.
C|)[0, ^]. For brevity, we
For brevity, we shall
shall write
write V == C1
Cf^O,^], the set
[0, f], the set of
of
allowable displacements
allowable displacements v. Therefore, we
v. Therefore, we wish to prove
wish to prove that
that
Cpot(u + v) > Cpot(u) for all v E V.
We have
We have
1 r' (dU dV) 2 dx - 10(
Cpot(u + v) = "210 k(x) dx (x) + dx (x) f(x) (u(x) + vex)) dx + Co
176 problems in statics
Chapter 5. Boundary value problems

=2 III 0 k(x) ((dU)2


dx(X) +2 du dv (dV )2) dx
dx (X)dx(X)+ dx(X)

- fot f(x)u(x) dx - fot f(x)v(x) dx + [0


="21 It 0 k(x)
(dU) 2
dx (x) dx + It0
du dv
k(x) dx (x) dx (x) dx

+"2 It
1 ( 0 k(x) dv (x) )
dx 2
dx - lf 0 f(x)u(x) dx - lf
0 f(x)v(x) dx + [0;
that is,
that is,

[pot(U + v) = [pot(u) + fof k(x) ~~ (x) ~: (x) dx - fol f(x)v(x) dx


11t
+"2 0 k(x) (d~(x) )2 dx. (5.38)

Using integration by
Using integration by parts,
parts, we have
we have

fof k(x) ~~ (x) ~: (x) dx - fot f(x)v(x) dx


= [k(X)~~(X)V(X)]: - fof (d~ (k(x)~~(x)))V(X)dX- fof f(x)v(x) dx
=- fot (d~ (k(X)~~(X)) + f(X)) v(x)dx.
(The boundary
(The term disappears
boundary term disappears in
in the
the above
above calculation
calculation since
since v(O) v(t] = 0.)
v(0] = v(£) 0.)
The equilibrium
The equilibrium displacement
displacement Uu satisfies
satisfies

d ( k(x) dx
dx du (x) ) + f(x) = 0,

the differential
the differential equation
equation from
from (5.32),
(5.32), as
as we derived in
we derived in Section
Section 2.2.
2.2. Therefore,
Therefore, the
the
integral above vanishes,
integral above and we
vanishes, and have
we have

[pot(U + v) = [pot(U) +2 11£ 0 k(x) (dv)2


dx (x) dx.

If v is
If is not identically zero,
not identically then neither
zero, then neither is
is dv
dv/dx (only <la: constant
/ dx (only constant function
function has
has
aa zero
zero derivative,
derivative, and
and vv cannot
cannot be
be constant
constant unless
unless it
it is
is identically
identically zero,
zero, because
because
v(Q) =
v(O) =v(l)
v(£) == 0). Since
G). Since

11t
2 0 k(x) (dd:(x) )2 dx>O
whenever ^ 0 (the
whenever vv:/;O (the integral
integral of
of aa nonzero,
nonzero, nonnegative function is
nonnegative function is positive),
positive), we
we
have obtained the
have obtained the desired
desired result:
result:
5.4. Finite element
element methods
methods for BVPs 177
177

This result
This gives us
result gives us aa different
different understanding
understanding of of the equilibrium state
the equilibrium state of the
of the
bar—the
bar-the barbar assumes
assumes the state of
the state of minimal
minimal potential energy. This
potential energy. This complements
complements our our
earlier
earlier understanding
understanding that
that the
the bar
bar assumes
assumes aa state
state in
in which all forces
which all forces balance.
balance.
The potential
The potential energy
energy £ poi defines
[pot defines aa function
function mapping
mapping the space of
the space of physically
physically
meaningful displacements
meaningful displacements intointo R, and the
R, and equilibrium displacement
the equilibrium displacement u is is its
its mini-
mini-
mizer.
mizer. A standard result
A standard result from calculus is
from calculus is that
that the
the derivative of aa real-valued
derivative of real-valued function
function
must be
must be zero
zero at
at aa minimizer.
minimizer. AboveAbove we computed
we computed

[pot (u + v) = [pot (u) + a term linear in v + a term quadratic in v

(see (5.38)).
(see The linear
(5.38)). The linear term
term in
in this
this expression
expression must
must be
be D£ pot(u)v, the
D[pot(u)v, directional
the directional
derivative of
derivative of £
[pot
pot at
at u in
in the
the direction
direction of
of v. The
The minimality
minimality of
of the
the potential
potential energy
energy
then implies
then implies that
that D£ poi(u} =
D[pot(u) = 0,
0, or, equivalently,
or, equivalently,

D[pot(u)v = °
for all v E V.

This yields
This yields

i f du dv
o k(x) dx (x) dx (x) dx -
if
0 f(x)v(x) dx = °for all v E V

(as we
(as saw above),
we saw above), which
which is is called
called the
the principle
principle ofof virtual
virtual work. (The term
work. (The term linear
linear
in u dominates
in the work
dominates the work £ pot (u + v}
[pot v) — pot (u) when
- £[pot when the displacement v is
the displacement arbitrarily
is arbitrarily
small ("virtual"),
small ("virtual"), and
and isis called the virtual
called the work. The
virtual work. The principle says that
principle says that the virtual
the virtual
work
work isis zero
zero when
when the
the bar
bar is at equilibrium.)
is at equilibrium.)
The
The principle of virtual
principle of virtual work
work is is also
also called
called the
the weak form of
weak form of the
the BVP;
BVP; it it is
is
the
the form
form that the BVP
that the BVP would
would taketake ifif our
our basic
basic principle
principle were
were the
the minimality
minimality of of
potential energy rather
potential energy rather than
than the
the balance
balance of of forces at equilibrium.
forces at equilibrium. ByBy contrast,
contrast, wewe
will
will call
call the
the original
original BVP,
BVP,

d ( k(x) du
- dx dx (x) ) =f(x),O<x<f,
u(o) = 0, (5.39)
u(f) = 0,
the
the strong form. We
strong form. can show
We can show directly
directly that
that the
the two
two forms
forms of
of the
the BVP are equivalent,
BVP are equivalent,
in the
in the sense
sense that, for f/ E6 C[O,
that, for C[0, I],
£], uu satisfies
satisfies the
the strong form if
strong form if and
and only
only if
if it
it satisfies
satisfies
the
the weak form.
weak form.

5.4.2
5.4.2 The equivalence of
The equivalence of the strong and
the strong and weak forms of
weak forms of the BVP
the BVP
The
The precise statement of
precise statement of the
the weak
weak form
form of
of the
the BVP
BVP is:
is:

find u E V such that


i
0
f du dv
k(x) dx (x) dx (x) dx =
if
0 f(x)v(x) dx for all v E V.
(5.40~
We
We have
have already seen the
already seen the proof
proof of
of the
the following fact: If
following fact: If uu satisfies
satisfies (5.39), the
(5.39), the
strong form
strong form of
of the
the BVP,
BVP, then
then uu also
also satisfies (5.40), the
satisfies (5.40), the weak form. This
weak form. This was
was proved
proved
178 Chapter 5. Boundary
Boundary value problems in statics
statics

just below (5.38), using integration


integration by parts. Indeed, the simplest way of deriving
deriving
the weak form is to start with the differential
differential equation

d ( k(x) dx
- dx du (x) ) = f(x), 0 < x < f,

multiply by an arbitrary
arbitrary "test
"test function"
function" vv e
E V to get

d ( k(x) dx
- dx du (x) ) v(x) = f(x)v(x), 0 < x < f,

and then integrate


and integrate both sides from 00 to i:
f:

- 10{l dxd ( dU) (l


k(x) dx (x) v(x) dx = 10 f(x)v(x) dx.

Integrating by parts on the left


Integrating left and applying the boundary conditions yield the
weak form.
weak form.
Now suppose
suppose Uu satisfies
satisfies (5.40),
(5.40), the
the weak form of the BVP. Then, by definition
definition
of V, u(O) = u(i]
w(0) = u(f) = 0.
O. We
We now
now use integration
integration by parts to show
show that u satisfies the
the
strong form
strong form of
of the
the differential
differential equation.
equation. We
We have
have

{i du dv (l
10 k(x) dx (x) dx (x) dx - 10 f(x)v(x) dx = 0 for all v E V

dU ]i
=> [ k(x)dx(x)v(x) 0 - 10(- dxd ( du )
k(x) dx (x) v(x)dx

- foi f(x)v(x) dx = 0 for all v E V


=>- foi {d~ (k(X)~~(x)) +f(X)}V(X)dx=oforallvEv.
The boundary terms vanish because of the boundary conditions v(O) = v(f)
v(Qi) = v(i] = 0.
O.
We
We have
have

fol {d~ (k(X) ~~ (X)) + f(X)} v(x) dx = 0 for all v E V. (5.41)

This condition
This condition can
can only
only be true ifif
be true

d ( k(x) dx
dx du (x) ) + f(x) = 0 (5.42)

on the interval [0, [0, fl. The proof


i]. The proof isis simple,
simple, given
given the
the following
following fact:
fact: If
If 00 << ec << dd << f,I,
then
then there
there exists
exists aa function
function V[c,dj
V[c^] £ E V such that V[c,dj(X)
such that v^c^(x) > 0 for all
0 for all x € (c,d) and
E (e,d) and
v
[c,d](x) =
V[c,dj(x) = 00 for
for all
all xx in
in [0,c]
[O,e] or [d,f]. (Exercise
or [d,i\. (Exercise 33 asks
asks the
the reader
reader toto construct
construct such such
aa function
function V[c,dj.)
v\c &.} If
If
d ( k(x)dx(x)
dx du ) +f(x)
element methods
5.4. Finite element methods for BVPs 179

were
were positive
positive on
on aa small
small interval
interval [c,
[c, d]d]CC [0,
[0,£], then
£], then

would be positive
would be on [c,
positive on [c, d\ and zero
d] and zero on
on the
the rest of [0,
rest of [0, £],
^], and
and hence
hence

would be positive.
would be Since this
positive. Since this integral is zero
integral is zero for
for all £ V, this
all v E shows that
this shows that

d ( k(x)dx(x)
dx du ) +f(x)

cannot
cannot bebe positive
positive on any small
on any small interval.
interval. By By the same reasoning,
the same reasoning, it it cannot
cannot be be
negative on any
negative on small interval.
any small interval. It
It follows
follows that (5.42) must
that (5.42) hold.
must hold.
Thus, to
Thus, solve (5.39),
to solve (5.39), it
it suffices
suffices toto solve
solve the weak form
the weak form (5.40).
(5.40). TheThe weak form
weak form
consists of
consists infinitely many
of infinitely many equations, since there
equations, since are infinitely
there are infinitely many "test functions"
many "test functions"
v E£ V. The
The original
original PDE
PDE also
also implies
implies an an infinite
infinite number
number of of equations,
equations, sincesince the
the
equation must
equation must hold
hold for each of
for each of the infinitely many
the infinitely values of
many values of x E [0, fl.
£ [0, In either
i\. In either case,
case,
we cannot
we cannot find
find the solution directly,
the solution directly, since
since any
any practical computational procedure
practical computational procedure
must reduce
must reduce to to aa finite
finite number
number of of steps.
steps. The The weak
weak form
form admits
admits the use of
the use the
of the
Galerkin method,
Galerkin method, which
which reduces
reduces the
the infinitely
infinitely many equations to
many equations to aa finite collection
finite collection
of
of equations
equations whose
whose solution
solution provides
provides an an approximate
approximate solution
solution to
to the BVP.
the BVP.

Exercises
1. Show
1. Show that
that the differential operator
the differential operator

K : c1 [0, £] -+ C[O, f]

defined by
defined by
Ku = -- d (k(x)-
dU)
dx dx
is
is symmetric:
symmetric:
(Ku,v) = (u,Kv) for all U,V E C1[0,£].
2. Suppose
2. Suppose that
the
the previous
k(x) > 0 for
that k(x)
previous exercise,
°
for all
all xx £E [0,
has an
exercise, has an eigenvalue,
fl. Show
[0,1]. Show that
eigenvalue, then
then it
if the
that if
it must
operator K,
the operator
must bebe positive.
defined in
K, defined
(Hint: Let
positive. (Hint:
in
Let
AA be
be an
an eigenvalue
eigenvalue and
and u aa corresponding
corresponding eigenfunction.
eigenfunction. Compute
Compute (K (Ku,u)
u, u)
two
two ways,
ways, once
once using
using the fact that
the fact that u u is
is an
an eigenfunction
eigenfunction andand again
again using
using
integration by parts
integration by parts once.)
once.)

3.
3. Let °
Let 0 < cc < d
differentiate
d < t£ hold.
differentiable on
hold. Find
[0, i]£] and
on [0,
Find aa function
and satisfies
function V[c,d]
satisfies the
V[CJ(Q that
the conditions
that is
conditions that
that
is twice-continuously
twice-continuously

V[c,dJ(X) °
> for all x E (c, d)
180 Chapter 5.
Chapter 5. Boundary
Boundary value
value problems
problems in statics
statics

and
and
V[c,d](X) = °for all x E [0, c] U [d, fl.
Hint: Let
Hint: Let p(x) be aa polynomial
p(x] be such that
polynomial such that

dp d2 p dp ~p
p(c) = dx (c) = dx 2 (c) = 0, p(d) = dx (d) = dx 2 (d) = o.
Then define
Then define

() {P(X), c<x<d,
V[c,d] x = 0, 0 ~ x ~ c or d ~ x ~ £.

4. Show
4. Show that
that both
both of
of the
the integrals
integrals

1 rf
"210 Ap(x)
(aa~ ) dX'"2 10r Ak(x) (aa: ) dx
2 1
f
2

have units of
have units of energy
energy (force
(force times
times distance).
distance).

5. Consider
5. Consider the damped wave
the damped wave equation
equation
2
a u
Ap(x) at2 + c au
at
a ( au)
- A ax k(x) ax = 0, 0 < x < f, t> 0,
u(O, t) = 0, t > 0,
u(f,t) = 0, t > 0,

where
where cc > 00 is
is aa constant.
constant. By
By modifying the calculation
modifying the calculation beginning on page
beginning on page
173, show
173, show that
that the
the total energy (kinetic
total energy (kinetic energy
energy plus
plus elastic
elastic potential
potential energy)
energy)
is decreasing
is decreasing with
with time.
time.

5.5
5.5 The Galerkin
The Galerkin method
method
As we stated
As we stated earlier,
earlier, the Galerkin method
the Galerkin method defines
defines an
an approximate
approximate solution
solution to the
to the
weak form
weak form of
of the
the BVP
BVP by by restricting
restricting the
the problem
problem toto aa finite-dimensional subspace.
finite-dimensional subspace.
This has
This has the
the effect
effect of
of reducing
reducing the infinitely many
the infinitely many equations
equations contained
contained in in (5.40)
(5.40) to
to
aa finite
finite system
system ofof equations.
equations. ToTo describe
describe the
the Galerkin
Galerkin method,
method, it it is
is convenient
convenient toto
introduce the
introduce the following
following notation.
notation. WeWe define
define the
the symmetric
symmetric bilinear
bilinear form a(-, •) by
form a(·,·) by

a(u,v)
r k(x)dx(x)dx(x)dx.
= 10
f
du dv

The function
The function is
is called
called bilinear
bilinear because,
because, holding one argument
holding one argument fixed,
fixed, the function is
the function is
linear in
linear in the
the other:
other:

a(alul +a2U2,V) = ala(Ul,V) +a2a(u2,V) for all al,a2 E R, Ul,U2,V,


a(u, al Vl + a2v2) = ala(u, Vl) + a2a(u, V2) for all al, a2 E R, U, Vl, V2.
5.5. The
5.5. The Galerkin
Galerkin method
method 181
181

The
The bilinear form is
bilinear form is called
called symmetric because
symmetric because

a(u,v) = a(v,u) for all u,V.

Bilinearity and
Bilinearity symmetry are
and symmetry are two of the
two of the properties of an
properties of an inner
inner product
product (see
(see Section
Section
3.4). The
3.4). The third
third property also holds
property also if we
holds if restrict a(·,·)
we restrict a(-, •) to
to vectors
vectors in
in V = Cf^O,^]:
= Cb[O,f]:

a( u, u) ~ 0 for all u E V

and
and
a(u,u) > 0 for all u E V,U i- O.
From the
From definition of
the definition of a(·,
a(-, .),
•), we
we have
have

a(u,u) = 1£ k(x) (~~(X)r dx.


Since the
Since integrand is
the integrand is nonnegative,
nonnegative, we clearly have
we clearly have a(u,
a( u, u) > 0 for
~ 0 for all u. Moreover,
all u. Moreover,
the integral
the integral of
of aa nonnegative function can
nonnegative function only be
can only zero when
be zero when the
the function (the
function (the
integrand) is
integrand) is the zero function.
the zero Thus,
function. Thus,

a(u,U)=0=?k(X)(~~(X))2 =0, O<x<f,


=? ~~ (x) = 0, 0< x < f (since k(x) > 0),
=? u(x) = C, 0 < x < f,

where
where C isis aa constant.
constant. But we already
But we already know
know that w(0) = 00 and
that u(O) and u is continuous on
is continuous on
[0,1]. Therefore, C must
[O,f]. Therefore, must be
be zero, which is
zero, which what we
is what we wanted
wanted to
to prove. Thus a(·,·)
prove. Thus o(-, •)
defines an inner
defines an inner product
product on V.
on V.
We
We recall
recall that
that
11 f(x)v(x) dx = (f,v),

where (-, •) is
where (.,.) is the L22 inner
the L inner product.
product. Thus, the weak
Thus, the form (5.40)
weak form (5.40) of
of the model BVP
the model BVP
(5.39) can
(5.39) can bebe written as
written as

find u E V satisfying a(u, v) = (f, v) for all v E V. (5.43)

The
The Galerkin idea is
Galerkin idea is simple.
simple. Choose
Choose aa finite-dimensional subspace Vn
finite-dimensional subspace of V, and
Vn of and
reduce (5.43)
(5.43) to the
the subspace:
subspace:

find Vn E Vn satisfying a(vn,V) = (f,v) for all v E Vn. (5.44)

Below we
Below show that
we show that (5.44)
(5.44) has
has aa unique solution that
unique solution can be
that can be found
found by solving aa
by solving
matrix-vector equation (that
matrix-vector equation (that is,
is, aa system
system of
of linear
linear algebraic
algebraic equations). First we
equations). First we
show that solving
show solving (5.44)
(5.44) is
is useful:
useful: the Galerkin approximation is the best approxi-
approxi-
mation,
mation, from
from VVnn,, to the true
to the true solution.
solution.
182 Chapter 5. Boundary
Boundary value problems in statics

Suppose U
Suppose uE 6 V is
is the solution to
the solution to (5.43),
(5.43), Vn is aa finite-dimensional
Vn is subspace of
finite-dimensional subspace of
and Vn
V, and vn e is the
Vn is
E Vn solution to
the solution (5.44). Then
to (5.44). Then wewe have
have
UEV, a(u,v) = (f,v) forallvEV,
vnEVn , a(vn,v) = (f,v) forallvEVn ·
Subtracting the
Subtracting the second
second equation
equation from
from the
the first,
first, we
we see
see that
that
a(u,v) - a(vn,v) = 0 for all v E Vn
or, using the bilinearity of a(-,-),
a(·, .),
a(u - vn,v) = 0 for all v E Vn .
Since a(·,·)
Since o(-, •) defines
defines an
an inner
inner product
product on
on V, the
the projection theorem (see
projection theorem (see Theorem
Theorem
3.36 in
3.36 in Section
Section 3.4)
3.4) shows
shows that
that Vn is the
vn is the best
best approximation
approximation toto u from
from V Vnn, when
when
"best" is
"best" is defined
defined by the
the norm
norm induced
induced by a(·,
o(-, .):
•):
Ilu - vnllE :::; Ilu - wilE for all w E Vn,
where
where

IlvIIE=va(v,v)= 1\(X)(~~(X))2 dx forallvEV.

We usually refer to II|| .• liE


We usually as the energy
\\E as and to
energy norm and to a(·,·)
«(-,-) as
as the
the energy
energy inner
product.
product.
To compute V {</>i,02,
vnn, suppose {(/>1, • • • ,,^n}
¢2, ... (5.44) is
Vnn. Then (5.44)
¢n} is a basis for V
equivalent to
equivalent to
find Vn E Vn satisfying a(vn,¢i) = (f,¢i),i = 1,2, ... ,n. (5.45)
Since Vn
Since vn belongs
belongs to it can
Vnn,, it
to V can be
be written as aa linear
written as linear combination
combination of
of the
the basis vectors:
basis vectors:
n
Vn = I: Uj¢j' (5.46)
j=l

(We now
(We now have two meanings
have two meanings for
for the symbol "u."
the symbol "u." The
The function
function uu is is the exact
the exact
solution to
solution to the
the BVP,
BVP, while the components
while the components of of the
the vector
vector uu areare the
the weights
weights in in the
the
representation
representation ofof the approximation Vn
the approximation in terms
vn in terms ofof the
the basis
basis ¢l,0i, ¢2,
02, ...
• • • , ¢n' We will
(f>n- We will
live with
live this ambiguity
with this ambiguity in
in order
order to
to adhere
adhere to standard notation.)
to standard notation.)
Finding Vn
Finding is now
vn is now equivalent
equivalent to
to determining
determining Ul, 1*2,...,
HI, U2, Substituting (5.46)
un. Substituting
. .. , Un. (5.46)
into (5.45)
into (5.45) yields
yields

or, using the


or, the bilinearity
bilinearity of
of a(·,
o(-, .),
•),
n
I:a(¢j,¢i)Uj = (f,¢i), i = 1,2, ... ,n.
j=l
5.5. The Galerkin method 183

This is
This is aa system
system ofof n linear
linear equations
equations for
for the
the unknowns
unknowns Ul,
wi, U2,
U2, ...
• • • ,, Un. We define
un. We define aa
matrix K
matrix K E R n x n and a vector fERn
€ Rnxn f e Rn by

(We now
(We now also
also have
have two
two meanings
meanings for
for the
the symbol
symbol "f":
"f": the
the function
function f/ is
is the
the right-hand
right-hand
side of
side of the
the differential
differential equation,
equation, while
while the
the vector
vector ff has components Ii
has components fi =
— (I,(/,&).}
<l>i).)
Finding Vn
Finding is now
vn is now equivalent
equivalent to solving the
to solving the linear
linear system
system

Ku=f.

The matrix
The matrix K K isis usually
usually called
called the the stiffness
stiffness matrix, since, when
matrix, since, when applied
applied to
to problems
problems
in mechanics, the
in mechanics, entries in
the entries in K K depend
depend on on the stiffness k(x)
the stiffness k(x) ofof the material. For
the material. For
analogous reasons,
analogous reasons, thethe vector
vector ff is is usually
usually called
called the
the load vector.31
load vector.31
The reader
The reader willwill recall
recall that,that, inin computing
computing aa best approximation, it
best approximation, it is
is advan-
advan-
tageous to
tageous to have
have anan orthogonal
orthogonal basis, basis, since
since then
then the stiffness (or
the stiffness (or Gram)
Gram) matrix
matrix is
is
diagonal, and
diagonal, and the
the projection
projection is is computed
computed by by nn inner
inner products. However, the
products. However, the basis
basis
for Vn
for must be
Vn must orthogonal with
be orthogonal with respect
respect to to the
the energy
energy inner
inner product,
product, and
and with
with aa
nonconstant coefficient k(x),
nonconstant coefficient it is
k ( x ) , it is usually difficult32
usually difficult 32
to
to find
find anan orthogonal
orthogonal basis.
basis.
Therefore, in
Therefore, in the
the finite element method,
finite element method, we we will
will use
use aa nonorthogonal
nonorthogonal basis.basis.
We now illustrate
We now illustrate the
the Galerkin
Galerkin method
method by by applying
applying it it to two BVPs,
to two BVPs, one
one with
with
constant coefficients
constant coefficients andand thethe other
other with
with nonconstant
nonconstant coefficients.
coefficients.

Example 5.18.
Example 5.18. Let FN be
Let FN be the
the subspace
subspace of
ofVV spanned
spanned by
by the
the basis
basis

{sin (7fx) , sin (27fx) , ... ,sin (N 7fx)} ;

This basis
This basis is
is orthogonal
orthogonal with
with respect
respect to
to the
the ordinary L22 inner
ordinary L inner product on the
product on the interval
interval
[0,1].
Consider the
Consider the BVP
BVP
d2 u
- dx 2 = X, 0 < x < 1,
u(O) = 0, (5.47)
u(l) = 0

(this is
(this is (5.39)
(5.39) with
with k(x)
k(x) == I}.
I ) . The
The exact
exact solution
solution is
is

X x3
u(x) = 6 - 6'
31
The stiffness
31The stiffness matrix
matrix isis precisely
precisely the Gram matrix
the Gram matrix appearing
appearing inin the
the projection
projection theorem;
theorem; see
see
page 62.
page 62. If
If we apply the
we apply projection theorem
the projection theorem directly
directly to to compute
compute Vn,
vn, we need to
we need compute the
to compute the
right-hand-side vector
right-hand-side vector ff whose
whose components
components are are a(u, </>i); the
a(u, ¢i)j the weak
weak form
form allows us to
allows us to compute
compute these
these
components without
components without knowing
knowing u, since a(u,
u, since a(it,(fo) = (j,
¢i) = (/, ¢;).
</>i).
32
32That is, in
That is, in the
the sense
sense that
that itit is
is computationally
computationally expensive
expensive to to compute
compute an an orthogonal
orthogonal basis.
basis.
Given any
Given any basis,
basis, it
it is
is simple
simple in principle to
in principle apply the
to apply the Gram-Schmidt
Gram-Schmidt procedure
procedure to to obtain
obtain an
an or-
or-
thogonal basis.
thogonal basis. The
The reader
reader can
can consult
consult anyany introductory
introductory book book on
on linear
linear algebra
algebra for
for an
an explanation
explanation
of the
of the Gram-Schmidt
Gram-Schmidt procedure.
procedure.
184 Chapter 5. Boundary value problems in statics

Since k(x)
Since k(x) =
= 1,
I , we
we see
see that
that

(1 du dv
a(u,v) = 10 dx(x)dx(x)dx

and
and

Therefore,
Therefore,

and the
and the basis turns out
basis turns out to
to be
be orthogonal
orthogonal with
with respect
respect to
to the
the energy
energy inner
inner product
product as
as
well. We
well. We also
also have
have
1 (_1)i+1
(x, ¢i) =
1
o
x sin (i1fx) dx
)
= -'----,. :-.-
Z1f

These form
These the entries
form the entries of
of the
the matrix
matrix K and
and the
the vector f. Since
vector f. Since K is
is diagonal,
diagonal, we
we
can
can solve the system
solve the system KKuu == ff immediately
immediately to
to obtain
obtain

2(-1)i+1
Ui = ·3 3
2 1f

The resulting
The resulting approximation,
approximation, for
for N
N = 20, is
= 20, is displayed
displayed inin Figure 5.10. The
Figure 5.10. The energy
energy
inner product,
inner product, for
for a
a constant
constant function k ( x ) , is
function k(x), is just L2 inner
the £2
just the inner product applied to
product applied to
the derivatives,
the derivatives, and so the
and so the calculations
calculations areare intimately
intimately related
related to
to those
those we perform
we perform
in computing
in computing aa Fourier
Fourier series
series solution;
solution; indeed,
indeed, the the final
final result is the
result is the same!
same!

Example 5.19.
Example 5.19. Consider
Consider the
the BVP
BVP

d(
- - (l+x)- dU) =x, °< x < 1,
dx dx
u(o) = 0, (5.48)
u(l) = 0.

The exact
The exact solution
solution is
is
_ ~ _ x2 _ In (1 + x)
( )
u x - 2 4 4In2'
We will
We will apply the Galerkin
apply the Galerkin method
method with
with the
the same
same approximating
approximating subspace
subspace and
and basis
basis
as in
as in the
the previous exercise. The
previous exercise. The calculations
calculations are
are similar,
similar, but
but the
the bilinear
bilinear form
form
changes to
changes to
(1 du dv
a(u,v) = 10 (1 + x)dx(x)dx(x) dx,

and the
and the basis
basis functions
functions are no longer
are no longer orthogonal
orthogonal in
in the
the energy
energy inner product.
inner product.
5.5. The Galerkin method
5.5. 185
185

We have
We have

a(¢>j, ¢>i) = ij7r2 11 (1 + x) cos (i7rx) cos (j7rX) dx

={
and
and
1 (_I)i+l
(x, ¢>i) =
1 o
x sin (i7rx) dx = -'---:-.-
Z7r
These form
These the entries
form the entries of the matrix
of the K and
matrix K and the vector f.
the vector We cannot
f. We Ku == ff
solve Ku
cannot solve
explicitly; that
explicitly; that is,
is, we cannot derive
we cannot derive aa useful
useful formula
formula for the coefficients
for the Ui,ii =
coefficients Ui, =
1,2,...,
1,2, ... , N, in the
N, in the formula
formula
N
VN(X) = LUi sin (i7rx).
i=1

However,
However, we can solve
we can solve for the unknowns
for the unknowns numerically
numerically using
using Gaussian
Gaussian elimination,
elimination,
and thereby
and thereby produce the approximation
produce the approximation w
w from
from FN. The result,
FN . The result, for
for N
N = 20, is
= 20, is
shown in
shown in Figure 5.10.
Figure 5.10.

0.08.-----------. 0.06.------------.

-5
10 x 10

5 2

-5~---~----j
o 0.5 0.5
x x

Figure 5.10.
Figure 5.10. Solving
Solving BVPs (5.47) {left}
BVPs {5.47} (left) and
and {5.48}
(6.48) {right}
(right) using
using the
the
Galerkin method.
Galerkin method. The
The solutions are graphed
solutions are in the
graphed in the top
top figures and the
figures and the errors
errors in
in
the solutions
the in the
solutions in the bottom.
bottom.
186 Chapter 5. Boundary
Boundary value problems in statics

The results in
The results in these
these two examples are
two examples are ofof roughly
roughly the same quality,
the same quality, showing
showing
that the
that Galerkin method
the Galerkin method can can bebe as as effective
effective as as the
the Fourier
Fourier method.
method. The The most
most
significant difference in these two methods is the need to form the matrix K in the
significant difference in these two methods is the need to form the matrix K in the
second example
second example and solve the
and solve the N x system Ku
x N system Ku = = f.f. This
This is is very
very time-consuming
time-consuming
compared to
compared to the computations required
the computations required in in the
the first
first example (where the
example (where system of
the system of
linear equations
linear equations is is diagonal).
diagonal). This question question of of efficiency
efficiency is particularly
particularly important
important
when we we have
have two or three spatialspatial dimensions;
dimensions; in aa problem of of realistic size, it may
may
take impossibly
take impossibly long long toto solve
solve the
the resulting
resulting linear system if
linear system if the coefficient matrix
the coefficient matrix is is
dense. A
dense. A dense
dense matrix
matrix is is aa matrix
matrix in in which
which mostmost or all of
or all of the entries are
the entries are nonzero.
nonzero.
A sparse
A matrix, on
sparse matrix, on the other hand,
the other hand, has has mostly
mostly zero
zero entries.
entries.
The
The finite element method
finite element method is is simply
simply thethe Galerkin
Galerkin method
method with with aa special
special choice
choice
for
for the
the subspace
subspace and and its
its basis;
basis; thethe basis leads to
basis leads to aa sparse
sparse coefficient
coefficient matrix.
matrix. The The
ultimate sparse, nonsingular
ultimate sparse, nonsingular matrixmatrix is is aa diagonal
diagonal matrix. Obtaining aa diagonal
matrix. Obtaining diagonal
matrix
matrix requires
requires that
that the
the basis
basis forfor the
the approximating
approximating subspacesubspace be be chosen
chosen to to be
be
orthogonal with
orthogonal with respect
respect to the energy
to the energy inner
inner product.
product. As As mentioned
mentioned earlier, it is
earlier, it too
is too
difficult, for
difficult, for aa problem
problem with variable coefficients,
with variable coefficients, to to find
find anan orthogonal
orthogonal basis. The
basis. The
finite element
finite element method
method uses uses aa basis
basis in in which
which mostmost pairs
pairs ofof functions are orthogonal;
functions are orthogonal;
the resulting
the resulting matrix
matrix is is not diagonal, but
not diagonal, but itit is
is quite sparse.
quite sparse.

Exercises
1. Determine
1. Determine whether
whether the
the bilinear form
bilinear form

defines an
defines an inner
inner product
product on each of
on each of the following subspaces
the following subspaces of (722[0,^].
of C [0, fl. If
If it
it
does not,
does not, show
show why.
why.
(a) {v E C 2 [0,f] : v(f) = O}
2
(b) {v E C [0,f] : v(O) = v(f)}
(c) C 2 [0,f] (the entire space)
2. Show
2. Show that if FN
that if is the
FN is subspace defined
the subspace defined in
in Example
Example 5.18,
5.18, and
and the
the Galerkin
Galerkin
method is applied
method is applied to
to the
the weak form of
weak form of
d2 u
-k dx 2 = f(x), 0 < x < f,
u(O) = 0,
u(f) = 0,
with FJV as
with FN as the
the approximating
approximating subspace,
subspace, the
the result
result will
will always
always be
be the partial
the partial
Fourier sine series
Fourier sine series (with
(with N terms) of
N terms) of the
the exact solution u.
exact solution u.
3. Define
3. Define 5
S to
to be
be the set of
the set of all
all polynomials
polynomials of
of the form ax
the form bx22,, considered
ax + bx considered as
as
functions defined
functions defined on
on the
the interval [0,1].
interval [0,1].
(a)
(a) Explain why S
Explain why 5 is
is aa subspace of C22[0,1].
subspace of [0, 1].
5.5. The Galerkin method
method 187

(b) Explain
(b) Explain why
why the
the bilinear form
bilinear form

10r
l
du dv
a(u,v) = dx (x) dx (x) dx

defines an inner product on


defines on S.
S.
(c) Compute
(c) Compute the
the best
best approximation from S, in
approximation from in the
the energy
energy norm,
norm, to f(x) =
to f(x] =
ex.
eX.
(d) Explain why
(d) Explain why the the best
best approximation
approximation from
from P-2, in the
P2, in the energy
energy norm,
norm, toto
ff(x) = eeXx isis not
(x) = not unique. (The subspace
unique. (The subspace PI is defined
P2 is defined in Exercise 3.l.3d.)
in Exercise 3.1.3d.)
4. Repeat
Repeat Exercise
Exercise 33 with

s= {v E C 2 [0, 1] v(x) = ax+ bx 2 + cx 3 for some a,b,c E R}.

5. Define
5. Define
V2 = span { x(l - x), x (~ - x) (1 - x) }

and
and regard
regard V¥22 as
as aa subspace
subspace of
of C|j[0,1].
C1[0, 1]. Apply
Apply the
the Galerkin
Galerkin method, using
method, using
as the
¥22 as
V the approximating subspace, to
approximating subspace, estimate the
to estimate the solution
solution of
of

- dx d ((1 + x) dx
dU) = x, 0 < x < 1,
u(O) = 0,
u(l) = O.

Find
Find the exact solution
the exact solution and
and graph
graph the exact and
the exact and approximate
approximate solutions
solutions to-
to-
gether.
gether.

6. Repeat
6. Repeat Exercise
Exercise 55 using
using the
the subspace
subspace

V3 = span {X(l- x),x (~- x) (1- x),x (~- x) (~- x) (1- x)}.
7. The standard
7. The standard Gaussian
Gaussian elimination algorithm for
elimination algorithm for solving
solving Ax =b
Ax = b requires
requires

nxn
arithmetic operations when A E eRRnxn. . (The exact number is a cubic
cubic poly-
3
nomial in n, and
nomial in and 2n 3
2n /3/3 is
is the
the leading
leading term.
term. When
When n is large, the
is large, the lower
lower degree
degree
terms are negligible in
terms in comparison to the leading term.)
(a) Suppose that,
(a) Suppose on aa certain
that, on computer, it
certain computer, it takes
takes 11 second
second to solve aa 100
to solve 100xx100
100
dense linear
dense linear system
system by Gaussian elimination.
by Gaussian elimination. HowHow long
long will
will it
it take to
take to
solve a 1000
solve 1000 x 1000
1000 system?
system? A 10000
10000 x 10000
10000 system?
188 Chapter 5. Boundary value
value problems in statics

nxn
(b) Now
(b) suppose A e
Now suppose ERRnxn is tridiagonal,
tridiagonal, that is,
is, suppose
suppose AIJ
Aij =—a 0 whenever
whenever
Ii\i -—ilj\ > 1.1. About
About howhow many
many arithmetic
arithmetic operations does it
operations does it take
take to
to solve
solve
Ax
Ax = = bb by Gaussian elimination,
by Gaussian elimination, assuming
assuming that
that the algorithm takes
the algorithm takes
advantage
advantage of of the fact that
the fact that most
most of the entries
of the entries of
of A are
are already
already zero?
zero?
(The student
(The student should
should work
work outout aa small
small example
example byby hand and count
hand and the
count the
number
number of operation taken
of operation taken atat each
each step.
step. A
A short
short calculation
calculation gives
gives this
this
operation count
operation count asas aa function
function of of n.)
n.)
(c) Finally,
(c) suppose that,
Finally, suppose that, onon aa certain computer, it
certain computer, it takes 0.01 ss to
takes 0.01 solve aa
to solve
100 xx 100
100 100 tridiagonal
tridiagonal linear
linear system
system by Gaussian elimination.
by Gaussian elimination. HowHow long
long
will
will itit take
take to solve aa 1000
to solve 1000 x 1000 system?
x 1000 system? AA 10000
10000 xx 10000
10000 system?
system?

5.6
5.6 Piecewise polynomials
Piecewise polynomials and
and the
the finite element
finite element
method
method
To apply
To apply the Galerkin method
the Galerkin method to solve aa BVP
to solve BVP accurately
accurately and efficiently, we
and efficiently, we must
must
choose
choose aa subspace
subspace Vn
Vn of C22[0,^]
of C and aa basis
[0, l] and basis for with the
Vn with
for Vn following properties:
the following properties:
1. The
1. The stiffness
stiffness matrix
matrix K
K and
and the
the load
load vector
vector ff can
can be assembled efficiently.
be assembled efficiently.
This means
This that the
means that the basis for Vn
basis for should consist
Vn should of functions
consist of functions that are easy
that are to
easy to
manipulate, in particular,
manipulate, in differentiate and
particular, differentiate and integrate.
integrate.
2. The
2. The basis
basis for should be
Vn should
for Vn as close
be as close to
to orthogonal
orthogonal asas possible so that
possible so that K will
K will
be sparse. Although
be sparse. Although wewe do
do not expect every
not expect every pair
pair of
of basis functions to
basis functions to be
be
orthogonal (which would
orthogonal (which would lead
lead to
to aa diagonal
diagonal stiffness
stiffness matrix),
matrix), we want as
we want as
many
many pairs as possible
pairs as to be
possible to orthogonal so
be orthogonal so that
that K
K will
will be as close
be as close to diagonal
to diagonal
as possible.
as possible.
3. The
3. The true
true solution
solution u of
of the BVP should
the BVP should be
be well
well approximated from subspace
approximated from subspace
V^,
Vn , with
with the
the approximation
approximation becoming
becoming arbitrarily
arbitrarily good
good as
as n
n —>
-+ oo.
00.

We
We will
will continue
continue to use the
to use BVP
the BVP
d ( k(x) dx
- dx du (x) ) = f(x), 0 < x < /!,
u(O) = 0, (5.49)
u(/!) = a
as our model
as our model problem.
problem.
Finite element methods
Finite element methods use
use subspaces
subspaces of
of piece wise polynomials;
piecewise polynomials; for
for simplicity,
simplicity,
we will concentrate
we will concentrate on
on piece wise linear
piecewise linear functions.
functions. ToTo define
define aa space
space of
of piecewise
piecewise
linear functions,
linear functions, we
we begin
begin by
by creating
creating aa mesh (or grid)
mesh (or on the
grid) on the interval
interval [0,
[0,^]:
l]:

o = Xo < Xl < ... < Xn = l.


The points
The points XQ
Xo,, Xi,...,
Xl, ... , x are called
n are
Xn called the nodes of
the nodes the mesh.
of the mesh. Often
Often we choose aa regular
we choose regular
mesh,
mesh, with Xi =
with xi ih, hh = lin.
— ih, t/n. AA function
function pp :: [0, [0,^] —>• R
l] -+ R is
is piecewise (relative
linear (relative
piecewise linear
to
to the given mesh)
the given mesh) if, for each
if, for = 1,2,
each i = . . . ,,n,
l , 2 , ... n , there
there exist
exist constants i , with
d{, bb{,
constants ai, with
p(x) = aiX + bi for all X E (Xi-l,Xi).
5.6. Piecewise polynomials and the finite element
element method 189
189

See Figure
See Figure 5.11
5.11 for
for an example of
an example of aa continuous
continuous piecewise
piecewise linear
linear function.
function.

0.9

Figure
Figure 5.11.
5.11. A A piecewise
piecewise linear
linear function
function relative to the
relative to the mesh
mesh XQ =
Xo =
0.0,31
0.0, Xl =
= 0.25, x
X2 = 0.5, xX33 =
2 = = 0.75, z
X44 = 1.0.
= 1.0.

We
We define,
define, for
for aa fixed
fixed mesh on [0,
mesh on [0,£],
£],
Sn = {p: [0,£]-+ R : p is continuous and piecewise linear, p(O) = pee) = O}.
(5.50)
We
We now argue that
now argue that the subspace S
the subspace satisfies the
Snn satisfies the three
three requirements for an
requirements for approx-
an approx-
imating subspace that
imating subspace are listed
that are listed above.
above. Two
Two of of the
the properties
properties are
are almost
almost obvious:
obvious:
1. Since
1. Since the functions belonging
the functions belonging to
to S are piecewise
Snn are piecewise polynomials,
polynomials, they
they are
are easy
easy
to
to manipulate—it
manipulate-it is
is easy
easy to
to differentiate
differentiate or
or integrate
integrate aa polynomial.
polynomial.
3. Smooth
3. Smooth functions
functions can
can bebe well-approximated
well-approximated by by piecewise
piecewise linear functions. In-
linear functions. In-
deed, in
deed, in the
the days
days before
before hand-held calculators, the
hand-held calculators, elementary transcendental
the elementary transcendental
functions
functions like
like sin (x) or
sin (x) ex were
or eX were given
given in
in tables. Only aa finite
tables. Only finite number
number of func-
of func-
tion
tion values
values could
could be
be listed
listed in
in aa table;
table; the
the user
user was expected to
was expected to use
use piecewise
piecewise
linear interpolation
linear interpolation to to estimate
estimate values
values not listed in
not listed in the table.
the table.
The fact that
The fact smooth functions
that smooth functions can
can bebe well-approximated
well-approximated byby piecewise linear
piecewise linear
functions can also
functions can also be illustrated in
be illustrated in aa graph.
graph. Figure
Figure 5.12 shows aa smooth
5.12 shows smooth func-
func-
tion
tion on [0,1]
on [0, 1] with
with two
two piecewise linear approximations,
piecewise linear approximations, the
the first
first corresponding
corresponding
to 10 and
to n = 10 and the
the second
second toto n = 20.
20. Clearly
Clearly the approximation can
the approximation can be made
be made
arbitrarily good
arbitrarily good by
by choosing
choosing n n large
large enough.
enough.
In
In order
order to
to discuss
discuss Property 2, that
Property 2, that the
the stiffness
stiffness matrix
matrix should
should be
be sparse,
sparse,
we
we must
must first
first define
define aa basis for S
basis for n. The
Sn. The idea
idea of
of piecewise
piecewise linear interpolation
linear interpolation
190 Chapter 5. Boundary value problems
problems in statics

0.2
x

Figure 5.12. A
Figure 5.12. A smooth
smooth function
function and
and two
two piecewise linear approximations.
piecewise linear approximations.
The top
The top approximation
approximation is
is based on 11
based on 11 nodes, while the
nodes, while the bottom is based
bottom is based on
on 21
21 nodes.
nodes.

suggests the natural basis: a piecewise linear function is completely determined by


its values (that
nodal values
its nodal (that is,
is, the
the values of the
values of the function at the
function at the nodes
nodes of
of the
the mesh).
mesh). For
For
n
n= = 1,2,
1,2, ...
. . . ,, nn — 1, define
- 1, define fa
¢i £E Sn to be
Sn to that piecewise
be that linear function
piecewise linear function satisfying
satisfying

.+. (
<pi Xj
)
=
{I, 0
j = i,
. ..J..
, J r~·

Then each
Then each pp E
eSSnn satisfies
satisfies
n-l
p(x) = ~p(Xi)¢i(X). (5.51)
i=l

To prove this, we merely need to show that p and


n-l
~P(Xi)¢i (5.52)
i=l

have
have the same nodal
the same nodal values, since two
values, since two continuous
continuous piecewise linear functions
piecewise linear functions are
are equal
equal
if and
if and only
only if
if they have the
the same
same nodal values. Therefore,
Therefore, we substitute x == Xj into
we substitute into
(5.52):
(5.52):
n-l
~P(Xi)¢i(Xj) = p(xd· 0 + ... + p(xj)·l + ... + p(xn-d· 0 = p(Xj).
i=l
5.6.
5.6. Piecewise polynomials and the finite element method
method 191

This shows that


This shows that (5.51)
(5.51) holds.
holds.
Thus every
Thus every pp E
6 S
Snn can
can be
be written
written as
as aa linear
linear combination
combination of of {{</»i,
(/J!, 02, • • • , ¢n-1};
¢2, ... 0n-i} 5
that
that is,
is, this
this set spans S
set spans To show
n. To
Sn. show that {0i, ¢2,
that {¢1, <fe, ...
• • • , <^n-i}
¢n-1} is
is linearly independent,
linearly independent,
suppose
suppose
n-1
LCi¢i = 0.
i=1
Then,
Then, in
in particular,
particular,
n-1
LCi¢i(Xj) = Cj = 0, j = 1,2, .. . ,n-l.
i=1

This implies
This implies that
that all
all of
of the coefficients c\,
the coefficients c^,...,
C1, C2, cnn -1
... , C _i are
are zero, so {{(f>i,
zero, so ¢1, 0 2 , ...
¢2, • • • ,? ¢n-1}
(f>n-i}
is
is aa linearly
linearly independent
independent set.set. A
A typical
typical basis function ¢i(X)
basis function (f)i(x) is
is displayed
displayed in Figure
in Figure
5.13.
5.13.

0.9

0.8

0.7

0.6

0.5

0.4

0.3
0.2

0.2 0.6 0.8


x

Figure 5.13. A
Figure 5.13. A typical basis function
typical basis function for Sn.
for Sn.

The entries of
The entries of the
the stiffness
stiffness matrix are
matrix are

Kij=a(¢j,¢i), i,j=1,2, ... ,n-l.


Here is the
Here is the fundamental observation concerning
fundamental observation concerning the
the finite element method:
finite element method: since
since
each fa is
each ¢i is zero
zero on
on most
most of
of the [0,£], most
interval [O,fJ,
the interval most of
of the inner products
the inner a(0j,^>j)
products a(¢i,¢j)
are
are zero because the
zero because the product
product
192
192 Chapter 5.
Chapter 5. Boundary
Boundary value
value problems
problems in
in statics
statics

turns out to
turns out to be
be zero
zero for all xx €E [0,
for all fl·
[0,^].
To be
To specific, fa
be specific, ¢i is zero except
is zero except onon the
the interval
interval [Xi-l,
[ori_i,£i+i]. (We say
Xi+l]. (We say that the
that the
33
support of fa is the interval [xj_i,Xj+i].) From this we
support 33 of ¢i is the interval [Xi-l, Xi+1].) From this we see thatsee that

can be nonzero,
can be but
nonzero, but
Ii - il > 1 =:? a(¢j, ¢i) = 0,
since in
since in that case, for
that case, for any
any xx E
G [0,
[O,/], either
f], either

d¢ix
- () o r
d¢j
-x( )
dx dx
is zero.
is zero. Therefore,
Therefore, the matrix K
the matrix K turns
turns out
out to
to be tridiagonal, that
be tridiagonal, is, all
that is, all of
of its entries
its entries
are zero
are except (possibly)
zero except (possibly) those
those on three diagonals
on three (see Figure
diagonals (see Figure 5.14).
5.14).

o ••
...
...
5 ...
...
...
...
...
...
10 ...
...
...
.........
15
...
•••
...
20 ...
...
•••
25 ...
...
30
......
•••
•••

35
...
...
...
40L-________~________~__________~________~
o 10 20 30 40

Figure 5.14. A
Figure 5.14. A schematic view of
schematic view of aa tridiagonal
tridiagonal matrix;
matrix; the only nonzeros
the only nonzeros
are on
are the main
on the main diagonal
diagonal and
and the
the first
first sub-
sub- and super-diagonal.
and super-diagonal.

We now
We now see
see that
that the
the subspace
subspace S of continuous
Snn of continuous piecewise
piecewise linear functions
linear functions
satisfies all
satisfies all three
three requirements
requirements forfor aa good
good approximating
approximating subspace.
subspace. However,
However, the the
attentive reader may
attentive may have been
been troubled by one one apparent
apparent shortcoming
shortcoming ofof S
Sn:
n - it
it
is not
is not aa subset
subset of Cf>[0,^],
of C1[0, because most
f], because most of
of the functions in
the functions in S are not
Snn are not continu-
continu-
ously differentiable,
ously differentiate, much
much less
less twice-continuously
twice-continuously differentiable.
differentiable. This
This would
would seem
seem
33
The support
33The support of
of aa continuous
continuous function is the
function is closure of
the closure of the
the set
set on which the
on which the function is nonzero,
function is nonzero,
that is, the
that is, the set
set on
on which
which the function is
the function is nonzero,
nonzero, together
together with its boundary.
with its boundary. In In the
the case
case of
of </>i,
ci>;,
the function is
the function is nonzero
nonzero onon (Xi-I,Xi+ll. The closure
(xi-i,Xi+i). The closure of this open
of this open interval is the
interval is closed interval.
the closed interval.
polynomials and
5.6. Piecewise polynomials and the finite element
element method 193

to invalidate
to invalidate the
the entire context on
entire context on which
which the
the Galerkin
Galerkin method
method depends. In fact,
depends. In fact,
however,
however, this presents no
this presents no difficulty-the
difficulty—the important
important fact
fact is
is that
that equations
equations defining
defining
the weak
the weak form
form are
are well-defined,
well-defined, that
that is,
is, that
that we
we can
can compute
compute

Since cPi
Since <fo is
is piecewise linear, its
piecewise linear, its derivative
derivative dcPddx
dfa/dx isis piecewise constant and
piecewise constant and hence
hence
integrable.
integrable.
The key
The key toto aa mathematically
mathematically consistent
consistent treatment
treatment of of finite
finite element
element methods
methods
is to
is to use
use aa larger
larger space
space of
of functions,
functions, oneone that includes both
that includes both C'b
Cf)[0,l] and Sn
[0, f] and Sn asas
subspaces. This
subspaces. This will
will show
show that
that thethe basic property of
basic property of the
the Galerkin
Galerkin method
method still
still holds
holds
when
when we we use
use Sn as the
Sn as the approximating
approximating subspace:
subspace: the
the Galerkin
Galerkin method
method produces
produces thethe
best approximation from
best approximation from SSn,
n , in
in the
the energy
energy norm,
norm, to
to the
the true
true solution
solution u. We
We sketch
sketch
this theory
this theory in in Section
Section 10.3.
10.3. For
For aa more
more complete
complete exposition
exposition ofof the theory, we
the theory, we refer
refer
the reader
the reader to to more
more advanced
advanced texts,
texts, for
for example,
example, Brenner
Brenner andand Scott
Scott [6].
[6].

5.6.1
5.6.1 piecewise linear finite elements
Examples using piecewise
Let us
Let us apply
apply the
the Galerkin
Galerkin method,
method, with
with the subspace Sn
the subspace defined in
Sn defined in the
the previous
previous
section, to
section, to (5.49).
(5.49). As
As we
we showed
showed in
in Section
Section 5.5,
5.5, the
the Galerkin
Galerkin approximation
approximation is
is
n-l
vn(x) = L UicPi(X),
i=l

where the
where the coefficients
coefficients Ul,
MI, U2, • • • ,, Un-l
U2, ... w n -i satisfy
satisfy

Example 5.20.
Example 5.20. We
We apply
apply the
the finite
finite element
element method
method to
to the
the BVP
BVP
d2 u
- dX2 = eX, 0 < x < 1,
u(O) = 0, (5.53)
u(l) = O.
The exact
The exact solution
solution is
is u(x) —ex + (e
u(x] == -ex l)x + 1.
(e -— l)x 1. We
We use
use aa regular
regular mesh
mesh with
with n
n
subintervals and h
subintervals and h== lin.
l/n. We
We then
then have
have

~(x - (i -l)h), < x < Xi,


Xi-l

cPi(X) = --k(x - (i + l)h), Xi < x < Xi+l,


{
0, otherwise
and
1
< X < Xi,
~{
Xi-l
II'
d¢i(x) 1
-II' Xi < X < Xi+1,
dx
0, otherwise.
194
194 Chapter 5. Boundary
Chapter Boundary value problems in statics

Therefore,
Therefore,
(Hl)h dx
Kii = a(¢i' ¢i) =
l
2
(i-l)h
h2

=h
and
and

K i ,Hl = a(¢Hl, ¢i) = J


r(Hl)h 1( 1)
h -h dx
ih
1
-h'
(These calculations
(These calculations are critical, and
are critical, and the
the reader should make
reader should make sure he or
sure he or she
she thoroughly
thoroughly
understands them.
understands them. TheThe basis
basis function
function fa is nonzero
¢i is nonzero onlyonly on
on the
the interval
interval [([(ii-I)
— l)h,
h, (i(i+
+
l)h], so
l)h], so the interval of
the interval of integration
integration reduces
reduces toto this
this subinterval.
subinterval. The The square
square of of the
the
derivative of
derivative fa is
of ¢i I1h22 on
is l/h on this
this entire
entire subinterval.
subinterval. ThisThis gives
gives the result for
the result for KH. As
K ii . As
for the computation
for the computation of of Ki^+i,
Ki ,Hl, the only part
the only part of [0,1]
of [0, on which
1] on which both fa and
both ¢i fa+i are
and ¢Hl are
nonzero is
nonzero is [ih,(i l)h]. On
[ih, (i + l)h]. On this
this subinterval,
subinterval, the the derivative
derivative of fa is
of ¢i is -l/h
—l/h and and the
the
derivative of ¢Hl
derivative of fa+i is
is Ilh.)
l/h.)
This gives
This gives us us the
the entries
entries on the main
on the main diagonal
diagonal and and first
first super-diagonal
super-diagonal ofofK; K;
since
since KK isis symmetric
symmetric and and tridiagonal,
tridiagonal, we we can
can deduce the rest
deduce the rest of the entries.
of the entries. We We
also have
also have

(I, ¢i) = l~h (~(X - (i - l)h)) eX dx + (i+l)h (-~(X - (i + l)h)) eX dx


(,-I)h Jih
eih
= - (e h + e- h - 2) .
h
It
It remains only to
remains only to assemble the tridiagonal
assemble the tridiagonal matrix
matrix K K and
and the
the right-hand-side
right-hand-side vector
vector
f, and solve
f, and Ku =
solve Ku = ff using
using Gaussian
Gaussian elimination.
elimination.
4x4
For example, for
For example, 5, we
for nn = 5, have K
we have GR
K E R 4X4 ;,

10 -5 0 0 ]
= -5 10 -5 0
K [
0 -5 10 -5 '
o 0 -5 10

0.2451 ]
f == 0.2994
0.3656 '
[
0.4466
and
0.1223]
== 0.1955
u 0.2089'
[
0.1491
5.6. Piecewise polynomials
5.6. Piecewise polynomials and
and the finite element
the finite method
element method 195

The corresponding
The corresponding piecewise linear approximation,
piecewise linear approximation, together
together with the exact
with the exact solution,
solution,
is displayed
displayed in Figure 5.15.

0.25r-----.....,...-----r-------,----.....,------,

0.6 0.8 1
x
-3
15 X 10

-5~------~--------~--------~--------~------~
o 0.2 0.4 0.6 0.8 1
X

Figure 5.15.
Figure 5.15. Exact
Exact solution and piecewise
solution and piecewise linear finite element
linear finite approxima-
element approxima-
tion
tion for -~ =
for -£-% = eeX,x,u(Q)
u(O) = u(l) = 00 (top).
w(l) = (top). Error in piecewise
Error in linear approximation
piecewise linear approximation
(bottom).
(bottom).

Example 5.21.
Example 5.21. We
We now find
find an approximate
approximate solution
solution to the BVP
BVP

d ((l+x)-(x)
-- dU) =1, 0< x < 1,
dx dx
u(O) = 0, (5.54)
u(l) = O.
The exact
The exact solution is u(x)
solution is u(x) = In (1
= In + x)/ln2
(1 + x)/In2 -— x. WeWe again
again use
use a regular
regular mesh
mesh with
with
n subintervals
subintervals and
and hh =— lIn.
l/n.
The bilinear
The bilinear form a(-, •) now
form a(·,·) takes the
now takes the form
form
(l du dv
a(u,v) = 10 (1 + x)dx(x)dx(x)dx.
196
196 Chapter
Chapter 5. Boundary value
5. Boundary value problems
problems in statics
statics

We obtain
We obtain
1)
a(¢i, ¢i) =
l (i+I)h (

(i-1)h
2(ih + 1)
(1 + x) h2 dx

h
and

1( 1))
a(¢i+1' ¢i) = 1+ ih

h
(i+1)h (
(1 + x)h
2ih + 2
-h dx

2h

As in the
As in the previous example, these
previous example, these calculations
calculations suffice to determine
suffice to determine K. We
We also
also have
have

l (1
(1, ¢i) = .ih h(x - (i - l)h) ) dx + 1(i+
.
1
)h ( 1
-h(x - (i + l)h) ) dx
(.-1)h .h
=h.

It remains only to assemble the tridiagonal matrix K and the right-hand-side vector
remains only
f, Ku =
f, and solve Ku = f using
using Gaussian
Gaussian elimination.
elimination.
if n =
For example, if — 5, the matrix
5, the K is 44 xx 4,
matrix K 4,

K-
-
[
13
-2
0 -2
13
12 - 2
15

o 0 -2
0
15
14 - 2
16
17
)), 18

and ff is
and is aa 4-vector,
4-vector,
1/5
1/5 )
f=
1/5 .
[
1/5
The resulting uu is
The resulting is
0.0628]
== 0.0851
u 0.0778'
[
0.0479
The piecewise
The linear approximation,
piecewise linear approximation, together
together with
with the
the exact
exact solution, is shown
solution, is shown in
in
Figure
Figure 5.16.
5.16.

Fundamental issues
Fundamental for the
issues for the finite element method
finite element are:
method are:

• How
How fast does the
fast does approximate solution
the approximate solution converge
converge to
to the true solution
the true solution as
as nn -+

oo?
oo?
5.6. Piecewise
5.6. Piecewise polynomials
polynomials and the finite
and the element method
finite element method 197

0.15..--------r----,.------,----...,-------.

0.1

0.4
x

0.6 O.B
x

Figure
Figure 5.16.
5.16. Piecewise linear finite
Piecewise linear finite element
element approximation
approximation to
to the solution
the solution
of -/x ((x + l)~~) = 1,u(O) = u(l) = O.

Howcan
•• How can the
the stiffness
stiffness matrix
matrix K
K and
and the
the load
load vector
vector ff be
be computed
computed efficiently
efficiently
and automatically
and automatically onon aa computer?
computer?
•• How
Howcancan the
the sparse
sparse system
system Ku
Ku == ff be
be solved
solved efficiently?
efficiently? (This
(This is
is primarily
primarily an
an
issue
issue when the problem
when the involves two
problem involves two or three spatial
or three spatial dimensions,
dimensions, since
since then
then
K can be
K can very large.)
be very large.)
Another issue that
Another issue that will
will be important for
be important for higher-dimensional
higher-dimensional problems
problems is is the
the descrip-
descrip-
tion of the
tion of the mesh—special data structures
mesh-special data are needed
structures are needed to allow efficient
to allow efficient computation.
computation.
A careful
careful treatment of these questions
treatment of questions is
is beyond
beyond the scope
scope of
of this
this book,
book, but
but we will
provide
provide some answers in
some answers in Chapter
Chapter 10.
10.

5.6.2
5.6.2 Inhomogeneous Dirichlet conditions
The inhomogeneous
inhomogeneous Dirichlet problem,

d (k(x) dU)
- dx dx = f(x), 0 < x < £,

u(O) = 0:, (5.55)


u(£) = /3,
can be
can solved using
be solved using the
the method of "shifting
method of "shifting the data" introduced
the data" introduced earlier.
earlier. In this
In this
method,
method, we find aa function
we find function g(x] satisfying the
g(x) satisfying the boundary
boundary conditions and define
conditions and define aa
198 Chapter
Chapter 5. value problems
Boundary value problems in statics

new BVP for the unknown w(x) w(x) = u(x)


u(x] -— g(x). We can apply this idea to the weak
g(x). We
form of
form of the
the BVP.
BVP.
calculation similar to that of Section 5.4.1 shows that the weak form of
A calculation of
(5.55) is
a(u,v) = (f,v) for all v E V.
Here, however, we
Here, we do
do not
not look
look for
for the
the solution
solution uu in in g +
in V, but rather in +V =
{g +
{g +v : vE We now
€ V}. We write u = gg +
now write + w, and the
w, and the problem
problem becomes
becomes

find wE V such that a(w + g,v) = (f'v) for all v E V. (5.56)

But a(w + g, v) =
But = a(w, v) +
+ a(g, v), so we
v ) , so can write
we can write (5.56)
(5.56) as
as

find w E V such that a(w,v) = (f'v) - a(g,v) for all v E V. (5.57)

turns out
It turns out that
that solving
solving (5.57)
(5.57) is
is not
not much
much harder
harder than
than solving
solving the
the weak
weak formulation
formulation
of the
of the homogeneous
homogeneous Dirichlet
Dirichlet problem;
problem; the the only
only difference
difference is
is that
that we modify the
we modify the
right-hand-side vector f,
right-hand-side vector f, as
as we
we explain
explain below.
below.
Shifting the
Shifting the data
data is
is easy
easy because
because we we can
can delay
delay the
the choice
choice of
of the
the function
function gg until
until
we apply
we apply the
the Galerkin
Galerkin method;
method; it it is
is always
always simple
simple toto find
find aa finite element function
finite element function
gnn which
g which satisfies
satisfies the
the boundary
boundary conditions
conditions on on the
the boundary
boundary nodes
nodes (actually,
(actually, for
for aa
one-dimensional problem
one-dimensional problem like
like this,
this, it
it is
is trivial
trivial to
to find such aa function
find such function gg inin any
any case;
case;
however,
however, this becomes difficult
this becomes difficult in
in higher
higher dimensions,
dimensions, while finding aa finite
while finding finite element
element
function to
function to satisfy
satisfy the
the boundary
boundary conditions,
conditions, at at least
least approximately,
approximately, is is still
still easy
easy in
in
higher dimensions).
dimensions).
The Galerkin problem is:

find Wn E Sn such that a(w n , v) = (f, v) - a(gn, v) for all v E Sn- (5.58)

We choose
We choose g to be
gnn to piece wise linear
be piecewise linear and
and satisfy gn(xo} = a,
satisfy gn(XO) gn(xn) = (3;
a, gn(xn) the simplest
/3- the simplest
such function
such function has value zero
has value zero at
at the
the other
other nodes of the mesh,
nodes ofthe mesh, namely
namely g gnn == a¢o+(3¢n.
afio+ftfin.
Substituting Wn
Substituting i^i minto
^ii=i aai¢i
wn == l:~:ll *° (5-58),
(5.58), we
we obtain,
obtain, as
as before,
before, the
the linear
linear system
system
Ku =
Ku = f.
f. The
The matrix
matrix K does not
K does not change,
change, but
but ff becomes
becomes

i = 2,3, ... , n - 2 (since a(gn, ¢i) = 0),


i = 1, (5.59)
i=n-1.

Example 5.22.
Example 5.22. WeWe now
now solve
solve anan inhomogeneous
inhomogeneous version
version of
of Example specif-
Example 5.21; specif-
i.rnll.ii we
ically, IIJP apply
n.nnln the
the finite
finite element
pl.pm.pni. method
mpthntt to
t.n

d ((1 + x) dx
- dx dU)(x) = 1, 0 < x < 1,
u(O) = 2, (5.60)
u(l) = 1.
5.6. Piecewise polynomials
polynomials and the finite element method 199
199

As we have
As we have just explained, the
just explained, approximate solution
the approximate solution is
is given
given by
by

n-l
Vn(X) =L UirPi(X),
i=l

where the
where coefficients iti,
the coefficients «2,....
Ul, U2, • • ,, Un-l
un-i satisfy
satisfy

Ku=f.

The stiffness
The matrix K
stiffness matrix K isis identical
identical to
to the one calculated
the one calculated in Example 5.21,
in Example 5.21, while
while the
the
load vector ff is
load vector is modified
modified as indicated in
as indicated in (5.
(5.59). We obtain
59}. We obtain

i = 2,3, ... , n - 2 (since a(gn, rPi) = OJ,


i = 1,
i=n-l.

Now,
Now,

a(rPo,rPd = lh ((1 +x)~ (-~)) dx


h+2
2h '

a(rPn,rPn-d = l~h ((l+X)~ (-~)) dx


h-4
2h'
so
so
h+2
II =h+2----v;-

and
and
h-4
fn-l = h- 2h"".
With n
With = 5,
n = 5, we obtain
we obtain

_ 56/5]
1/5
f - 1/5.
r 97/10
The results
The are shown
results are in Figure
shown in Figure 5.17.
5.17. In
In this
this case,
case, the
the computed
computed solution equals the
solution equals the
exact solution
exact (the error
solution (the error shown
shown is
is Figure 5.17 is
Figure 5.17 is only
only due
due to
to round-off
round-off error
error in
in the
the
computer calculations)
computer calculations) (see
(see Exercise
Exercise 2).
2).
200
200 Chapter 5. Boundary value problems in statics

2~------~--------~--------~------~--------~
1.8

1.6
1.4

1.2

1L-------~~------~--------~--------~------~~
o 0.2 0.4 0.6 0.8
x

0.2 0.8
x

Figure 5.11.
Figure 5.17. Piecewise linear finite
Piecewise linear finite element with nn = 5
approximation, with
element approximation, 5
subintervals in the
subintervals in the mesh,
mesh, to the solution
to the solution of ((x +
of — -^ ((x -lx
+ 1) ~~) =
l)ff) = 1,
l,w(0) = 2,2,w(l)
u(O) = = 1.1.
u(1) =
The error
The error shown
shown inin the
the bottom
bottom graph is due
graph is due only to round-off
only to round-off error—the "approxi-
error-the "approxi-
mation" is in fact equal to
mation" solution.
to the exact solution.

Exercises
1. (a)
1. (a) Using direct integration,
Using direct integration, find
find the exact solution
the exact solution to
to the BVP from
the BVP from Exam-
Exam-
ple 5.21.
ple 5.21.
(b) Repeat the calculations from Example 5.21,
5.21, using an increasing sequence
increasing sequence
of values of n. similar to Figure
n. Produce graphs similar Figure 5.16, or otherwise mea-
sure the errors in the approximation. Try to identify the size of the error
34
as a function of h. 34

2. (a)
2. (a) Compute
Compute the exact solution
the exact solution to
to the
the BVP
BVP from
from Example
Example 5.22.
5.22.
(b) Explain
(b) Explain why,
why, for
for this
this particular BVP, the
particular BVP, the finite
finite element
element method
method computes
computes
the exact,
exact, rather than
than an
an approximate, solution.
solution.

3. Use piecewise
3. Use linear finite
piecewise linear finite elements
elements and
and aa regular
regular mesh
mesh to
to solve the following
solve the following
34
To perform
34To these calculations
perform these calculations for
for nn much larger than
much larger than 55 will
will require
require the
the use of aa computer.
use of computer.
One could, of
One could, of course, write aa program,
course, write program, inin aa language
language such
such as Fortran or
as Fortran or C,
C, to
to do
do the
the calculations.
calculations.
However, there
However, exist powerful
there exist interactive software
powerful interactive software programs that integrate
programs that integrate numerical
numerical calculations,
calculations,
programming,
programming, and and graphics,
graphics, and
and these
these are
are much
much more
more convenient
convenient to use. MATLAB
to use. MATLAB is particularly
is particularly
suitable for
suitable the finite
for the element calculations
finite element calculations needed
needed for this book,
for this book, since
since it
it is
is designed
designed toto facilitate
facilitate
matrix computations.
matrix computations. Mathematica
Mathematica and Maple are
and Maple other possibilities.
are other possibilities.
5.6. Piecewise
5.6. Piecewise polynomials
polynomials and
and the finite element
the finite element method
method 201
201

problem:

J2u 2
- dx 2 = X ,

U(O) = 0,
u(1) = O.

Use 10,20,40,...
Use nn = 10,20,40, elements, and
... elements, and determine
determine (experimentally)
(experimentally) an
an exponent
exponent
p» so
so that
that the
the error
error is
is
o (:p) .
Here error is
Here error is defined
defined to
to be
be the maximum absolute
the maximum absolute difference
difference between the exact
between the exact
and approximate
and approximate solutions.
solutions. (Determine
(Determine the
the exact
exact solution
solution by
by integration;
integration; you
you
will need it to compute the error in the approximations.)
4. Repeat
4. Repeat Exercise
Exercise 33 for
for the
the BVP
BVP

d ( (1 + x 2 ) dU)
- dx dx = 1, 0 < x < 1,
u(O) = 0,
u(1) = O.

The exact
The exact solution
solution is
is
2ln2 1
u(x) = -7r- tan- 1 (x) - 2ln (1 + x 2 ).

5. Derive
5. Derive the
the weak form of
weak form of the
the BVP
BVP

d ( k(x) dU)
- dx dx + p(x)u = I(x), 0 < x < f,
u(O) = 0,
u(f) = 0,
where and p satisfy
where k and satisfy k(x) > 0,
0, p(x]
p(x) > 00 for
for x G fl. What
[0,^].
E [0, is the
What is the bilinear
bilinear
form for
form for this
this BVP?
BVP?
for the BVP
6. Repeat Exercise 3 for

J2u 1
- -2 +2u= --x
dx 2'
u(O) = 0,
u(1) = O.

The results
The results of
of the last exercise
the last exercise will
will be
be required.
required. The
The exact
exact solution
solution is
is

u(x) = clev'2x + cze-v'2x + ~ - ~,


202 Chapter
Chapter 5. Boundary value problems
problems in statics

where

Cl = - 4 (e-v'2 _ ev'2) ,
ev'2 +1

5.7
5.7 Green's
Green's functions
functions for BVPs
for BVPs
The zero
The zero function
function isis always
always aa solution
solution of
of aa linear
linear homogeneous
homogeneous differential equation.
differential equation.
Suppose we we have a BVP, defined by a linear differential
differential equation
equation and Dirichlet or
Neumann
Neumann boundary conditions, satisfying
boundary conditions, satisfying thethe existence
existence and
and uniqueness property.
uniqueness property.
Then
Then the BVP has a nonzero solution only if the differential
differential equation
equation is inhomoge-
neous
neous oror the
the boundary
boundary conditions
conditions are inhomogeneous (or
are inhomogeneous (or both).
both). We
We will focus on
will focus on
the differential
differential equation, assuming the boundary conditions are homogeneous, and
present
present aa formula
formula that
that expresses
expresses the solution explicitly
the solution explicitly in
in terms
terms of the right-hand
of the right-hand
side of the
side of the differential equation.
differential equation.
As our
As our first
first example,
example, we consider the
we consider the BVPBVP

d (k(x) dx
- dx dU) = f(x), 0 < x < l,
u(O) = 0, (5.61)
du
dx(l) =0.

The "data" for


The "data" (5.61) is
for (5.61) is the forcing function
the forcing function /, which is
f, which is aa function
function of
of the spatial
the spatial
variable x. By
variable x. By two
two integrations,
integrations, we can determine
we can determine aa formula for u in
formula for in terms of f:/:
terms of

d ( k(x) dx
- dx du (x) ) = f(x)
1xr fey) dy (since
i
du
~ k(x) dx (x) = ~~(l) = 0)

du
~ dx (x) = k(x)
ri fey) dy
1
1x
r 1 rt
~ u(x) = 10 k(z) 1z f(y)dydz (since u(O) = 0)

~ u(x) =
r
10 10
i
{ rmin{x,y} ( 1) }
k(z) dz fey) dy.

(To verify
(To the last
verify the last step,
step, the
the reader should sketch
reader should sketch the domain of
the domain of integration for the
integration for the
double
double integral, and change
integral, and change the order of
the order of integration.)
integration.) We can thus
We can thus write
write the solution
the solution
as
as
i
u(x) = Io g(x;y)f(y)dy, (5.62)
5.7. Green's functions for BVPs 203

where
rmin{x,y} ( 1 )
g(x;y) = Jo k(z) dz. (5.63)

By inspection
By inspection of of formula
formula (5.62),
(5.62), we see that,
we see that, for
for aa particular
particular x, the
the value
value u(x)
u(x) isis
aa weighted
weighted sum sum of
of the
the data
data f/ over
over the
the interval
interval [O,.€].
[0,£]. Indeed,
Indeed, for
for aa given
given x and
and y,
y,
effect on the solution u at x of the data f/ at y. The function
g ( x ; yy)) indicates the effect
g(x; function
9g is
is called
called the function for
Green's function
the Green's for BVP (5.61).
BVP (5.61).
To expose
To expose the
the meaning
meaning of of the Green's function
the Green's function more
more plainly,
plainly, we
we consider
consider aa
right-hand-side function
right-hand-side function f/ that is concentrated
that is concentrated atat aa single
single point = £. We
point xx =~. We define
define
dAx
d Ax by
x+Ax -Llx < x < 0,
AX2 ,
dAu-X (x) = _x-Ax
AX2 , 0< x < Llx,
{
0, otherwise
(see Figure
(see Figure 5.18)
5.18) and
and let
let f& x(x) = dAx(X-~).
fAx(x) The solution
d^x(x — ^). The solution of
of (5.61), with f/ = /A
(5.61), with fAx,
X)
is
is

Since
{+AX

l {-Ax
d Ax (y - ~) dy =1
for all
for all Llx,
Ax, we see that
we see that u(x)
u(x) isis aa weighted
weighted average
average of
of g(x; y) (considered
(considered as
as aa function
function
of y)
of over the
y) over interval ~£ -— Llx
the interval Ax ::;< yy ::; Ax. As
< ~£ + Llx. As Llx
Ax -+—>• 0,
0, this
this weighted
weighted average
average
converges to
converges <?(x;£).
to g(x;~).
We now
We now interpret
interpret this
this result
result in in terms
terms ofof aa specific
specific application.
application. We
We consider
consider
an elastic bar of length I£ and stiffnessstiffness k(x) hanging with one end fixed at x == 0
and the other
and other end (at x =
end (at = £) free. The
K) free. The displacement
displacement u of of the
the bar isis modeled byby the
the
BVP (5.61),
BVP (5.61), where
where f/ is
is the
the external
external force
force density
density (in
(in units
units ofof force
force per
per volume).
volume).
The quantity
The quantity
fot Ahx (y) dy
is the total force exerted on the entire bar. Since

fot hx(Y) dy = 1 for all Llx > 0


and /AX
fAx is zero except on the interval [~- [£ — Llx, ~ + Llx], we see that the total pressure
Ax,£+Ax],
exerted on
exerted on the
the bar
bar is
is A and
and it
it is
is concentrated
concentrated more and more
more and more atat xx = ~£ as
as Llx
Ax -+
-> 0.
O.
In the
In the limit,
limit, the
the external
external force
force onon the
the bar
bar consists
consists of
of aa pressure
pressure of of 11 unit acting
unit acting
on the
on the cross-section
cross-section ofof the
the bar
bar atat x
x =
=~.£. The
The response
response ofof the bar, in
the bar, in the
the limit,
limit, is
is
w(x) ==g(x]£).
u(x) g(x; ~).
204 Chapter 5. Boundary value problems in statics

10~------~-------r------~------~

O~------~-----L~~----~------~
-1 -0.5 0 0.5
x

Figure 5.18.
Figure 5.18. The
The function d/:;.x (Ax = 0.1).
d&x (!lx O.I).

Thus we
Thus we see
see that, for aa fixed
that, for fixed £,
~, g(x; £) is
g(x;~) is aa solution
solution to
to (5.61)
(5.61) for
for aa special
special right-
right-
hand side-a
hand side—a forcing function of
forcing function of magnitude
magnitude 11 concentrated
concentrated at at x =
= £. However, this
~. However, this
forcing function
forcing function is
is not
not aa true
true function
function in
in the
the usual
usual sense.
sense. Indeed,
Indeed, the
the function
function d/:;.x
d^\x
has the
has the following
following properties:
properties:

• d~x(x) = 0, x ft [-!lx, !lx].

• I: d/:;.x(x) dx = I~~x d/:;.x(x) dx = 1 for all !lx > 0, provided [-!lx, !lx] c
[a, b], and I: d/:;.x(x) dx = 0 if !lx ::; a or -!lx 2: b.
• If 9 is a continuous function, and [-!lx, !lx] c [a, b], then

is aa weighted
is average of
weighted average of 9g on
on the
the interval
interval [-!lx,
[—Ax, !lx].
Ax].
Since the
Since the limit,
limit, as
as !lx
Ax ~—>• 0,
0, of
of the
the weighted
weighted average
average of
of 9g over
over [-!lx,
[—Ax, !lx)
Ax] isis #(0)
g(O)
when 9g is
when is continuous,
continuous, these
these properties suggest that
properties suggest we define
that we define the
the limit
limit 86 of
of d<\ as
d/:;.xx as
Ax ~
!lx —>• 00 by
by the
the following
following properties:
properties:
• 8(x) = 0 if x # O.
• 8(0) = 00.

• J: 8(x)dx = 1 if 0 E [a,b], and I: 8(x)dx = 0 if 0 rf- [a, b).


5.7. Green's functions for BVPs 205

If 9
• If is aa continuous
g is continuous function
function and
and 0 E [a, b], then J: 8(x)g(x) dx = g(O). If
o (j [a, b], then J: 8(x)g(x) dx = o.
The "function"
The "function" 88 is is not
not aa function
function at at all-any
all—any ordinary
ordinary function
function d has
has the property
the property
that if dd is
that if nonzero only
is nonzero only at
at aa single
single point
point on
on an
an interval,
interval, then
then the
the integral of dover
integral of d over
that interval
that interval isis zero. However, it
zero. However, it is
is useful
useful to regard 88 as
to regard as aa generalized
generalized function. The
function. The
particular generalized function
particular generalized function 88 is is called
called the
the Dirac delta function
Dirac delta (or simply
junction (or simply the
the
delta function)
delta function) andand isis defined
defined byby the sifting property:
the siftinq property:

If 9
If is aa continuous
g is continuous function
function and
and 00 E
e [a,
[0,6],
b], then
then Ja 8(x)g(x) J:
8(x)g(x}dxdx =
=
c/(0). If
g(O). If 00 (j
<£ [a, 6],
bj, then J:
then fc 8(x)g(x)
S(x}g(x) dx 0.
dx == O.
By aa simple
By simple change
change of
of variables,
variables, we see that
we see that the
the following
following property
property also
also holds:
holds:
If 9
If is aa continuous
g is continuous function and ~£ E
function and G [a, b],
6], then
then J 8(x)g(x J:
-~)
8(x)g(x — £} dx
dx ==
g(~).
0(0-
Since 8S is
Since is formally
formally an an even
even function
function (8( -x) = 8(x)),
(8(—x) we also
8(x)), we also have
have
If 9g is
If is aa continuous
continuous function and ~£ Ee [a,
function and then J 8(x)g(~
6], then
[a, b], J: x) dx =
8(x)g(£ -— x}dx =
0(0.
g(~).

Since 86 is
Since is not
not aa function,
function, but
but aa generalized
generalized function,
function, we
we regard the last
regard the last two
two properties
properties
as assumptions.
as assumptions.
From this discussion,
From this discussion, we
we seesee that
that the Green's function
the Green's function 9g for
for (5.61)
(5.61) has the
has the
property that
property that u(x)
u(x) = g(x; £) is
= g(x;~) is the
the solution
solution of
of the
the BVP
BVP

-! (k(X) ~~) = 8(x - ~), 0 < x < £,


u(O) = 0, (5.64)
dUe£) =0.
dx
We can verify
We can this result
verify this result using
using physical reasoning; this
physical reasoning; this is
is particularly
particularly simple
simple
in the
in the case
case ofof aa homogeneous
homogeneous bar. bar. We consider the
We consider the following
following thought
thought experiment:
experiment:
We apply
We apply aa unit pressure (in
unit pressure (in the
the positive direction) to
positive direction) to the cross-section at
the cross-section at x == £~ E6
(0,^).
(0, (It is
e). (It is not obvious how
not obvious how such
such aa pressure could actually
pressure could actually be applied in
be applied in aa physical
physical
experiment, which
experiment, which isis why
why wewe term
term this
this aa "thought
"thought experiment.")
experiment.") Since
Since the bar is
the bar is
fixed at
fixed at xx = 0,
0, and
and the
the end
end at
at xx =— £t is free, it
is free, it is
is not hard to
not hard to see
see what
what the
the resulting
resulting
displacement will
displacement be. The
will be. The part
part ofof the bar originally
the bar originally between
between xx == 00 and
and xx =— ~£ will
will
stretch from
stretch from its
its original
original length
length ofof £~ to
to aa length
length ofof £~ +
+ ~~,
A£, where
where

k~~ = 1
~
(the pressure,
(the pressure, 1,
1, is
is proportional
proportional to
to the
the relative change in
relative change in length
length (A£/£)).
(~~/~)). Therefore,
Therefore,
A£,
~~, which is the
which is displacement u(~),
the displacement is ~/k.
u(£), is £/fc. Since
Since the bar is
the bar is homogeneous, the
homogeneous, the
displacement in
displacement in the
the Dart
part of
of the
the bar
bar above = £~ isis
above xx =
x
u(x) = k' 0 ~ x ~ ~.
206 Chapter 5.
Chapter 5. Boundary
Boundary value
value problems
problems in
in statics
statics

What about
What about the
the part
part of
of the
the bar between x = ~£ and
originally between
bar originally and x =
= l? This part
11 This part of
of
displacement
the bar is not stretched at all; it merely moves because of the displacement in the
We therefore obtain
part of the bar above it. We

Combining these
Combining these two formulas gives
two formulas gives

u(x) ={ ~'
k'

or simply
u(x) = min{x,~}
k
(see Figure 5.19). Thus we u(x) = g(x;
we see that u(x) g(x;£), g is given by (5.63)
~), where 9
(specialized to the case in which k is constant).

- =g(x;O.6)
4.5

3.5

0.8
x

Figure 5.19.
Figure 5.19. The
The Green's
Green's function
function gg(x; ] , yy =
( x ; yy), 0.6, in
= 0.6, in the
the case
case of
of aa
constant stiffness
constant stiffness (k
(k = 200, £
= 200, t == 1).
I).

Example 5.23.
Example 5.23. Consider
Consider BVP (5.61)
(5.61) with
with £1=1,
= 1, k(x) = 21-x,
k(x) = and ff(x)
- x, and (x) =
= 1.
1. We
We
have
have
ffiin {X,Y} dz
g(x;y) =
lo
-
2-z
5.7. Green's
5.7. Green's functions
functions for
for BVPs
BVPs 207

= -log (2 _ z)l~in{x,y}
= log 2 -log (2 - min{x, y})
_ {IOg2-10g (2- y ), O<y<x,
- log 2 - log (2 - x), x < y < 1.

Therefore,
Therefore,

u(x) = fo1 g(x; y) dy (since fey) = 1)

= fox {log 2 -log (2 - v)} dy + 11 {log 2 -log (2 - x)} dy

= x(1 + log 2) + (2 - x) log (2 - x) - log 4 + (1 - x) (log 2 - log (2 - x))


= x + log (1 - ~).

5.7.1
5.7.1 and the inverse of a differential
The Green's function and
operator
operator
We write
We write
C![O,i] = {u E C 2 [O,i] u(O) = ~~(i) = o}
and K : c;' [0, i] -+ C[O, i] by

dx
d ( dU) .
Ku = - - k(x)-
dx

Our results
Our above show
results above show that, for each
that, for each f/ E€ C[O,
C[0,£], there is
i], there is aa unique solution to
unique solution to
Ku
Ku == ff.. InIn other
other words, K is
words, K an invertible
is an operator. Moreover,
invertible operator. Moreover, the solution to
the solution to
Ku = f is is u == Mf,
Mf, where
where M C[0,l] -> C;'[O,i]
M:: C[O,i]-+ C^[0,£] is
is defined
denned by
by

(Mf)(x) = 1£ g(x;y)f(y) dy.

Therefore, KM
Therefore, K M ff = /,
f, which shows that
which shows K- x1,, the
that M == K the inverse
inverse operator
operator of
of K. It
It
follows
follows that
that
MKu = u for all u E C![O,i) (5.65)
must also
must also hold.
hold. Thus
Thus the
the Green's
Green's function
function defines
defines the
the inverse
inverse of
of the differential
the differential
operator.
operator.

Exercises
x
1. Use
1. Use the
the Green's
Green's function
function to solve (5.61)
to solve (5.61) when
when it == 1,
1, /(#)
f(x) == 1,
1, and
and k(x) =
=eeX..

2. Prove
2. Prove directly
directly (by
(by substituting
substituting u into
into the differential equation
the differential equation and
and boundary
boundary
conditions) that
conditions) that the
the function
function uu defined
defined by (5.62) and
by (5.62) and (5.63)
(5.63) solves
solves (5.61).
(5.61).
208 Chapter 5. Boundary value problems
problems in statics

3. Consider
3. Consider the
the BVP
BVP

d ( k(x)dx
- dx dU) =/(x),O<x<f,

:: (0) = 0, (5.66)
u(f) = O.
(a) Using
(a) Using physical
physical reasoning
reasoning (as
(as on
on page
page 205),
205), determine
determine aa formula
formula for
for the
the
Green's function
Green's function in
in the
the case
case that
that k is
is constant.
constant.
(b) Derive
(b) Derive the
the Green's
Green's function
function for
for the
the BVP
BVP (with
(with aa possibly
possibly nonconstant
nonconstant
by integrating
k} by
k) integrating the
the differential
differential equation twice and
equation twice and interchanging
interchanging the
the
order of
order of integration
integration in
in the resulting
resulting double
double integral.
integral.
(c) Simplify
(c) Simplify the
the Green's
Green's function
function found
found in
in Exercise
Exercise 3b
3b in
in the
the case
case that
that the
the
stiffness kk is
stiffness is constant.
constant. Compare
Compare to
to the
the result
result in
in part
part 3a.
3a.
(d) Use
(d) Use the
the Green's
Green's function
function to
to solve
solve (5.66)
(5.66) for
for f1=1, f ( x ) == x,
= 1, I(x) k(x) =
x, k(x) = l+x.
1 + x.
4. Consider
4. Consider the
the BVP
BVP

d ( k(x) dU)
- dx dx = I(x), 0 < x < f,
u(O) = 0,
u(f) = O.

(a) Using
(a) Using physical
physical reasoning
reasoning (as(as in
in the
the text),
text), determine
determine aa formula
formula for
for the
the
Green's function
Green's function inin the
the case
case that
that kk is
is constant.
constant. (Hint:
(Hint: Since
Since the
the bar
bar
is homogeneous,
is homogeneous, the the displacement
displacement function
function u(x)
u(x) == g(x;y) fixed) will
g(x; y) (y fixed) will
be
be piecewise
piecewise linear,
linear, with w(0) =
with u(O) = u(f)
u(i) = 0. Determine
= O. Determine thethe displacement
displacement
of the
of the cross-section
cross-section atat xx = yy by
by balancing
balancing thethe forces
forces and
and using
using Hooke's
Hooke's
law, and
law, and then
then the
the three
three values
values u(O),
w(0), u(y), and u(f)
u(y], and will determine
u(i] will determine the
the
displacement function.)
displacement function.)
(b) Derive
(b) Derive the Green's function
the Green's function for
for the BVP, still
the BVP, still assuming
assuming that
that kk is
is constant,
constant,
by integrating the
by integrating the differential
differential equation
equation twice
twice and interchanging the
and interchanging the order
order
of integration
of integration in
in the
the resulting
resulting double
double integral.
integral. Verify that you
Verify that you obtain
obtain the
the
same formula
same formula for
for the
the Green's
Green's function.
function.
(c) (Hard) Derive
(c) Derive the
the Green's
Green's function
function in
in the
the case
case of
of aa nonconstant
nonconstant stiffness
stiffness
k(x).
k(x).
5. Since
5. Since the
the BVP
BVP (5.61)
(5.61) is
is linear,
linear, the
the principle
principle of
of superposition
superposition holds, and the
holds, and the
solution to
solution to

d ( k(x) dU)
- dx dx = I(x), 0 < x < f,
u(O) = 0,
kef) du (f) = p
dx
functions for BVPs
5.7. Green's functions 209

is u(x)
is u(x) =— w(x) +
+ vex),
v(x), where w solves
solves (5.61)
(5.61) (hence
(hence w is
is given
given by
by (5.62))
(5.62)) and
and
vv solves

dU) = 0, °< x < f,


d (k(x) dx
- dx
u(o) = 0, (5.67)
du
kef) dx (f) = p.

(5.67) and show that the solution can be written in terms of the Green's
Solve (5.67)
function (5.63).
function

6. Prove directly that (5.65) holds. (Hint: Write

};Y dz y < x,
g(x; y) = fOx k~~)'
{
Jo k(z)' x<y

and rewrite
fot g(x; y)(Ku)(y) dy
the sum of two integrals,
as the integrals,

fox g(x; y)(Ku)(y) dy + it 9(Xiy)(Ku)(y) dy.

Then apply
Then apply integration
integration by
by parts
parts to
to the
the first integral, and
first integral, and simplify.)
simplify.)

7. Let g(x; y) be
7. be the Green's function
the Green's function for
for the
the BVP
BVP

tPu
-k dx 2 = I(x), °< x < f,
u(o) = 0,
u(f) = 0.

The purpose
The purpose ofof this problem is
this problem is to
to derive
derive the
the Fourier
Fourier sine
sine series
series of
of g(x] in
g(x; y) in
three different
three different ways. Since 9g depends
ways. Since depends onon the parameter
parameter y, its Fourier
y, its Fourier sine
coefficients will be functions
coefficients functions of y.
y.

(a) First
(a) First compute
compute the
the Fourier
Fourier sine
sine series
series of
of g(x; y) directly
directly (that
(that is,
is, using
the formula
the formula for
for the
the Fourier
Fourier sine
sine coefficients
coefficients of
of aa given function),
function), using
the formula
the formula for
for 9g as
as determined
determined inin Exercise
Exercise 4.
4.
(b) Next, derive the
the Fourier sine series of g(x; y) as follows: Write down
the Fourier series solution to the BVP. Pass the summation
summation through the
integral defining
integral defining the
the Fourier coefficients of
Fourier coefficients of the
the right-hand
right-hand side I. Identify
side /. Identify
the Fourier sine series of the Green's function
function g(x; y).
y).
210 Chapter 5. Boundary
Boundary value problems in statics
statics

(c) Find
(c) the Fourier
Find the Fourier sine
sine series
series of
of gg(x;y) by solving
( x ; y ) by solving the BVP
the BVP

cPu
-k dx 2 = J(x - y), 0 < x < J!.,
u(O) = 0,
u(J!.) = 0

using the Fourier series method. Use


Use the sifting property of the delta
function to determine
determine its Fourier coefficients.
Fourier coefficients.

Verify that all three methods give the same result.

5.8 reading
Suggestions for further reading
We have now introduced
introduced the two primary topics of this book, Fourier series and
finite elements. Fourier analysis has been important important in applied mathematics
mathematics for 200
years, and there are many books on the subject. A classic introductory textbook textbook
is Churchill and Brown [10], [10], which has been in print for over 60 years! A classic
reference
reference to the theory
to the theory of Fourier series
of Fourier series is
is Zygmund
Zygmund [53].[53]. Two
Two modern textbooks
modern textbooks
that focus
that focus on Fourier
Fourier series methods
methods are Bick Bick [4][4] and Hanna
Hanna and Rowland
Rowland [24]. [24].
One can
One can also
also look
look to
to introductory
introductory booksbooks on on PDEs
PDEs forfor details about Fourier
details about Fourier
series, in addition
series, addition to other
other analytic
analytic andand numeric
numeric techniques.
techniques. Strauss
Strauss [46]
[46] is
is aa well-
written text that concisely surveys analytic methods. It contains a range of topics,
from elementary to relatively advanced. Another introduction to PDEs that covers
Fourier series methods,
Fourier series methods, as as well
well as
as many other topics,
many other is Haberman
topics, is Haberman [22].[22].
The finite
The element method
finite element method is is much
much moremore recent,
recent, having
having been
been popularized
popularized
in the
in 1960s. Most
the 1960s. Most textbooks
textbooks on on the
the subject
subject are are written
written atat aa more demanding
more demanding
level
level than
than isis ours.
ours. Brenner
Brenner and Scott [6]
and Scott [6] isis aa careful
careful introduction
introduction to to the theory of
the theory of
finite elements
finite elements for for steady-state
steady-state problems,
problems, whilewhile Johnson
Johnson [27J[27] and Strang and
and Strang and FixFix
[45] treat
[45J treat both steady-state and
both steady-state time-dependent equations.
and time-dependent equations. Ciarlet [11] is
Ciarlet [11J is another
another
careful
careful treatment of the the theory of finite
finite elements
elements for for steady-state problems. There
is also
is the six-volume
also the six-volume Texas Finite ElementElement Series by Becker, Carey,
by Becker, Carey, and
and Oden
Oden [3],[3],
which starts
which starts at at an
an elementary
elementary level.
level.
Chapter 6

Heat flow
ow and
and diffusion
diffusion

We now turn
We now our attention
turn our attention to time-dependent problems,
to time-dependent still restricting
problems, still restricting ourselves
ourselves
to problems in one spatial dimension. Since both time (t) and space (x) (x) are inde-
pendent variables, the differential
differential equations will be PDEs, and wewe will need initial
conditions as well as boundary conditions.
We begin
We begin with
with the
the heat
heat equation,
equation,
au a2u
pc at - /'i, ax 2 = f(x, t), 0< x < e, t > to·
This
This PDE
PDE models
models the
the temperature
temperature distribution u(x, t) in
distribution u(x,t) in aa bar (see Section
bar (see Section 2.1)
2.1) or
or
the concentration w(ar,
the concentration t] of
u(x, t) of aa chemical in solution
chemical in (see Section
solution (see Section 2.1.3). Since the
2.1.3). Since the first
first
time
time derivative
derivative ofof the
the unknown appears in
unknown appears the equation,
in the equation, wewe need
need aa single
single initial
initial
condition.
condition.
Our
Our first
first model
model problem
problem will
will be
be the following initial-boundary
the following initial-boundary value
value problem
problem
(IBVP):

au a 2u
pc at - /'i, 0< x < e, t> to,
ax 2 = f(x, t),
u(x, to) = 'I/J(x), 0 < x < e, (6.1)
u(O, t) = 0, t > to,
u(e, t) = 0, t > to.
We apply
apply the
the Fourier series method first and then turn to the
the finite element
element method
method.
We
We close
close the chapter with
the chapter with aa look at Green's
look at Green's functions
functions for this and
for this and related
related problems
problems.
Along
Along the
the way
way we
we will introduce new
will introduce combinations of
new combinations of boundary conditions.
boundary conditions.

6.1 Fourier series


Fourier series methods
methods for the heat equation
We now solve (6.1) using Fourier series. Since the unknown u(x, u(x,t]t) is a function
function
of both time and space, it can
of can be represented
represented as a Fourier sine
sine series
series in which
which the
the
Fourier
Fourier coefficients depend on
coefficients depend on t. In other words,
In other for each
words, for £, we
each t, have aa Fourier
we have Fourier sine
sine

211
211
212 Heat flow and
Chapter 6. Heat and diffusion
diffusion

series representation
series representation of
of u(x, (regarded as
u(x,t)t) (regarded as aa function
function of
of x). The
The series
series takes
takes the
the
form
form

u(x, t) = ~ . (n1l'x) 2 (i
e
. (n1l'x)
~ an(t) sm -,,- , an(t) = 10 u(x, t) sm -,,- dx.
n=l 0

The function
The function u will
will then
then automatically
automatically satisfy
satisfy the the boundary
boundary conditions
conditions in
in (6.1).
(6.1).
We must
We must choose
choose the
the coefficients
coefficients an(t) so that
an(t) so that thethe PDE
PDE and
and initial
initial condition
condition are
are
satisfied.
satisfied.
We represent
We represent the
the right-hand
right-hand side
side f(x,
f ( x , t t) in the
] in the same
same way:
way:

f(x, t) =
00

L cn(t) sin (n;x),


~l
cn(t) = ~ 1
0
i
f(x, t) sin (n;x) dx.

We then
We then express
express the
the left-hand
left-hand side
side of
of the
the PDE
PDE as as aa Fourier
Fourier series,
series, in
in which
which the the
Fourier coefficients
Fourier coefficients are
are all
all expressed
expressed in
in terms
terms of
of the
the unknowns
unknowns alai(i), a^t],
(t), a2 To
(t), . ... To
do this,
do this, we
we have
have to
to compute
compute the
the Fourier
Fourier coefficients
coefficients of
of the
the functions
functions
au
pc at (x, t)

and
and
a2 u
-1'0 ax 2 (x, t).
Just as
Just as with
with thethe function
function uu itself,
itself, we
we are
are using
using the
the Fourier
Fourier series
series toto represent
represent the
the
spatial variation
spatial variation (Le.
(i.e. the
the dependence
dependence on on x) of these
x} of these functions.
functions. Since
Since they
they also
also
on t,t, the resulting Fourier coefficients will
depend on will be functions
functions of
of t.t.
compute the Fourier coefficients of
To compute
au 2
-1'0 ax2(x, t),
we integrate
we integrate by
by parts
parts twice,
twice, just
just as
as we
we did
did in
in the
the previous
previous chapter,
chapter, and
and use
use the
the
conditions to eliminate the boundary terms:
boundary conditions terms:
21'0 {i cPu (n1l'x)
-7 10 ax2 (x, t) sin -e- dx
= _ 21'0 ([au (x, t) sin (n1l'x)] £ _ n1l' {l au (x, t) cos (n1l'x) dX)
e ax " 0 " 10 ax "
21'On1l' {i au (n1l'x)
= ~ 10 ax (x, t) cos -,,- dx

~ 2;:, ([ u(x, t) 008 C;X) 1: + ne, [u(x, t) sin C;X) dx )


21'On 2 1l'2 (i (n1l'X)
= ,,3 10 u(x, t) sin -,,- dx
I'On 21l'2
= i 2 an (t).
6.1. Fourier series methods for the heat equation
6.1. 213

We
We used
used the
the conditions sin (0)
conditions sin = sin
(0) = sin (n1f)
(n?r) =
= 0 and w(0,
0 and u(£, t) == 0
u(O, t]t) == u(l,t) in canceling
0 in canceling
the boundary
the boundary terms in the
terms in the above calculation.
above calculation.
We
We now compute the
now compute the Fourier sine coefficient
Fourier sine coefficient of
of pcdu/dt. Using Theorem
pc8uj8t. Using Theorem 2.1,
2.1,
we have
we have

e210t· 8uat (x, t) sm. (n1fx) d [2 [f. . (n1fx) 1


-f.- dx = dt e10 u(x, t) sm -f.- dx

d
= dt[an(t)]

_ dan (t ) .
-
dt
Thus the
Thus the nth
nth Fourier
Fourier coefficient
coefficient of pc8uj8t is
of pcdu/dt is

We now see
We now see that
that

Since
Since CXl

f(x, t) = L Cn(t) sin (n;x),


n=l

the PDE
the PDE implies
implies

This is aa sequence
This is sequence of
of ODEs for the
ODEs for coefficients ai(£),a2(£),a3(£),
the coefficients — Moreover,
al(t),a2(t),a3(t), .... Moreover, we
we
have
have

u(x, to) = 'ljJ(x), 0 < x < f.

: :} I:
n=l
an(to) sin (n;x) = I:bnsin(n;x),
n=l

where 61,62;
where b • • • are
1 , b2, ... are the
the Fourier
Fourier sine
sine coefficients
coefficients of
of 'ljJ(x). Therefore, we
ijj(x). Therefore, obtair
we obtain

an(to) = bn , n = 1,2,3, ....

These
These conditions
conditions provide initial conditions
provide initial conditions for
for the
the ODEs. To find
ODEs. To find an(t), we solve
an(t), we solve
the IVP
the IVP
dan K,n 21f2
pCTt + ~an = cn(t), (6.2)
an(to) = bn .
214 Chapter 6. Heat flow and diffusion
Chapter

The coefficients
The n(t] and
coefficients ccn(t) and b are computable
bnn are from the
computable from the given
given functions
functions ff(x,
( x , t t) and
) and
'lj;(x).
$(%)•
The
The IVP
IVP (6.2)
(6.2) is
is of
of the
the type
type considered in Section
considered in Section 4.2.3,
4.2.3, and
and we
we have
have aa formula
formula.
for
for the solution:
the solution:

(6.3)

6.1.1
6.1.1 equation
The homogeneous heat equation
We
We will
will begin
begin with examples of
with examples of the
the homogeneous
homogeneous heat equation.
heat equation.

Example
Example 6.1. We consider
6.1. We consider anan iron
iron bar,
bar, of length 50cm,
of length 50 cm, with
with specific
specific heat
heat cc —
=
0.437 J/(gK),
0.437 J/(gK), density
density pp =
= 7.88 g/ cm33,, and
7.88 g/cm and thermal
thermal conductivity = 0.836
conductivity KK, = Wf(cmK).
0.836 W/(cmK).
We assume that the bar is insulated
We insulated except at the
except at the ends and
and that
that it
it is (somehow)
(somehow) given
the initial temperature
the initial temperature
1
'lj;(x) = 5 - Six - 251,

where ^(x) is
where'lj;(x) is given
given in
in degrees
degrees Celsius.
Celsius. Finally,
Finally, we
we assume
assume that, at time
that, at — 0,
time tt = 0, the
the
ends
ends of
of the
the bar
bar are
are placed
placed inin an ice bath
an ice bath (0 degrees Celsius). We
degrees Celsius). We will
will compute the
compute the
temperature distribution
temperature distribution after
after 20, 60, and
20, 60, and 300
300 seconds.
seconds.
We must
We must solve
solve the IBVP
the IBVP

au a 2u
pc at - K, < x < 50, t > 0,
ax 2 = 0, 0
u(x,O) = 'lj;(x), 0 < x < 50,
u(O, t) = 0, t > 0,
u(50, t) = 0, t > O.

The
The solution
solution is
is
00
x
u(x,t) = Lan(t) sin (n:a ) ,
n=l

where
where the coefficient a
the coefficient n(t) satisfies
an(t) the IVP
satisfies the IVP

dan K,n 2 7r 2
dt + 502pc an = 0,
an(O) = bn
and
and
bn = ~ (50 "1.( ) . (n7rx) d = 40 sin (n7r /2)
£ 10 'I' X sm 50 x 7r 2 n 2 '

The coefficient
The coefficient a
ann is
is given
given by
by
6.1. Fourier series methods for the heat equation 215

where K,
where Ib, p, and cc have
p, and the values
have the values given above. This
given above. This gives us an
gives us an explicit
explicit formula for
formula for
the solution
the u,
solution u,
"n 2 ,,2 t
u(x, t) = L bne
00 _
2
50 pc sin
n7fX
(50)' (6.4)
n=l

which can
can be approximated by a finite
approximated by finite series
series of
of the
the form
form

In
In Figure 6.1, we
Figure 6.1, we display "snapshots" of
display "snapshots" of the
the temperature
temperature distributions
distributions at
at the
the times
times
tt = 20, tt = 60, and tt =
60, and = 300; that
that is,
is, we
we show
show the
the graphs
graphs of
of the
the function w(x,20),
junction u(x,20),
u(x,QQ), and
u(x,60), and u(x,3QO). This is
u(x,300). This is often
often the
the preferred way to
preferred way to visualize
visualize aa function
junction of
of
space and
space and time.
time.

Sr-----~----~--~--~--~======~
u(x,O)
4.S u(x,20)
u(x,60)
4 u x,300)

3.S

~ 3
~
til
Cii2.S
c..
E
2 2
1.S

10 20 30 40 so
x

Figure 6.1. The


Figure 6.1. The solution
solution u(x,
u(x,t)t) from
from Example 6.1 at
Example 6.1 times 0,
at times 0, 20, 60, and
20, 60, and
300
300 (seconds). Ten terms
(seconds). Ten terms of
of the
the Fourier
Fourier series
series were
were used
used to
to create
create these
these curves.
curves.

We now make several observations concerning the homogeneous heat equation


equation
and its solution.

1. For
1. For aa fixed
fixed time
time tt > 0, the Fourier
0, the coefficients an(t)
Fourier coefficients decay exponentially
an(t] decay as nn -+
exponentially as —>•
oo (cf.
00 (cf. equation
equation (6.3),
(6.3), in which
which the second term
the second term is
is zero
zero for
for the homogeneous
the homogeneous
heat equation). Since
Since larger values of of n correspond to higher frequencies,
n correspond frequencies, this
this
shows that
shows the solution
that the solution u(x, is very
u(x,t)t) is smooth as
very smooth as aa function
function of for any
of xx for any tt > 0.
O.
216 Chapter 6. Heat flow and diffusion

This can
This can be seen in
be seen in Figure
Figure 6.1;
6.1; at
at tt =
= 0,
0, the temperature distribution
the temperature distribution has
has aa
singularity (a
singularity (a point
point ofof nondifferentiability)
nondifferentiability) at at xx == 25. This singularity
25. This singularity isis not
not
seen even
seen after 10
even after 10 seconds.
seconds. InIn fact,
fact, it
it can
can be shown mathematically
be shown mathematically that the
that the
solution u(x,
solution u(x, t) is infinitely
t) is differentiate as
infinitely differentiable as aa function
function of
of xx for
for every
every tt > 0,
0,
and this
and holds for
this holds for every
every initial
initial temperature
temperature distribution
distribution ty £ e[o,
'ljJ E fl.
(7[0,^].
The relationship
The relationship between
between the smoothness of
the smoothness of aa function
function and the rate
and the rate of decay
of decay
of its
of its Fourier
Fourier will
will be explained thoroughly
be explained thoroughly inin Section
Section 9.5.1.
9.5.1. For
For now,
now, we
we will
will
content ourselves
content ourselves with
with aa qualitative
qualitative description
description ofof this
this relationship.
relationship. A A "rough"
"rough"
function (one
function (one that
that varies
varies rapidly
rapidly with x] must
with x) have aa lot
must have lot of
of high frequency
high frequency
content (because
content (because high
high frequency modes—sin (rnrx/l)
frequency modes-sin (mrx / f) with large—change
with nn large-change
rapidly with
rapidly with x), andand therefore
therefore the
the Fourier coefficients
coefficients must decay
decay to zero
slowly as
slowly as nn -t
-» 00.
oo. On
On the other hand,
the other hand, aa smooth
smooth function,
function, one
one that changes
that changes
slowly with
slowly with x, must
must be made up
be made up mostly
mostly of
of low
low frequency
frequency waves,
waves, and
and so
so the
the
Fourier coefficients
Fourier coefficients decay
decay rapidly
rapidly with x.x.
function with a discontinuity is "rough" in the sense that we
For example, a function we
are discussing,
are discussing, andand its
its Fourier coefficients go
Fourier coefficients go to
to zero
zero only
only as
as fast
fast as
as lin.
1/n. A A
function that
function that is continuous but
is continuous but whose derivative is
whose derivative is discontinuous
discontinuous hashas Fourier
Fourier
coefficients that
coefficients that decay
decay toto zero
zero like 1/n22 (assuming
like 1/n (assuming the function satisfies
the function satisfies the
the
same boundary
same boundary conditions
conditions asas the eigenfunctions). This
the eigenfunctions). This pattern
pattern continues:
continues:
Each additional
Each additional degree
degree ofof smoothness
smoothness inin the
the function
function corresponds
corresponds to an addi-
to an addi-
tional factor of n in the denominator of the Fourier coefficients. For examples,
tional factor of n in the denominator of the Fourier coefficients. For examples,
the reader
reader isis referred to
to Exercise
Exercise 13
13 and,
and, for
for aa complete
complete explanation,
explanation, to Section
Section
9.5.1.
9.5.1.
The fact
The fact that
that the solution u(x,
the solution u(x, t) of the
t} of the homogeneous
homogeneous heat heat equation
equation is
is very
very
smooth can
smooth can be understood physically
be understood physically as follows: If
as follows: If somehow
somehow aa temperature
temperature
distribution that
distribution that has
has aa lot
lot of
of high
high frequency
frequency content
content (meaning
(meaning that
that the tem-
the tem-
perature changes
changes rapidly
rapidly with x) is induced, and and then the
the temperature dis-
dis-
tribution
tribution isis allowed
allowed toto evolve
evolve without
without external
external influence,
influence, the
the heat
heat energy
energy will
will
quickly flow
quickly from high
flow from temperature regions
high temperature regions to low temperature
to low temperature regions
regions and
and
smooth out
smooth out the
the temperature
temperature distribution.
distribution.

2. For each
2. each fixed n,n, the
the Fourier coefficient
coefficient an(t) decays exponentially
an(t) decays exponentially as as tt -t
—>• oo.
00.
Moreover,
Moreover, thethe rate
rate of
of decay
decay isis faster
faster for
for larger
larger n. This
This is
is another
another implication
implication of of
the fact that
the fact that the
the temperature distribution u becomes
temperature distribution becomes smoother
smoother asas tt increases,
increases,
and means that, as tt grows,grows, fewer and fewer terms in the Fourier series are
required to
required produce an
to produce an accurate
accurate approximation
approximation to to the solution u(x,
the solution u(x,t}. When
t). W'hen
tt is
is large
large enough,
enough, thethe first
first term
term from the Fourier
from the Fourier series
series provides
provides an
an excellent
excellent
approximation
approximation to to the
the solution.
solution.
As an
As an illustration
illustration ofof this, we graph,
this, we graph, in
in Figure
Figure 6.2,
6.2, the difference between
the difference between
u(x, t)
u(x, and the
t) and the first term of
first term of its
its Fourier series for
Fourier series for tt == 10,
10, tt == 20, and tt =
20, and 300.
= 300.
(We used
(We used 10
10 terms
terms ofof the
the Fourier
Fourier series
series to approximate the
to approximate the exact
exact solution.
solution.
Figure 6.2
Figure 6.2 suggests
suggests that this
this is
is plenty.)

characteristics of the bar appear


3. The material characteristics appear in the formula
formula for the solution
6.1. Fourier series methods for the heat equation 217
217

- t=10
- _. t=60
.- - t=300

...
e
W

10 20 30 40 50
x

Figure 6.2.
Figure 6.2. The
The error
error in
in approximating, at times
approximating, at times 0,
0, 20,
20, 60,
60, and
and 300
300 (sec-
(sec-
onds), the solution
onds), the solution u(x,t)
u(x, t) from Example 6.1
from Example 6.1 with only the
with only first term
the first term in
in its
its Fourier
Fourier
series.
series.

onlv in
only in the combination
the combination
",

pC£2·
For example,
For example, in
in the case of
the case of the
the iron
iron bar of Example
bar of Example 6.1,
6.1, we
we have
have

If the
If the bar
bar were made of
were made of aluminum instead, with
aluminum instead, with pp =
— 2.70, 0.875, and
2.70, cc = 0.875, and
K=
", = 2.36,
2.36, and still had
and still had length
length 50cm,
50 cm, we
we would
would have
have

02'" ~ 3.996 . 10-4 .


1; pc

An examination of
An examination of the solution (formula
the solution (formula (6.4))
(6.4)) shows
shows that
that the
the temperature
temperature
u(x,t)t) will
u(x, decay to
will decay to zero
zero faster
faster for
for aa bar
bar made
made of of aluminum
aluminum than for aa bar
than for bar
made
made of of iron.
iron. Figure
Figure 6.3
6.3 demonstrates
demonstrates this;
this; it
it is
is exactly
exactly analogous
analogous to
to Figure
Figure
6.1, except
6.1, except the
the solution
solution is
is for
for an
an aluminum
aluminum barbar instead
instead of
of an
an iron
iron bar.
bar.

6.1.2
6.1.2 Nondimensionalization
Point 33 above
Point above raises
raises the
the following
following question:
question: Suppose
Suppose we cannot solve
we cannot solve aa PDE
PDE explic-
explic-
itly. Can
itly. Can we still identify
we still the critical
identify the critical parameters (or combination
parameters (or combination of
of parameters)
parameters)
218 Chapter 6. Heat flow and diffusion
diffusion

5r-----~----~--~--~--_r====~~
u(x,O)
4.5 u(x,20)
u(x,60)
4 u(x,300)

3.5

~ 3
::J
<ii
0;2.5
0-
E
.sa 2
1.5

10 20 30 40 50
x

Figure 6.3.
Figure The temperature
6.3. The temperature distribution
distribution u(x,t)
u(x, t) for
for an
an aluminum
aluminum barbar at
at
times 0, 20,
times 0, 20, 60,
60, and 300 (seconds).
and 300 (seconds). Ten
Ten terms
terms of the Fourier
of the Fourier series
series were used to
were used to
create these
create curves. The
these curves. The experiment
experiment is
is exactly
exactly as
as in
in Example 6.1, except
Example 6.1, except the
the iron
iron
bar is replaced
replaced by an aluminum bar.
bar.

in the
in the problem?
problem? In In the case of
the case of the homogeneous heat
the homogeneous equation, the
heat equation, the parameters
parameters p,p,
c, tr" and lt are not significant individually, but rather
c, K, K/(pcl2).
rather in the combination tr,/(pC£2).
Can we
Can deduce this
we deduce from the
this from equation itself,
the equation itself, rather
rather than from its
than from solution?
its solution?
It turns out
out that this is is often
often possible through
through nondimensionalization, which which
is the
is the process
process of
of replacing
replacing the independent variables
the independent variables (and sometimes the
(and sometimes dependent
the dependent
variable) with nondimensional
variable) with nondimensional variables.
variables. We continue to
We continue consider heat
to consider heat flow in aa
flow in
bar. The independent
bar. The independent variables
variables are and t. The
are xx and The spatial variable has
spatial variable dimensions of
has dimensions of
cm, and
cm, and it
it is
is rather obvious how
rather obvious how to nondimensionalize x—we
to nondimensionalize describe the
x-we describe the spatial
spatial
location in
location in terms
terms of of the
the overall
overall length
length tl of
of the bar. That
the bar. That is,
is, we
we replace with
replace x with

y= e·x
Since both
Since and tl have
both x and have units
units of
of centimeters,
centimeters, y isis dimensionless.
dimensionless.
It is more
It is more difficult
difficult to
to nondimensionalize
nondimensionalize thethe time variable, but
time variable, there is
but there is aa general
general
technique
technique forfor creating
creating nondimensional variables: List
nondimensional variables: all parameters
List all appearing in
parameters appearing in
the
the problem,
problem, together with their
together with their units, and find
units, and find aa combination
combination of the parameters
of the parameters
that has the
that has same units
the same units as the variable
as the variable you
you wish
wish toto nondimensionalize.
nondimensionalize. In In this
this
problem,
problem, thethe parameters
parameters and and their
their units
units are
are as follows:
as follows:
6.1.
6.1. Fourier series
Fourier series methods
methods for
for the heat equation
the heat equation 219
219

parameter
parameter units
3
Pp g/cm
g/cm3
cc J/(gK)
K J/(scmK)
J/(s cmK)
'" cm
cm

Then the ratio


"
t

pd2

is seen
is seen to
to have
have units
units of seconds, so
of seconds, so we
'"
define aa dimensionless
we define dimensionless time
time variable
variable ss by
by
t ",t
s = -2 - = - -2.
pd /", pd

We then define v(y, = u(x,


v ( y , ss)) = t), where (y,
u(x,t), (y,s) ( x , tt)) are related by
s) and (x,
x ",t
Y= e' s = pd2 •

Then, by the chain rule,


AU avos
at as at
and
and

Therefore, the PDE


PDE

is equivalent to
is equivalent to

which simplifies to
220 Chapter 6. Heat flow and diffusion

Since
Since xx = £y and
= iy — t£ corresponds
and xx = corresponds to
to yy = 1, the
= 1, the IBVP
IBVP (6.1),
(6.1), with
with ff(x, = 0,
( x , t) = 0,
becomes
becomes
av a2 v
as - ay2 = 0, 0< y < 1, s > so,
v(y, so)= 'ljJ(£y), 0< y < 1, (6.5)
v(O,s) = 0, s > so,
v(1,s) =0, s > so,
2
where
where sSo0 =
= Kt 0/(pcl ). The
/'1,tO/(pC£2). solution of
The solution of (6.5)
(6.5) is
is computed as above;
computed as above; the
the result
result is
is
00

v(s, y) =L bne-n27r2S sin (mry).


n=l

The Fourier
The Fourier sine coefficients of
sine coefficients if)(ly), , considered
of 'ljJ(£y) considered as as aa function
function of of yyon
on the interval
the interval
[0,1], are
[0,1]' are the same as
the same as the
the Fourier
Fourier sine sine coefficients of i})(x) as
coefficients of'ljJ(x) as aa function
function of of xx on the
on the
interval [0,
interval [0,1] (see Exercise
£] (see Exercise 6). 6).
What
What did did we
we gain
gain from
from nondimensionalization?
nondimensionalization? We We identified
identified the natural
the natural
time scale, namely,
time scale, namely, pclpC£22/K, for the
/ /'1" for the experiment,
experiment, and and we did this
we did this without solving
without solving
the
the equation.
equation. Whether
Whether we we have have an an iron
iron or or aluminum
aluminum bar, bar, the
the problem
problem can can be be
written
written as (6.5). This
as (6.5). This shows
shows that that the evolution of
the evolution of the
the temperature
temperature will will be exactly
be exactly
the
the same for the
same for the two
two bars,
bars, except
except thatthat the the temperature
temperature evolvesevolves on on different
different timetime
scales, depending on the material properties of the bars. Moreover, we see exactly
scales, depending on the material properties of the bars. Moreover, we see exactly
how
how this
this time scale depends
time scale depends on on the
the various
various parameters,
parameters, and and this
this can
can give some
give some
information
information that is not
that is not immediately
immediately obvious obvious fromfrom the equation. For
the equation. example, it
For example, it
is obvious from
is obvious from the equation that,
the equation that, holding
holding p constant, aa bar
p constant, bar with
with specific
specific heat
heat cc
and thermal
and thermal conductivity
conductivity K/'1, willwill behave
behave the the same
same asas aa bar
bar with specific heat
with specific heat 2c and
2c and
thermal conductivity 2/'1,.
thermal conductivity 2«. However,
However, it it is
is not at all
not at all obvious
obvious that,
that, holding
holding pp and and cc
constant,
constant, aa bar
bar of
of length
length t£ with with thermal
thermal conductivity
conductivity K /'1, will
will behave
behave just
just as
as aa bar
bar of
of
35
length
length 2£21 with
with thermal
thermal conductivity
conductivity 4«. 4/'1,.35

6.1.3
6.1.3 The inhomogeneous heat equation
We
We now
now consider
consider an
an inhomogeneous
inhomogeneous problem.
problem.

Example
Example 6.2. 6.2. The
The diffusion
diffusion coefficient
coefficient for
for carbon
carbon monoxide
monoxide (CO) (CO) in in air
air isis D
D ==
0.208cm 2//s.s. We
0.208cm2 We consider
consider aa pipe
pipe ofof length 100cm,
length 100 cm, filled
filled with
with air,
air, that initially
that initially
contains
contains no
no CO.CO. We
We assume
assume that the two
that the ends of
two ends of the
the pipe
pipe open
open onto
onto large
large reservoirs
reservoirs
of
of air,
air, also
also containing
containing no CO, and
no CO, and that CO is
that CO is produced
produced inside
inside the
the pipe
pipe atat aa constant
constant
rate
rate of 10~77 g/cm
of 10-
3
g/ cm3 per
per second.
second. We We write
write u(x, t}, 00 <
u(x, t), 100, for
< xx < 100, for the
the concentration
concentration
of co
of CO inin air,
air, inin units
units of
of g/cm
3
g/ cm3,, and model uu as
and model as the
the solution
solution ofof the IBVP
the IEVP

au a2 u -7
at - D ax 2 = 10 ,0 < x < 100, t > 0,
u(x,O) = 0, 0 < x < 100,
35
For a thorough
35For discussion of nondimensionalization
thorough discussion nondimensionalization and scale
scale models, see [36],
models, see Chapter 6.
[36], Chapter
6.1. Fourier series methods for the heat equation 221
221

u(O, t) = 0, t > 0,
u(100, t) = 0, t > O.

We wish
We wish to
to determine
determine the
the evolution
evolution of
of the
the concentration
concentration of
of CO
CO in
in the
the pipe.
pipe.
We write
We the solution
write the solution u in the
u in the form
form
00

u(x, t) = L an(t) sin (~~~),


n=l

so that
so that

We have
We have

10
-7
= ~
~ Cn sm
. (mrx)
100 '
n=l

where
where

2 (IOO _ . mrx 2.1O- 7 (1-(-1)n)


en = 100 io 10 7 sm ( 100) dx = mr ' n = 1,2,3, ....

To find
To find the
the coefficients an(t) of
coefficients an(t) of u(x,
u(x,t), we must
t), we must solve
solve the
the IVPs
IVPs

dan Dn 2 Jr2
dt + 1002 an = cn ,
an(O) = o.
Using (6.3), we
Using we obtain
obtain

In
In Figure 6.4, we
Figure 6.4, we show the concentration
show the concentration ofof CO
CO in in the
the pipe times tt == 3600
at times
pipe at 3600 (1
hour), tt =
hour), 7200 (2
= 7200 (2 hours),
hours), tt = 14400 (4
= 14400 (4 hours), = 21600
hours), tt = (6 hours),
21600 (6 hours), andt
andt = 360000
= 360000
(100 hours).
(100 The graph
hours). The graph suggests
suggests that
that the
the concentration
concentration approaches steady state
approaches steady state (the
(the
reader should notice
reader should notice how little the
how little the concentration
concentration changes
changes between
between 44 hours
hours andand 100
100
hours of
hours of elapsed
elapsed time).
time). WeWe discuss
discuss the
the approach
approach to to steady
steady state below in
state below in Section
Section
6.1.5.
6.1.5.
222 Chapter 6. Heat flow and diffusion

- t=3600
- _. t=7200
6 ._.- t=14400
t=21600
- t=360000
5
----- .......

20 40 60 80 100
x

Figure 6.4.
Figure 6.4. The
The concentration of co
concentration of CO in
in the
the pipe of Example
pipe of Example 6.2
6.2 after
after 1,
1,
and 100
2, 4, 6, and 100 hours.
hours. Ten
Ten terms
terms of
of the
the Fourier
Fourier series
series were
were used
used to
to create
create these
these
curves.
curves.

6.1.4
6.1.4 In homogeneous boundary
Inhomogeneous boundary conditions
conditions
Inhomogeneous boundary
Inhomogeneous conditions in
boundary conditions in aa time-dependent
time-dependent problem
problem can
can be handled
be handled
by the
by method of
the method of shifting
shifting the
the data,
data, much
much as as in
in the
the steady-state
steady-state problems
problems discussed
discussed
in the
in the last
last chapter.
chapter. We
We illustrate
illustrate with an example.
with an example.

Example 6.3.
Example 6.3. WeWe suppose that the
suppose that the iron
iron bar
bar of
of Example 6.1 is
Example 6.1 is heated
heated to
to aa constant
constant
temperature of 44 degrees
temperature of degrees Celsius,
Celsius, and
and that
that one
one end
end (x
(x =
= O)
0) is
is placed in an
placed in an ice
ice bath
bath
(0 degree
(0 degree Celsius),
Celsius), while
while the
the other
other end
end is
is maintained
maintained at 4 degrees.
at 4 degrees. What
What is is the
the
temperature distribution
temperature after 55 minutes'?
distribution after minutes ?
The IBVP
The IEVP is is
{)u {)2u
pc {)t - K, {)x 2 = 0, 0 < x < 50, t > 0,
u(x,O) = 4, 0 < x < 50,
u(O, t) = 0,
> 0, t
u(50, t) = 4, t > O.

Since
Since p(x)
p(x) = 4#/50 satisfies
= 4x/50 satisfies the
the boundary
boundary conditions,
conditions, we
we will
will define
define v(x,
v(x,t)t) ==
u(x,t) -— p(x).
u(x,t) Then, as
p(x). Then, as is
is easily
easily verified,
verified, vv satisfies
satisfies
{)v {)2v
pc {)t - K, {)x 2 = 0, 0 < x < 50, t > 0,
6.1.
6.1. Fourier series
Fourier series methods
methods for
for the
the heat
heat equation
equation 223

4
v(x,O) = 4 - 50x, 0< x < 50,
v(O, t) = 0, t > 0,
v(50, t) = 0, t > O.

The initial
The initial temperature
temperature satisfies
satisfies
oo
4
4- -x=
50
L b sm (nnx)
--
50' n
.

n=l
where
where
8
bn = - , n = 1,2,3, ....
nn
The solution
The
00

v(x, t) =L an(t) sin (n;x)


n=l
is determined
is by the
determined by IVPs
the IVPs

dan K,n 2n 2
dt + pc502 an = 0,
an(O) = bn ,

so the solution
so the solution is
is
v(x,t) = L -nn8e _ ~ sin (nnx
00
-).
50
«n 2 ,,2 t

n=l
The solution
The solution u is then
u is then given
given by
by

4 _"n 2 .. 2 t nnx
u(x, t) = -x +
50
-e
n=l nn
L
00 8
pc50
2
sin ( - ) .
50

The temperature
The temperature distribution at tt = 300
distribution at is shown
300 is shown in
in Figure
Figure 6.5.
6.5.

In
In aa time-dependent
time-dependent problem,
problem, inhomogeneous
inhomogeneous boundary
boundary conditions
conditions can them-
can them-
selves be
selves be time dependent; for
time dependent; for example,
example,

u(O, t) = g(t), u(£, t) = h(t), t > 0,

are valid
are valid inhomogeneous
inhomogeneous Dirichlet
Dirichlet conditions. The function
conditions. The function
x
p(x, t) = g(t) + C(h(t) - g(t))

satisfies these
satisfies conditions. The
these conditions. The reader
reader should
should notice that the
notice that function v(x,i)
the function v(x, t) =
u(x, t)
u(x, t) -—p(x, t] will
p(x, t) will not satisfy the
not satisfy the same PDE as
same PDE as does w; the
does u; the right-hand side will
right-hand side be
will be
different. See
different. See Exercise
Exercise 5.5.
224
224 Chapter 6. Heat flow and diffusion
diffusion

5
- t-O I
4.5 1 - _. t=300 ~

4
.. --- ---
3.5 ,.
,,
~
:::J
3 ,,
~
(1)2.5
, I

c.. , I

E I
2 2 I
I

I
1.5 I
I

I
I
I
I
I
0.5 I
I
I

00 10 20 30 40 50
x

temperature distribution after


Figure 6.5. The temperature after 300 seconds (see
(see Example
Example 6.3).

6.1.5
6.1.5 Steady-state heat flow
Steady-state flow and diffusion
We
We now discuss the
now discuss the special
special case
case of
of heat
heat flow or diffusion
flow or diffusion in
in which the source
which the source function
function
/(#,£) appearing on
f(x, t) appearing on the
the right-hand side of
right-hand side of the
the differential
differential equation
equation isis independent
independent
of tt (this
of (this is
is the
the case
case in Example 6.2).
in Example 6.2). In
In this case, the
this case, the Fourier
Fourier coefficients
coefficients of
of f/ are
are
constant with respect
constant with respect to
to t, and formula (6.3)
and formula (6.3) can
can bebe simplified
simplified as
as follows:
follows:

As —>• oo,
As tt -+ 00, the
the first term tends
first term tends to
to zero
zero for
for each
each n, and so
n, and so

This implies
This implies that

00 £2
u(x,t) -+ Us(x) = L ",~27f2 sin (n;x).
n=l
6.1. Fourier
6.1. Fourier series
series methods
methods for
for the
the heat
heat equation
equation 225

The limit
The is the
us(x) is
limit us(x) the steady-state temperature distribution.
steady-state temperature distribution. It is
is not difficult to
not difficult to
show that
show is the
us is
that Us the solution
solution to
to the
the BVP
BVP
cPU
-r;, daP = f(x), 0 < x < f,
u(O) = 0, (6.6)
u(f) = 0

(see Exercise
(see Exercise 2). It It should
should be noted that
be noted that the
the initial temperature distribution
initial temperature distribution isis
irrelevant
irrelevant inin determining
determining the steady-state temperature
the steady-state distribution.
temperature distribution.
Similar results
Similar results hold
hold for
for the
the diffusion
diffusion equation,
equation, which
which is
is really no different
really no different from
from
the heat equation
the heat except in
equation except in the
the meaning
meaning of of the
the parameters. Indeed, Example
parameters. Indeed, Example 6.26.2
is an illustration;
is an illustration; the concentration u
the concentration u approaches
approaches aa steady-state
steady-state concentration,
concentration, asas
suggested by
suggested by Figure 6.4 (see
Figure 6.4 Exercise 1).
(see Exercise 1).
In the
In the next
next section,
section, we
we will
will turn
turn our
our attention
attention to
to two
two new sets of
new sets of boundary
boundary
conditions for
conditions for the heat equation
the heat equation and
and derive
derive Fourier series methods
Fourier series methods that apply to
that apply to
the
the new boundary conditions.
new boundary conditions. First,
First, however,
however, we we briefly discuss another
briefly discuss another derivation
derivation
of the
of Fourier series
the Fourier series method.
method.

6.1.6
6.1.6 Separation of
Separation of variables
variables
There is
There is another
another way
way to
to derive
derive Fourier series solutions
Fourier series solutions of of the
the heat
heat equation, which
equation, which
is called the
is called the method
method ofof separation
separation of It is
variables. It
of variables. is in some ways
in some ways more elementary
more elementary
than the point
than the of view
point of view we
we have
have presented,
presented, but
but it is less
it is less general.
general.
To introduce
To introduce the method of
the method of separation
separation ofof variables, we will
variables, we will use
use the following
the following
IBVP:
IBVP:
{)u {)2u
pc {)t - r;, {)x 2 = 0, 0 < x < f, t > to,
u(x, to) = 'l/J(x), 0 < x < f, (6.7)
u(O, t) = 0, t > to,
u(f, t) = 0, t > to.
The reader
The reader should
should notice
notice that
that the PDE is
the PDE is homogeneous; this is
homogeneous; this is necessary
necessary and
and aa
significant limitation
significant limitation ofof this
this technique.
technique.
Here is the
Here is the key idea of
key idea of the method of
the method of separation
separation of
of variables:
variables: we look for
we look for
separated solutions: u(x, t)
separated solutions: t) = X(x)T(t) and T are
(X and
X(x)T(t) (X are functions of aa single
functions of single variable).
variable).
Substituting; uu into
Substituting into the
the PDE
PDE vields
yields
{)u {)2U
U = XT, pc {)t - r;, {)x 2 = 0
dT d2 X
=> pcX- - r;,T--2 = 0
dt dx
cP X dT
=> -r;,T--2
dx
= -pcX-
dt
_ld2 X _ldT
=> -r;,X d,x2 = -peT di·
226
226 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

The last
The last step
step follows
follows upon dividing
dividing both
both sides
sides of
of the
the equation
equation by
by XT. The crucial
XT. The crucial
observation is
observation is the following:
the following:

is aa function
is function of
of x alone,
alone, while
while
dT
-pcT- 1 dt
is aa function
is function of
of tt alone.
alone. The
The only
only way
way these
these two
two functions
functions can
can be
be equal
equal is
is if
if they
they
are both
are both constants:
constants:
-1 J2 X -1 dT
-liX dx 2 = -pcT dt = A.
We now
We now have
have ODEs
ODEs for
for X(x) and T(t):
X(x) and T(t)

d2 X dT
-Ii dx 2 = AX, -pc
dt = AT.
Moreover, the
Moreover, the boundary
boundary conditions
conditions for
for uu imply
imply boundary conditions for
boundary conditions for X:
X:

u(O, t) = 0 :::} X(O)T(t) = 0 :::} X(O) = 0,


u(l, t) = O:::} X(l)T(t) = O:::} X(l) = 0
(the function
(the function T(t) cannot be
T(t) cannot zero, for
be zero, for otherwise
otherwise u is
is the
the trivial
trivial solution).
solution).
We see
We see that
that the
the function
function X must satisfy
X must satisfy the
the eigenvalue
eigenvalue problem
problem
J2x
-Ii dx 2 = AX, 0 < x < l,
X(O) = 0,
X(l) = O.

From our
From our earlier
earlier work,
work, we know that
we know that there
there is
is aa sequence
sequence of
of solutions:
solutions:

n21f2
An =~, Xn(x) = sin (n1fx)
-l- , n = 1,2,3, ....

For each
For each value
value of
of A n , we
An, we can
can solve
solve the ODE
the ODE
dT
-pc- = AT
dt
to find
to find aa corresponding
corresponding function
function Tn:
Tn:
_ An(t-·o)
Tn(t) = bne pc , n = 1,2,3, ...
is an
(bn is
(b an arbitrary
arbitrary constant).
constant).
We have
We now found
have now found aa sequence
sequence of
of separated
separated solutions
solutions to
to the homogeneous heat
the homogeneous heat
equation, namely,
equation, namely,

un(x,t)=bne
_"'n(t-to)
pc
• (n1fX)
sm -l- ,n=1,2,3, ....
6.1. Fourier series methods for the heat equation 227

By construction, each
By each of
of these
these functions
functions satisfies
satisfies the
the homogeneous Dirichlet
Dirichlet condi-
tions.
tions.
To
To satisfy
satisfy the initial condition,
the initial condition, wewe use
use the
the principle
principle of superposition (which
of superposition (which
applies because
applies because the
the heat equation is
heat equation is linear)
linear) to
to form
form the solution
the solution
<Xl
~ (nnx)
U(X, t) = ~ bne-
An(t-tO)
pc sin -c- .
n=l

We then
We then have
have
<Xl

u(x, to) = Lb n sin (n;x).


n=l

If we
If we choose
choose 61, b2 , 63,...
b1 , b%, b3 , ••• to
to be
be the
the Fourier sine coefficients
Fourier sine coefficients of'lj;,
of i/»,

bn = ~ 1i 'lj;(x) sin (n;x) dx,

then u(x,to)
then u(x, i^(x] will
to) == 'lj;(x) will hold.
hold.
We thus see
We see that the method of separation
separation of of variables
variables yields the solution we
the solution
obtained earlier
obtained earlier (see Section
Section 6.1.1).
6.1.1). However,
However, the method
method requires that the PDE PDE
and
and the
the boundary
boundary conditions be homogeneous,
conditions be homogeneous, and and this
this is
is aa serious
serious limitation.
limitation. For
For
example, one
example, one cannot
cannot apply separation of
apply separation variables to
of variables to aa problem
problem with inhomogeneous,
with inhomogeneous,
time-dependent
time-dependent boundary conditions. The The method does not apply directly, and one
cannot use the
cannot use the trick
trick ofof shifting
shifting the data, since
the data, since it
it would
would result
result inin an
an inhomogeneous
inhomogeneous
PDE.
PDE.
We will
We find separation
will find separation ofof variables
variables useful in Section
useful in Section 8.2,8.2, when
when we derive the
we derive the
eigenvalues and eigenfunctions
eigenvalues and eigenfunctions forfor aa differential
differential operator
operator defined
defined onon aa rectangle.
rectangle.

Exercises
1. What
1. What is
is the steady-state solution
the steady-state solution of Example 6.2?
of Example 6.2? What BVP does
What BVP it satisfy?
does it satisfy?
2. Find
2. Find the Fourier sine
the Fourier sine series
series of
of the solution of
the solution (6.6) and
of (6.6) show that
and show that it equals
it equals
u8(x).
us(x).

3. Solve the
3. Solve following IBVP
the following IBVP using
using the
the Fourier
Fourier series method:
series method:
{)u fPu
{)t - {)x2 = 0, °< x < 1, t > 0,
u(x,O) = x, °< x < 1,
u(O, t) = 0, t > 0,
u(I, t) = 0, t > 0.

Produce an accurate
Produce an accurate graph
graph of
of the
the "snapshot"
"snapshot" u(·,O.I).
w(-,0.1).
4. Solve the
4. Solve following IBVP
the following IBVP using
using the Fourier series
the Fourier series method:
method:
{)u {)2u
{)t - {)x2 = sm (t),
.
°< x < 1, t > 0,
228 Chapter 6. Heat flow and diffusion

u(x,O) °
= 0, < x < 1,
u(O, t) = 0, t > 0,
u(l, t) = 0, t > 0.
Produce an accurate graph of the "snapshot"
"snapshot" u(·,O.I).
w(-,0.1).
5. Consider
5. Consider the
the heat
heat equation
equation with
with inhomogeneous
inhomogeneous boundary conditions:
boundary conditions:
au
pc at
a2 u
- ~ ax2 = f(x, t),°< < x f, t> 0,
u(x, to) = ¢(x), x°< < f,
u(O, t) = g(t), t > to,
u(f, t) = h(t), t > to.

Define
Define
x
p(x, t) = g(t) + e(h(t) - g(t))
v(x,i)t) =
and v(x, = u(x,
u(x,t)t) -— pp(x,
( x , tt). satisfy?
) . What IBVP does v satisfy?
6. Suppose ¢ VE e C[O,
C[0,4f), and 1> e C[O,
(f> E C[0,1]
1) is defined by 1>(y)
(j>(y) =
= ¢(fy).
^(iy). Show that
the sine coefficients
the sine coefficients of on [0,1)
<j> on
of 1> [0,1] are
are the
the same
same as the sine
as the sine coefficients
coefficients of on
ty on
of ¢
[0,4
[0, f).
7. Use the method of shifting the data to solve the following IBVP with inho-
mogeneous Dirichlet conditions:

au _ a u2 =
at ax
2

'
°°
< x < 1, t > 0,
u(x, 0) = x, 0 < x < 1,
u(O, t) = 0, t > 0,
u(l, t) = cos (t), t > 0.
If possible, produce an accurate
If accurate graph of the "snapshot"
"snapshot" u(·,
w(-, 1.0).
8. Consider
8. Consider anan iron bar, of
iron bar, diameter 44cm
of diameter cm and length 11m,
and length m, with specific heat
with specific heat
0.437 J/(gK),
cc = 0.437 J/(gK), density 7.88g/cm33,, and
density pp = 7.88g/cm and thermal
thermal conductivity
conductivity ~K =
0.836 W/(cm
W / (cm K). Suppose that the bar is insulated except at the ends, is
heated to a constant
heated constant temperature
temperature of 5 degrees Celsius,
Celsius, and the ends are placed
in an
in an ice
ice bath
bath (0 degrees Celsius).
(0 degrees Celsius). Compute
Compute thethe temperature (accurate to
temperature (accurate to 33
digits) at the midpoint of the bar after
after 20
20 minutes. (Warning: Be sure to use
consistent units.)
consistent
9. Repeat
9. Repeat Exercise
Exercise 88 with
with aa copper
copper bar: specific heat
bar: specific heat cc = 0.379 J/(gK), density
= 0.379J/(gK), density
pp = 8.97 g/cm33,, thermal
= 8.97g/cm thermal conductivity
conductivity K
~== 4.04
4.04 W/(cmK).
W /(cmK).
10. Consider the bar of Exercise 8. Suppose the bar is completely insulated except
10.
at the ends. The bar is heated
heated to a constant
constant temperature
temperature of 5 degrees Celsius,
and then the right end is placed in an ice bath (0 degrees Celsius),
Celsius), while the
maintained at 5 degrees Celsius.
other end is maintained
6.2. Neumann conditions and the Fourier cosine series
Pure Neumann 229

(a) What
(a) What is
is the
the steady-state
steady-state temperature
temperature distribution
distribution of
of the bar?
the bar?
(b) How
(b) How long
long does
does it
it take
take the
the bar to reach
bar to steady-state (to
reach steady-state (to within
within 11%)?
%)?

11. Repeat
11. the preceding
Repeat the preceding exercise
exercise with
with the
the bar of Exercise
bar of Exercise 9.
9.

12. Consider
12. Consider aa 100cm
100 cm circular
circular bar, with radius
bar, with radius 44cm,cm, designed
designed soso that
that the thermal
the thermal
conductivity is
conductivity is nonconstant
nonconstant and and satisfies
satisfies II;K(X) = 11 +
(x ) = + o::x
ax W/(cmK)
W / (cm K) forfor some
some
a > O.
0:: 0. Assume
Assume thatthat the
the sides
sides of
of the
the bar
bar areare completely
completely insulated,
insulated, one
one end
end
0) is
(x == 0)
(x is kept at 00 degrees
kept at degrees Celsius,
Celsius, and
and heat is added
heat is added toto the other end
the other end at
at
aa rate
rate of
of 44 W.
W. The
The temperature
temperature of of the
the bar
bar reaches
reaches aa steady
steady state,
state, uu == u(x),
u(x),
and the
and the temperature
temperature at at the end xx == 100
the end 100 is
is measured
measured to be
to be

u(100) == 7.6 degrees Celsius.

Estimate 0::.
Estimate a.

13. Compute
13. Compute thethe Fourier
Fourier sine
sine coefficients
coefficients of
of each
each of
of the
the following
following functions,
functions, and
and
verify the
verify the statements
statements on
on page
page 216 concerning the
216 concerning the rate
rate of
of decay
decay of
of the
the Fourier
Fourier
coefficients. (Take
coefficients. (Take the interval to
the interval to be [0.11.)
be [0,1].)

(a)

f(x) = {
x, Os x < 1/2,
2 - 2x, 1/2 S x S 1.

(b)
X s
0 x < 1/2,
f(x)= { 1'-x,I/2SxS1.

6.2
6.2 Pure Neumann
Pure Neumann conditions
conditions and
and the
the Fourier
Fourier cosine
cosine
.
series
series
In this section
In this section wewe will consider the
will consider effect of
the effect of insulating
insulating one
one or
or both
both ends
ends of
of aa bar
bar in
in
which
which heat
heat is flowing.3636 With
is flowing. the new
With the new boundary
boundary conditions
conditions that result, we
that result, must use
we must use
different eigenfunctions
different eigenfunctions in in the
the Fourier
Fourier series method. Of
series method. Of particular
particular interest
interest is the
is the
case in
case in which
which both ends of
both ends of the
the bar
bar are
are insulated,
insulated, as
as this
this raises some mathematical
raises some mathematical
questions that
questions that we have not
we have not yet
yet encountered.
encountered.

6.2.1
6.2.1 One end insulated; mixed boundary conditions
We begin
We with the
begin with case in
the case in which
which one
one end
end of
of the
the bar is insulated,
bar is insulated, but the other
but the other is
is not.
not.
In Section
In Section 2.1,
2.1, we saw that
we saw an insulated
that an insulated boundary
boundary corresponds
corresponds to to aa homogeneous
homogeneous
Neumann condition,
Neumann which indicates
condition, which that no
indicates that heat energy
no heat energy isis flowing through that
flowing through that
end of
end of the
the bar.
bar. We consider aa bar
We consider bar of
of length
length C, perfectly insulated
t, perfectly insulated onon the sides, and
the sides, and
assume that
assume that one
one end
end (x = = C) is perfectly
1} is perfectly insulated
insulated while
while the
the other
other end
end (x = 0) 0)
36
Or closing
360r closing one
one or
or both ends of
both ends of aa pipe in which
pipe in which aa chemical
chemical is
is diffusing.
diffusing.
230 flow and diffusion
Chapter 6. Heat flow

is uninsulated
is uninsulated and
and placed in an
placed in an ice
ice bath. If the
bath. If the initial
initial temperature
temperature distribution
distribution is
is
then the
^(x), then
'l/J(x), the temperature
temperature distribution
distribution u(x, satisfies the
u(x,t)t) satisfies the IBVP
IBVP
au
pc at - /l,
a2u
ax 2 = f(x, t), °< < £, x t> to,
u(x, to) = 'l/J(x) , °< < £, x (6.8)
u(O, t) = 0, t > to,
au
ax (£, t) = 0, t > to·
The eigenvalue/eigenfunctions
The eigenvalue/eigenfunctions pairs
pairs for
for L the negative
Lmm,, the second derivative
negative second derivative operator,
operator
under
under the
the mixed
mixed boundary conditions (Dirichlet
boundary conditions (Dirichlet at
at the
the left,
left, Neumann
Neumann atat the
the right)
right
are
are
(2n-1)21f2 . ((2n-1)1fx)
4£2 ' sm 2£ ' n = 1,2,3, ...
(see Section
(see Section 5.2.3).
5.2.3). If
If we
we represent the solution
represent the solution as
as

~ . ((2n - l)1fX)
u(x, t) = ~ an(t) sm 2£ '

then uu will
then satisfy the
will satisfy the boundary
boundary conditions.
conditions. Just
Just as
as in
in the
the previous section, we
previous section, we
can derive
can derive an
an ODE
ODE with an initial
with an initial condition
condition for
for each
each coefficient
coefficient an(t) and thereby
an(t) and thereby
determine u.
determine We will
u. We will illustrate with an
illustrate with an example.
example.

Example
Example 6.4.6.4. WeWe consider
consider the temperature distribution
the temperature in the
distribution in the iron
iron bar
bar of
of Example
Example
6.1, with
6.1, the experimental
with the experimental conditions
conditions unchanged
unchanged except
except that
that the
the right
right end
end (x
(x =
= £)I)
of the
of bar is
the bar is perfectly insulated. The
perfectly insulated. The temperature
temperature distribution
distribution u(x,
u(x,t)t) then
then satisfies
satisfies
the IBVP
the IBVP
au
pc at - /l,
a 2u
ax 2 = 0, °< < x 50, t > 0,
u(x,O) = 'l/J(x), x °< < 50,
u(O, t) = 0, t > 0,
du
dx (50, t) = 0, t > 0,
3
where
where p
p== 7.88
7.88g/cm
g/ cm3,, cc =
= 0.437
QA37J/(gK), 0.836 W/
J/ (g K), K/l, == 0.836 W/(cmK),
(cm K), and
and
1
'l/J(x) = 5 - Six - 251·
We have
We have
~ . ((2n-1)1f)
'l/J(x) = ~cnsm 100 '

where
where
_ ~ (50.,,( ) . ((2n -l)1fX) d
cn - 50 J0 'f' X sm 100 x
80 (-\1'2 sin (n1f /2) + \1'2 cos (n1f/2) - (-l)n)
=- 2()2
1f 2n-1
' n = 1,2,3, ....
6.2. Neumann conditions and the Fourier
Pure Neumann Fourier cosine series 231
231

We write
We the solution
write the solution u
u in the form
in the form

~
u(x, t) = ~ an(t) sm
. ((2n 100
- 1)1fX) .
Then, by
Then, by almost
almost exactly
exactly the
the same
same computation
computation as
as on
on page 212, we
page 212, we have
have

The PDE
The PDE and initial condition
and initial condition for
for u then imply
u then imply that
that the
the coefficient
coefficient a n(t) must
an(t) must satisfy
satisfy
the following
the IVP:
following IVP:

dan ~(2n- 1)21f2


pc dt + 4.50 2 an = 0,
an(O) = cn ·

The solution
The is
solution is

which
which determines
determines u(x,u(x,t).
t).
In
In Figure 6.6, we
Figure 6.6, we show the temperature
show the temperature distributions
distributions at times tt =
at times 20, tt =
= 20, 60,
= 60,
and
and tt = 300; this
= 300; this figure
figure should be compared
should be compared with
with Figure 6.1. The
Figure 6.1. The effect
effect of
of insulating
insulating
the right
the right end
end is
is clearly
clearly seen.
seen.

6.2.2
6.2.2 boundary conditions
Both ends insulated; Neumann boundary
In order to
In order treat the
to treat case of
the case of heat
heat flow
flow in
in aa bar
bar with
with both ends insulated,
both ends insulated, we must
we must
first analyze
first analyze the negative second derivative
derivative operator
operator under Neumann conditions.
conditions.
We define
We define
e1[0, e) = {u E e 2 [0, e) : ~~(O) = ~~(e) = o},
and LN : eF,r[o, £) -+ e[o, £} by

Unlike the negative


Unlike the second derivative
negative second operator under
derivative operator under the other sets
the other sets of
of boundary
boundary
conditions we
conditions
and only
and only if
eigenvalue of
eigenvalue
we have

of LN
LN with
considered, LN
have considered,
if uu is
is aa constant
LN has
constant function
has aa nontrivial
function (see
(see Example
eigenfunction 'Yo(x)
with eigenfunction 70 (x) == 1.
1. It
null space;
nontrivial null indeed, LNu
space; indeed,
3.17). Therefore,
Example 3.17).
It is
Therefore, AQ
is straightforward
straightforward to
L^u =
AD = °°
= 0 ifif
= 0 isis an
show that
to show
an
that
LJV is
LN symmetric, so
is symmetric, so that
that its
its eigenvalues are real
eigenvalues are and eigenfunctions
real and corresponding to
eigenfunctions corresponding to
distinct eigenvalues
distinct eigenvalues are are orthogonal.
orthogonal. Moreover,
Moreover, apart
apart from
from AQ,
AD, the other eigenvalues
the other eigenvalues
of LN
of Z/jv are
are positive (see
(see Exercise
Exercise 3). We
We now determine
determine these other
other eigenvalues
eigenvalues andand
the corresponding eigenfunctions.
the corresponding eigenfunctions.
232 Chapter 6. Heat flow and diffusion

5r-----~----~--~--~--~:%====~

4.5

3.5

~ 3
::J
Cil
Q52.5
a.
E
.$ 2

1.5

10 20 30 40 50
x

Figure 6.6.
Figure 6.6. The
The solution
solution u(x,t)
u(x, t) from
from Example
Example 6.4 atat times
times 0,
0, 20,
20, 60,
60, and
and
300 {seconds}.
300 (seconds). Ten
Ten terms
terms of
of the
the Fourier
Fourier series
series were
were used
used to
to create
create these
these curves.
curves.

Since we
Since we are
axe looking
looking for
for positive
positive eigenvalues,
eigenvalues, we
we write 02 and
A = (j2
write>. and solve
solve

(6.9)

The general
The general solution
solution of
of the
the ODE
ODE is
is

Therefore,
Therefore,

and
and
du
dx (0) = c2 fJ,

so the
so first boundary
the first boundary condition
condition implies
implies C2
C2 =
= O.
0. We
We then
then have
have u(x)
u(x] =
= Cl cos (Ox)
c\ cos and
(Ox) and
the second
the second boundary
boundary condition
condition becomes
becomes
6.2. Pure Neumann conditions and the Fourier cosine
cosine series 233

When A >
When > 0,
0, this holds only
only ifif

B£=±n7l", n=1,2,3, ... ,


that is,
that is, ifif
n27l"2
>..= T ' n= 1,2,3, ...
(we disregard
(we disregard the possibility that
the possibility that Cl 0, as
c\ == 0, as this
this does
does not
not lead
lead to an eigenfunction).
to an eigenfunction).
The value
The value of the constant
of the constant Cl
c\ is
is irrelevant.
irrelevant.
We thus
We see that
thus see the operator
that the operator

has the following


following eigenpairs
eigenpairs under
under Neumann conditions:
conditions

(6.10)

in addition
in addition to
to the
the eigenpair AQ =
eigenpair >"0 = 0, 7o(#) =
0, 'Yo(x) = l.
1-
A direct
direct calculation
calculation shows
shows that
that
0, m", n,
("(m,'Yn) ={ ~, m=n>O,
£, m = n = 0.
The eigenfunctions are
The eigenfunctions orthogonal, as
are orthogonal, as we
we knew they would
knew they would be
be due
due to the symmetry
to the symmetry
of LN.
of I/AT-
By the
By the projection
projection theorem,
theorem, the best approximation
the best approximation to
to f/ E
G e[O,
C*[0,£] from the
£] from the
subspace spanned
subspace spanned by

{ 1, cos (7l"£X), ... , cos (N;X) }


is
is

where
where
l
bo = e1 10r f(x) dx, b = e2 10rl f(x) cos (n7l"X)
n -£- dx, n = 1,2, ....

It can
It can be shown that
be shown that
Ilf - fN" -t °as N -t 00;
that is,
that is,

L bncos C;X),
00

f(x) = bo +
n=l
234
234 Chapter 6. Heat flow and diffusion

where the
where the convergence
convergence is is in
in the
the mean-square sense (not
mean-square sense (not necessarily
necessarily in in the pointwise
the pointwise
sense—the distinction
sense-the distinction will be discussed
will be discussed in
in detail
detail in
in Section
Section 9.4.1).
9.4.1). This This is is the
the
Fourier cosine series ofof the function f,
the function /, and
and the
the coefficients
coefficients b
6o0 ,,&b1i ,, &b22, , •- ••
- - are
are the
the
Fourier cosine coefficients
coefficients ofof f./.
We can
We can now
now solve
solve the
the following
following IBVP for the
IBVP for the heat
heat equation:
equation:

oU 02U
pc ot - '" ox2 = f(x, t), °< x < £, t > to,
u(x, 0) = 'I/J(x), °< x < £, (6.11)
OU
ox (0, t) = 0, t> to,
au
ox (£, t) = 0, t > to·

We write
We write the
the unknown
unknown solution
solution u(x, t) in aa Fourier
t) in cosine series
Fourier cosine series with time-
with time-
dependent Fourier
dependent Fourier coefficients:
coefficients:
00

u(x, t) = bo(t) + 2: bn(t) cos (n;x),


n=l

1 (-
bo(t) = i io u(x, t) dx,

bn(t) = i2 io(l u(x, t) cos (n7rx)


-c- dx, n = 1,2, ....

The problem
The problem of of determining
determining u(x, now reduces
u(x,t)t) now to the
reduces to the problem of solving
problem of solving for
for
b0(t),bi(t),b
bo(t), b1 (t), b22(t),.... We write
(t), .... We write the
the PDE
PDE

in terms
in terms of
of Fourier
Fourier cosine
cosine series;
series; this
this requires determining formulas
requires determining formulas for
for the
the Fourier
Fourier
cosine coefficients
cosine coefficients of
of ou/ot(x,
du/dt(x,t)t) and —d2u/dx22(x,t)
and -o2u/ax in terms
(x, t) in of the
terms of the Fourier
Fourier coeffi-
coeffi-
cients of
cients of u(x, t). By
By Theorem
Theorem 2.1,
2.1, we have
we have

i2io{lou (n7rx) d [2 {l (n7rx) db


ot (x, t) cos -c- dx = dt i io u(x, t) cos -£- dx = dt(t)
1 n

(and similarly
(and similarly for
for nn = 0). Therefore,
= 0). Therefore,

au db o ~ db n (n7rx)
ot (x, t) = (it(t) + ~ dt(t) cos -c- .
n=l
Computing the
Computing the Fourier coefficients of
Fourier coefficients —d2u/dx22(x,
of -02u/ox requires two
(x, t) requires two applications
applications
of integration
of integration by parts, as
by parts, as in
in Section
Section 6.1.
6.1. In
In the
the following
following calculation,
calculation, the
the boundary
boundary
6.2. Pure Neumann conditions and the Fourier cosine
cosine series 235

terms vanish because


terms vanish of the
because of the boundary conditions:
boundary conditions:
la2u(x, t) cos (n7rx)
-""i2 ior ax2 -e- dx

= -""i2 ([au
ax (x, t) cos (n7rx)]l n7r (au
-e- 0 + T . (n7rx)
io ax (x, t) sm -e- dx )
2n7r rl au . (n7rx)
= -~ io ax (x, t) sm -e- dx
l
= -~
2n7r ([u(x, t) sm
. (n7rx)]l r
n7r io u(x, t) cos (n7rx))
-e- 0 - T -e- dx

=
2n27r 2 l r (n7rx)
~ io u(x, t) cos -e- dx

n 2 7r 2
= ----g2bn (t).
To compute
To compute the n=
the n = 00 Fourier
Fourier coefficient,
coefficient, we
we just
just use direct integration:
use direct integration:

(since aujax(e, t) —
(since du/dx(l,t) aujax(O, t) == 0).
= du/dx(Q,t] 0). We obtain
We obtain

Therefore,
Therefore,

(6.12)

Now,
Now, since
since any
any function in C[O,e]
function in C[0,£] can
can be
be represented
represented by
by aa cosine
cosine series,
series, we
we
have
have
=
f(x, t) = eo(t) + L cn(t) cos (n;x), (6.13)
n=l
where
where the coefficients CQ
the coefficients (t}, c\ (t), c^ ( t ) , ...
cO(t),Cl(t),C2(t), . . . can
can be computed explicitly
be computed explicitly because
because f/ is
is
given:
given:

rl f(x, t) dx, cn(t) = ""i2 iorl f(x, t) cos (n7rx)


co(t) = ""i1 io -e- dx, n = 1,2, ....
236 Chapter 6. Heat flow and
and diffusion

We equate
We equate the
the two
two series,
series, given
given in
in (6.12)
(6.12) and
and (6.13),
(6.13), and obtain
and obtain

We can
We can then
then compute bl (t), b2 (t), ... by
bo(t),b\(t),b<2,(t),...
compute bo(t), solving these
by solving these ODEs,
ODEs, together
together with
with
the initial
the initial values
values obtained
obtained from
from the initial condition
the initial condition

u(x, to) = ,¢(x), 0< x < e.


Example 6.5.
Example 6.5. We
We continue
continue to
to consider the iron
consider the iron bar
bar of
of Example 6.1, now
Example 6.1, now with both
with both
ends insulated.
ends insulated. We
We must
must solve
solve the IBVP
the IB VP

au
pc at - K,
a2u
ax 2 = 0, ° < x < 50, t > 0,
u(x,O) = ,¢(x), < x
au
° < 50, (6.14)

ax (0, t) = 0, t > 0,
au
ax (50, t) = 0, t > 0,

where
where p, p, c, K, and
c, K" and '¢
ip are
are asas given before.
given before.
Before
Before solving
solving for u, we
for u, we note that it
note that it is
is easy
easy to
to predict the long-time
predict the long-time behavior
behavior
o f uu,, the
of the temperature.
temperature. Since
Since thethe bar
bar is
is completely
completely insulated
insulated and
and there
there isis no internal
no internal
source
source of of heat,
heat, the heat energy
the heat energy contained
contained in in the
the bar
bar at time 00 (represented
at time (represented by by the
the
initial value
initial value of
of u)
u) will
will flow
flow from
from hot
hot regions
regions toto colder
colder regions and eventually
regions and eventually reach
reach
equilibrium at
equilibrium at aa constant
constant temperature.
temperature. The The purpose
purpose of modeling this
of modeling this phenonemon
phenonemon
with
with the heat equation
the heat equation is to obtain
is to quantitative information
obtain quantitative information about
about this
this process—the
process-the
process is already
already understood
understood qualitatively.
qualitatively.
We write
We write
00

u(x, t) = bo(t) + 2..: bn(t) cos (n:ox)


n=l

and then
and then

Since the right-hand


Since the right-hand side
side of
of the
the PDE
PDE is
is zero, we obtain
zero, we obtain

Also,
Also,
00

,¢(x) = do + 2..: dn cos (n:ox) ,


n=1
6.2. Pure Neumann conditions and the Fourier
Fourier cosine series 237

where
where
1 (50 5
do = 5010 'l/J(x) dx = 2'
2 (50 (n1fX)
dn = 5010 'l/J(x) cos 50 dx
20 (2 cos (n1f /2) - 1 - (-1)n)
= 22
n1f
,n=1,2,3, ....

Since w(#,0) =
Since u(x,O) = 'l/J(x),
i£>(x), we
we have
have

that is,
that is,
bo(O) = do, bn(O) = d n , n = 1,2,3, ....
Thus we
Thus we solve
solve

to
to get
get
bo(t) =do ,
and
and

to get

where
where

Therefore,
Therefore,
00

u(x,t) = do + 2: dne->'nt cos (n1fx) ,


n=l 50
with ^0,^1,^2,...
with do ,d1 ,d2 , ... given
given above.
above. Figure
Figure 6.7 is analogous
analogous to
to Figures
Figures 6.1
6.1 and 6.6,
and 6.6,
showing
showing snapshots
snapshots of of the
the temperature
temperature distribution
distribution atat the
the same
same times
times as before. It
as before. It
also
also shows
shows the
the equilibrium
equilibrium temperature;
temperature; an inspection of
an inspection of the
the formula
formula for u(x,t)
for u(x, t)
makes
makes it
it clear
clear that u(x,t}t) ->
that u(x, --+ do
do == 5/2
5/2 as --+ oo.
as tt —> 00.

6.2.3
6.2.3 Pure Neumann conditions
conditions in a steady-state
steady-state BVP
The BVP
The BVP
~u
-r;, dx 2 = f(x), 0 < x < e,
~~ (0) = 0, (6.15)

~~(e) = 0,
238
238 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

5r-----~----~~~--~----r:==~~
- - t=O
4.5 - _. t=20
._.- t=60
4 t=300
- - t=oo
3.5

~3 ~
~ .,../ .........
w2.5~------------~~---------------------------~~------------~
0..
E
$ 2

10 20 30 40 50
x

Figure 6.7.
Figure 6.7. The
The solution u(x,t]t) from
solution u(x, from Example 6.5 at
Example 6.5 at times
times 0,
0, 20,
20, 60,
60, and
and
300 (seconds).
300 (seconds). Ten
Ten terms
terms of
of the
the Fourier series were
Fourier series were used
used to
to create
create these
these curves.
curves.

describes the
describes steady-state temperature
the steady-state distribution u(x)
temperature distribution u(x) inin aa completely
completely insulated
insulated
bar
bar with
with aa (time-independent)
(time-independent) heat source. Up
heat source. Up to this point,
to this each BVP
point, each BVP or or IBVP
IBVP
in Chapters
in Chapters 55 andand 66 hashas had
had aa unique solution for
unique solution for any
any reasonable choice of
reasonable choice the
of the
"ingredients" of
"ingredients" of the PDE: the
the PDE: coefficients (such
the coefficients (such as as the stiffness or
the stiffness or the heat con-
the heat con-
ductivity), the
ductivity), the initial
initial and
and boundary conditions, and
boundary conditions, and the right-hand-side function.
the right-hand-side function.
We have
We have not emphasized this
not emphasized point; rather,
this point; rather, we we have concentrated on
have concentrated on developing
developing
solution techniques.
solution However, we
techniques. However, we must
must now now address
address the the issues
issues of
of existence (does
existence (does
the problem have
the problem have aa solution?)
solution?) andand uniqueness
uniqueness (is (is there
there only
only one
one solution?).
solution?). The The
class of
class of PDEs
PDEs for for which
which we can demonstrate
we can demonstrate existence
existence and and uniqueness
uniqueness by by explicitly
explicitly
producing
producing thethe solution
solution is very small.
is very small. That
That is, there are
is, there are many
many PDEsPDEs for for which
which we we
cannot derive
cannot derive aa formula
formula forfor the solution; we
the solution; we can only approximate
can only approximate the the solution
solution by by
numerical methods. For
numerical methods. For those
those problems,
problems, we we need
need to to know
know thatthat aa unique
unique solution
solution
exists before
exists before we try to
we try approximate it.
to approximate it.
Indeed, this
Indeed, is an
this is issue with
an issue with the
the finite element method,
finite element although we
method, although we did
did not
not
acknowledge it
acknowledge it when
when we we first
first introduced
introduced the the technique.
technique. We showed in
We showed in Section
Section 5.55.5
that the Galerkin
that the Galerkin method,
method, on on which
which thethe finite element method
finite element method is is based,
based, produces
produces
the best approximation
the best approximation (in (in the
the energy
energy norm,
norm, and and from
from aa certain
certain subspace)
subspace) to the
to the
true solution. However,
true solution. However, we assumed in
we assumed that argument
in that argument that that aa true
true solution
solution existed,
existed,
and that
and that there
there was only one!
was only one!
The question
The question of of existence
existence and
and uniqueness
uniqueness is is not
not merely academic. The
merely academic. steady-
The steady-
state BVP
state BVP (6.15)
(6.15) demonstrates
demonstrates this-it
this—it is is aa physically meaningful problem
physically meaningful that aa
problem that
scientist may
scientist may wish
wish toto solve,
solve, and
and yet, as we
yet, as we are about to
are about show, either
to show, either it
it does
does not have
not have
Neumann conditions and the Fourier cosine series
6.2. Pure Neumann 239
239

aa solution
solution or
or the
the solution
solution is
is not
not unique!
unique! We
We already
already discussed
discussed this
this fact
fact in
in Examples
Examples
3.14 and 3.17 in Section 3.2. For emphasis, we we will repeat the
the justification from
several points of view.
view.

Physical reasoning
Physical reasoning
The source function ff(x) ( x ) in (6.15) represents
represents the rate at which (heat) energy is
added to
added to the
the bar (in units
bar (in units of energy per
of energy per time
time perper volume).
volume). It depends on
It depends (the
on x (the
position
position in the bar)
bar) because
because we we allow the possibility
possibility that different
different parts of the bar
bar
receive different
receive different amounts
amounts of of heat.
heat. However,
However, it it is independent of
is independent of time, indicating that
time, indicating that
the rate
the at which
rate at which energy
energy is added is
is added is constant.
constant. Clearly, for aa steady-state
Clearly, for steady-state solution
solution to
to
exist, the
exist, the total
total rate atat which energy
energy is
is added
added must be zero; if energy
zero; if energy is added
added to
to one
part of
part of the
the bar, it must
bar, it must be taken away
be taken from another
away from another part. Otherwise, the
part. Otherwise, the total
total heat
heat
energy in
energy in the bar would be constantlyconstantly growing or or shrinking,
shrinking, and thethe temperature
temperature
could not
could not bebe constant
constant with respect to
with respect to time.
time. All of this
All of this implies
implies that
that (6.15)
(6.15) may
may not
not
have aa solution;
have solution; whether
whether it it does
does depends
depends onon the properties of
the properties of /(#).
f(x).
On the
On the other
other hand,
hand, if if (6.15) does have
(6.15) does have aa solution,
solution, it
it cannot
cannot be unique. Know-
be unique. Know-
ing only that no net energy is being added to or taken from the bar does not tell
us how much energy is in the bar. That is, the energy, and hence the temperature, temperature,
is not
is uniquely determined
not uniquely determined by by the BVP.
the BVP.

Mathematical reasoning
Recall
Recall that
that ff(x) has units
( x ) has of energy
units of energy per
per unit
unit volume per unit
volume per time; the
unit time; the total
total rate
rate
at which
at energy is
which energy added to
is added to the
the bar
bar is
is

1i f(x)Adx,

where is the
where A is the cross-sectional
cross-sectional area
areaof
ofthe
the bar.
bar. By
Byphysical
physicalreasoning,
reasoning,weweconcluded
conclude
that
that
1£ f(x)A dx = 0,

or simply
or simply
1£ f(x) dx = 0, (6.16)

must
must hold in order
hold in for aa solution
order for solution to
to exist.
exist. But
But we
we can
can see
see this
this directly from the
directly from the
BVP. Suppose
Suppose uu is aa solution
solution to (6.15).
(6.15). Then
Then
{l (l dlu
io f(x) dx = -I), io dx 2 (x) dx

= -I),~(X)
d Ii
dx 0
du du
= 1),-(0)
dx
- /'i,-(£)
dx
= 0-0 = O.
240 Chapter 6.
Chapter Heat flow
6. Heat and diffusion
flow and diffusion

Thus,
Thus, if
if aa solution
solution exists,
exists, then
then the compatibility condition
the compatibility (6.16) holds.
condition (6.16) holds.
Now suppose that
Now suppose that aa solution
solution u of (6.15)
u of (6.15) does
does exist.
exist. Let
Let C be any constant,
be any constant,
and
and define
define aa function
function v by
by v(x) u(x] + C.
v(x) == u(x) Then we
C. Then we have
have
~v ~u ~u
-K, dx 2 (x) = -K, dx 2 (x) + 0 = -K, dx 2 (x) = f(x)

and
and
dv (0) = du (0) + 0 = du (0) = 0, dv (£) = du (£) + 0 = du (£) = O.
dx dx dx dx dx dx
Therefore,
Therefore, v is another solution
is another solution of
of (6.15),
(6.15), and
and this
this is
is true
true for any real
for any real number C.
number C.
This shows that if (6.15) has a solution, then it has infinitely many solutions.

The Fourier series


The Fourier method
series method

Suppose that,
Suppose that, rather than engage
rather than engage in
in the
the above
above reasoning,
reasoning, we
we just set out
just set out to
to solve
solve
(6.15)
(6.15) by
by the Fourier series
the Fourier series method.
method. Because
Because of
of the
the boundary
boundary conditions,
conditions, we write
we write
the solution as
the solution as aa cosine
cosine series:
series:
00

u(x) = bo + 2:: bncos (n;x).


n=l
2
Then, computing the
the cosine coefficients
coefficients of —d?u/dx
_~U/dX2(x)(x) in the
the usual way,
way, we have
have

~u ~ K,n 7r
2 2
(n7rx)
-K, dx 2 (x) = ~ ~bn cos -£-
n=l

(note that
(note that the constant term
the constant 60
term bo vanishes
vanishes when u(x) is
when u(x) differentiated). Also,
is differentiated). Also,
00

f(x) =eo+ 2:cnCOs(n;x),


n=l

where
where

eo = f
1
10{l f(x) dx, Cn =f
2
10(l f(x) cos (n7rx)
-£- dx, n = 1,2, ....

Equating the
Equating the series
series for K,d2 u / dx22(x)
for -—Kd?u/dx (x) andand /(#),
f (x), we find that
we find that the following equations
the following equations
must
must hold:
hold:
K,n 2 7r 2
0= Co, ~bn = Cn, n = 1,2, ....
Since the coefficient
Since co,ci,C2,...
coefficient eo,Cl,C2, ... are given and the
the coefficients
coefficients bo,bl,b
O o ? 0 i 5 022, , ...
- - - are
are to
to
be
be determined, we can
determined, we can choose
choose

and thereby satisfy


and satisfy all
all but the first equation.
equation. However,
However, the equation

eo = 0
6.2. Pure
6.2. Pure Neumann
Neumann conditions
conditions and
and the Fourier cosine
the Fourier series
cosine series 241
241

is not
is not aa condition
condition on
on the solution w,
the solution u, but rather on
but rather on the right-hand-side function
the right-hand-side function f./.
Indeed, no choice of u can
Indeed, can satisfy
satisfy this equation unless

Co = l1£ f(x)dx = o.
Thus we
Thus we see again that the compatibility
again that compatibility condition (6.16) must
condition (6.16) must hold in order
order for
(6.15) to
(6.15) to have
have aa solution.
solution.
Moreover,
Moreover, assuming
assuming that
that CQ = 00 does
Co = does hold,
hold, we see that
we see that the
the value
value ofof 60
bo is
is
undetermined
undetermined byby the
the BVP. Indeed, with
BVP. Indeed, Co =
with CQ =0,0,the
the general
generalsolution
solutionofofthe
the BVP
BVP isis
2
~ C cn (n1fx)
u(x) = bo + L..J /1,n 21f2 cos -C- ,
n=l

where 60
where bo can
can take on any
take on any value.
value. Thus,
Thus, when
when aa solution
solution exists,
exists, it is not
it is not unique.
unique.

Relationship to
Relationship the Fredholm
to the Fredholm alternative
alternative for
for symmetric linear systems
symmetric linear systems

If A
If R n x n is symmetric and singular (so that N(A)
A €E Rnxn A/"(A) contains nonzero vectors),
then
then the
the Fredholm
Fredholm alternative
alternative (Theorem 3.19) implies
(Theorem 3.19) implies that Ax =
that Ax =b has aa solution
b has solution
if
if and only if
and only if b is orthogonal
b is to AT
orthogonal to This is
(A). This
N(A). is the
the compatibility
compatibility condition for aa
condition for
symmetric, singular linear
symmetric, singular linear system.
system. The
The compatibility
compatibility condition (6.16) is
condition (6.16) is precisely
precisely
analogous,
analogous, as
as we
we now
now show.
show.
The operator
The operator LN (the negative
LN (the second derivative
negative second derivative operator,
operator, restricted to func-
restricted to func-
tions satisfying homogeneous
tions satisfying homogeneous Neumann conditions) is
Neumann conditions) symmetric. Moreover,
is symmetric. the
Moreover, the
null
null space
space of
of the
the operator
operator contains
contains nonzero functions, namely,
nonzero functions, namely, all
all nonzero solutions
nonzero solutions
to
to
~u
-/1, dx 2 = 0, 0 < x < C,

:: (0) = 0, (6.17)

du(C) = o.
dx
It is
It is easy
easy to show, by
to show, direct integration,
by direct integration, that
that the
the solution set consists
solution set consists ofof all
all constant
constant
functions defined on [0, Cl. Therefore, the
[0,£]. the compatibility
compatibility condition
condition suggested
suggested by the the
finite-dimensional
finite-dimensional situation is that
situation is (6.15) has
that (6.15) has aa solution
solution if
if and
and only if f/ is
only if orthogonal
is orthogonal
to
to every
every constant
constant function. But
function. But
(c, f) = 0 for all c E R
is
is equivalent to
equivalent to
1£ cf(x) dx = 0 for all c E R,
or simply
or simply to
to
1£ f(x) dx = o.
This
This is
is precisely (6.16).
precisely (6.16).
242
242 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

Summary
As the
As the above
above example
example shows,
shows, aa steady-state
steady-state (time-independent)
(time-independent) BVPBVP with
with pure
pure
Neumann conditions can have the property
Neumann property that either
either there is no solution
solution or there
there
is more
is more than one solution.
solution. It is
is important
important to note,
note, however,
however, that this
this situation
situation
depends on the differential
differential operator
operator as well
well as on the boundary conditions. For
example, the BVP

d2 u
-/'i, dx 2 + au = f(x), 0< x < i,

du (0) = 0, (6.18)
dx
du (i) =0
dx
(K, 0) has
(/'i" a > 0) has aa unique
unique solution,
solution, and
and there
there is no compatibility
is no compatibility condition
condition imposed
imposed
on f.
on /. The
The difference between (6.18)
difference between (6.18) and
and (6.15)
(6.15) is
is that
that the differential
differential operator
operator in
(6.18) involves
(6.18) involves the function uu itself,
the function itself, not
not just
just the derivatives of
the derivatives of u. Therefore, unlike
u. Therefore, unlike
(6.15), the addition of a constant
in problem (6.15), constant to u is not "invisible" to the PDE.

Exercises
1. Solve the IBVP
au a 2u
at - ax2 = 0, °< x < 1, t > 0,
u(x,O) = x(I- x), 0< x < 1,
au
ax (0, t) = 0, t > 0,
au
ax (1, t) = 0, t > 0,

and graph the


and graph solution at
the solution at times
times 0,0.02,0.04,0.06,
0,0.02,0.04,0.06, along
along with
with the steady-state
the steady-state
solution.
solution.
2. Solve
2. Solve the IBVP
the IBVP
au a 2u 1
at - ax2 = "2 - x, °< x < 1, t > 0,
u(x,O) = x(I - x), 0< x < 1,
au
ax (0, t) = 0, t > 0,
au
ax(I,t) =0, t>o

and graph the


and graph the solution
solution at
at times
times 0,0.02,0.04,0.06,
0,0.02,0.04,0.06, along with the
along with the steady-state
steady-state
solution.
solution.
3. (a) Show
Show that LN
Ljy is symmetric.
6.2. conditions and the Fourier cosine series
Pure Neumann conditions series 243

(b) Show that


(b) Show that the eigenvalues of
the eigenvalues of LN are nonnegative.
LN are nonnegative.
4.
4. Following Section 6.1.4,
Following Section 6.1.4, show
show how
how to
to solve
solve the
the following
following IBVP
IBVP with
with inhomo-
inhomo-
geneous Neumann
geneous conditions:
Neumann conditions:

au a2u
pc at - K, ax 2 = J(x, t), 0 < x <!!, t > to,
u(x, to) = 'l/J(x), 0 < x < !!,
au
ax (0, t) = aCt), t> to,
au
ax (!!, t) = bet), t > to·
5. (a)
5. (a) Consider
Consider the following BVP
the following (with inhomogeneous
BVP (with inhomogeneous Neumann
Neumann conditions):
conditions):

~u
-K, dx 2 = J(x), 0 < x < !!,
du
dx (0) = a,
du (!!) = b.
dx
Just as
Just as in
in the
the case
case of
of homogeneous
homogeneous Neumann
Neumann conditions,
conditions, if
if there
there is
is one
one
solution u(x),
solution w(x), there
there are
are in
in fact
fact infinitely
infinitely many
many solutions
solutions u(x)+C, where C
u(x}+C, where
is aa constant.
is constant. Also
Also as
as in
in the
the case
case of
of homogeneous
homogeneous Neumann conditions,
Neumann conditions,
there
there isis aa compatibility
compatibility condition
condition that
that the right-hand side
the right-hand side /(#) must
J(x) must
satisfy in
satisfy in order
order for
for aa solution
solution toto exist.
exist. What
What is
is it?
it?
(b) Does
(b) Does the
the BVP
BVP

~u
-K, dx 2 + u = J(x), 0 < x < !!,
du
dx (0) = a,
dUe!!) = b
dx
(note the
(note difference in
the difference in the differential equation)
the differential equation) require
require aa compatibility
compatibility
condition on
condition on /(#), or is
I(x), or is there
there aa solution
solution for
for every
every /I E
E C[O,!!]?
C[0, ^]? Justify
Justify
your answer.
your answer.

6. Consider
6. Consider aa copper
copper bar
bar (p == 8.96
8.96 g/ cm 33,, cc =
g/cm 0.385 JJ/(gK),
= 0.385 / (g K), K,« == 4.01
4.01 W
W/(cmK))
/ (cm K))
of length
of length 11 m and cross-sectional
m and cross-sectional area
area 22 cm cm22.. Suppose
Suppose the the sides
sides and
and the
the left
left
end (x =
end 0) are
= 0) are perfectly insulated and
perfectly insulated and that that heat is added
heat is added to (or taken
to (or taken from)
from)
the other
the other end
end (x = 100, x in
= 100, in centimeters)
centimeters) at at aa rate
rate of
of fJ(t) 0.1 sin
( t ) =— 0.1 sin (607rt) W.
(QQirt) W.
If the
If the initial
initial (t == 0)
0) temperature
temperature of of the
the bar bar is
is aa constant
constant 25 25 degrees
degrees Celsius,
Celsius,
find the
find the temperature
temperature distribution
distribution u(x,
u(x,t)t) of of the
the bar
bar by
by formulating
formulating and and solving
solving
an IBVP.
an IBVP.
244 Chapter
Chapter 6. Heat flow
6. Heat and diffusion
flow and diffusion

7. Consider the
7. Consider the IBVP
IBVP

au a u 2
at - = 0, 0 < x < l, t > 0,
{)x2

u(x,O) = 'lj;(x), 0< x < l,


{)u
ax (0, t) = 0, t > 0,
{)u
ax(l,t) = 0, t > 0.
Show that
Show that the solution u(x,
the solution u(x,t)t) satisfies
satisfies

lim u(x, t) = C for all x E (0, l),


t-+oo

for some
for some constant
constant C,
(7, and
and compute
compute C.
C.

8. Consider
8. Consider the
the experiment
experiment described
described in Exercise 6.1.8.
in Exercise 6.1.8. Suppose
Suppose that, after the
that, after the
20 minutes are
20 are up,
up, the ends
ends of the bar are
are removed
removed from thethe ice bath
bath and
and are
are
insulated. Compute the
insulated. Compute eventual steady-state
the eventual steady-state temperature
temperature distribution
distribution in the
in the
bar.
bar.

9. Repeat
9. Repeat Exercise
Exercise 8
8 for
for the
the copper bar described
copper bar described in Exercise 6.1.9.
in Exercise 6.1.9.
3
10. Consider
10. Consider an
an iron
iron bar
bar (p == 7.87
7.87 g/cm
g/cm3 ,, cc = 0.449 J/(gK), KK, =
= 0.449J/(gK), = 0.802
0.802 W/(cm
W /(cmK)) K))
of length
of length 11 m
m and
and cross-sectional area 2
cross-sectional area cm22.• Suppose
2 cm Suppose that the bar
that the is heated
bar is heated to to
aa constant
constant temperature
temperature of of 30
30 degrees
degrees Celsius,
Celsius, the
the left end (x = 0)
left end 0) is
is perfectly
perfectly
insulated, and
insulated, and heat
heat energy
energy is
is added
added toto (or
(or taken from) the
taken from) the right end (x —
right end = 100)
100)
at the
at the rate of 11W
rate of (the variable
W (the variable xx is
is given
given inin centimeters). Suppose further
centimeters). Suppose further
that
that heat energy is
heat energy is added
added to the interior
to the interior of
of the
the bar
bar at
at aa rate
rate of 0.1 W
of 0.1 /cm 33.•
W/cm

(a)
(a) Explain
Explain why
why the
the temperature
temperature will
will not
not reach steady state.
reach steady state.
(b) Compute
(b) Compute the
the temperature
temperature distribution t] by
distribution u(x, t) by formulating and solving
formulating and solving
the appropriate IBVP,
the appropriate IBVP, and
and verify that u(x, t) does
verify that does not approach aa steady
not approach steady
state.
state.
(c) Suppose
(c) Suppose that, instead of
that, instead of the
the left end's being
left end's being insulated,
insulated, heat energy is
heat energy is
removed from
removed from the
the left
left end
end of
of bar.
bar. At what rate
At what rate must energy be
must energy removed
be removed
if
if the
the temperature
temperature distribution
distribution isis to
to reach
reach aa steady
steady state?
state?
(d) Verify that
(d) Verify your answer
that your answer to
to the
the previous
previous part
part is
is correct
correct by formulating
by formulating
and solving
and the appropriate
solving the appropriate IBVP
IBVP and showing that
and showing approaches
u(x,t)t) approaches
that u(x,
a limit.
limit.
(e) Suppose
(e) Suppose that
that aa steady
steady state
state is
is to
to be
be achieved
achieved by holding the
by holding the temperature
temperature
at the
at the left
left end
end at
at aa fixed
fixed value.
value. What
What must the value
must the value be? Explain.
be? Explain.

11. The
11. The purpose of this
purpose of exercise is
this exercise is to show that
to show that if
if u(x, satisfies homogeneous
u(x,t)t) satisfies homogeneous
Neumann
Neumann conditions, and u(x,
conditions, and u(x,t)t) is represented by
is represented by aa Fourier
Fourier sine
sine series,
series, then
then aa
6.3. Periodic
6.3. Periodic boundary
boundary conditions
conditions and
and the Fourier series
the full Fourier series 245
245

2
formal calculation of
formal calculation of the Fourier sine
the Fourier sine series
series of
of —8 u/dx22(x,
-()2u/ax is invalid.
(x, t) is invalid. That
That
is, suppose
is, suppose

~
u(x, t) = ~ an(t) sm
. (nnx)
-e- , an(t) = "£2 io(l u(x, t) sm. (nnx)
-e- dx
n=l 0

and u satisfies
au au
ax (0, t) = ax (e, t) = 0 for all t > O.
We wish to show
We show that

(6.19)

2 2
does not represent
does —d
represent -a u/dx2 2(x,
u/ax (x,t).
t).

(a) Show
(a) Show that
that the method of
the method Sections 6.1
of Sections 6.1 and
and 6.2.2
6.2.2 (two
(two applications of inte-
applications of inte-
gration by
gration by parts) cannot be
parts) cannot be used
used toto compute
compute thethe Fourier sine coefficients
Fourier sine coefficients
of -d22u/dx
of -a 2(x, t) in
u/ax2(x,t) in terms of al
terms of ai(t),O2(t),—
(t), a2(t), ....
(b) Let u(x,
(b) Let and e
t} == tt and
u(x, t) t — Compute the
\. Compute
= 1. the Fourier
Fourier sine coefficients
sine coefficients

of u. Then compute the series


of series (6.19), and
and explain
explain why it
it does
does not
not equal
equal
-d22u/dx
-a u/ax2(x,t).
2
(x, t).

6.3
6.3 Periodic boundary
Periodic boundary conditions
conditions and
and the
the full
full Fourier
Fourier
series
series
We
We now
now consider
consider the
the case of aa circular
case of circular (instead of straight)
(instead of straight) bar, specifically, aa set
bar, specifically, set
of
of the form
the form

(see
(see Figure 6.8). We
Figure 6.8). can model
We can model the
the flow
flow of
of heat in the
heat in the ring by the
ring by the heat equation
heat equation

au a2 u
pc at - K, ax 2 = 0;

however, the
however, variable x,
the variable x, representing
representing thethe cross-section
cross-section of the bar,
of the is now
bar, is now related to
related to
the polar angle O. 9. Purely for mathematical
mathematical convenience,
convenience, wewe will assume that the
length of
length of the
the bar
bar is
is 21, and we
2£, and will label
we will label the
the cross-sections
cross-sections by
by xx €E (-e, el, where
(—£,^j, where
x= oe/n. In
= Oi/7r. In particular,
particular, x — -e and
= —t and x = = te now
now represent
represent the
the same
same cross-section
cross-section of
of
the bar.
the bar.
There is
There is an
an additional level of
additional level approximation involved
of approximation in modeling
involved in modeling heat
heat flow
flow in
in
aa circular
circular bar
bar (as
(as compared
compared toto aa straight
straight bar)
bar) by
by the
the one-dimensional
one-dimensional heat
heat equation.
equation.
246
246 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

Figure 6.8. A circular


Figure 6.8. circular bar.
bar.

We mentioned
We mentioned earlier
earlier that,
that, inin the
the case
case of of the straight bar,
the straight bar, ifif the
the initial temperature
initial temperature
distribution and
distribution and the
the heat source depend
heat source depend onlyonly onon the
the longitudinal
longitudinal coordinate,
coordinate, then
then
so does the temperature
temperature distribution for for any subsequent time. This is not the case
for aa circular
for circular bar, as the
bar, as the geometry suggests (for
geometry suggests (for example,
example, the the distance
distance around
around the
the
ring varies
ring varies from
from 2C 2-jrS to
It -— 2m5 It +
to 2C + 21[(5, depending on
2-jrS, depending on the path). Nevertheless,
the path). Nevertheless, thethe
modeling error
modeling error involved
involved in in using the one-dimensional
using the one-dimensional heat heat equation
equation isis not large
not large
when the
when the bar is thin
bar is thin (Le.
(i.e. when is small
when 86 is small compared
compared to to f).
t).
We will consider
We will consider anan initial
initial condition
condition as as before:
before:

u(x, to) = 'l/J(x), -f < x ~ f.

A ring does not have physical boundaries as a straight


straight bar does (a ring has a lateral
boundary, which
boundary, which wewe still
still assume
assume to
to be
be insulated,
insulated, but it does
but it does not
not have
have "ends").
"ends").
However, since xx == -f
However, since represents the
— t represents the same
same cross-section
cross-section as
as does
does xx == f,
l,we still have
we still have
boundary conditions:
ou ou
u(-f,t) = u(f,t), ox (-f,t) = ox(f,t), t > to

(the temperature
(the and temperature
temperature and gradient must
temperature gradient be the
must be the same
same whether
whether wewe identify
identify
the cross-section
the by xx = -f
cross-section by or by x = f).
—lorbyx These equations
l). These equations are
are referred
referred to as periodic
to as periodic
boundary conditions.
boundary conditions.
We therefore wish to solve the following IBVP:

ou 82 u
pc 8t - fi, < x < f, t > to,
ox 2 = f(x, t), -f
u(x, to) = 'l/J(x), -f < x < f, (6.20)
u( -f, t) = u(f, t), t> to,
ou ou
ox (-f, t) = 8x (f, t), t> to·
6.3. Periodic boundary
6.3. boundary conditions and the full Fourier series 247
247

As
As we
we have
have seen
seen several times now,
several times now, the
the first step is
first step is to develop aa Fourier
to develop Fourier series
series
method for the
method for the related
related BVP
d2 u
-/'i, = lex), -f::; x < f,
dx 2
u( -f) = u(f), (6.21)
du (-f) = du (f).
dx dx
**j
6.3.1
6.3.1 Eigenpairs of
Eigenpairs d~2 under
of -— -£-5 under periodic
periodic boundary
boundary conditions
conditions
We define
We define Lp: C;[-f,fJ-t C[-f,fJ by

where
C;[-f,f] = {u E C 2 [-f,f] : u(-f) = u(f), ~~(-f) = ~~(f)}.
Using
Using techniques
techniques that
that are
are by now familiar,
by now familiar, the
the reader should be
reader should be able
able to demonstrate
to demonstrate
that
that
Lp is
• Lp is symmetric, and
symmetric, and

• Lp has no negative eigenvalues


eigenvalues
(see Exercise 5).
We first observe
We first observe that AO = 00 is
that AQ is anan eigenvalue
eigenvalue of
of L
L pp,, and
and aa corresponding
corresponding
eigenfunction
eigenfunction is ggo(x)
Q (x) —
= I.
1. Indeed, it is straightforward
straightforward to show that the only
solutions to
solutions to
d2 u
- dx 2 = 0, -f < x < f,
u( -e) = u(£),
dUe_f) = dUCf)
dx dx
are the constant
constant functions.
We next consider
consider positive eigenvalues.
eigenvalues. Suppose
Suppose A = 02, 09 > O.
= (j2, 0. We
We must solve

~u 2
--=Ou
dx 2 -f<x<f ,
,-

u( -E) = u(E), (6.22)


du C-E) = du (E).
dx dx
The general solution to the differential
differential equation
equation is

u(x) = Cl cos (Ox) + C2 sin (Ox).


248 Chapter 6.
Chapter Heat flow
6. Heat flow and
and diffusion
diffusion

The first
The first boundary
boundary condition
condition yields
yields the equation
the equation

Cl cos (OC) + C2 sin (OC) = Cl cos (OC) - C2 sin (OC),

while the
while the second
second yields

Since 8 > 0,
Since 0 0, these
these equations
equations reduce to
reduce to

C2 = ° or sin (8C) = °
and
and
Cl = °or sin (OC) = 0,
respectively. It follows that the only nonzero solutions
respectively. solutions of (6.22) correspond to
(6.22) correspond to
n21l"2
A= T' n = 1,2,3, ... ,
and,
and, moreover,
moreover, that
that with one of
with one of these values for
these values for A,
A, every
every function
function of
of the form
the form

cos (Ox) or sin (Ox)

satisfies (6.22).
satisfies (6.22).
Now,
Now,
cos (n;x) and sin (n;x)
are linearly
are linearly independent, which means
means that there are are two independent eigenfunc-
two independent eigenfunc-
tions
tions for each positive
for each positive eigenvalue,
eigenvalue, aa situation
situation we
we have
have not seen before.
not seen before. The complete
The complete
list of eigenpairs
list eigenpairs for
for the negative second
the negative second derivative operator, subject
derivative operator, subject to
to periodic
periodic
boundary
boundary conditions,
conditions, is
is

Ao = 0, 'Yo(x) = 1;
2
n 1l"2' 'Yn(X) = cos (n1l"x)
An =T -C- , n = 1,2,3, ... , (6.23)

n21l"2 (n1l"x)
An = T ' '¢n(X) = sin -C- , n = 1,2,3, ....
We know
We know that, since L
that, since is symmetric,
Lpp is eigenfunctions corresponding
symmetric, eigenfunctions corresponding to
to distinct eigen-
distinct eigen-
values are orthogonal.
values That is,
orthogonal. That is, if m
m^=f. n,
n, then
m1l"X)
cos ( -C-

is orthogonal to
is orthogonal to both
both
n1l"X) and sm
cos ( -C- . (n1l"x)
-C- .
Similarly,
Similarly,
. (m1l"x)
sm --
C
6.3.
6.3. Periodic boundary conditions and
and the full Fourier series 249

is orthogonal
is orthogonal to
to both
both
nKX) and sm
cos ( -e- . (nKX)
-e- .
There is
There is no
no aa priori guarantee that
priori guarantee the two
that the two eigenfunctions
eigenfunctions corresponding
corresponding toto AAmm are
are
orthogonal to
orthogonal each other.
to each other. However,
However, aa direct calculation shows
direct calculation shows this
this to be true.
to be true. We
We
can also
can also calculate
calculate
(1,1) = 2e, bn, 'Yn) = ('l/Jn, 'l/Jn) = e, n = 1,2,3, .... (6.24)
The lull
The full Fourier series of
Fourier series of aa function
function I/ E C[-e, £] is
€ C[—t,(\ given by
is given by

where
where

ao 1
= 2£
ji I(x) dx,
-i

an =£1 ji
_/(x)cos (nKX)
-£- dx, n=1,2,3, ... , (6.25)

bn = ~ ii/(X) sin (n;x) dx, n = 1,2,3, .. ..

We will
We show in
will show Section 9.6
in Section 9.6 that the full
that the full Fourier
Fourier series
series of C[ -e, I]£] function
of aa C[—l, function con-
con-
verges
verges to it in
to it in the
the mean-square sense (that
mean-square sense is, that
(that is, that the sequence of
the sequence of partial
partial Fourier
Fourier
series converges
series converges to to the
the function in the
function in the I/L 22-norm).

6.3.2
6.3.2 BVP using the full Fourier series
Solving the BVP
We now
We show how
now show how toto solve
solve the BVP (6.21)
the BVP using the
(6.21) using full Fourier
the full Fourier series.
series. Since
Since the
the
method should by
method should by now
now be familiar, we
be familiar, we leave the intermediate
leave the steps to
intermediate steps to the
the exercises.
exercises.
We
We write the (unknown)
write the (unknown) solution
solution of
of (6.21)
(6.21) as
as
00

u(x) = ao + 2:= {an cos (n;x) + bn sin (n;x) } , (6.26)


n=l

where the
the coefficients
coefficients ao, ai, 02, ...
aI, a2, • • • ,, &i,
b1 , b&2, • • • are
2, ... are to
to be
be determined. Then u au- au-
tomatically satisfies
tomatically satisfies the
the periodic
periodic boundary conditions. The
boundary conditions. full Fourier
The full series for
Fourier series for
-d u/dx22 is
—d22ujdx is given
given by
by

~u 00 {K,n K2 (nKX) 2
K,n K2 (nKX)} 2
-K,dx2(X)=~ an~cos -e- +bn~sin -e- (6.27)

(see Exercise
(see Exercise 6).
6).
We
We now assume that
now assume that the
the source
source function
function I/ has full Fourier
has full series
Fourier series
00

I(x) = C{) + 2:= {en cos (n;x) + dnsin (n;x) } ,


n=l
250
250 Chapter
Chapter 6. Heat flow
6. Heat and diffusion
flow and diffusion

where the
the coefficients
coefficients CQ,
Co, ci, C 2 ..•
Cl, e2, , . . . ,d
, d 1i ,,fife? • • • can
d2 , •.. can be determined
determined explicitly, since f/
explicitly, since
is
is known. Then the
known. Then differential equation
the differential equation

~u
-r;, dx 2 = f(x) (6.28)

implies that
implies that the
the Fourier
Fourier series
series (6.27)
(6.27) and
and (6.28)
(6.28) are
are equal
equal and
and hence
hence that
that

0= Co,
r;,n 2 7r 2
~an=en'

r;,n 2 7r 2
~bn=dn.

From these
From these equations,
equations, we deduce first
we deduce first of
of all
all that the source
that the source function
function f/ must
must satisfy
satisfy
the compatibility
the compatibility condition
condition
i£/(X)dX = 0 (6.29)

in order
in order for
for aa solution
solution to
to exist.
exist. If
If (6.29)
(6.29) holds,
holds, then
then we
we have
have

but is not
do is
but ao determined by
not determined by the
the differential
differential equation
equation or
or by
by the
the boundary
boundary conditions.
conditions
Therefore, for
Therefore, any ao,
for any CIQ,

is aa solution
is solution to (6.21) (again,
to (6.21) (again, assuming
assuming that
that (6.29) holds).
(6.29) holds).

Example 6.6.
Example 6.6. We
We consider
consider aa thin
thin gold ring, of
gold ring, of radius 1cm. In
radius 1em. the above
In the above notation,
notation,
then, fI =
then, TT. The
= 7r. The material
material properties of gold
properties of are
gold are
3
p=l9.3g/cm c = 0.129 Jf(gK), r;,=3.17W/(cmK).
p=19.3g/cm3,, e=0.129J/(gK), K = 3.17 W/(cmK).

We assume
We assume that
that heat
heat energy
energy is
is being
being added
added to
to the
the ring
ring at
at the
the rate
rate of
of

Since
Since
i: f(x) dx = 0,
and the full Fourier series
6.3. Periodic boundary conditions and 251
251

the BVP
BVP
J2u
-I\, dx 2 = f(x), -7f < x < 7f,
u( -7f) = u(7f),
du du
dx (-7f) = dx (7f)
has aa solution.
has solution. We
We write
write
00

u(x) = L (an cos (nx) + bn sin (nx))


n=l

(we take
{we ao == 0,
take ao 0, thus
thus choosing
choosing one
one of
of the
the infinitely
infinitely many
many solutions). We then
solutions}. We then have
have

-I\, ~~ (x) = f:
n=l
(I\,n 2 a n cos (nx) + I\,n 2 bn sin (nx)) .

Also,
Also,
00

f (x) =L (c n cos (nx) + dn sin (nx)) ,


n=l
where
where

Cn = -1111"f(x) cos (nx) dx = 0, n = 1,2,3, ... ,


7f -11"
1111". 6(-1)n
dn = - f(x) sm (nx) dx = 3 ' n = 1,2,3, ....
7f -11" 5n

(The value
(The of Co
value of CQ is
is already
already known
known to be zero
to be since f satisfies
zero since satisfies the
the compatibility
compatibility con-
con-
dition.) Equating
dition.) the last
Equating the last two
two series yields
series yields

2 Cn
I\,n an = Cn :::} an = -I\,n
2 = 0, n = 1,2,3, ... ,
2 n d 12(-1)n
I\,n bn = dn :::} bn = -I\,n2 = 10 5 ' n
I\,n
= 1,2,3, ....
Thus
Thus
12(-1)n .
u(x) = L00

n=l
10
I\,n
sm (nx).
5

A
A graph
graph of
of uu is
is shown
shown inin Figure
Figure 6.9.
6.9. We
We emphasize
emphasize that
that this
this solution
solution really only
really only
shows the
shows the variation
variation inin the
the temperature-the
temperature—the true
true temperature
temperature is u(x) +
is u(x) +C C for some
for some
real number
real number C.C. The
The assumptions
assumptions above
above do
do not
not give enough
enough information
information to to determine
determine
C; we
C; we would
would have
have toto know
know the
the amount
amount ofof heat
heat energy
energy in
in the
the ring
ring before
before the
the heat
heat
source ff is
source is applied.
applied.
252 Chapter 6. Heat flow and diffusion
diffusion

0.5,.,.-----,,.-----.---r----r--.....----n

0.4

0.3

~ 0.1
ca
Iii
a.
0
E
2-0.1

-0.2

-0.3

-0.4

-0.5 ........----''---.........- - ' - - - - ' - - - . & . - -.........


-3 -2 -1 0 2 3
x

Figure
Figure 6.9. temperature distribution in Example 6.6.
6.9. The tempemture 6.6. This graph
gmph was
computed using 10 terms of
computed of the Fourier series.

6.3.3
6.3.3 Solving
Solving the
the IBVP using the
I BVP using the full Fourier series
full Fourier series
Now
Now we solve the
we solve the IVP
IVP (6.20)
(6.20) for
for the
the heat
heat equation,
equation, using
using aa full
full Fourier
Fourier series
series
representation of the
representation of solution. As
the solution. As in
in the
the previous
previous section,
section, the
the technique
technique should
should by
by
now
now be
be familiar, and we
familiar, and we will
will leave
leave many of the
many of supporting computations
the supporting computations as exercises.
as exercises.
Let u(x, t)
Let t) be
be the
the solution
solution to (6.20). We
to (6.20). We express as aa full
express u as full Fourier
Fourier series
series with
with
time-varying
time-varying Fourier coefficients:
Fourier coefficients:
00

u(x, t) = ao(t) + L {an(t) cos (n;x) + bn(t) sin (n;x) } . (6.30)


n=l

The
The series -l'i.J2u/dx22 is
for —Kd?u/dx
series for is

(6.31)

As
As for
for the
the time
time derivative,
derivative, we
we can apply Theorem
can apply Theorem 2.1
2.1 to obtain
to obtain

au dao ~ {dan (n1fx) db n . (n1fx)}


at (x, t) = (jt(t) + ~ dt (t) cos -e- + (jt(t) sm -e- (6.32)

(see Exercise
(see Exercise 8).
8).
6.3. Periodic boundary
boundary conditions and the full Fourier series 253

We
We then
then write
write the
the source
source term
term /(#,£)
f(x, t) as
as the
the (time-varying)
(time-varying) full
full Fourier series,
Fourier series,
00

f(x, t) = co(t) + L {cn(t) cos (n;x) + dn(t) sin (n;x)}, (6.33)


n=l

where the Fourier coefficients


coefficients can be computed explicitly from

co(t) = ;e il/(X, t) dx,

cn(t) = eIII f(x, t) cos (n7rx)


_£ -e- dx, n = 1,2,3, ... ,
dn(t) = ~ ill f(x, t) sin (n;x) dx, n = 1,2,3, ... .

Substituting (6.31),
Substituting (6.31), (6.32),
(6.32), and
and (6.33)
(6.33) into
into the
the heat
heat equation
equation and equating
and equating
coefficients yield
coefficients
dao
pCTt(t) = eo(t),
2 2
dan r;,n 7r
pc dt (t) + ~an(t) = cn(t), n = 1,2,3, ... , (6.34)
db n r;,n 2 7r 2
pcdt(t) + ~bn(t) = dn(t), n = 1,2,3, ....

We can solve these ODEs for the derived initial


the unknown coefficients once we have derived
conditions. These
These come from the initial condition for the PDE, just just as in Section
6.1. We write the
6.1. initial value 1jJ(x)
the initial ib(x] in aa full Fourier series, sav
say
00

1jJ(x) = Po + L {Pn cos (n;x) + qn sin (n;x)} . (6.35)


n=l

We also have
have
00

1jJ(x) = u(x, 0) = ao(O) + L {an(O) cos (n;x) + bn(O) sin (n;x) } .


n=l

This yields the initial


initial conditions

ao(O) = Po,
an(O) = Pn, n = 1,2,3, ... , (6.36)
bn(O) = qn, n = 1,2,3, ... .
Solving the IVPs defined by (6.34) and (6.36) yields

ao(t),al(t),a2(t), ... ,b 1 (t),b 2(t), ... ,


and
and then u(x,t)t) is
then u(x, is given
given by
by (6.30),
(6.30).
254 Chapter 6. Heat flow and
and diffusion

Example 6.7.
Example 6.7. WeWe consider again the
consider again the ring
ring of
of Example 6.6. We
Example 6.6. We will assume that
will assume that
the temperature
the temperature in
(t measured
(t measured in
in the
the ring
in seconds),
ring is
seconds), heat
is initially
heat energy
energy is
25 degrees
initially 25 degrees Celsius,
is added
Celsius, and
according to
added according
and that at time
that at
the function
to the function ff given
=0
time tt =
in
given in
°
that example.
that example. WeWe wish
wish toto find
findu(x,t],
u(x, t), which
which describes the evolution
describes the evolution of temperature
of temperature
in the
in the ring.
ring. To
To do this, we
do this, we solve the IBVP
solve the IBVP

{)u {)2U
pc {)t -,.;, {)x 2 = f(x), < x < Jr, t> 0,
-Jr

u(x,O) = 25, -Jr < x < Jr, (6.37)


u( -Jr, t) = u(Jr, t), t > 0,
{)U {)u
{)t (-Jr,t) = {)t (Jr,t), t > 0.

We write
We write the
the solution
solution as
as
00

u(x, t) = ao(t) +L {an(t) cos (nx) + bn(t) sin (nx)}.


n=l

We already
We already have
have the
the full
full Fourier
Fourier series
series of
of ff,, and
and the
the initial
initial temperature
temperature distribution
distribution
is given
is by aa full
given by full Fourier
Fourier series with exactly
series with exactly one
one nonzero
nonzero term,
term, namely,
namely, the constant
the constant
term 25. We
term 25. We must
must therefore
therefore solve the IVPs
solve the IVPs

da o
pCTt = 0, ao(O) = 25,
pc dan
dt +,.;,n2 an = 0, an ( °=
)
0, n = 1,2,3, ... ,
db n 2
pCTt+,.;,nbn=dn, ( )
bnO =0, n=1,2,3, ....

The solutions
The solutions are
are

ao(t) = 25,
an(t) = 0, n = 1,2,3, ... ,
12(-1)npC ( _I<n 2t )
bn(t) = 5 1 - e pc ,n = 1,2,3, ....
10,.;,n

Therefore, the
Therefore, the solution is
solution is

u(x, t) = 25 + ~
~
12(-1)n ( 1<,,2 )
10,.;,n5 1 - e-pc-t sin (nx).
n=l

Snapshots
Snapshots ofof this
this temperature
temperature distribution
distribution are
are shown
shown inin Figure 6.10. The
Figure 6.10. The reader
reader
should notice the
should notice the relationship between the
relationship between the steady-state temperature of
steady-state temperature of the
the ring
ring and
and
the solution
the solution to
to the
the previous example.
previous example.
6.3. Periodic boundary
boundary conditions
conditions and the full Fourier series 255

25.5
- t=O
25.4 - _. t=O.25
t=O.5
25.3 t=1
o t=oo
25.2

~25.1
:::J
~
Q) 2
0. ~,~....... ,":t)
E 0.'"
ao· ....... __
-- .. '" "'--
,,'~
224.9 ° v

....:. "," -,- ,~'~".'.~·l


',.... - - - - ....
0

24.8

24.7

24.6

24.5
-3 -2 -1 o 2 3
x

Figure
Figure 6.10. w(x,t)
6.10. The solution u(x, t) to Example
Example 6.7 at times 0, 0.25, 0.5,
0, 0.25,
and 11 (seconds),
(seconds), along with the steady-state solution. These solutions were estimated
estimated
using 10 terms in the Fourier series.

Exercises
1. Repeat
1. Repeat Example
Example 6.6, 6.6, assuming
assuming the
the ring
ring is
is made
made of silver instead
of silver of gold:
instead of gold:
= 10.5
pp = g/cm33, , cc =
10.5g/cm = 0.235 J/(gK), «K, == 4.29
O.235J/(gK), W/(cm K). How
4.29W/(cmK). How does
does the steady-
the steady-
state temperature
temperature compare to that of of the gold ring?
2. Repeat
Repeat Example 6.7, assuming the the ring is made of silver instead
instead of gold:
3
= 10.5g/cm
pp = IO.5g/cm3, = 0.235
, cc = J/(gK), K
O.235J/(gK), = 4.29W/(cmK).
K, = 4.29W/(cmK).
3. Consider aa ring, 55cm
3. cm in radius, made of lead (which has physical properties
properties
= 11.3
pp = g/cm33,, cc =
11.3g/cm = 0.129
O.129J/(gK), = 0.353
J/(gK), «K, = W/(cm K)). Suppose,
O.353W/(cmK)). Suppose, by
by heating
heating
one side of
one side of the
the ring,
ring, the
the temperature distribution
temperature distribution

is induced. Suppose
Suppose the heat source is then removed and the ring is allowed
heat source
to cool.
(a)
(a) Write
Write down
down an
an IBVP
IBVP describing
describing the cooling of
the cooling of the ring.
the ring.
(b) Solve the
(b) Solve IBVP.
the IBVP.
(c) Find the steady-state temperature
(c) Find the steady-state temperature ofof the
the ring.
ring.
(d)
(d) How
How long
long does
does it
it take
take the
the ring
ring to
to reach
reach steady state (within
steady state (within 1%)?
1%)?
256 Chapter 6. Heat flow and diffusion
diffusion

4. Consider
4. Consider the lead ring
the lead ring of
of the
the previous
previous exercise.
exercise. Suppose
Suppose the temperature is
the temperature is
constant 25
a constant 25 degrees Celsius,
Celsius, and an (uneven)
(uneven) heat source is
is applied to the
the
ring. If
If the heat source delivers heat
heat energy to the ring at a rate of
of

f(x) = 1- ~~ Wjcm 3 ,
how long does it take for for the temperature
temperature at the hottest
hottest part of the ring to
rpa.rh 30 degrees
reach HPCTTPPS Celsius?
("Iplsiiifi?

5. (a)
5. (a) Show
Show that
that L
Lpp is
is symmetric.
symmetric.
Lpp does not have any negative eigenvalues.
(b) Show that L

6. Assuming
6. Assuming thatthat u is
is aa smooth
smooth function
function defined on [-£,
defined on [—£, £],
£l, the full Fourier
the full series
Fourier series
of uu is given by (6.26), and uu satisfies periodic boundary conditions,
periodic boundary conditions, show that
the full
the full Fourier series of
Fourier series of -d ujdx22 is
—d^u/dx
2
is given by (6.27).
given by (6.27).

7. Justify the compatibility


compatibility condition
condition (6.29)

(a) by physical reasoning (assume that (6.21) models a steady-state


steady-state temper-
ature distribution
ature distribution in
in aa circular ring);
circular ring);
differential equation
(b) by using the differential equation

~u
- dx 2 (x) = f(x), -£ < x < £,

and the periodic boundary conditions to compute

i: f(x)dx;

(c) by analogy to the compatibility condition given in the Fredholm


Predholm alter-
native.

8. Show that the Fourier series representation


representation (6.32)
(6.32) follows from (6.30)
(6.30) and
Theorem 2.1.

6.4
6.4 Finite element
Finite element methods
methods for the heat
for the heat equation
equation
To apply the Fourier series method to the heat equation, we we used the familiar
represent the spatial variation of the solution, while
eigenfunctions to represent while allowing the
Fourier coefficients
Fourier coefficients to
to depend
depend onon time.
time. We
We then
then found
found the values of
the values of these
these Fourier
Fourier
coefficients by solving
coefficients by solving ODEs.
ODEs. We can can use the finite element
element method in anan analogous
analogous
fashion. We
fashion. We use finite element
use finite element functions
functions to approximate the
to approximate the spatial
spatial variation of the
variation of the
solution, while
solution, while the
the coefficients
coefficients in
in the
the representation
representation depend
depend on
on time.
time. We end
end upup
with
with aa system
system ofof ODEs
ODEs whose
whose solution
solution yields
yields the
the unknown coefficients.
unknown coefficients.
6.4. Finite
6.4. Finite element
element methods
methods for
for the
the heat
heat equation
equation 257

We
We will
will consider again the
consider again following IBVP:
the following IBVP:

{)u
pc {)t - /'i,
{)2U
{)x 2 °< x < e, t > to,
= I(x, t),
u(x, to) = 'Ij!(x), °< x < e, (6.38)
u(O, t) = 0, t > to,
u(e,t) = 0, t > to.

We begin
We begin by deriving the
by deriving weak form
the weak form of
of the IBVP, following
the IBVP, following the
the pattern of Section
pattern of Section
5.4.2 (multiply
5.4.2 (multiply the
the differential
differential equation
equation by
by aa test
test function
function and
and integrate
integrate by parts
by parts
on the
on left). In
the left). In the
the following
following calculation,
calculation, V is the
V is the same
same space
space of
of test
test functions
functions used
used
for the
for the problem
problem inin statics:
statics:
V = cb[o,e].
We have
We have
{)u
pc {)t - /'i,
{)2u
{)x 2 = I(x, t), °< x < t, t > to
=}
{)u
pc {)t (x, t)v(x) - /'i,
{)2U
{)x 2 (x, t)v(x) = I(x, t)v(x), °< x < t, t> to, v EV

=} 1£ {pc ~~ (x, t)v(x) - /'i, ~:~ (x, t)v(x)} dx = 1£ I(x, t)v(x) dx, t> to, v E V.

We integrate
We integrate by
by parts in the
parts in the second
second term
term on
on the
the left;
left; the
the boundary term from
boundary term from
integration by
integration by parts vanishes because
parts vanishes because of
of the
the boundary
boundary conditions
conditions on
on the test function
the test function
and we
v(x), and
vex), we obtain
obtain

1£ {pc ~~ (x, t)v(x) + /'i, ~~ (x, t) :: (x) } dx


£
= 10 I(x, t)v(x) dx, t> to for all v E V.

This is
This is the
the weak
weak form
form of
of the
the IBVP.
IBVP. To
To get
get an
an approximate
approximate solution,
solution, we
we apply
apply the
the
Galerkin method
Galerkin with approximating
method with approximating subspace
subspace

Sn = {p:
Sn [0, e]
{p '• [0, f\ -+ R :: p is
—> R is continuous
continuous and
and piecewise
piecewise linear, p(O) =
linear, p(0) pee) = O}
= p(t] 0}
= span{¢h,CP2,
= span{0i,0 2 ,...,0n-i},
... ,CPn-d,

where the piecewise


where the
= t and
xn =
xn
piecewise linear
and {0i,
{CPI, 02?
linear functions
CP2, •...
functions are
• • ,, 0n-i}
CPn-l} is is the
are defined
defined on
the standard
standard basis
on the grid 0 =
the grid
basis defined
defined in
= XQ
in the
x\ < ...
Xo < Xl
the previous
••• <
chapter.
previous chapter.
°
For each
For each t,t, the
the function
function u(·, must lie
u(-,t]t) must lie in
in S n, that
Sn, that is,
is,

n-l
un(x, t) = L D:i(t)cpi(X). (6.39)
i=l
258 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

Galerkin's method
Galerkin's method leads
leads to
to

10£ {PC a;t n


(x, t)v(x) + '" ~:n (x, t) ~~ (X)} dx

= 10£ !(x, t)v(x) dx for all v E Sn, t> to,

or
or

i o
f { aU n ( ) ( )
pC7it x, t cPi X + '" aU
n ( ) dcPi )}
ax x, t dx (x dx

= Ioi !(x, t) cPi (x) dx, t > to, i = 1,2, ... , n -1.(6.40)
Substituting (6.39)
Substituting (6.39) into
into (6.40)
(6.40) yields,
yields, for
for tt > to and ii =
to and = 1,2,
1,2, ...
. . . ,, n
n -— 1,1,

If we
If we now
now define
define the
the mass matrix matrix
matrix M
M and
and the
the stiffness K by
stiffness matrix K by

Mij
Mij == 10
r
i
I pc(f)j(x)(f)i(x}dx,
pecPj (X)cPi(X) dx, Kij
Kij == 10
I r '" dcP'
f
a:: (x) dcPi
K—^-(x)^ ±
(x)dx,
dx (x) dx,
Jo Jo dx dx
and the
and the vector-valued
vector-valued functions
functions f(t)
f (t} and
and a(t)
a(t) by
by

f(t) =

then we
then we can
can write (6.41) as
write (6.41) as
da
M dt + Ka = f(t).
(The names "mass matrix" and "stiffness for M and K, respectively,
"stiffness matrix" for respectively, arise
from the interpretation for similar matrices appearing in mechanical models. We
stiffness matrix in Chapter 5;
have already seen the stiffness 5; we will see the mass matrix in
Chapter 7. In the context of the heat equation, these names
Chapter 7. In the context of the heat equation, these names are
are not
not particularly
particularly
meaningful, but the
meaningful, but the usage
usage isis well
well established.)
established.)
The initial
The initial condition
condition u(x,
u(x,to) ip(x), 00 < x < lt can
to) == 'I/J(x), can be
be approximately
approximately imple-
imple-
mented as
mented as
n-l n-l

un(x, to) = L ai(to)cPi(X) = L 'I/J(Xi)cPi(X),


i=l i=l
6.4. Finite element methods for the heat equation
6.4. 259

that is, as ai(to) = '¢(Xi). function


if>(xi). This is reasonable, because the function
n-l
,(f;(x) = L '¢(Xi)(Pi(X)
i=l

satisfies
n-l

,(f;(Xj) = L ,¢(Xi)(Pi(Xj) = '¢(Xj).


i=l

V> the
We call ,(f; the piecewise linear
linear interpolant tf}(x) (see Figure 6.11 for an example).
interpolant of ,¢(x)

Figure 6.11.
6.11. ,¢(x)
^(x) = (STTX) and its piecewise linear
= sin (37fx) linear interpolant.
interpolant.

We therefore
therefore arrive at the following system of ODEs and initial conditions:

dO'
M dt + Ka = f(t), t > to,
aCto) = 0'0,
where
260 Chapter 6. Heat flow and diffusion
Chapter diffusion

1
To solve this,
To solve this, we
we can
can multiply
multiply the
the ODE
ODE on
on both sides by
both sides by M
M~l to
to obtain
obtain

that
that is,
is,
do:
dt == Ao: + get), A == _M~lK, get) == M~lf(t).

We
We recognize
recognize this as an
this as an inhomogeneous
inhomogeneous system system of linear, constant
of linear, constant coefficient
coefficient first-
first-
order
order ODEs
ODEs forfor the
the unknown
unknown a(t) (if the
o:(t) (if coefficients in
the coefficients in the
the PDE are nonconstant,
PDE are nonconstant,
then
then soso will
will be
be the
the matrices
matrices MM andand K K and
and hence
hence A; in that
A; in case, the
that case, system of
the system of
37
ODEs will
ODEs will not
not have
have constant coefficients).37
constant coefficients).
We
We have
have now
now discretized
discretized the spatial variation
the spatial variation of the solution
of the solution (a
(a process referred
process referred
to as semidiscretization
to as semidiscretization in space) to
in space) to obtain
obtain aa system
system of
of ODEs.
ODEs. We We can
can now apply
now apply
aa numerical
numerical method
method to to integrate
integrate thethe ODEs.
ODEs. This
This general
general technique
technique ofof solving
solving aa
time-dependent
time-dependent PDE PDE by integrating the
by integrating the system
system ofof (semidiscrete)
(semidiscrete) ODEs
ODEs is called
is called
the
the method
method of of lines.
lines.

6.4.1
6.4.1 The method of lines for the heat equation
We
We now
now illustrate
illustrate the
the method of lines
method of lines via an example,
via an example, which
which will
will show that the
show that the
system
system of ODEs arising
of ODEs arising from the heat
from the heat equation
equation is stiff.
is stiff.

Example 6.8.
Example 6.8. Suppose
Suppose an ironiron bar (p =
== 7.88,
7.88, c = 0.437, K
== 0.437, == 0.836,)
K. — 0.836) is chilled to
to a
constant temperature of
constant of 00 degrees Celsius,
Celsius, and then heated internally with both ends ends
maintained
maintained atat 00 degrees Celsius. Suppose
degrees Celsius. Suppose further
further that
that the
the bar
bar is 100 cm
is 100 cm in
in length
length
and heat
and heat energy
energy isis added
added atat the
the rate
rate of
of

We wish
We wish to
to find
find the
the temperature
temperature distribution
distribution in
in the
the bar after 33 minutes.
bar after minutes.
The temperature
The temperature distribution u(x,t) is the
u(x, t) is the solution of
of the IBVP
IBVP

au a2 u
pc at - K. < x < 100, t > 0,
ax 2 == I(x, t), 0
u(x,O) == 0, 0 < x < 100, (6.42)
u(O, t) == 0, t > 0,
u(100, t) == 0, t > O.

We will
We approximate the
will approximate the solution
solution using
using piecewise linear finite
piecewise linear finite elements
elements with
with aa regular
regular
mesh
mesh of 100 subintervals.
of 100 We write
subintervals. We write n
n= 100, h
== 100, h=== 100/n,
1001n, Xi = ih,
Xi == ih, ii == 0,1,2,...,
= 0,1,2, n.
... , n.
37
In practice,
37In practice, wewe do
do not
not actually compute either
actually compute M"1 or
either M-l or A. When implementing
A. When implementing numerical
numerical
algorithms, it
algorithms, it is
is rarely
rarely efficient
efficient to
to compute
compute anan inverse
inverse matrix,
matrix, particularly
particularly when
when the
the matrix
matrix is
is
sparse, as
sparse, as in
in this
this case.
case. Instead, the presence
Instead, the presence of M- 11 is
of M" is aa signal
signal that
that aa linear
linear system
system with coefficient
with coefficient
matrix
matrix MM must
must bebe solved.
solved. This
This is
is explained
explained below
below when
when we we discuss
discuss the
the implementation of Euler's
implementation of Euler's
method
method and
and the
the backward
backward Euler method.
Euler method.
6.4.
6.4. Finite element
Finite element methods
methods for
for the heat equation
the heat equation 261
261

As usual, {<Pl,
As usual, 02, ...
{(f)i, <P2' • • • ', <Pn-d
0n-i} will be the
will be the standard
standard basis
basis for the subspace
for the Sn of
subspace Sn of con-
con-
tinuous piecewise
tinuous linear finite
piecewise linear finite elements.
elements. It is straightforward
It is straightforward to to compute
compute the
the mass
mass
and stiffness matrices:
and stiffness matrices:

2hpc
1tOO
100
Mii = pC(<Pi(X))2dx = - - , i = 1,2, ... ,n-l,
o 3
hpc .
Mi,i+l = 10 PC<Pi(X)<Pi+l(X)dx = 6' z = 1,2, ... ,n - 2,

(d<Pi ) 2K;.
Kii= 10{lOO K; dx(x)
2
dX=h' z=1,2, ... ,n-l,

Ki i+l =
, 1 0
100
K;-
d<Pi ( ) d<Pi+l ( )
dx x
K;.
x - d - x dx = - -h' z = 1,2, ... , n - 2

(both M and
(both and K are
are tridiagonal
tridiaqonal and
and symmetric). We also
symmetric). We also have
have

(100
fi(t) = 10 f(x, t)<Pi(X) dx

h2(60000i - 200h - 1200i 2 h + 6h 2i 3 + 3ih2 )


= t 6.10 8 ' i = 1,2, ... , n - 1.

We first
We first try
try taking
taking N N = 180
180 steps (At = 11 s)
steps (.D.t of Euler's
s) of Euler's method; however, the
method; however, the result
result
40
is meaningless,
is meaningless, with temperatures on
with temperatures on the
the order
order of 1040
of 10 degrees Celsius!
degrees Celsius! Clearly
Clearly
Euler's
Euler's method
method isis unstable with this
unstable with choice of
this choice of .D.t.
At. A little experimentation
A little experimentation showsshows thatthat
At cannot
.D.t cannot bebe much more than
much more 0.7 seconds,
than 0.7 seconds, or instability will
or instability will result.
result. The
The temperature
temperature
distribution at
distribution attt = 180 seconds,
= 180 seconds, computed using 260
computed using time steps
260 time (At =
steps (.D.t 0.69J, is
== 0.69), is shown
shown
in Figure
in 6.12.
Figure 6.12.
Before leaving this
Before leaving this example,
example, wewe should explain how
should explain how Euler's method is
Euler's method is imple-
imple-
mented
mented in in practice. The system
practice. The system ofof ODEs
ODEs isis

da
dt = M- 1 (-Ka + f(t)),
and so
and Euler's method
so Euler's method takes
takes the
the form
form

As
As we mentioned before,
we mentioned it is
before, it is not
not efficient
efficient to
to actually
actually compute M l ;, since
compute M- since M M isis
1
tridiagonal and
tridiagonal M" is
and M- l
is completely
completely dense.
dense. Instead, we implement
Instead, we implement the
the above
above iteration
iteration
as
as

sW is
where sci) is found by solving
found by

MSCi) = -Ka C;) + f(ti)·


262 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

Figure 6.12.
Figure 6.12. The temperature distribution in Example 6.8 after
after 180 sec-
sec-
onds (computed using
onds (computed using the
the forward
forward Euler with At
method, with
Euler method, = 0.69).
t:..t == 0.69J.

Therefore, one
Therefore, one tridiagonal
tridiagonal solve
solve is
is required
required during
during each
each iteration,
iteration, at
at aa cost
cost of
of O(8n)
O(8n)
operations, instead of
of a multiplication by a dense matrix, which O(2n2) oper-
which costs O(2n2) oper-
38
ations.38
ations.

Although the
Although the time
time step
step ofof t:..t
At = = 0.7
0.7 seconds,
seconds, required
required in in Example
Example 6.8 6.8 for
for
stability, does
stability, does not
not seem
seem excessively
excessively small,
small, it
it is easy to
is easy show by
to show numerical experi-
by numerical experi-
mentation that
mentation that aa time
time step
step t:..t
At onon the
the order of hh22 is
order of is required
required forfor stability.
stability. (Exercise
(Exercise
10 asks
10 asks the
the reader
reader to verify this
to verify this for
for Example
Example 6.8.)
6.8.) That
That is,
is, if
if we wish to
we wish to refine the
refine the
spatial grid
spatial grid byby aa factor
factor of
of 2,
2, we
we must
must reduce
reduce thethe time
time step
step byby aa factor
factor ofof 4.
4. This
This
is the
is the typical
typical situation
situation when
when we we apply
apply the the method
method of of lines
lines toto the
the heat
heat equation:
equation:
The resulting
The system of
resulting system of ODEs
ODEs is is stiff,
stiff, with
with the
the degree
degree ofof stiffness
stiffness increasing
increasing as as the
the
spatial grid is refined.
The reason
The reason forfor the
the stiffness
stiffness inin the
the heat equation is
heat equation is easy
easy to
to understand
understand on on
an intuitive
an intuitive level.
level. The
The reader
reader should
should recall
recall from
from Section
Section 4.54.5 that stiffness arises
that stiffness arises
when a (physical) system has components that decay at very different different rates. In
heat flow,
heat the components
flow, the components of of interest
interest are
are the
the spatial
spatial frequencies
frequencies in in the temperature
the temperature
components are damped
distribution. High frequency components damped out very quickly, as we we saw
from the Fourier series solution (see Section 6.1.1). Low Low frequency components, on
the other
the other hand,
hand, decay
decay more slowly. Moreover,
more slowly. Moreover, as as we
we refine
refine the spatial grid,
the spatial grid, we
we can
can
38
We can
38We can even
even do
do aa bit better, by
bit better, by factoring the matrix
factoring the M once
matrix M once (outside
(outside the
the main
main loop)
loop) and
and
then using
then using the factors in
the factors in the
the loop
loop to solve for
to solve for s(i).
s^). This
This reduces
reduces the cost to
the cost O(6n) per
to O(6n) per iteration.
iteration.
Factorization of
Factorization of matrices
matrices is
is discussed
discussed briefly in Section
briefly in Section 10.2.
10.2.
element methods for the heat equation
6.4. Finite element 263

represent higher
represent higher frequencies,
frequencies, and
and so
so the
the degree
degree of
of stiffness
stiffness worsens.
worsens.

Example 6.9.
Example 6.9. We
We now
now apply
apply the
the backward
backward Euler method
method to
to the
the previous example.
example.
Using nn = 100
Using 100 subintervals
subintervals inin space
space and At =
and Ilt = 22 (seconds),
(seconds), wewe obtain
obtain the
the result
result
shown in
shown in Figure 6.13.
6.13. Using
Using aa time
time step
step for which Euler's method
for which method isis unstable,
unstable, we
produced
produced aa result
result which
which is
is qualitatively
qualitatively correct.
correct.
The backward
The backward Euler method takes
Euler method takes the
the form
form

a(i+l) = a(i) + IltM- 1 ( _Ka(i+1) + f(tHd) .

Multiplying through by
Multiplying through M and
by M and manipulating,
manipulating, we
we obtain
obtain
(M + IltK)a(Hl) = Ma i + Iltf(ti+1).
We therefore
We therefore compute a^+1) by
compute a(Hl) by solving
solving aa system with the
system with the (tridiagonal)
(tridiagonal) matrix M+
matrix M
AtK as the
IltK as the coefficient
coefficient matrix.
matrix.

Br--------r--------r--------r--------r---------,

Figure 6.13.
Figure 6.13. The
The temperature
temperature distribution
distribution in
in Example 6.8 after
Example 6.8 after 180
180 sec-
sec-
onds (computed
onds (computed using
using the
the backward
backward Euler with At
method, with
Euler method, = 2).
Ilt = 1).

Exercises
Show that
1. Show that the
the mass
mass matrix M is
matrix M is nonsingular.
nonsingular. (Hint:
(Hint: This
This follows
follows from
from the
the
general result
general that if
result that if {Ul'
{ui,U2,...
U2, ... ,,u n } is
un} is aa linearly
linearly independent
independent set
set in
in an
an in-
in-
ner product
ner product space,
space, then
then the matrix G
Gram matrix
the Gram G defined
defined by
by GGij (uj, Ui)
= (Uj,
ij = Uj) is
is
nonsingular. To
nonsingular. To prove
prove this,
this, suppose
suppose Gx Gx = = O.
0. Then
Then (x, Gx) =
(x, Gx) = 0,
0, and
and byby
264 Chapter 6. Heat flow and diffusion

expanding (x,
expanding (x, Gx)
Gx) in
in terms
terms ofof the
the inner
inner products
products (Uj,
(iij,iii),
Ui), it is possible to
to
show that
show that (x,
(x, Gx)
Gx) == 00 is
is only
only possible if xx =
possible if = 0. This suffices
O. This suffices to
to show
show that
that G
G
is nonsingular.)
is nonsingular.)
2. Consider
2. Consider aa function
function /f in C[0,^].
in e[O, l).
(a) Show
(a) Show howhow toto compute
compute the
the projection of f/ onto
projection of onto the
the subspace
subspace S Be sure
n. Be
Sn. sure
to observe
to observe how how the
the mass
mass matrix
matrix MM and
and load
load vector
vector f arise
arise naturally
naturally in
in
this problem.
this problem.
(b) We
(b) We can
can also
also find
find an
an approximation
approximation toto /f from
from S by computing
Snn by computing the piece-
the piece-
wise linear
wise linear interpolant of f.
interpolant of /. Show
Show by
by aa specific
specific example
example thatthat the
the projec-
projec-
tion of f/ onto
tion of onto S and the
Snn and the piecewise
piecewise linear
linear interpolant
interpolant ofof f/ from
from Sn are not
Sn are not
the same.
the same. (The
(The number
number nn can
can be chosen small
be chosen small to
to make
make the computations
the computations
simple.)
3. Apply
3. the method
Apply the method of
of lines
lines to
to the IBVP
the IBVP
au a2 u
at - ax2 = x(l - x) cos (t), 0 < x < 1, t > 0,
u(x, 0) = 1, 0 < x < 1,
u(O, t) = 0, t > to,
u(l, t) = 0, t > to.
Use the
Use the finite element method,
finite element method, with
with the
the approximating
approximating subspace
subspace 83 (and aa
S3 (and
regular grid),
regular grid), to
to do
do the
the discretization
discretization in
in space.
space.
(a) Explicitly
(a) compute the
Explicitly compute the mass matrix M,
mass matrix M, the
the stiffness
stiffness matrix
matrix K, and
and the
the
load vector
load vector f(t).
f(t).
(b) Explicitly set up the system of ODEs resulting from applying the method
of lines.
of
4. Consider
4. Consider aa heterogeneous
heterogeneous bar, that is,
bar, that is, aa bar in which
bar in which the
the material
material properties
properties
/9, c, and K are not constants but rather functions of space:
p, c, and '" are not constants but rather functions of space: = p(x), cc == c(x),
p = p(x), c(x),
K'" = K(X).
= "'(x).

(a) What
(a) What is
is the appropriate form
the appropriate form of
of the heat equation
the heat equation for
for this
this bar?
bar?
(b) What
(b) What is
is the appropriate weak
the appropriate form of
weak form of the
the resulting IBVP (assuming
resulting IBVP (assuming
homogeneous Dirichlet
homogeneous Dirichlet conditions)?
conditions)?
(c) How
(c) How does
does the system of
the system of ODEs
ODEs change?
5. An
5. advantage of
An advantage of the
the weak
weak formulation
formulation of of aa BVP
BVP (and
(and therefore of the
therefore of the fi-
fi-
nite element method)
nite element method) is is that
that the equation makes
the equation sense for
makes sense for discontinuous
discontinuous
coefficients. Consider
coefficients. Consider aa metal
metal barbar of
of length
length 1m1m and
and diameter
diameter 44cm.
cm. As-As-
sume that
sume that one-half
one-half ofof the
the bar is made
bar is made of of copper
copper (c (c = 0.379 J/(gK), pP =
= 0.379J/(gK), =
8.97 g/cm 33,, '"
8.97g/cm K = 4.04
4.04 WW/(cmK)),
/(cmK)), andand the
the other
other half is made
half is made of of iron
iron (spe-
(spe-
cific heat
cific heat cc = 0.437 JJ/(gK),
= 0.437 density pp == 7.88
/ (g K), density g/ cm33,, thermal
7.88 g/cm thermal conductivity
conductivity
K=
'" = 0.836
0.836 W/(cmK)). Suppose the
W / (cmK)). Suppose the bar is initially
bar is initially heated
heated toto 55 degrees
degrees Celsius
Celsius
then (at
and then (at time
time 0)0) its
its ends
ends are
are placed
placed inin an
an ice bath (0 (0 degrees
degrees Celsius).
Celsius).
6.4. Finite
6.4. Finite element
element methods
methods for
for the heat equation
the heat equation 265
265

(a) Formulate
(a) Formulate the IBVP describing
describing this
this experiment.
experiment.
(b) Apply
(b) Apply the
the finite element method
finite element method and
and the
the method
method ofof lines
lines to obtain the
to obtain the
resulting system of
resulting system of ODEs.
ODEs. Use only aa uniform
Use only uniform grid
grid with an even
with an even number
number
of subintervals
of subintervals (so
(so that
that the
the midpoint
midpoint of of the
the bar
bar is
is always
always aa gridpoint).
gridpoint).
Give the
Give the mass matrix M
mass matrix M and
and the stiffness matrix
the stiffness K explicitly.
matrix K explicitly.

6. Consider
6. Consider the
the IBVP
IBVP with
with inhomogeneous Dirichlet
Dirichlet conditions:
conditions:

au a2 u
pc at - Ii ax 2 < x < £, t > to,
= f(x, t), 0
u(x, to) = ,¢(x), 0 < x < £, (6.43)
u(O, t) = a(t), t> to,
u(£,t) = b(t), t> to.

(a) Formulate
(a) Formulate the
the weak
weak form
form of
of the IBVP.
the IBVP.
(b) Show
(b) Show how
how to apply the
to apply the finite element method
finite element method by by representing the ap-
representing the ap-
proximate solution
proximate solution in
in the
the form un(x,t)t) = vn(x,
form un(x, vn(x,t)t) + g t), where
n(x,t),
gn(X, where
n-l
vn(x, t) = L Qi(t)¢i(X)
i=l

and
and
gn(X, t) = a(t)¢o(x) + b(t)¢n(x).
(c)
(c) Illustrate
Illustrate by solving (6.43)
by solving (6.43) with
with /9, c, IiK equal
p, c, equal to the material
to the constants
material constants
for
for iron, = 100cm,
iron, £t = ,¢(x) = 00 degrees
100cm, ^)(x) degrees Celsius, a(t] = 0,
Celsius, a(t) 0, and =
and b(t) =
(607r£)..
sin (601ft)

7. Consider
7. Consider the IBVP from
the IBVP from Examples
Examples 6.8
6.8 and
and 6.9.
6.9.
(a) Using
(a) Using the method of
the method of Fourier series, find
Fourier series, find the exact solution
the exact solution u(x,
u(x,t).
t).
(b) Using
(b) enough terms
Using enough in the
terms in the Fourier
Fourier series
series to obtain aa highly
to obtain accurate
highly accurate
solution, evaluate
solution, evaluate u(x, 180)
180) on
on the
the regular grid with
regular grid = 100
with nn = 100 used
used in
in
Examples 6.8
Examples 6.8 and 6.9.
and 6.9.
(c) Reproduce
(c) Reproduce the
the numerical
numerical results in Examples
results in Examples 6.8
6.8 and
and 6.9,
6.9, and,
and, by
by com-
com-
paring to the
paring to the Fourier series result,
Fourier series result, determine
determine the accuracy of
the accuracy each result.
of each result.
8. Repeat
8. Repeat Example
Example 6.8,
6.8, with the following
with the following changes.
changes. First,
First, assume
assume that the bar
that the bar
33, c = 0.385 J/(gK), K = 4.01 W/(cmK))
is made of copper (p = 8.96 g/ cm , c = 0.385 J / (g K), Ii = 4.01 W / (cm K))
is made of copper (p = 8.96g/cm
instead of
instead of iron.
iron. Second,
Second, assume
assume that
that thethe heat "source" is
heat "source" given by
is given by

f(x, t) = 10- 7 tx(60 - x)(100 - x)

(note that f/ adds


(note that energy over
adds energy over part
part of
of the
the interval
interval and
and takes
takes it away over
it away over an-
an-
other part).
other part). Graph
Graph the temperature after
the temperature after 180
180 seconds.
seconds. Does
Does the temperature
the temperature
approach aa steady
approach steady state
state as
as tt -+
->• oo?
oo?
266 Chapter 6. Heat flow and diffusion
diffusion

9. Consider a heterogenous bar of length 100


100cm
cm whose material
material properties
properties are
given
given by
by the following formulas:
the following formulas:
p(x)
p(x) = = 7.5 + O.01x
7.5 + g/cm33,, 0
O.Ola; g/cm 100,
0 < xx < 100,
c(x) =
c(x) = 0.45 + O.OOOlx
0.45 + O.OOOlx J/(gK),
J/(gK), 0 100,
0 < xx < 100,
K(X)
II;(X) = 2.5 +
= 2.5 + 0.05z g/(cmK), 0
0.05x g/(cmK), 100.
0 < xx < 100.
Suppose that
Suppose that the
the initial
initial temperature
temperature in
in the
the bar is aa uniform
bar is uniform 55 degrees
degrees Celsius,
Celsius,
and
and that
that at = 00 both
at tt = ends are
both ends are placed
placed in
in ice
ice baths
baths (while
(while the lateral side
the lateral side of
of
the
the bar
bar is
is perfectly insulated).
perfectly insulated).
(a)
(a) Formulate
Formulate the
the IBVP
IBVP describing
describing this experiment.
this experiment.
(b)
(b) Formulate
Formulate the
the weak
weak form
form of
of the IBVP.
the IBVP.
(c) Use the finite element
(c) element method with backward Euler integration
integration to
to esti-
esti-
mate the temperature
mate the after 22 minutes.
temperature after minutes.
10. Consider Example
10. Example 6.8, and suppose that the number of elements in the mesh
is
is increased from 100
increased from 100 to
to 200,
200, so
so that
that the
the mesh
mesh size
size h is cut in
is cut in half. Show, by
half. Show, by
numerical experimentation, that
numerical experimentation, that the
the time step tlt
time step At inin the
the forward
forward Euler method
Euler method
must
must bebe reduced
reduced by
by aa factor
factor of
of approximately four to
approximately four to preserve stability.
preserve stability.

6.5
6.5 Finite elements
Finite elements and Neumann conditions
and Neumann conditions
So far we have only used finite element methods for problems with Dirichlet bound-
conditions. The weak form of the BVP or IBVP, on which the finite element
ary conditions.
incorporates the Dirichlet conditions in the definition
method is based, incorporates definition of V, the
space of
space of test functions. When
test functions. When the
the weak
weak form is discretized
form is via the
discretized via Galerkin method,
the Galerkin method,
the
the boundary
boundary conditions
conditions formform part
part of
of the
the definition
definition ofof S n, the
Sn, approximating sub-
the approximating sub-
space (see
space (see (5.50)).
(5.50)).
It turns
turns outout that
that Neumann conditions are
Neumann conditions are even
even easier
easier to
to handle
handle inin the
the finite
finite
element method. As
element method. As we show below,
we show a Neumann
below, aN eumann condition
condition does
does not
not appear
appear explicitly
explicitly
in the
in the weak
weak form
form or or in
in the definition of
the definition of the approximating subspace
the approximating subspace (the
(the analogue
analogue
of S
of )-
Sn).
n For
For this
this reason,
reason, a
a Neumann
Neumann condition
condition is
is often
often called
called a
a natural boundary
boundary
condition (since
(since it it is
is satisfied
satisfied automatically
automatically by by aa solution
solution of
of the
the weak
weak form),
form), while
while
aa Dirichlet
Dirichlet condition
condition is is referred
referred to
to as
as an
an essential
essential boundary
boundary condition (since it
condition (since it is
is
essential
essential to include the condition explicitly in the weak form).

6.5.1 The weak form of a BVP with Neumann conditions


conditions
We will first
first consider
consider the (time-independent) BVP
(time-independent) BVP

d ( dx
dU) = lex), 0< x < £,
- - k(x)-
dx
du (0) = 0 (6.44)
dx '
du
dx(£) =0.
6.5. Finite elements
6.5. Finite elements and Neumann conditions
and Neumann conditions 267

To derive the
To derive the weak
weak form,
form, we
we multiply
multiply both sides of
both sides of the
the differential
differential equation
equation by
by aa
test function, and integrate by parts. We take for our space of test functions
test function, and integrate by parts. We take for our space of test functions

(note that
(note that the
the boundary
boundary conditions
conditions dodo not appear in
not appear in this definition).
this definition).
Assuming
Assuming that
that u solves (6.44), we
solves (6.44), we have, for each
have, for each v E€ V,
V,

d ( k(x) dx
- dx du (x) ) v(x) = f(x)v(x), 0 < x < £

(x) v(x) dx 1£ f(x)v(x) dx


=} -
1 dxd (k(x) dxdU)
0
£
= 0

=} -
du ]
[ k(x) dx (x)v(x) 0
£+ 1£ 0
du dv
k(x) dx (x) dx (x) dx =
1£ f(x)v(x) dx
0

£ du dv 1£
=}
1 k(x) dx (x) dx (x) dx = f(x)v(x) dx.
0 0

In
In the
the last
last step,
step, we
we use
use the fact that
the fact that

du (0) = du (£) = o.
dx dx
The
The weak
weak form
form of (6.44) is
of (6.44) is

find u E V such that 1£ k(x) ~~ (x) ~~ (x) dx = 1£ f(x)v(x) dx for all v E V.


(6.45)
In
In the
the context of (6.45),
context of (6.45), we
we refer
refer to
to (6.44) as the
(6.44) as the strong form of
strong form of the
the BVP.
BVP.

6.5.2
6.5.2 Equivalence of
Equivalence of the
the strong and weak
strong and weak forms of a
forms of BVP with
a BVP with
Neumann
Neumann conditions
conditions
The
The derivation
derivation ofof the
the weak
weak form
form (6.45)
(6.45) shows
shows that
that if satisfies the
if uu satisfies the original BVP
original BVP
(6.44)
(6.44) (the
(the strong form), then
strong form), then u also satisfies the
also satisfies the weak
weak form.form. WeWe now demonstrate
now demonstrate
the
the converse:
converse: If If uu satisfies
satisfies the
the weak
weak form
form (6.45)
(6.45) of
of the
the BVP,
BVP, then
then uu also
also satisfies
satisfies
(6.44)—including
(6.44)----'including the
the boundary
boundary conditions! This is
conditions! This is quite surprising at
quite surprising at first
first sight,
sight,
since
since the
the boundary conditions mentioned
boundary conditions mentioned inin (6.44) are not
(6.44) are not mentioned
mentioned inin (6.45).
(6.45).
We assume that u E GVV and that

1£ -
1 £ du dv
o k(x) dx (x) dx (x) dx = 0 f(x)v(x) dx for all v E V.

Integrating
Integrating by parts on the left side of
left side of this equation
equation yields

du ]£
[ k(x) dx (x)v(x) 0 -

0
d [ du ] (£
dx k(x) dx (x) v(x) dx = 10 f(x)v(x) dx for all v E V.
(6.46)
268 Chapter
Chapter 6. Heat flow
6. Heat flow and diffusion
and diffusion

Now,
Now, V CC V, where
where V is
is defined
defined as
as the
the space
space of
of test functions used
test functions used for
for aa Dirichlet
Dirichlet
problem:
problem:
V = c1[0, R] = {v E V : v(O) = v(R) = O} .
Therefore,
Therefore, in
in particular, (6.46) holds
particular, (6.46) for all
holds for all vv e V. Since
E V. Since the
the boundary
boundary term
term in
in
(6.46)
(6.46) vanishes
vanishes when v(t} =
v(0) = v(R)
when v(O) = 0,
0, we obtain
we obtain

-
i
0
f d[ dU]
dx k(x) dx (x) vex) dx = if
0 f(x)v(x) dx for all v E V,

or
or
fat {! [k(X) :~ (x)] + f(X)} vex) dx = 0 for all v E V.
Using
Using the
the same
same argument
argument as in Section
as in Section 5.4.2,
5.4.2, we
we see
see that
that

d [ k(x)dx(x)
dx du ] +f(x) =0, O<x<R

must
must hold,
hold, or
or equivalently,
equivalently, that
that

d [ k(x) du
- dx dx (x) ] = f(x), 0 < x < £.

Thus,
Thus, if U satisfies
if u satisfies the
the weak form of
weak form of the
the BVP,
BVP, it
it must
must satisfy
satisfy at
at least
least the differential
the differential
equation appearing
equation appearing in in the
the strong form.
strong form.
It is
It is now
now easy
easy toto show
show that
that the
the boundary
boundary conditions
conditions also
also hold. The condition
hold. The condition
(6.46) is
(6.46) is equivalent
equivalent toto

- [ k(x) du ]i
dx (x)v(x) 0
rt {dxd [k(x) dU]}
+ 10 dx (x) + f(x) vex) dx = 0 for all v E
_
V,
and,
and, since
since we
we have
have already
already shown
shown that
that

d [ k(x) dx
dx du (x) ] +f(x) =0, O<x<R,

we see that
we see that
du ]i _
[ k(x) dx (x)v(x) 0 = 0 for all v E V. (6.47)

We
We now
now take,
take, for
for example, v(x) = 1-
example, vex) x/R, which
I — x/l, which certainly
certainly belongs
belongs to
to V. With this
With this
choice
choice of
of v, (6.47) becomes
v, (6.47) becomes
-k(O): (0) =0
(since
(since v(0) 1, v(i)
= 1,
v(O) = 0). Since
= 0).
v(R) = Since fc(0)
k(O) > 0
0 by
by assumption,
assumption, this
this can
can hold
hold only
only if
if

du
dx (0) = O.
6.5. Finite
6.5. Finite elements
elements and
and Neumann
Neumann conditions
conditions 269

Similarly, choosing
Similarly, choosing v(x)
v(x) =
= x/i shows that
xli shows that

du (i) = 0
dx
must hold.
must Thus, when
hold. Thus, when uu satisfies
satisfies the
the weak
weak form
form (6.45),
(6.45), it
it must
must necessarily satisfy
necessarily satisfy
the Neumann
the Neumann boundary
boundary conditions.
conditions. This
This completes
completes the
the proof that the strong
strong and
weak forms of
weak forms of BVP
BVP (6.44)
(6.44) are
are equivalent.
equivalent.

6.5.3
6.5.3 Piecewise linear finite elements with Neumann conditions
Now that we
Now that we have the weak
have the form of
weak form of the
the BVP,
BVP, we choose the
we choose the appropriate
appropriate subspace
subspace
of piecewise
of piecewise linear
linear functions
functions and
and apply
apply the
the Galerkin
Galerkin technique
technique to obtain aa finite
to obtain finite
element method.
element method. Since
Since no
no boundary conditions are
boundary conditions are imposed
imposed inin the
the weak form, we
weak form, we
augment the
augment space S
the space defined in
Snn defined in Section
Section 5.6
5.6 by
by adding
adding the
the basis functions 4>0
basis functions </>o and
and
0n (see
4>n (see Figure
Figure 6.14).
6.14). We
We denote
denote the
the resulting
resulting subspace
subspace by
by Sn:
Sn:
[Oj^j
— {p :'• [0,
Sn = i] -+ R- :: Pp isis continuous
—*• R continuous and
and piecewise
piecewise linear}
linear}
= span
= span{</>o,0i,...,0 n }..
{4>0, 4>1, ... , 4>n}

,
0.9
0.8
~ ._._ <pn(x)
,!
j

,
0.7
\ ,
0.6
,
0.5 i
0.4 ,
,
0.3
0.2
0.1 ,
00
\ 0.2 0.4 0.6 0.8
,

Figure 6.14.
Figure 6.14. The
The piecewise linear basis
piecewise linear functions </>o
basis functions and 4>n.
4>0 and (f)n.

Having defined
Having defined the
the approximating
approximating subspace
subspace Sn,
5n, we apply the
we apply Galerkin method
the Galerkin method
to the
to the weak
weak form
form (6.45),
(6.45), yielding
yielding the problem
the problem

- dVnr
l
dv rl
-
find Vn E Sn such that 10 k(x) dx (x) dx (x) dx = 10 f(x)v(x) dx for all v E Sn,
270 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

or, equivalently,
or, equivalently,

find Vn E Sn such that lot k(x) ~; (x) dxi (x) dx = 10£ !(X)tPi(X) dx, i = 0,1, ... , n.
(6.48)
For simplicity
simplicity of
of notation, we will again
again write
write

(t dv dw
a(v, w) = io k(x) dx (x) dx (x) dx,

so that
so (6.48) can
that (6.48) can be
be written
written as
as

(6.49)

We
We then write the
then write the unknown vn as
unknown Vn as
n
Vn = LUjtPj
j=O

substitute into (6.49).


and substitute (6.49). The result is
n
La(tPj,tPi)Uj = (J,tPi), i =O,l, ... ,n.
i=O

This is
This is aa system
system of n+
of n + 11 equations
equations in the n + 1I unknowns
in the unknowns uo,
uo,ui,...,u n. We
UI, ... , Un. We can
can
write the
write the system as the
system as the matrix-vector equation Kii =
matrix-vector equation = f by
by defining
defining

Kij = a(tPj, tPi), i,j = 0,1, ... , n,


ii = (J,tPi)' i = O,l, ... ,n.

The
The calculations
calculations involved
involved in forming the
in forming the matrix
matrix K and and the
the vector
vector f are exactly the
are exactly the
same as
same for aa Dirichlet
as for Dirichlet problem, except that
problem, except that 0 and 4>
tPo0 and tPnn are qualitatively different
are qualitatively different
from tPI, tP2,
from 0i, 02,..., 0n-i (0o
... , tPn-1 (tPo and
and 0 are each
tPnn are each nonzero
nonzero on on aa single
single subinterval,
subinterval, namely
namely
[XQ,
[xo, Xi] and [x
Xl] and n _i, x
[Xn-l, respectively, while
n], respectively,
xn], while each
each 0j,
tPi, ii = 1,2,...,
= 1,2, ... , n 1, is
n -— 1, is nonzero
nonzero onon
[Xi-I, Xi+l]).
[Xi-i,X i+i}}.

Having
Having now
now reduced
reduced thethe problem
problem toto the
the linear system Kii =
linear system = f, where
where now
now
K E
6 R(n+1)x
R(n+i)x(n+i)
(n+1) and ^
and ii, ff eE RRn+1,
n+i 5 we
weface
facethetheDifficulty
difficultythat
thatKKisisa asingular
singular
matrix. This is not surprising,
surprising, since
since we
we know that
that the original BVP BVP (6.44) does not
(6.44) does not
have a unique
unique solution. We
We can can show
show directly that K is
directly that is singular, and understand
understand
the nature of
the of the singularity, asas follows.
follows. If
If
6.5. Finite elements and Neumann conditions 271
271

then
then

But
But
(6.50)
j=O
is piecewise
is linear and
piecewise linear and has
has value one at
value one at each
each mesh
mesh node. node. It It follows that (6.50)
follows that (6.50) isis
the constant function
the constant function one,
one, and
and hence
hence has derivative zero.
has derivative Therefore CKUe)i
zero. Therefore (Ku c )j = = 00 for
for
each i,
each ij which
which shows that KU
shows that Ku ce == 00 and
and hence
hence that
that K K isis singular.
singular. Moreover,
Moreover, it it can
can
shown that Uuec spans the
be shown space of K; that is,
the null space is, if Kii
Ku = = 0, then ii u isis a multiple
of u
of Uc (see Exercise
e (see Exercise 5} 5].
The fact that K is singular means that we we must give special attention to the
process of solving Ku Kii == f. In particular,
particular, if we we ignore the singularity of K K and
solve Kii == f using
solve Kii using computer software, we
computer software, we will
will get either aa meaningless
get either meaningless solution
solution
or an
or error message.
an error message. To To solve
solve this singular system
this singular system correctly,
correctly, wewe must
must add add another
another
equation (one
equation (one additional
additional equation, correctly chosen, chosen, will will be sufficient,
sufficient, because the the
null space of
null space of K is is one-dimensional).
one-dimensional). A simple choice
A simple choice is is the equation Un
the equation un = = 0;0; this
this is
is
equivalent to choosing,
equivalent choosing, outout ofof the
the infinitely
infinitely many solutionssolutions to (6.44),
(6.44), the one with
u(i] =— O.
u(C) 0. Moreover,
Moreover, we we can
can impose
i~pose this additional equation
this additional equation by simply removing
by simply removing;
the
the last row and
last row and column from K,
column from K, and
and the
the last entry from
last entry from f.f. The last column
The last column of of KK
consists of the the coefficients
coefficients of the terms in the the equations involving u un;
n ; if we insist
that
that Unun = 0, then
= 0, then we can remove
we can remove these
these terms
terms fromfrom all all nn + 11 equations.
equations. We then
We then
have n + 1l equations
have equations in in the unknowns uo,
the n unknowns WQ, ut,
W i ,...
. . . ,,Un-l.
w n _i. This
This isis one
one more equation
more equation
than we we need, so so wewe remove
remove oneone equation,
equation, thethe last, to obtain obtain aa square system.system. It
can be proved
can be proved that
that the
the resulting
resulting n xx n system
system is is nonsingular
nonsingular (see (see Exercise
Exercise 11). 11).
Of course,
Of course, we we could
could have
have removed
removed aa different
different row row andand column.
column. If If wewe remove
remove
the ith row
the iih row and column, we
and column, are selecting
we are selecting the approximate solution
the approximate solution Vn vn satisfying
satisfying
Vn(Xi) =
Vn(Xi) = O.
0.

Example
Example 6.10.
6.10. Consider the Neumann
Neumann problem
problem
d2 u 1
-- = x - - 0
dX2 2' < x < 1,

~: (0) = 0, (6.51 )

~: (1) = 0.
It is easy to show (by direct integration) that
X3 X2
u(x) = -"6 + 4" + C
272 Chapter 6. Heat flow and diffusion

is aa solution
is solution for any constant
for any constant C, and
and that
that
x3 x2 1
u(x) = - - + - - -
6 4 12
is the
is the solution
solution satisfying u(l) = 0.
satisfying u(l) 0.
We will
We will use
use aa regular
regular grid
grid with the finite
with the finite element
element method. We define
method. We define xi = ih,
Xi = ih,
ii = 0,1,...,n,
= 0,1, ... , n, hh =— lin.
l/n. With
With piecewise
piecewise linear
linear finite
finite elements,
elements, as
as we
we have
have seen
seen
before, the stiffness
before, the matrix K
stiffness matrix K is tridiagonal since
is tridiagonal since

Ii - il > 1 :::} ixi a:;


(x) (x) = ° on (0, f).

We compute
We compute as
as follows (as suggested
follows (as suggested above,
above, the
the computations
computations involving involving <^o and CPn
CPo and (f)n
</»i, ^2,
must be handled separately from those involving CPl, • • • , CPn-l):
CP2, ... (f>n-i)-'
- .. _l(Hl)h (dCPi ) 2 _l(Hl)h ~ _ ~
K .. - d (x) dx- h2dx - h' i=1,2, ... ,n-1,
(i-l)h x (i-l)h
- r
Koo = io
h
(dCPO
dx (x)
) 2 tIl
dx = io h2 dx = h'

_ /1
Knn = I-h
(dCPn
dx (x)
) 2 /1
dx =
1
I-h h2 dx =
1
h'
-
K i ,i+l =
l(i+1)h dCPi dCPHI
-(x)--(x)dx =
l(i+1)h (
-2"
1) dx
ih dx dx ih h
1 .
= - h' Z = 0, 1, ... , n - l.

Since K is
Since is symmetric and tridiagonal,
symmetric and tridiagonal, this
this completes
completes the
the computation of K. Next,
computation ofK. Next,
we have
we have

h= l(HI)h (x - ~) CPi(X) dx
(i-I)h 2
= lih (x _ ~) (x - (i - l)h) dx
(i-I)h 2 h

+ I~HI)h (x _ ~) (1 _ ~ x ih) dx

= ih2 - ~
4'
h
io = Io (x - ~) (1 - ~) dx
h2 h
6-4'
in= !~h(x-~)X-(~-h)dX
h h2
---
4 6
and Neumann conditions
6.5. Finite elements and 273

As suggested above,
As suggested above, we compute a solution ii Ku = f by removing the last row
u to Kii
and column from K and the last component from ff,, and solving the resulting square,
square,
nonsingular system. The
nonsingular system. The result,
result, for
for n
n = 10, is
= 10, is shown
shown in
in Figure
Figure 6.15.
6.15.

0.1 r----r-----"T"""""---....---,=:::;;::;;:::=:::;,

-0.1~------~--------~------~--------~------~
o 0.2 0.4 0.6 0.8
x
-3
1 x 10

-1~---~---~---~----~--~
o 0.2 0.4 0.6 0.8
x

Figure 6.15.
Figure 6.15. The The exact
exact and computed
computed solution (top)
(top) and
and the
the error
error in
in
the computed solution (bottom) for (6.(6.51).
51}. The computed solution was found using
piecewise linear finite
finite elements with a regular grid of
of 10
10 subintervals.
subintervals.

6.5.4
6.5.4 Inhomogeneous Neumann
Inhomogeneous Neumann conditions
conditions
The finite
The finite element
element method requires only
method requires only minor
minor modifications
modifications to
to handle
handle the
the inhomo-
inhomo-
geneous Neumann
geneous Neumann problem
problem

- dx d (k(x)dx
dU) =f(x),o<x<i!,
du
dx (0) = a, (6.52)

~~ (f) = b.

In deriving
In deriving the
the weak form of
weak form of the
the BVP, the boundary
BVP, the boundary terms
terms from
from the integration by
the integration by
parts do
parts do not
not vanish:
vanish:

- ior£ dxd [ du ]
k(x) dx (x) v(x) dx
274 Chapter 6. Heat
Heat flow and diffusion
diffusion

The
The weak
weak form becomes
form becomes

find u E V such that a(u, v) = (f, v) + k(R)v(R)b - k(O)v(O)a for all v E V. (6.53)

When
When wewe apply
apply the
the Galerkin
Galerkin method,
method, we
we end
end up
up with
with aa slightly
slightly different
different right-
right-
hand-side
hand-side vector
vector f. We have
We have

ii = (f, rPi) + k(R)rPi(R)b - k(O)rPi(O)a


_ { (f, rP~)' ~ :: 1,2,.... , n - 1 ~ince rPi(R~ = rPi(O) = 0),
- (f, rP~) - k(O)a, ~ - 0 (smce rPo(R) - 0, rPo(O) - 1), (6.54)
(f, rPi) + k(R)b, i = n (since rPn(R) = 1, rPn(O) = 0).

Example 6.11. We
Example 6.11. We now apply the
now apply the finite
finite element
element method to the
method to inhomogeneous
the inhomogeneous
Neumann problem
Neumann problem

d2 u 1
- dx 2 =X - 2' 0 < x < 1,
du (0) = 1, (6.55)
dx
dU(l) = 1.
dx
The exact
The exact solution is
solution is
x3 x2 13
u(x) = -6 + '4 +x - 12
(again
(again choosing the solution
choosing the with u(l)
solution with u(l] = = 0).
Q). The
The calculations
calculations are exactly the
are exactly same
the same
as
as for
for Example 6.10, except
Example 6.10, except that
that the first and
the first last components
and last components ofof f are
are altered
altered as
as
given in (6.54)-
given in We therefore
(6.54). We therefore have
have

- h2 h - h h2
fo = 6 - 4- 1, fn = 4 - 6 + 1.
The results
The results are
are shown,
shown, for
for n = 10,
n = 10, in
in Figure
Figure 6.16.
6.16.

6.5.5 The finite element method for an


an IBVP with Neumann
conditions
We
We now
now briefly
briefly consider
consider the following IBVP:
the following IBVP:
au a
2
u
pc at - '" ax 2 = f(x, t), 0 < x < R, t> to,
6.5. Finite elements and Neumann conditions 275
275

_1.51-_ _ _-'-_ _ _---'......._ _ _-'-_ _ _--L_ _ _- - J


o 0.2 0.4 0.6 0.8
x

_1~------~---------L-- ______ ________ ______


~ ~ ~

o 0.2 0.4 0.6 0.8


x

Figure 6.16.
Figure 6.16. The The exact
exact and computed
computed solution {top}
(top) and
and the
the error in
in
the computed
computed solution {bottom}
(bottom) for {6.55}.
(6.55). The
The computed
computed solution was found
found using
using
piecewise linear finite
finite elements with a regular grid of
of 10 subintervals.
subintervals.

u(x, to) = 'l/J(x), 0< x < e, (6.56)


du
dx (0, t) = 0, t > to,
du
dx (e, t) = 0, t > to·
Finite element methods for. the heat equation with Neumann conditions are derived
as in
as Section 6.4.
in Section 6.4. The
The following
following differences arise:
differences arise:
•• In
In the
the derivation
derivation of
of the
the weak
weak form
form of
of the
the IBVP,
IBVP, the
the space
space V of test
V of test functions
functions
is
is replaced
replaced by
by if.
V.
When the
•• When the Galerkin
Galerkin method
method is
is applied,
applied, the
the approximating
approximating subspace
subspace Sn is re-
Sn is re-
placed
placed by Sn.
by Sn.
The mass matrix M
• The ME R( n - 1 ) x ( n - 1 ), stiffness
e R(n-l)x(n-l), stiffness matrix K RC11-1)^"-1), and
K E€ R(n-l)x(n-l),
11 1
f(t) E
load vector f(t) GR " are replaced by M
Rn-l ME € R(n+l) x (n+l) ?,K
R(n+i)x(n+i) £Ee R(n+i)x(n+i)
R(n+1)x (n+1) },
n+1
and f(t)
f(t) G R , respectively.
E Rn+l, respectively. The stiffness matrix K was
The new stiffness was derived
derived in Sec-
Sec-
tion 6.5.3, and
tion 6.5.3, and the
the new
new form
form of of thethe mass matrix, M,
mass matrix, M, is
is derived analogously.
derived analogously.

In
In contrast to the
contrast to the case
case of
of aa steady-state
steady-state BVP, thesingularity
BVP, the singularityof
ofthe matrixKK causes
thematrix causes
no particular
no particular problem
problem in an IBVP,
in an IBVP, since
since we
we are
are not
not required
required to solve aa linear
to solve system
linear system
whose coefficient
whose coefficient matrix is K.
matrix is K.
276 Chapter 6. Heat flow and diffusion
Chapter

Moreover,
Moreover, the source function
the source function fI(x, is not
( x , t t)) is not required
required to satisfy aa compatibility
to satisfy compatibility
condition in
condition in order
order for
for (6.56)
(6.56) to have aa solution.
solution. Physically,
Physically, this makes sense.
sense. Think-
Think-
ing of
ing of heat
heat flow, for example,
flow, for example, the temperature distribution
the temperature distribution isis in
in general
general changing,
changing,
so there
so there is no
no inconsistency
inconsistency in having
having aa net gain or loss of of total
total heat
heat energy
energy in
in the
the
bar. On
bar. On the
the other
other hand,
hand, for
for the steady-state case,
the steady-state case, the temperature could
the temperature could not
not be
be
independent of
independent of time if the
time if total amount
the total amount of of heat
heat energy
energy in the bar
in the bar were
were changing
changing
with time.
with time.
This can
This can also
also be seen directly.
be seen directly. If
If uu is is the
the solution
solution of
of (6.56),
(6.56), then
then

fof I(x, t) dx = fof pc ~~ (x, t) dx _fof ~ ~:~ (x, t) dx

au [au]e
=
Io
f
pC- (x, t) dx -
t a ~-a (x, t)
x x=o

= fof pc ~~ (x, t) dx - ~ (~~ (C, t) - ~~ (0, t))


= foe pc ~~ (x, t) dx (by the Neumann conditions)
= %t [fof pcu(x, t) dx].
This last
This expression is
last expression is (proportional
(proportional to)to) the time rate
the time rate of change of
of change the total
of the total heal
heat
energy contained
energy contained inin the
the bar (see (2.2)
bar (see (2.2) in
in Section
Section 2.1).
2.1).
We leave the
We leave detailed formulation
the detailed formulation of of aa piecewise
piecewise linear
linear finite
finite element method
element method
for (6.56)
for (6.56) to
to the exercises (see
the exercises (see Exercise
Exercise 6).
6).

Exercises
Exercises
1. Consider
1. Consider an
an aluminum
aluminum bar of length
bar of length 11 m and radius
m and radius 11 cm.
cm. Suppose
Suppose that
that the
the
sides and
sides and ends
ends of
of the
the bar
bar are
are perfectly insulated, and
perfectly insulated, and heat energy is
heat energy is added
added to
to
the
the interior
interior of
of the
the bar at aa rate
bar at rate of
of
1
I(x) = 10- 7 x(25 - x) (100 - x) + 240 W /cm3
is given
(x is
(x given in centimeters, and
in centimeters, and the usual coordinate
the usual coordinate system
system is
is used). The
used). The
thermal conductivity ofthe
thermal conductivity of the aluminum
aluminum alloy
alloy is
is 1.5
1.5W/(cmK). Find and
W / (cm K). Find graph
and graph
the steady-state
steady-state temperature
temperature ofof the bar. Use
Use the finite element method.
method.
2. Repeat
2. Repeat the previous
previous exercise,
exercise, except
except now assume
assume that the
the bar is heteroge-
heteroge-
neous, with thermal
neous, with thermal conductivity
conductivity

~(x) = 1.0 + (1~0) 2


3. Consider
3. Consider aa copper
copper bar (thermal conductivity
bar (thermal conductivity 4.04
4.04 W/(cm K)) of
W / (cm K)) length 100
oflength 100 cm.
cm.
Suppose that
Suppose heat energy
that heat energy is added to
is added the interior
to the interior of
of the bar at
the bar at the
the constant
constant
6.5. Finite elements and Neumann conditions 277

rate of ff(x)
rate of (x) = 0.005 W/cm33,, and
= 0.005W/cm and that
that heat
heat energy
energy is
is added
added to
to the
the left
left end
end
(x =
(x 0) of
= 0) of the
the bar
bar at
at the rate of
the rate of 0.01 W/cm22..
0.01 W/cm
(a) At
(a) At what
what rate must heat
rate must energy be
heat energy be removed from the
removed from the right end (x =
right end = 100)
100)
in order
in order that
that aa steady-state
steady-state solution
solution exist?
exist? (See
(See Exercise
Exercise 6.2.5a,
6.2.5a, or just
or just
use common
use common sense.)
sense.)
(b) Formulate
(b) Formulate the
the BVP
BVP leading
leading to
to aa steady-state
steady-state solution,
solution, and
and approximate
approximate
the solution
the solution using
using the
the finite element method.
finite element method.
4. Suppose that,
4. Suppose that, in
in the
the Neumann
Neumann problem (6.44), f/ does
problem (6.44), does not
not satisfy
satisfy the
the com-
com-
patibility condition
patibility condition
f-
lo f(x)dx = o.
Suppose we
Suppose we just
just ignore
ignore this fact and
this fact and try to apply
try to apply the
the finite
finite element
element method
method
anyway. Where
anyway. Where does
does the method break
the method down? illustrate
break down? Illustrate with the Neumann
with the Neumann
problem
problem

d2 u
- dx 2 = x, O<x<l

~~(O) = 0,
~~(1) =0.
5. The
5. The purpose of this
purpose of this exercise
exercise isis to provide aa sketch
to provide sketch of the proof
of the proof that the null
that the null
space of K is
space of is spanned
spanned byby u where K is
U c ,, where is the
the stiffness
stiffness matrix
matrix arising in aa
arising in
Neumann
Neumann problem and Uucc is
problem and is the
the vector with each
vector with each component
component equal to one.
equal to one.
(a) Suppose
(a) Suppose KuKu == 0,
0, where
where the
the components of u are
components of are UO,Ul,
UQ, ui,...,
..• ,Un. Show
un. Show
that
that this implies that
this implies v, v) =0,
a(v,v)
that a( = 0, where
where
n
V = L Ui¢>i·
i=O

(Hint: Compute
(Hint: Compute U·
u • Ku.)
Ku.)
(b) Explain
(b) Explain why
why a(
a(v, = 00 implies
v, v) = implies that is aa constant
that v is constant function.
function.
(c) Now
(c) explain why
Now explain why Ku
Ku = 00 implies
implies that is aa multiple
that u is multiple of
of Uucc .•
6. (a)
6. (a) Formulate
Formulate the
the weak form of
weak form of (6.56).
(6.56).
(b) Show
(b) Show how
how to
to use piecewise linear
use piecewise linear finite
finite elements and the
elements and method of
the method of lines
lines
to
to reduce
reduce the
the weak
weak form
form to
to aa system
system ofof ODEs.
ODEs.
(c)
(c) Using the backward
Using the Euler method
backward Euler method for
for the
the time integration, estimate
time integration, estimate the
the
solution of
solution of the
the IBVP
IBVP

au
at
_ aax2
2
u = 0' 0 <.x < 1, t > 0,
278 Chaoter
Chapter 6. Heat flow and difFusior
diffusion

u(x, 0) = x(l - x), 0 < x < 1,


au
ax (0, t) = 0, t > 0,
au (1, t) =
ax 0, t >0
and
and graph
graph the solution at
the solution at times
times 0,0.02,0.04,0.06,
0,0.02,0.04,0.06, along
along with
with the steady-
the steady-
state
state solution.
solution. (See
(See Exercise 6.2.1 and
Exercise 6.2.1 and Figure
Figure C.12.)
C.12.)
7.
7. (a)
(a) Formulate
Formulate the
the weak
weak form of the
form of the following
following BVP
BVP with
with mixed
mixed boundary
boundary
conditions:
conditions:

d ( k(x) dU)
- dx dx = I(x), 0 < x < £,
u(O) = 0, (6.57)

~~(£) = O.

(b) Show
(b) Show that
that the
the weak
weak and
and strong forms of
strong forms (6.57) are
of (6.57) equivalent.
are equivalent.
8.
8. Repeat
Repeat Exercise
Exercise 77 for
for the BVP
the BVP

d ( k(x)dx
-dx dU) =/(x),O<x<£,

du (0) = 0
dx '
u(£) = O.

9.
9. Consider
Consider aa copper
copper bar (p =
bar (p = 8.97 g/cm 33,,cc =
8.97g/cm 0.379 J/(gK), '"
= 0.379J/CgK), K== 4.04
4.04 W/(cmK))
W/CcmK))
of length
of length 11 m and cross-sectional
m and cross-sectional area
area 2 cm22.• Suppose
2 cm Suppose the
the bar
bar is
is heated
heated toto aa
uniform
uniform temperature
temperature ofof 88 degrees
degrees Celsius,
Celsius, the
the sides
sides and
and the
the left end (x
left end (a; =
= 0)
0)
are perfectly insulated, and the right endend (x = 100) is
= 100) is placed in an ice bath.
Find
Find the
the temperature
temperature distribution u(x,t)t) of
distribution u(x, of the
the bar
bar by
by formulating and solv-
formulating and solv-
ing an IBVP.
ing IBVP. Graph u(x, 300) (t in in seconds).
seconds). Use the finite element method method
with
with backward
backward Euler
Euler time integration.
time integration.
10. Consider
10. Consider aa chromium
chromium bar
bar of length 25
oflength 25 cm.
cm. The
The material
material constants
constants for
for chromium
chromium
are
are
pp = 7.15g/cm33,, cc =
= 7.15g/cm = 0.439J/(gK),
0.439J/(gK), '"«= 0.937W/(cmK).
= 0.937W/(cmK).
Suppose that
Suppose that the
the left
left end
end ofof the
the bar
bar is
is placed
placed inin an
an ice
ice bath,
bath, the
the right
right end
end is
is
held
held fixed
fixed at
at 88 degrees
degrees Celsius, and the
Celsius, and the bar is allowed
bar is allowed to
to reach
reach aa steady-state
steady-state
temperature.
temperature. Then (at t =
Then (at = 0)
0) the
the right end is
right end insulated. Find
is insulated. Find the temperature
the temperature
distribution
distribution using
using the
the finite
finite element
element method
method andand backward
backward Euler integration.
Euler integration.
Graph
Graph u(x, 100).
n 1 x n 1
11. Let K E
11. 6 R,( + ) ( + ) be the stiffness
R(n+1)x(n+1) stiffness matrix
matrix for
for the Neumann problem, and
nxn
nxn
let K e
let E R
R be
be the
the matrix obtained by
matrix obtained by removing
removing the last row
the last and column
row and column
equation
6.6. Green's functions for the heat equation 279

of K. Prove
of that K is
Prove that is nonsingular. (Hint: K is
nonsingular. (Hint: is the
the stiffness
stiffness matrix
matrix for
for the
the
BVP with
BVP with mixed
mixed boundary
boundary conditions,
conditions, Neumann at the
Neumann at the left
left and
and Dirichlet
Dirichlet at
at
the right.)
the right.)

6.6
6.6 Green's functions
Green's functions for
for the
the heat
heat equation
equation
We will
We will now discuss Green's
now discuss Green's functions
functions for
for the heat equation.
the heat equation. Our
Our treatment
treatment of of this
this
topic is
topic is intentionally
intentionally rather
rather superficial,
superficial, and
and our
our goals
goals are
are modest.
modest. WeWe simply
simply want
want
to introduce
to introduce thethe concept
concept of
of aa Green's
Green's function
function for
for aa time-dependent
time-dependent PDE PDE and
and show
show
an example.
an example. To To do
do anything
anything more would distract
more would distract us
us from
from our
our main topics.
main topics.
Before we
Before we present any specific
present any specific Green's
Green's functions,
functions, wewe describe
describe the
the form
form that
that the
the
Green's function
Green's function must
must take.
take. WeWe have
have so
so far
far seen
seen two examples of
two examples of Green's
Green's functions.
functions.
First of
First of all,
all, in
in an
an IVP
IVP for
for an
an ODE,
ODE, the
the solution
solution u == u(t) is of
u(t) is of the
the form
form

u(t) = (JO G(t; s)f(y) ds,


ito
where f/ is
where is the right-hand side
the right-hand side of
of the
the ODE
ODE (see(see Section
Section 4.6
4.6 for
for an
an example).
example). This
This
formula shows
formula shows thethe contribution
contribution of of the
the data
data atat time
time ss onon the solution at
the solution at time
time t t—-
39
this contribution
this contribution is is G(t;
G(t] s)f(s) ds.39
s)f(s) ds. The reader
The reader should
should notice
notice how
how the value u(t)
the value u(t) is
is
found by
found "adding up"
by "adding up" the
the contributions
contributions to to u(t)
u(t) ofof the
the data
data from
from the
the time
time interval
interval
oo). (The
[to, 00). (The value
value of of G(t; s) is
is zero
zero when
when s > t, so in
t, so in fact
fact only
only the data from
the data from the
the
time interval
time [tQ,t]tl can
interval [to, can affect
affect the value of
the value of u(t).)
u(t).)
We have
We have also
also seen
seen anan example
example of of aa Green's
Green's function
function for
for aa steady-state
steady-state BVPBVP
(see Section
(see Section 5.7),
5.7), where
where thethe data
data (the
(the right-hand
right-hand side side of
of the
the differential
differential equation)
equation) isis
given over
given over aa spatial
spatial interval
interval such
such as
as [0, fl. In
[0,1]. In this
this case,
case, the
the value is determined
u(x) is
value u(x) determined
by adding up
by adding up the contributions from
the contributions from the data at
the data at all
all points
points in in the
the interval.
interval. TheThe
solution formula
solution formula takes
takes thethe form
form

u(x) = 10£ g(x;y)f(s) dy.


In the
In the case
case of
of aa time-dependent
time-dependent PDE,
PDE, the
the data
data !(x,
/(x,t) (the right-hand
t) (the right-hand side
side of
of
the PDE) is
the PDE) is prescribed over both
prescribed over both space
space and
and time.
time. Therefore,
Therefore, we
we will
will have
have to
to add
add
up the
the contributions
contributions over
over both
both space
space and
and time,
time, and
and the
the formula
formula for
for the
the solution
solution will
will
involve two
involve two integrals:
integrals:

u(x, t) = roo
ito
r G(x, t; y, s)f(y, s) dy ds.
io
l

39
By this
39By this we
we mean that the
mean that the contribution
contribution of
of the
the data
data over
over aa small
small interval
interval (8 e, s +
(s -— £,8 + £)
e) is
is
8+<

1 8-< G(tj s)f(s) ds.


280
280 Chapter 6.
Chapter 6. Heat
Heat flow
flow and
and diffusion
diffusion

6.6.1
6.6.1 The Green's
The Green's function for the
function for the one-dimensional
one-dimensional heat
heat
equation under
equation under Dirichlet
Dirichlet conditions
conditions
We
We will compute the
will compute the Green's
Green's function
function for
for the
the IBVP
IBVP
au a 2u
pc at - "'ax 2 = f(x,t), 0< x < £, t> to,
u(x, to) = 0, < x < £, ° (6.58)
u(O, t) = 0, t > to,
u(£, t) = 0, t > to.
The solution
The solution to (6.58) was
to (6.58) was derived
derived in
in Section
Section 6.1;
6.1; it
it is
is
00

u(x, t) = L an(t) sin (n;x),


n=l

where
where

and
and
Cn(s) = ~ 1£ fey, s) sin C?) dy.
We can derive
We can derive an
an expression
expression for
for the Green's functions
the Green's functions by manipulating the
by manipulating the formula
formula
for u(x,
for u(x,i):
t):

If we define
If

~ ~oo e-t<n 2 7r 2 (t-s)/(pcP) sin (~) sin (n7rre) to S sst,


G(x , t ;Y, s) = pel L...n=l £ £'
{ 0, s > t,
(6.59)
then we
then we have
have
t
XJ

u(x,t) = (t G(x,t;y,s)f(y,s)dyds.
ltD 10
Therefore, G(x,
Therefore, G(x,t;y,s) is the
t; y, s) is the Green's
Green's function
function for
for (6.58).
(6.58).
6.6. Green's
6.6. Green's functions for the
the heat
heat equation 281
281

Having derived the


Having derived Green's function,
the Green's function, we
we ought
ought to ask the
to ask question: What
the question: What is it
is it
good for?
good It may
for? It may be obvious to
be obvious to the
the reader
reader that
that the formula for
the formula for uu is no more
is no more useful,
useful,
for computational
for computational purposes,
purposes, than
than the original Fourier
the original series solution.
Fourier series solution. Therefore,
Therefore,
the
the value of the
value of Green's function
the Green's function is
is not as aa computational
not as too1. 40 Rather,
computational tool. Rather, the
the
Green's function is valuable because of the insight it gives us into the behavior of
Green's function is valuable because of the insight it gives us into the behavior of
solutions to
solutions to the
the IBVP.
IBVP. Indeed,
Indeed, the
the Green's
Green's function
function cancan be
be regarded
regarded as as aa solution
solution
to
to the IBVP with
the IBVP with aa special
special right-hand
right-hand side.
side. The
The solution to
solution to

au a2 u
pc at - ~ ax2 = 6(x - yo)6(t - so), 0 < x < e, t > to,
u(x, to) = 0, 0 < x < e, (6.60)
u(O, t) = 0, t > to,
u(e,t) = 0, t> to

is
is
u(x, t) = G(x, t; Yo, so).
The right-hand
The side 6(x-yo)6(t-s
right-hand side represents aa source
6(x—yo)6(t—SQ)o) represents source concentrated
concentrated entirely
entirely at the
at the
space-time point
space-time (yo,so).
point (Yo, The IBVP
so). The (6.60) describes
IBVP (6.60) describes the
the following experiment: A
following experiment: A
bar of
bar of length e
length t is
is initially at temperature
initially at temperature 0, 0, and
and at
at time
time SoSQ > to, Joules of
to, A Joules of energy,
energy,
where A is
where is the cross-sectional area
the cross-sectional area of
of the bar,41 are
the bar,41 are added
added toto the
the cross-section at
cross-section at
xx —
= y 0. The
Yo. The heat
heat energy
energy then
then flows
flows in
in accordance
accordance with
with the
the heat
heat equation.
equation. ByBy
examining snapshots
examining snapshots of of G(x, t; Yo, so), we
G(x,t;yo,so), we can
can get an idea
get an idea of
of how
how the temperature
the temperature
changes with
changes time.
with time.

Example 6.12.
Example 6.12. WeWe consider an iron
consider an bar of
iron bar of length
length t =— 100 e
100cm (p =
cm (p g/ cm33,,
7.8&g/cm
= 7.88
cc = 0.437
QA37J/(gK), 0.836 W/(cmK)).
J/(gK), ~K = 0.836 W/(cmK)). We We graph
graph the
the solution
solution to
to (6.60)
(6.60) with
with
to = 0,
to 0, So 60, and
SQ = 60, and yo
Yo = 7575 (time
(time measured
measured inin seconds)
seconds) in
in Figure 6.17, which
Figure 6.17, which
shows
shows how the spike
how the of heat
spike of heat energy
energy diffuses
diffuses over time.
over time.

Formula
Formula (6.59) has its
(6.59) has shortcomings; for
its shortcomings; example, if
for example, if one
one wishes
wishes to
to compute
compute aa
snapshot of
snapshot of G
G(x,t;y
(x, t; Yo,
0 , s
so)
0 ) for
for t
t greater
greater than
than but
but very
very close
close to
to SQ,
so, then
then many
many terms
terms
of the
of Fourier series
the Fourier series are
are required
required toto obtain an accurate
obtain an accurate result (see Exercise
result (see Exercise 1).
1). It
It is
is
possible to
possible obtain aa more
to obtain more computationally
computationally efficient
efficient formula
formula for for use when tt is
use when is very
very
close to
close to SQ- However, to
so. However, to do so would
do so would require
require aa lengthy digression.42
lengthy digression.

6.6.2 Green's functions under other boundary


boundary conditions
The above
The above method
method can
can be used to
be used to derive
derive the
the Green's
Green's function for the
function for the one-dimensional
one-dimensional
heat equation
heat equation under other boundary
under other boundary conditions, such as
conditions, such as Neumann
Neumann or or mixed
mixed bound-
bound-
ary conditions.
ary The calculations
conditions. The calculations are left to
are left to the
the exercises.
exercises.
40
That is, this particular
40That particular Green's function is not useful
useful as a computational tool. We
We have encoun-
encoun-
tered other Green's functions, particularly those in Section 4.6, are useful
4.6, that are useful computationally.
41
The reader should recall from
41The 2.1 that each term in the heat equation, including
from Section 2.1 including the
right-hand side, is multiplied by A in the original derivation.
42
The interested reader can consult Haberman [22], Chapter 11.
42The
282 and diffusion
Chapter 6. Heat flow and

Graph of G(x,t;75,60) for various values of t

- t=120
- _. t=240
0.02 ._.- t=360
...... t=480
- t=600

Q) 0.015
::;

Q)
c..
.ill 0.01

0.005

20 40 80
x

Figure 6.17.
Figure 6.17. Snapshots
Snapshots of
of the
the Green's
Green's function in Example
function in 6.12 at
Example 6.12 at tt ==
120,240,360,480,600 seconds.
120,240,360,480,600 seconds. Twenty
Twenty terms
terms of
of the
the Fourier
Fourier series
series were
were used
used to to
create these
create these gmphs.
graphs.

Exercises
Exercises
1. Let
L Let G(x,
G(x,t]yo,so)
t; Yo, so) bebe the
the Green's
Green's function
function from
from Example
Example 6.12
6.12 (yO
(yo = 75,75, So
SQ ==
60). Suppose
60). Suppose oneone wishes
wishes to
to produce
produce an an accurate
accurate graph
graph of
of G(x,
G(x,t;yo, so) for
t; Yo, SQ) for
various values of
various values of tt > so. How many
SQ. How many terms
terms ofof the
the Fourier
Fourier series
series are
are necessary
necessary
to obtain
to obtain an
an accurate
accurate graph for tt = 6060
graph for 6060 (10
(10 minutes
minutes after
after the heat energy
the heat energy isis
added)? For
added)? For tt == 61
61 (1
(1 second
second afterward)?
afterward)? (Hint:
(Hint: Using
Using trial
trial and
and error,
error, keep
keep
adding terms
adding terms toto the
the Fourier
Fourier series
series until the graph
until the graph no
no longer
longer changes
changes visibly.)
visibly.)

2. Compute
2. Compute the
the Green's
Green's function
function for
for the
the IBVP
IBVP

au 02u
pc at - /'i, < x < f,
ox 2 = f(x, t), 0 t > to,
u(x, to) = 0, 0 < x < f,
au
ax (0, t) = 0, t > to,
au
ox(f,t) = 0, t> to·

Produce aa graph
Produce graph similar
similar to
to Figure
Figure 6.17
6.17 (use
(use the
the values of p,
values of c, /'i"K, yo,
p, c, and So
yo, and SQ
from Exercise 6.12).
from Exercise 6.12).
6.7. Suggestions for further reading 283

3. Compute
3. Compute the
the Green's
Green's function
function for
for the
the IBVP
IBVP

au - 1£ aax2 u =
pc at f(x, t), 0< x < f, t > to,
2

u(x, to) = 0, °< x < f,


u(O, t) = 0, t > to,
au
ax(f,t) = 0, t > to·

Produce aa graph
Produce graph similar
similar to
to Figure 6.17 (use
Figure 6.17 (use the values of
the values of p, c, 1£,
p, c, K, Yo, and 80
yo, and SQ
from Exercise
from Exercise 6.12).
6.12).
4. Compute
4. Compute the
the Green's
Green's function
function for
for the
the IBVP
IBVP

au a2 u
pc at - 1£ ax 2 = f(x, t), °< x < f, t > to,
u(x, to) = 0,
au
°< x < f,
ax (0, t) = 0, t > to,
u(f, t) = 0, t > to.
Produce aa graph
Produce graph similar
similar to
to Figure
Figure 6.17
6.17 (use
(use the
the values
values of
of p, c, 1£,
p, c, «, Yo,
yo ? and
and 80
SQ
from Exercise
from Exercise 6.12).
6.12).

6.7
6.7 Suggestions for
Suggestions for further
further reading
reading
In this
In this section,
section, we
we have
have continued
continued the development, begun
the development, begun inin the
the previous
previous chapter,
chapter,
of both
of both Fourier
Fourier series
series and
and finite
finite element
element methods.
methods. TheThe references
references noted
noted in
in Section
Section
5.8 are,
5.8 are, for
for the
the most
most part, revelant
part, revel for this
ant for chapter as
this chapter as well.
well. The
The books
books [10,
[10, 4, 46, 22],
4, 46, 22],
along with
along with many
many others,
others, introduce
introduce Fourier
Fourier series
series via
via the
the method
method of of separation
separation of of
variables briefly
variables briefly described
described inin Section
Section 6.1.6.
6.1.6. Our
Our approach
approach is is perhaps unique among
perhaps unique among
introductory texts.
introductory texts.
To gain
To gain aa deep
deep understanding
understanding of of solution
solution techniques,
techniques, it it is
is essential
essential to
to know
know
the qualitative
the qualitative theory
theory ofof PDEs,
PDEs, which
which isis developed
developed inin several
several texts.
texts. A A basic
basic under-
under-
standing can
standing can be
be gained
gained from
from introductory
introductory books
books such
such as
as Strauss
Strauss [46]
[46] or
or Haberman
Haberman
[22]. An
[22]. An alternative
alternative isis the
the older
older text
text by
by Weinberger
Weinberger [52].
[52]. For
For aa more
more advanced
advanced and and
complete study,
complete study, one
one should
should consult
consult McOwen
McOwen [39][39] or
or Folland
Fblland [14]
[14] or
or Rauch
Rauch [41].
[41].
This page intentionally
This page intentionally left
left blank
blank
Chapter 7

waves

We
We now
now treat
treat the
the one-dimensional
one-dimensional wave
wave equation,
equation, which
which models
models the transverse
the transverse
vibrations of an elastic string or the longitudinal vibrations of a metal bar. We will
concentrate
concentrate on modeling a homogeneous medium,
medium, in which case the wave equation
takes the form
form
82u 2
28 u
8t2 - C 8x 2 = f(x, t).
Our first order
Our first order of
of business
business will
will be to understand
be to understand the
the meaning
meaning of
of the
the parameter c. We
parameter c. We
then derive
then derive Fourier series and
Fourier series and finite element methods
finite element methods for solving the
for solving the wave equation.
wave equation.
It is straightforward
straightforward to extend the finite element methods to handle heterogeneous
media (nonconstant
media (nonconstant coefficients in the
coefficients in PDE).
the PDE).

7.1 homogeneous wave equation without


The homogeneous
boundaries
We
We begin
begin our
our study of the
study of the wave equation by
wave equation by supposing
supposing that
that there are no
there are no boundaries—
boundaries-
that
that the
the wave equation holds
wave equation holds for
for — oo < xx < oo.
-00 00. Although
Although this
this may
may not seem to
not seem be
to be
aa very
very realistic
realistic problem,
problem, it
it will
will provide
provide some
some useful
useful information
information about
about wave
wave motion.
motion.
We
We therefore
therefore consider
consider the
the IVP
IVP
82 u 2
2 f) u
8t 2 - c f)x 2 = 0, -00 < x < 00, t > 0,
u(x,O) = 'l/J(x), -00 < x < 00, (7.1)
8u
8t (x,O) = ')'(x), -00 < x < 00.

(To simplify
(To simplify the
the algebra
algebra that follows, we
that follows, we assume
assume in in this section that
this section that the
the initial time
initial time
is to =
is = 0.)
0.) With
With aa little
little cleverness,
cleverness, it
it is
is possible
possible to
to derive
derive an explicit formula
an explicit formula for
for the
the
solution in
solution in terms
terms of the initial
of the initial conditions and ')'(x).
i^(x) and
conditions 'l/J(x) ^(x). The
The key
key point in deriving
point in deriving
this formula
this formula is to notice
is to notice that
that the
the wave operator
wave operator
82 2 82
f)t2 - C f)x2

285
286 Chapter 7. Waves

factored:
can be factored:

For example,
For example,

The mixed
The mixed partial derivatives cancel
partial derivatives cancel because, according to
because, according to aa theorem
theorem of
of calculus,
calculus, if
if
the second
the second derivatives
derivatives of
of aa function
function u(x, t) are
are continuous,
continuous, then
then

82 u 82 u
8t8x 8x8t·
It follows
It follows that
that any
any solution
solution u(x,
w(x, t) of
of either
either

8u+ c 8u=O
8t 8x
or
or
8u_ c 8u=O
8t 8x
will also
will also solve
solve the
the homogeneous
homogeneous wavewave equation.
equation. If
If u(x, f(x -— ct), where
u(x,t)t) == f(x where /f ::
R -t
R —t R
R isis any
any twice
twice differentiable
differentiate function,
function, then
then
8u 8u
8t (x, t) + c 8x (x, t) = -c!'(x - ct) + c!,(x - ct) = O.

Similarly, if
Similarly, if g : R
R -t
—> R
R is
is twice
twice differentiable,
differentiate, then u(x,t)t) =
then u(x, g(x + ct)
= g(x satisfies
ct) satisfies

8u 8u
8t (x, t) - c 8x (x, t) = cg'(x + ct) - cg'(x + ct) = O.

Thus, by
Thus, by linearity,
linearity, every
every function
function of
of the
the form
form

u(x, t) = f(x - ct) + g(x + ct) (7.2)

is aa solution
is solution of
of the
the homogeneous
homogeneous wave wave equation.
equation. WeWe now
now show
show that
that (7.2)
(7.2) is
is the
the
general solution.
general solution.
To prove
To prove that
that (7.2)
(7.2) really
really represents
represents all
all possible
possible solutions
solutions of
of the homogeneous
the homogeneous
wave equation, it
wave equation, it suffices
suffices to
to show
show that we can
that we can always
always solve
solve (7.1)
(7.1) with
with aa function
function of
of
7.1. The
7.1. The homogeneous
homogeneous wave
wave equation
equation without
without boundaries
boundaries 287

the form
the form (7.2)
(7.2) (since
(since any
any solution
solution of
of the
the wave
wave equation
equation satisfies
satisfies (7.1)
(7.1) for
for some
some 'lipjJ
and ')').
and 7). Moreover,
Moreover, by
by linearity
linearity (the
(the principle
principle of
of superposition),
superposition), it
it suffices
suffices to
to solve
solve

fPu
at 2 -
2 fPu _
c ax 2 -
° , -00 < x < 00, t > 0,
u(x,O) = 'ljJ(x), -00 < x < 00, (7.3)
au
at (x,O) = 0, -00 < x < 00,

and

a u
at 2
2
-
2
2a U _
c ax 2 -
° , -00 < x < 00, t > 0,
u(x,O) = 0, -00 < x < 00, (7.4)
au
at (x,O) = ')'(x), -00 < x < 00,

separately and
separately and add
add the
the solutions.
solutions.
To find
To find aa solution
solution to (7.3), we
to (7.3), we assume
assume that u(x,t)t) = f(x
that u(x, f ( x -- ct)
ct) + g(x
g(x + ct).
ct}.
Then uu solves
Then solves the
the PDE.
PDE. We We want
want to choose f/ and
to choose and 9g so
so that
that u(x,O) if)(x) and
u(x,Q) == 'ljJ(x) and
du/dt(x,Q} == 0.
au/at(x,O) 0. But
But
u(x,O) = f(x) + g(x)
and
au
at (x,O) = c(g'(x) - !'(x)),

so if
so if we
we take
take
1 1
f(x) = "2'ljJ(x), g(x) = "2'ljJ(x),
the required
the required conditions
conditions are
are satisfied.
satisfied. That
That is,
is,

u(x, t) = "21 ('ljJ(x - ct) + 'ljJ(x + ct))

is the
is the solution
solution of
of (7.3).
(7.3).
Finding aa solution
Finding solution to (7.4) is
to (7.4) is aa bit
bit harder.
harder. With u(x,t)t) = f(x-ct)
With u(x, f(x-ct}+g(x + ct),
+ g(x+ct),
we want
we u(x,0) = 00 and
want u(x,O) and au/at(x, 7(#)- This
du/dt(x,0]0) = ')'(x). This yields
yields two equations:
two equations:

f(x) + g(x) = 0,
-c!'(x) + cg'(x) = ')'(x).

The first
The equation implies
first equation implies that /(#) == -g(x);
that f(x) substituting this
—g(x); substituting this into
into the
the second
second
equation yields
equation yields
2cg'(x) = ')'(x).
A solution to
A solution to this
this is
is
1
g(x) = 2c 10r ')'(s) ds.
288 Chapter 7. Waves

With f(x) = —
With /(re) we obtain
g(x}, we
-g(x), obtain

u(x, t) = --21
c
l 0
x ct
- ')'(8) d8 1
+ -2
C
l
0
x ct
+ ')'(8) d8 1
= -2
C
l
x-ct
x ct
+ ')'(8) d8.

This is the
This is the solution
solution to (7.4). Adding
to (7.4). Adding the
the two, we obtain
two, we obtain

u(x, t) = "21 (¢(x - ct) 1


+ ¢(x + ct)) + -2
c
l
x-ct
x ct
+ ')'(8) d8. (7.5)

This is d'Alembert's
This is solution to
d'Alemberl's solution to (7.1).
We can
We can now
now understand
understand the significance of
the significance the constant
of the constant c,c, and also why
and also why the the
PDE is
PDE is called
called the
the wave equation.
equation. We first consider
We first consider aa function
function of
of the form ff(x
the form ( x -— ct).
ct}.
Regarding
Regarding u(x, t} = ff(x
t) = ( x -— ct} as aa function
ct) as function of of x for
for each
each fixed t, we
fixed t, see that
we see each
that each
u(x,t) is aa translate
u(x, t) is translate of of u(x,
w(x,0)0) == /(#). That is,
f(x). That is, the "time snapshots"
the "time snapshots" of of the function
the function
u(x, t) all have
t) all have the same shape;
the same shape; asas time
time goes
goes on, this shape
on, this shape moves
moves to to the
the right
right (since
(since
cc > 0).
0). We We call
call u(x,
u(x,t)t) == f(x ct} aa right-moving
f(x -— ct) right-moving wave; an example
wave] an example is is shown
shown in in
Figure 7.1. Similarly,
Figure 7.1. u(x, t) == g(x +
Similarly, u(x,t} + ct)
ct} is
is aa left-moving
left-moving wave.
wave. Moreover,
Moreover, c is is just
just
the
the wave speed. It
wave speed. It is
is therefore easy to
therefore easy to understand d'Alembert's solution
understand d'Alembert's solution to to the
the
wave equation—it is
wave equation-it is the
the sumsum ofof aa right-moving
right-moving wave wave andand aa left-moving
left-moving wave, both
wave, both
moving
moving at at speed
speed c.c.

1.Sr--..------..------..------..------,

y=u(x,O) y=u(x,S) y=u(x, 10)

O.S

O~~----~--~--~~--~~~~~--~--~--~
-S 0 S 10

Figure 7.1.
Figure 7.1. A right-moving wave u(x,t}
u(x, t) == ff(x
( x -— ct}
ct) (with c = I).
= 1).

Example 7.1.
Example 7.1. The solution to
E)2u 2u
28
8t 2 - c 8x 2 = 0, -00 < x < 00, t > 0,
7.1. The homogeneous
The homogeneous wave equation without boundaries
wave equation 289

_,,2
U (X, 0) = e ,-00 < x < 00, (7.6)
au
at (x, 0) = 0, -00 < x < 00

is
is

Several
Seveml snapshots
snapshots ofof this
this solution are graphed
solution are gmphed inin Figure 7.2. Notice
Figure 7.2. Notice how
how the
the initial
initial
"blip" splits
"blip" into two
splits into two parts
parts which
which move to the
move to the right and left.
right and left.

(\ uLO)
0.9 u(·,1 )
u(·,2)
0.8
u(·,3)
0.7

0.6

0.5

0.4

0.3

0.2

0.1

-5 0 5 10

Figure 7.2. Snapshots


Figure 7.2. Snapshots of
of the
the solution
solution to
to (7.6) at = 0,1,2,3.
times tt =
at times 0,1,2,3.

D'Alembert's solution to
D' Alembert's solution to the
the wave
wave equation
equation shows
shows that
that disturbances
disturbances in in aa
medium
medium modeled
modeled byby the
the wave
wave equation
equation travel
travel at
at aa finite speed. We
finite speed. We can
can state this
state this
precisely
precisely as follows. Given
as follows. Given any
any point in space
point x in space and
and any
any positive
positive time £, the
time t, interval
the interval
[x ct,xx + ct\
[x -— ct, ct] consists
consists of
of those
those points
points from
from which
which aa signal,
signal, traveling
traveling at
at aa speed
speed ofof
c,
c, would
would reach
reach xx in
in time
time t or
or less.
less.

Theorem
Theorem 7.2.
7.2. Suppose u(x,t)t) solves
Suppose u(x, solves the IVP (7.1), xx is
the IVP is any
any real
real number,
number, and
and
t > o.
t> 0. If
// 1jJ(x)
ifi(x) and
and 'Y(x)
'j(x) are
are both
both zero
zero for satisfying x -— ct ::;
all xx satisfying
for all < xx ::;
<X x+
+ ct, then
then
u(x, = 0.
u(x,t]t) = O.
290
290 Chapter 7.
Chapter 7. Waves
Waves

Proof. We
Proof. have
We have

-
u(1', t) = 21 ['IjJ(1' - -
ct)
-
+ 'IjJ(1' + ct)]
c
l
x-ct
x d
+ 21 _ +_ ')'(s) ds.

If 'IjJ(x)
If and ')'(x)
tfj(x) and 7(x) are
are both
both zero
zero for
for all
all x satisfying
satisfying 1'-
x —dct :::;
< x :::;
< 1'+x + d, then all
ct, then three
all three
terms
terms in in this
this formula
formula for
for u(1', are zero,
u(x,t)t) are zero, and
and hence
hence u(1', = 0.0. D0
u(x,i)t) =

We
We therefore call the
therefore call the interval ct,xx + d]
interval [x -— d, the domain
ct\ the of dependence
domain of of the
dependence of the
space-time point
space-time point (x, t). We
We illustrate
illustrate the
the domain
domain of of dependence
dependence in Figure 7.3.
in Figure 7.3.

1.5,----------., 1.5,---------~

0.5 0.5

OL.......:_-...
500 1000
--=-.....J
1500
O~------~~~--~
500 1000 1500
X

Figure 7.3. Left:


Figure 7.3. The domain
Left: The domain of dependence of
of dependence of the
the point (1000,1)
(x, t) == (1000,1)
point (x,
with 522. The
with cc == 522. The domain
domain of
of dependence
dependence isis the
the interval
interval shaded on the
shaded on the x-axis.
x-axis. Right:
Right:
The domain
The domain of influence of
of influence the point
of the (#o,0) == (1000,0).
point (xo,O) (1000,0).

We can
We can look at this
look at this result from another
result from another point of view.
point of view. TheThe initial
initial data at aa
data at
point
point xo, VKxo) and
#o, 'IjJ(xo) 7(^0), can
and ')'(xo), only affect
can only affect the solution u(x,
the solution if t is
u(x,t)t) if is large
large enough,
enough,
specifically, if
specifically, if
t ~ \x ~ Xo \.
The set
The set
{(x, t) : ct ~ Ix - xol}
is
is therefore called the
therefore called the domain
domain of
of influence of the
influence of the point (xo,0). An
point (xo,O). An example
example ofof aa
domain of
domain of influence
influence isis given
given in
in Figure 7.3.
Figure 7.3.
From the
From the preceding discussion, we
preceding discussion, we see
see that if aa disturbance
that if disturbance isis initially
initially confined
confined
to the interior
to the interior of
of aa bounded
bounded region, the boundary
region, the cannot affect
boundary cannot affect the solution until
the solution until
7.2. Fourier series methods for the wave equation 291
291

sufficient time
sufficient time has
has passed. For this
passed. For this reason,
reason, the solution to
the solution to the
the wave equation in
wave equation an
in an
infinite medium
infinite medium provides
provides aa realistic idea of
realistic idea of what
what happens
happens (in(in certain experiments)
certain experiments)
in aa bounded
in bounded region, at least
region, at least for
for aa finite
finite period of time
period of time (namely,
(namely, until
until enough
enough
time has elapsed for the disturbance to reach the boundary). However, there is
time has elapsed for the disturbance to reach the boundary). However, there is no
no
simple formula
simple formula for
for the
the solution of the
solution of wave equation
the wave subject to
equation subject to boundary
boundary conditions.
conditions.
To attack
To attack that
that problem,
problem, we must use
we must Fourier series,
use Fourier finite elements,
series, finite elements, or
or other
other less
less
elementary methods.
elementary methods.

Exercises
1. Solve
1. Solve (7.1)
(7.1) with
with

0, x < -2 or x > 2,
,,(x) = { 5· 1Q-4 x + 10- 3, -2 :s; x :s; 0,
-5· 1Q-4 x + 10- 3 , 0 < X :s; 2,
43
7(0;)
,(x) == 00 and — 522.
and c = 522.43 Graph several snapshots
Graph several snapshots of
of the solutions on
the solutions on aa
common plot.
common plot.
2. Solve
2. Solve (7.1)
(7.1) with ip(x) = 0,
with 'IjJ(x) 0,

0, x < -0.5 or x > 0.5,


,(x) = { -1,
Ixl :s; 0.5,
and cc =
and = 522.
522. Graph several snapshots
Graph several snapshots of
of the
the solutions
solutions on
on aa common
common plot.
plot.
3. Consider
3. Consider the
the IVP (7.1) with
IVP (7.1) with j(x) = 0
,(x) = and
0 and

The initial
The displacement consists
initial displacement of two
consists of "blips," which,
two "blips," which, according
according to d'Alembert's
to d' Alembert 's
formula,
formula, will
will each split into
each split into aa right-moving
right-moving and
and aa left-moving
left-moving wave. What
wave. What
happens when
happens when the
the right-moving
right-moving wave
wave from
from the
the first
first blip
blip meets
meets the
the left-moving
left-moving
wave from the
wave from second blip?
the second blip?

4. Repeat
4. Repeat the
the previous
previous exercise
exercise with
with

7.2 Fourier series methods for the wave equation


Fourier
Fourier series
series methods
methods forfor the
the wave
wave equation are developed
equation are developed just as for
just as for the
the heat
heat
equation—the key
equation-the key is
is to represent the
to represent solution in
the solution in aa Fourier
Fourier series
series in
in which the Fourier
which the Fourier
coefficients are
coefficients are functions
functions of
of t. We
We begin
begin with
with the
the IBVP
IBVP

aat2 u - 2 a2 u
c ax 2 = f(x, t), 0 < x < £, t > to,
2
43
The value
43The 522 is
value 522 is physically meaningful, as
physically meaningful, as we
we will see in
will see in the
the next section.
next section.
292
292 Chapter 7. Waves
Chapter 7. Waves

u(x, to) = 1/J(x) , °< x < e,


au
at (x, to) = 1'(x), °< x < e, (7.7)
u(O, t) = 0, t > to,
u(e,t) = 0, t> to,
which
which models
models the small displacements
the small displacements of
of aa vibrating string. We
vibrating string. We write
write the solution
the solution
in
in the form
the form
u(x, t) = ~ . (n7fx)
~ an(t) sm -e- ,
n=l
where
where
an(t) = ~ 1i u(x, t) sin (n;x) dx, n = 1,2,3, ....

We also
also expand
expand the right-hand side
side /(#,£) in aa sine
f(x, t) in sine series:
series
00

f(x,t) = LCn(t) sin (n;x),


n=l
where
where
Cn(t) = ~ 1i f(x, t) sin (n;x) dx, n = 1,2,3, ....

Using the
Using the same
same reasoning as in
reasoning as in Section
Section 6.1,
6.1, we
we can
can express
express the left-hand side
the left-hand side of
of the
the
PDE in
PDE in aa sine
sine series:
series:
2 2 2 2
a u a u 00 (d2a c n 7f2 (n7fx)
c
at 2 (x, t) - ax 2 (x, t) = ~ dt 2n (t) + ~an(t) sin -e- .
)

Setting this
Setting equal to
this equal to the series for
the series for /(#,£),
f(x, t), we obtain the
we obtain ODEs
the ODEs
~an 2n 27f2
dt 2 + -e-2-an = cn(t), n = 1,2,3, ....

Initial conditions
Initial conditions for
for these
these ODEs
ODEs are
are obtained
obtained from
from the
the initial
initial conditions
conditions for
for the
the
wave eauation in
wave equation in (7.7).
(7.7). If
If

1/J(x) = ~ . (n7fx) ~. (n7fx)


~ bn sm -e- , 1'(x) = ~ dn sm -e- ,
n=l n=l
then we
then we have
have
dan
an(to ) = bn, dt (to) = dn.
We
We thus
thus find
find the Fourier sine
the Fourier sine coefficients
coefficients of
of the
the solution
solution u(x,
u(x, t) by solving the
by solving the IVPs
IVPs
~an c2 n 2 7f2
dt 2 + -e-2-an = cn(t),
an(to) = bn , (7.8)
dan (to ) =d ,
--;It n
7.2. Fourier series methods for the wave equation 293

for
for n
n== 1,2,3,
1,2,3, —
.... In Section 4.2.2,
In Section 4.2.2, we
we presented
presented an
an explicit
explicit formula
formula for
for the solution
the solution
of (7.8). The use of this formula is illustrated in Example 7.4 below.
of (7.8). The use of this formula is illustrated in Example 7.4 below.

7.2.1
7.2.1 Fourier series
Fourier series solutions of the
solutions of the homogeneous
homogeneous wave
wave equation
equation
When
When the
the wave
wave equation
equation isis homogeneous
homogeneous (that
(that is, when f/ =
is, when == 0), the
the Fourier series
Fourier series
solution is
is especially
especially instructive. We then must solve
tPa n r?n 2 7f2
dt 2 +~an=O,
an(to) = bn ,
dan ( )
dt to = dn,
which yields

Therefore,
Therefore, the solution to
the solution to
a2 u 2 a
2
u
at 2 - c ax 2 = 0, 0 < x < i, t > to,
u(x, to) = 'IjJ(x) , 0 < x < i,
au
at (x, to) = 'Y(x), 0 < x < i, (7.9)
u(O, t) = 0, t > to,
u(i, t) = 0, t > to,
is

~{ bncos (m7f(
u(x,t ) = ~ -i- t-to) ) dni.
+ m7f sm (m7f
--yet-to) )}.
sm (n7fx)
-f- .

This formula shows


This formula shows the
the essentially
essentially oscillatory
oscillatory nature
nature of solutions to
of solutions to the
the wave equa-
wave equa-
tion;
tion; indeed,
indeed, the
the Fourier
Fourier sine
sine coefficients
coefficients of
of the solution are
the solution periodic:
are periodic:

an (t + ~!) = an(t) for all t.

44
The frequencies (21} are called the
en/ (2l)
frequencies cn! the natural frequencies of the
frequencies of the string.
string.44 These fre-
fre-
quencies
quencies are called natural
are called natural because
because any solution of
any solution of the
the homogeneous
homogeneous wave equation
wave equation
is an (infinite) combination
combination of thethe normal modes of the the string,

_ _ _ _--'A_n cn7f (t - to) )


cos ( -f.- . (cn7f
+ Bn sm -f.- (t - to) )) sm
. (n7fx)
-f.- .
(
44
The units
44The units of
of frequency are literally
frequency are I/second, which
literally l/second, which is
is interpreted
interpreted as
as cycles
cycles per
per second,
second, or
or
Hertz.
Hertz. Sometimes
Sometimes the
the natural frequencies are
natural frequencies are given
given as
as
cn cn7l'
271'-=-
2£ £'
in
in which
which case
case the
the units
units can
can be
be thought
thought of as radians/seconds.
of as radians/seconds.
294
294 Chapter 7. Waves

Each
Each normal mode is
normal mode is aa standing wave with
with temporal
temporal frequency
frequency en/ cycles per
(21) cycles
cn/(2£) per
second. Several examples are displayed in Figure 7.4.

0.5 0.5

:::J O~---____::.:----__:JI

-0.5 -0.5

-1L-----~~~----~ -1~--~~------~&---~
a 0.5 a 0.5 1
x x

0.5

-0.5

-1~--~----~------~~ -1~~----~--~----~
a 0.5 a 0.5 1
x x

Figure 7.4.
Figure 7.4. The first four normal modes (c =
= If = 1, to
= 1, to == 0).
0). Displayed
Displayed
are multiple time snapshots of
of each standing wave.
wave.

In particular,
In since 2t/c
particular, since 2£/c is an integer
is an integer multiple of 2^/(cn),
multiple of 2£/(cn), we have
we have

an (t + 2cf ) = an(t) for all t, for all n = 1,2,3, ....

It follows
follows that
that the solution u(x,t)
the solution satisfies
u(x, t) satisfies
f
u (x, t + 2c ) = u(x, t) for all x E (0, f), for all t > 0;

that is,
is, the
the solution
solution is periodic
periodic with period 2f/c. The frequency
2£/c. The frequency c/(2£) is called
c/(2l) is called the
the
fundamental
fundamental frequency of the
frequency of string—it is
the string-it is the
the frequency
frequency at
at which
which the
the plucked string
plucked string
vibrates.
An
An interesting question is
interesting question is the
the following:
following: What
What happens
happens to
to aa string
string that
that isis
subjected to an oscillatory transverse pressure with a frequency equal to one of the
7.2.
7.2. Fourier series
Fourier series methods
methods for
for the
the wave
wave equation
equation 295

natural frequencies of
natural frequencies of the string? The
the string? answer is
The answer that resonance
is that occurs. This
resonance occurs. This is
is
illustrated in Exercise
illustrated Exercise 8 and also in Section 77.4.
A.
We now give an example
example of using the Fourier series method to solve an IBVP
IBVP
for the wave equation.
for

Example 7.3. Consider


Example 7.3. Consider (7.7) with
with £1=1, 522, ff(x,
= 522,
= 1, c = ( x , t t)) = 0, 'Y(x)
= 0, 7(0;) =
= 0,
0, and
and
X -004, 004 < x < 0.5,
'IjJ(x) = -(x - 0.6), 0.5 < x < 0.6, (7.10)
{
0, 0 < x < 004 or 0.6 < x < 1.
The fundamental
fundamental frequency of the string is
frequency of is then
C 522
- = - =261 Hz
2£ 2 '
which
which is the frequency
is the frequency ofof the
the musical
musical note called "middle
note called "middle C."
C." The
The initial
initial conditions
conditions
indicate that
indicate that the
the string
string is "plucked" at
is ''plucked'' at the
the center. Using the
center. Using the notation
notation introduced
introduced
above, we
above, have cn(t)
we have = 00 and
cn(t] = = 00 for
and ddn = all n,
for all n, and
and

bn = 2 101 'IjJ(x) sin (mfx) dx

= -2 -2 sin(I/2mf) + sin(2/5mf) + sin(3/5mf).


n 2 7f2

We must
We must solve
solve
~an 2 2 2
dt 2 +c n 7f an = 0,
an(O) = bn ,

d: tn (0) = O.

The solution
The is easily
solution is easily seen to be
seen to be
an(t) = bn cos(cn7ft), n = 1,2,3, ... ,
and therefore
and therefore
00

u(x,t) = L:)n cos (cn7ft) sin (n7fx).


n=l

Several snapshots ofof the


the solution
solution are
are graphed in Figure 7.5.
graphed in 7.5. The
The reader
reader should
should
observe that when a wave boundary where
wave hits a boundary where there isis a Dirichlet condition,
condition,
the wave
the inverts and
wave inverts and reflects.
reflects. Therefore,
Therefore, for w(x,3T/8)
example, u(x,
for example, 3T /8) == -u(x,
—u(x,T/8]
T /8)
and u(x,
and u(x,T/2)
T /2) == -u(x,O),
—u(x,ty, where
where T
T is
is the
the period
period corresponding to the
corresponding to the fundamental
fundamental
frequency:
frequency: TT = 2/522 =
— 2/522 = 1/261.
1/261. Also, u(x,T)
Also, u(x, = w(x,0),
T) = as expected.
u(x, 0), as expected.

determined
The reader should recall, from Section 2.3, that the wave speed c is determined
by the
by the tension and the
tension T and density p
the density of the
p of string: cc22 =
the string: = T / p. The
T/p. fundamental
The fundamental
frequency of
frequency of the string is
the string is
296 Chapter 7.
Chapter 7. Waves

0.2r------.-----r-------.---;:=======il
- y=u(x,O)
- -' y=u(x,T/8)
y=u(x,3T/8)
y=u(x,T/2)
o =U x,T

, , ,. , ,
, , , ... , ,
,, ,, , ,

-0.2'-----.......---'-----'-----.&...-----'
o 0.2 0.4 0.6 0.8
x

Figure
Figure 7.5. The solution
7.5. The u(x,t) to
solution u(x,t) to {7.7}
(7.7) at
at times
times 0,
0, T18,
T/8, 3T/8, T/2, and
3T18, T12, and
T. For
T. this example,
For this example, we took I£ == 1,
we took 1, cc = 522, /(#,£)
= 522, f(x,t) == 0,
0, "((x)
7(2) == 0,
0, and the initial
and the initial
condition ijj given
condition'IjJ in (7.10).
given in (7.10). One
One hundred
hundred terms
terms of the Fourier
of the Fourier series
series were
were used.
used.

which shows that


which shows that if
if the tension and
the tension and density of the
density of the string
string stay
stay the
the same,
same, but
but the
the
string is
string shortened, then
is shortened, then the
the fundamental
fundamental frequency
frequency isis increased.
increased. This explains how
This explains how
aa guitar
guitar works-the
works—the strings
strings are
are shortened
shortened by
by the
the pressing
pressing of
of the
the strings
strings against
against the
the
"frets," and
"frets," thus different
and thus notes are
different notes sounded.
are sounded.

7.2.2
7.2.2 Fourier series solutions of the inhomogeneous wave
equation
We now
We show two
now show two examples
examples of
of the
the inhomogeneous wave equation.
inhomogeneous wave equation.

Example 7.4.
Example 7.4. Consider aa metal
Consider metal string, such as
string, such as aa guitar
guitar string, that can
string, that can be
be
attracted by
attracted by aa magnet.
magnet. Suppose the string
Suppose the in question
string in question isis 25
25 cm
cm inin length,
length, with
with
cc = 522
522 in
in the
the wave
wave equation,
equation, its
its ends
ends are
are fixed,
fixed, and
and it
it is
is "plucked"
"plucked" soso that
that its
its
initial displacement
initial displacement is
is

'I/J(x) = ~
10
(1 - ~
25
25
Ix _ 1)
2

and released (so


and released (so that
that its
its initial
initial velocity
velocity is
is zero).
zero). Suppose
Suppose further that aa magnet
further that magnet
exerts a constant upward force of 100 dynes. We wish to find the motion of
exerts a constant upward force of 100 dynes. We wish to find the motion of the
the
string.
7.2.
7.2. Fourier
Fourier series methods for the
the wave equation 297
297

We must
must solve the IBVP
IBVP
a2 u
cPu 2
at 2 - c ax 2 = 100, °< x < 25, t > 0,
u(x, 0) = 1jJ(x), °< x < 25,
au
at (x, 0) = 0, °< x < 25,
u(O, t) = 0, t > 0,
u(25, t) = 0, t > 0,

= 522
where cc — 522 and ^
1jJ is given above.
We write the solution as
00

u(x, t) =L an(t) sin (n;x)


n=l
and determine coefficients ai
determine the coefficients (£), 02 (£), 03 (£),...
al(t),a2(t),a3(t), ... by solving the IVPs (7.8). We
IVPs {7.8}.
have
00

100 =L cnsin (n;x),


n=l
with
2 [25 . (n7fx) 200(1- (_l)n)
Cn = 25 10 100 sm 25 dx = n7f ' n = 1,2,3, ... ,
and

with
bn =~ [25 ",.( ) . (n7fx) d = 4 sin (n7f/2)
25 10 'f/ X sm 25 x 5n 7f2 , n = 1,2,3, ....
2

To find an(t),
an(t], therefore,
therefore, we must
must solve
solve
d2 a n c2 n 2 7f2
dt 2 + ~an = Cn,
an(O) = bn ,
n
d;t (0) = 0.

Using the results of Section 4-2.2,


Using 4.2.2, we see that the solution is
298 Chapter 7. Waves
Chapter

The solution
The is periodic
solution is with period
periodic with period
2n 50
cn /25
= c
Twenty-five snapshots
Twenty-five of the
snapshots oj the solution
solution (taken
(taken during
during one
one period) are shown
period) are shown inin Figure
Figure
7.6. The
7.6. The effect
effect oj
of the
the external
external Jorce
force onon the
the motion
motion oj
of the
the string
string is
is clearly
clearly seen.
seen. (The
(The
reader should
reader should solve
solve Exercise
Exercise 11 iJ
if it
it is
is not
not clear
clear how
how the
the string
string would
would move
move inin the
the
absence oj
absence of the
the external
external Jorce.)
force.)

0 . 1~------r-------~--~--~------~------~

0 .08

"E
Q)
E
Q)

~
a.
!Jl
'6

5 10 15 20 25
x

Figure 7.6.
Figure 7.6. Twenty-five
Twenty-five snapshots
snapshots oj
of the
the vibrating
vibrating string
string from
from Example 7.4-
Example 7.4.

We now
We now consider
consider an
an example
example inin which one of
which one of the
the boundary
boundary conditions
conditions is
is in-
in-
homogeneous. As
homogeneous. usual, we
As usual, we use
use the
the method
method of
of shifting
shifting the
the data.
data.

Example 7.5.
Example 7.5. Consider a string oj 100 cm that has one end fixed at x == 0,
of length 100 0,
with the
with the other
other end
end free to move
free to move in
in the
the vertical
vertical direction
direction only
only (tied
(tied to
to aa frictionless
frictionless
45
pole, for example). Let the wave speedspeed in the string be 2000 cm/
be c == 2000 cm/5.S.45 Suppose
Suppose the
free end is
free end is "flicked,"
"flicked," that
that is,
is, moved
moved up
up and
and down
down rapidly,
rapidly, according
according toto the
the formula
formula
u(100,t)
u(100, t) =
= /(*),
J(t), where
where

f(t) = { co-it - 3c 2 t 2 + 3c 3 t 3 - c 4 4
t , 0 < t < c,
t > c,
---,------
45
The fundamental
45The fundamental frequency
frequency is
is then
then
_c_ = 10Hz.
2 ·100
By comparison,
By comparison, the lowest tone
the lowest of aa piano
tone of piano has
has frequency 27.5 Hz.
frequency 27.5 Hz.
7.2. Fourier
7.2. Fourier series methods for
series methods the wave
for the equation
wave equation 299

where E = 0.01 (see Figure 7.7).

0.12..-----....-----...-----,..----~--.....,..--___,

0.1

0.08
cQ)
E
Q)
al 0.06
a.
({)
15
0.04

0.02

\
0.02 0.04 0.06 0.08 0.1 0.12
t

Figure 7.7.
7.7. The
The "flick"
"flick" of the
the free end in Example 7.5.
free end

To determine
To determine the
the motion
motion of the string,
of the string, we must solve
we must the IBVP
solve the IBVP

cPu c2
2{PU =o
!!~
ot2
^ =_ °' o<x<io(M>o> '
- C ox 2
u(ar,0) = 00,, 0<
u(x,O)
- ,0 < x < 100, t
Q<xx < 100,
< 100,
0,

du
ou
— ( x ,0)
ot (x, 0 )== 00,, 00<
< xx<<1 100,
00, (7.11)
(7.11)
u(O, t) = 0,
w(0,t) 0, tt >
> 00,,
u(100,*)
u(lOO, t) == /(*),
f(t), tt>Q.
> 0.
Since the boundary
Since the boundary condition
condition at at the
the right end of
right end of the
the string
string is
is inhomogeneous,
inhomogeneous, we
we will
will
shift the data
shift the data to obtain aa problem
to obtain problem with
with homogeneous boundary conditions.
homogeneous boundary Define
conditions. Define
v(x,t)
v(x, t) == u(x,t)
u(x, t) -— pp(x,
( x , tt),
) , where
where
xf(t)
p(x, t) = 100'
Then vv satisfies
Then the IB
satisfies the IBVP
VP
02v 202v _ X d2f
ot 2 -c ox2 - -100 dt 2 (t), 0< x < 100, t > 0,
v(x,O) = 0, 0< x < 100,
OV
ot (x,D) = -IOOE'
x
°< X < 100,
300 Chapter 7.
Chapter 7. Waves
Waves

v(O, t) = 0, t > 0,
v(100, t) = 0, t > O.
In computing the initial
initial conditions for v, we used
df 1
f(O) = 0, -d (0) = -.
t E

of the PDE
The new right-hand side of is
PDE is

= -1~0 ~{ (t) = { ~ l~O ~;:.:::; E,


2 3 4
g(x, t) (-6E- + 18c t - 12c t2) ,

Since g is defined piecewise, so


is defined so are its Fourier coefficients:
coefficients:
00

g(x, t) = I:>n(t) sin (mrOx) ,


n=l 10
2 (lOO (n1fx)
cn(t) = 10010 g(x, t) sin 100 dx

= { 2(~;t ~(t), 0:::; t :::; E,


0, t > E.
initial velocity for v is
The initial is given by

x ~ . (n1fx)
-100E = ~dnsm 100 '
n=l

2 {lOO ( X) (n1fx)
dn = 100 10 - 100E sin 100 dx
2(-1)n

IfIf we write
00

v(x, t) = ~ an(t) sin (~~~),


coefficient an(t)
then the coefficient an (t] is
is determined
determined bv IVP
by the IVP
~an c2n 21f2
dt 2 + 1002 an = cn(t),
an(O) = 0,

~tn(O) = dn·
Again
Again using the results of
of Section
Section 4-2.2,
4.2.2, we see that

100 ( . (cn1ft)
an(t) = cn1f dn sm 100 + 10{t.sm (cn1f ) )
100 (t - S) cn(s) ds .
7.2. Fourier series methods for the wave equation
7.2. 301
301

We note
note that
,pf
Cn(t) = Edn dt 2 (t),
which allows us to simplify
simplify the formulas
formulas slightly. We will write

Then we have

an(t) = d; (Sin (Ot) +E lot sin (O(t - s)) (-6E- 2 + 18C 3 s - 12C 4 s 2) dS) .

For t E [0, EJ,

an(t) = dOn (Sin (Ot) +E lot sin (O(t - s)) (-6E- 2 + 18E- 3 S - 12E-4 S2) dS)

= dn (. (()) _ 6 -1 (1 - cos (Ot) _ 3 -1 Ot - sin ((}t)


(}smt E () E (}2

2 _2(}2t2_2+2COS((}t)))
+ E ~ ,

while for t > e,


E,

an(t) = d(}n (sin (Ot) + E10' sin (O(t - S)) (-6E- 2 + 18E- 3 S - 12E- 4S2) dS)

-_ -d
n (.
ut - 6E -1 (COS ((}(t - E)) - COS (Ot)
sm (ll)
o ()
-1 sin ((}(t - E)) + E(} COS ((}(t - S)) - sin ((}t)
3E ~ +
-2
2
E 02 COS (O(t - E)) - 2 cos (O(t - E)) + 2EO sin (O(t - E)) + 2 cos (Ot)))
2E (}3 •

Several snapshots
snapshots of the solution
solution are shown in Figure 7.8.7.8. For each t, the Fourier
coefficients
coefficients ofof u(x,t]
u(x, t) decay to zero relatively slowly in n, so a good approximation
approximation
many terms in the Fourier
requires many Fourier series. To produce Figure 7.8, 7.8, we used 200
terms. The reader should observe the behavior of the wave motion: the wave pro-
terms.
duced by the flick of of the end
end travels from right to left,
left, reflects,
reflects, travels from left to
from left
46
right, reflects
reflects again, and so on. At At each reflection, the wave inverts. 46

7.2.33
7.2.3 Other boundary conditions
Using Fourier series
Using Fourier to solve
series to solve the wave equation
the wave equation with
with aa different
different set
set of boundary
of boundary
conditions
conditions is not difficult,
is not difficult, provided
provided the eigenvalues and
the eigenvalues eigenfunctions are
and eigenfunctions are known.
known.
We
We now
now do an example
do an example with mixed boundary
with mixed boundary conditions.
conditions.
46
The reader
46The can approximate
reader can approximate this experiment with
this experiment with aa long
long rope.
rope.
302 Waves
Chapter 7. Waves

0.1 5

O. 1 ,,',\ cSb
o o0
,,
\
\ 0 0

0.05 ' ,
,
\
\
\ 0
0
0
c \
0
0
Q) \
,
E
Q)
u
\..
ttl
" ,
C.
C/)
\ ,
'C \ ,
-0.0 5
\ ,
\
, , ,
, ;
\
-- _. t=0.025
t=0.05
-0. 1 ',J
,
,-,- t=0.06
t=0.1
0 t=0.11
-0.1 5
o 20 40 60 80 100
x

Figure 7.8.
Figure 7.8. Snapshots
Snapshots of
of the
the string
string from
from Example 7.5.
Example 7.5.

Example 7.6.
Example 7.6. Consider
Consider aa steel bar of
steel bar length 11 m,
of length m, fixed
fixed atat the
the top
top {x
(x =— O}
0) with
with
the
the bottom end {x
bottom end (x == I}
I) free
free to move. Suppose
to move. Suppose the the bar
bar is stretched, by
is stretched, means of
by means of aa
downward pressure
downward applied to
pressure applied to the
the free end, to
free end, to aa length
length of 1.002 m,
of 1.002 m, and
and then
then released.
released.
We wish
We wish to
to describe
describe the
the vibrations
vibrations ofof the
the bar,
bar, given
given that
that the
the type
type of
of steel
steel has
has stiffness
stiffness
3
kk = 195 GPa
= 195 GPa and
and density 7.9 g/
density pp == 7.9 g/cm
cm3 •.
The longitudinal
The longitudinal displacement
displacement u(x,u(x,t)t) of
of the
the bar
bar satisfies
satisfies the
the IBVP
IBVP

fpu a2 u
p at 2 - k ax 2 = 0, 0 < x < 1, t > 0,
u(x,O) = 0.002x, 0 < x < 1,
au
at (x,O) =0, O<x<l, (7.12)
u(O, t) = 0, t > 0,
au
ax (1, t) = 0, t >0

(see Section
{see Section 2.2}.
2.2). The
The eigenpairs
eigenpairs of
of the
the negative
negative second
second derivative
derivative operator,
operator, under
under
these mixed
these mixed boundary
boundary conditions,
conditions, are
are

An = (2n -4(21)21T2 ' tPn(x)


. ((2n - 1)1TX)
= sm 2f ' n = 1,2,3, ...
7.2.
7.2. Fourier series methods for the wave equation 303
303

(see Section
(see Section 5.2.3), = 1. We
5.2.3), with f1=1. We therefore
therefore represent the solution of (7.12)
solution of (7.12) as

u(x, t) = ~ an(t) sin ((2n ~ l)7rX).


left side of
The left of the PDE
PDE is
2 2 2
a u a u ~ {J2a n k(2n - 1)27r } . ((2n - l)7rX)
p at 2 (x, t) - k ax2 (x, t) = ~ P dt 2 (t) + 4 an(t) sm 2 ;

since the right side is


is zero, we obtain the
the ODEs
ODEs
J2a n k(2n - 1)27r2
P dt 2 + 4 an = 0, n = 1,2,3, ....
The initial
The initial displacement is given by

0.002x = ~ bn sin ((2n ~ l)7rX),


with
with

bn = 2
1
1
o
0.002x sm

This, together with the fact


. ((2n-1)7rX)
2 dx = 1252(-1)n+l
initial velocity of the bar is
fact that the initial
(2n - 1)2 7r 2' n = 1,2,3, ....
is zero, yields initial
conditions for the
conditions the ODEs:
ODEs:
d2a n k(2n - 1)27r 2
P dt 2 + 4 an = 0,
an(O) = bn ,
~tn (0) = O.
The solution
The solution is
is

an(t) = bncos ( C(2n -2 l)7rt)


' n = 1,2,3, ...
(with c = Jk/P), so

~ bnCOS (C(2n -l)7rt) sm


u ( x,t ) = L....- . ((2n -l)7rX) .
n=1 2 2
We see that the
We the wave
wave speed in the
speed in the bar
bar is
is
1.95.10 11 .
7.9.103 = 4970 mj s
(we convert k and
(we and p to
to consistent units before
consistent units computing c),
before computing c), and the fundamental
fundamental
frequency is
frequency is
~ == 49;0 == 1240 Hz.
Several snapshots of
of the
the displacement of the bar are shown in
of the in Figure 7.9.
7.9.
304 Chapter 7. Waves

"E
Q)
E
~1
0..
Ul
'5

..........................................................................
- t=O
- _. t=5e-05
._.- t=0.0001
t=0.00015
0.2 0.4 0.6 0.8 1
x

Figure 7.9.
Figure 7.9. Snapshots of the
Snapshots of the displacement of the
displacement of the bar
bar in
in Example
Example 7.6.
7.6.

Exercises
1. Find
1. Find the motion of
the motion of the
the string
string in
in Example 7.4 in
Example 7.4 in the
the case
case that
that no
no external force
external force
is
is applied,
applied, and
and produce
produce aa graph analogous to
graph analogous to Figure
Figure 7.6. Compare.
Compare.

2. Consider
2. Consider aa string
string of
of length
length 50
50 cm, with cc = 400
cm, with 400 cm/s.
cm/s. Suppose
Suppose that the string
that the string
is initially
is initially at
at rest,
rest, with
with both ends fixed,
both ends and that
fixed, and it is
that it is struck
struck by
by aa hammer
hammer atat
its center
its center soso as
as to
to induce
induce an initial velocity
an initial velocity of
of

-20, 24 < x < 26,


"(x) ={ 0, 0::; x ::; 24 or 26 ::; x ::; 50.

(a) How
(a) How long does it
long does it take for the
take for resulting wave
the resulting wave to reach the
to reach the ends
ends of the
of the
string?
string?
(b) Formulate
(b) Formulate and solve the
and solve the IBVP describing the
IBVP describing motion of
the motion of the string.
the string.
(c) Plot
(c) several snapshots
Plot several snapshots of
of the string, showing
the string, showing the
the wave first reaching
wave first reaching the
the
ends
ends of
of the
the string. Verify your
string. Verify your answer
answer to 2a.
to 2a.

3. Find
3. Find the
the motion
motion ofof the
the string
string in Example 7.4
in Example if the
7.4 if only change
the only in the
change in the exper-
exper-
imental conditions
imental conditions isis that
that the
the right end (x == 25)
right end 25) is
is free to move
free to move vertically.
vertically.
(Imagine that
(Imagine that the right end
the right end isis held at uu = 00 and
held at then released,
and then released, along with the
along with the
rest
rest of
of the string, at
the string, = 0.)
at tt = 0.)
4.
4. Repeat Exercise 2,
Repeat Exercise 2, assuming that right
assuming that right end
end of
of the string is
the string free to
is free to move ver-
move ver-
tically.
tically.
7.3. Finite element methods for the wave equation
wave equation 305

5. Find the motion ofthe


of the string in Example 7.4 in the case that both ends of the
string are
string are free
free to
to move
move vertically. (All other
vertically. (All other experimental
experimental conditions
conditions remain
remain
the same.)
the same.)

6. Consider
6. Consider aa string
string whose
whose (linear)
(linear) density
density (in
(in the
the unstretched
unstretched state)
state) is 0.25 g/cm
is 0.25 g/cm
and whose
and longitudinal stiffness
whose longitudinal stiffness is
is 6500
6500 N (meaning that
N (meaning that aa force
force of
of 13p
13pNN is
is
required to stretch the string by p%). If the unstretched (zero(zero tension)
tension) length
of the
of string is
the string is 40
40 cm,
cm, to
to what
what length must the
length must string be
the string stretched in
be stretched in order
order
that its fundamental
fundamental frequency
frequency bebe 261
261 Hz
Hz (middle
(middle C)?
C)?

7. How
7. How does
does the
the motion
motion of
of the
the bar in Example
bar in 7.6 change
Example 7.6 change if
if the force due
the force due to
to
gravity is taken into account?
gravity is taken into account?

8. Consider
8. Consider aa string
string that
that has one end
has one end fixed,
fixed, with the other
with the other end
end free
free to
to move
move
in the
in the vertical
vertical direction.
direction. Suppose
Suppose the string is
the string is put into motion
put into motion by virtue of
by virtue of
the free end's being manually moved up and down down periodically.
periodically. An IBVP
describing this motion is

a2 u 2 au
2
at2 - c ax 2 = 0, 0 < x < i, t > to,
u(x, to) = 0, 0 < x < i,
au
at (x, to) = 0, 0 < x < i,
u(O, t) = 0, t > to,
u(i, t) = E sin (27TWt) , t > to.

Take it=l,c
Take 522, tto0 == 0,
= 522,
= 1, c = 0, and
and Ee == Ie
le -- 4.
4.

(a) Solve
(a) Solve the IBVP
IBVP with w not equal
u not equal to aa natural frequency of
of the string.
string.
Graph the
Graph the motion of
of the
the string
string with w equal to
uj equal to half the fundamental
frequency.
frequency.
(b) Solve the IBVP with wuj equal to a natural frequency of the string. Show
that resonance
that resonance occurs.
occurs. Graph
Graph the
the motion
motion ofof the
the string
string with
with u) equal to
w equal to
the fundamental frequency.
the fundamental frequency.

7.3 Finite element methods for the wave equation


wave equation
The wave
The equation presents
wave equation presents special
special difficulties
difficulties for
for the design of
the design of numerical
numerical methods.
methods.
These difficulties
These difficulties are
are largely
largely caused
caused by the
the fact
fact that waves
waves with
with abrupt
abrupt changes
(even singularities,
(even singularities, such
such asas jump discontinuities) will
jump discontinuities) will propagate
propagate in in accordance
accordance with
with
the wave
the equation, with
wave equation, with nono smoothing
smoothing of of the
the waves.
waves. (Of(Of course,
course, ifif u(x,
u(x,t]t) has
has aa
singularity, that
singularity, that is,
is, it fails to
it fails to be twice differentiable,
be twice differentiable, then it cannot
then it cannot bebe aa solution
solution
of the
of the wave
wave equation
equation unless
unless we expand our
we expand our notion
notion of
of what constitutes aa solution.
what constitutes solution.
But there
But there are
are mathematically
mathematically consistent
consistent ways
ways to do this,
to do this, and
and they
they are
are important
important
for modeling
modeling physical phenomena
phenomena exhibiting
exhibiting discontinuous
discontinuous behavior.)
behavior.)
306 Chapter
Chapter 7.
7. Waves

For
For example,
example, the function if)'IjJ : [0,
the function [0,1] -> R
1] -t R defined by
defined by

x _ {I, Ix - ~I < 0.05,


'IjJ( ) - 0, Ix - ~I ~ 0.05
is
is discontinuous.
discontinuous. We
We solve
solve both
both the
the heat equation,
heat equation,

au a2 u
at - ax2 = 0, 0 < x < 1, t > 0,
u(x,O) = 'IjJ(x) , 0< x < 1, (7.13)
u(O,t) = 0, t > 0,
u(1, t) = 0, t > 0,

and the
and the wave equation,
wave equation,

a2 u a2 u
at2 - ax 2 = °< x < t >
0, 1, 0,
u(x,O) = 'IjJ(x), 0< x < 1,
au
at (x, °< x <
0) = 0, 1, (7.14)
u(O, t) = 0, t > 0,
u(l, t) = 0, t > 0,

with if)(x} as
with 'IjJ(x) the initial
as the initial condition
condition (we
(we need
need aa second
second initial
initial condition
condition in the wave
in the wave
equation; we take the initial velocity equal to zero). The results are shown in Figures
equation; we take the initial velocity equal to zero). The results are shown in Figures
7.10 and
7.10 and 7.11.
7.11. The
The graphs show that
graphs show that the discontinuity is
the discontinuity is immediately
immediately "smoothed
"smoothed
away"
away" byby the
the heat
heat equation,
equation, butbut preserved
preserved by
by the
the wave equation.
wave equation.
The
The standard
standard method
method forfor applying
applying finite elements to
finite elements to the
the wave
wave equation,
equation, which
which
we
we now
now present,
present, works
works well if the
well if the true solution is
true solution smooth. Methods
is smooth. Methods that are effective
that are effective
when
when the
the solution
solution has
has singularities are beyond
singularities are beyond the scope of
the scope of this book.
this book.

7.3.1
7.3.1 The wave equation with Dirichlet conditions
We
We proceed as we
proceed as we did
did for
for the
the heat
heat equation.
equation. We suppose that
We suppose t) solves
that u(x, i) solves

a2 u a2 u
at 2 -
2
c ax 2 = f(x, t), °< x < £, t > to,
u(x, to) = 'IjJ(x), 0< x < £,
au
at (x, to) = l'(x), 0< x < £, (7.15)
u(O, t) = 0, t> to,
u(£, t) = 0, t> to.
We
We then
then multiply
multiply the
the PDE
PDE on
on both sides by
both sides by aa test function
test function

vEV = 01[0,£],
Finite element
7.3. Finite methods for
element methods for the
the wave
wave equation
equation 307
307

1.2
- y=u(X,O)
- _. y=u(x,0.0005)
y=u(x,0.001 )
,-,- =u(x,0.0015)

0.8
",

>-0.6

0.4

0.2

00 0.2 0.4 0.6 0.8


x

Figure 7.10. The solution to the heat equation


Figure 7.10. equation with a discontinuous initial
condition (see
(see (7.13}).
(7.13)). Graphed
Graphed are = 0.
are four time snapshots, including t = O.

and integrate
integrate by parts in the second term on the left
left to obtain
obtain

foe {~:~ (x, t)v(x) + c ~~ (x, t) ~~ (x)}


2
dx = foe f(x, t)v(x) dx, t > to, v E V.
(7.16)
This is the weak form. We now apply the Galerkin technique, approximating
This is the weak form. We now apply the Galerkin technique, approximating u(x, t)
by
n-l

vn(x, t) = L Ui(t)CPi(X), (7.17)


i=l
where
where </>i, ^ 2 , ...
CPl, CP2, • • • ,,CPn-l
<$>n-\ are
are the
the standard
standard piecewise
piecewise linear finite element
linear finite element basis func-
basis func-
tions,
tions, and
and requiring
requiring that that the
the variational equation (7.16)
variational equation (7.16) hold for all
hold for all continuous
continuous
piecewise
piecewise linear
linear testtest functions:
functions:

io
r£ {{Pv n ( ) ()
at x, t CPi X + c
2
2 aV n ( ) dCPi ( )}
ax x, t dx x dx

= foe f(x, t)CPi(X) dx, t> to, for all i = 1,2, ... , n- 1. (7.18)

Substituting (7.17)
Substituting (7.17) into
into (7.18)
(7.18) yields
yields

n-l d2u. r£ n-l r£ dcp· dcp'


L
j=l
dt2J (t) io
0
CPj (X)CPi ex) dx + L Uj(t) io c2-t-ex) ax' (x) dx
j=l 0 X
308
308 Chapter 7. Waves

1.2
-- _. y=u(x,0.15)
y=u(x,O)

- . _. - y=u(x,0.3)
- -. y=u(x,0.45)

0.8

>'0.6
- -- ._ .. _'. - -- - - -- '-"-" - --
• •
0.4 • •
• •
• •
• •
0.2 • •
•i •i
• •
0.2 0.4 0.6 0.8
x

Figure 7.11. The


Figure 7.11. The solution
solution to the wave equation
the wave equation with
with aa discontinuous
discontinuous initial
initial
condition (see
condition (see (7.14)). Graphed
Graphed are
are four time snapshots,
four time including tt =
snapshots, including 0.
= O.

= lot f(x, t)¢i(X) dx, t "2: to, i = 1,2, ... , n - l. (7.19)

If we
If we now define matrices
now define M and
matrices M and K K (the mass and
(the mass and stiffness
stiffness matrices,
matrices, respectively)
respectively)
bv
by

Mij =
rt
10
¢j (X)¢i (x) dx, Kij =
2 d¢j d¢i rt
10
c dx (x) dx (x) dx,

I [~~~:~
and the
and the vector-valued
vector-valued functions f (t) and
functions f(t) u(£) by
and u(t) by

I~ ~~:: :~:~~:~~: 1
f(t) =
[f~ f(x, t)¢n-l (x) dx
, u(t) = .

Un-·l(t)
,

we can
we write (7.19)
can write (7.19) as
as
~u
M dt 2 + Ku = f(t).
We now have
We now have aa system
system of
of second-order
second-order linear ODEs with
linear ODEs constant coefficients.
with constant coefficients.
We need
We need two initial conditions,
two initial conditions, and
and they
they are
are easily
easily obtained
obtained from
from the initial condi-
the initial condi-
tions in (7.15).
tions in (7.15). We
We have
have

u(x, to) = 1jJ(x), 0 < x < £,


wave equation
7.3. Finite element methods for the wave equation 309

and 'IjJ(x)
and T/>(X) can
can be
be approximated
approximated by its linear
by its linear interpolant:
interpolant:
n-l

'IjJ(x) == L 'IjJ(Xi)¢>i(X).
i=l

We therefore
We therefore require
require that
that

Similarly, we
Similarly, require
we require
dUi
dt(t o) = ,(Xi)'
These lead
These lead to the initial
to the initial conditions
conditions

'IjJ(xd
'IjJ(X2) 1 du ,(Xl)
,(X2) 1
u(to) = Yo = -(to) = Zo =
'IjJ(x~-d '(X~-l)
dt
[ [
' .
We therefore
We therefore obtain
obtain the
the IVP
IVI
~u
M dt 2 +Ku = f(t), t> to,
u(t o) = Yo, (7.20)
u'(to) = Zoo
To apply
To apply one
one of
of the
the numerical methods for
numerical methods for ODEs
ODEs that
that we
we studied
studied in
in Chapter
Chapter
4, we
4, must first
we must first convert
convert (7.20)
(7.20) to
to aa first-order
first-order system.
system. We will define
We will define
y(t) = u(t),
du
z(t) = dt (t)

€ R11"1). Then
(y,z ERn-I).
dy
dt = z,
dz ~u
dt dt 2
= M- I (-Ku + f(t))
= -M-1Ky + M-1f(t)
= Ay + g(t),
47 1 1
where 47 A == -M-1K
-M K and g(t) =
= M f(t). We
M-lf(t). We also
also have
have initial
initial conditions:
conditions:

y(to) = u(to) = Yo,


du
z(to) = dt (to) = zoo
47
47As we discussed
As we discussed in
in Section
Section 6.4,
6.4, we
we do
do not
not actually
actually form
form the
the inverse
inverse matrix M 11.. Instead,
matrix M- Instead,
when
when the action of
the action M^ 1 is
of M-l is needed,
needed, we solve the
we solve appropriate linear
the appropriate linear system.
system.
310
310 Chapter 7.
Chapter 7. Waves
Waves

We
We have
have thus obtained the
thus obtained the (2n
(In -— 2)
2) x (In 2) system
(2n -— 2) system of
of IVPs
IVPs

<!x z, y(t o) Yo,


dt
(7.21)
dz
dt Ay + g(t), z(to) zoo

We
We can can now
now apply
apply any
any ofof the
the numerical
numerical methods
methods that
that we
we have
have previously
previously learned,
learned,
such as
such as Euler's
Euler's method,
method, RK4, RK4, oror an
an adaptive
adaptive scheme.
scheme.
Just as
Just as in
in the case of
the case of the heat equation,
the heat equation, stability
stability is
is an
an issue.
issue. If If the
the time
time step
step
At is
!:l.t is chosen
chosen to to be
be too
too large
large relative
relative to
to the
the spatial
spatial mesh size h,
mesh size h, then
then thethe approximate
approximate
solution computed
solution computed by by the time stepping
the time stepping method
method can
can "blow
"blow up"
up" (i.e.
(i.e. increase
increase without
without
bound).
bound). For For the heat equation,
the heat equation, using Euler's method,
using Euler's method, we we needed
needed !:l.tAt = O(h2).
= O(h2).
This required
This required suchsuch aa large
large number
number of of time steps that
time steps it was
that it was advantageous
advantageous to to use
use
special methods
special methods (such(such asas the
the backward Euler method)
backward Euler method) for
for the
the sake
sake ofof efficiency.
efficiency. The
The
requirement on
requirement on !:l.t
At isis not
not soso stringent
stringent when
when solving
solving the
the wave equation; we
wave equation; we just need
just need
At == O(hlc).
!:l.t O(h/c}. For For this reason, we
this reason, we usually
usually use explicit methods
use explicit methods to solve the
to solve the system
system ofof
ODEs arising
ODEs arising from
from thethe wave
wave equation;
equation; the improved stability
the improved stability properties
properties of of implicit
implicit
48
methods are
methods are not
not really
really needed.
needed.48 We must
We must keep
keep the
the stability
stability requirement
requirement in in mind,
mind,
though.
though. If, If, in
in applying
applying (7.20)
(7.20) to approximate aa solution
to approximate solution to to the wave equation,
the wave equation, wewe
notice that
notice the approximate
that the approximate solution
solution isis growing
growing unreasonably
unreasonably in in amplitude,
amplitude, thenthen
the time
the time step
step must
must be be decreased.
decreased.

Example 7.7.
Example 7.7. We
We will
will solve
solve the
the lBVP
IBVP

f) 2 u
f)t 2 -
2
f) 2 u
c f)x 2 °
= 0, < x < 1, t> 0,
u(x,O) = 'IjJ(x), 0< x < 1,
f)u
f)t (x,O) = 0, 0< x < 1, (7.22)
u(O, t) = 0, t > 0,
u(l, t) = 0, t > °
with = 522
with cc = 522 and
and
'IjJ(x) = O.01x(l - x).

The resulting
The resulting solution is quite
solution is quite smooth,
smooth, so
so the
the finite
finite element
element method
method should work
should work
well. We
well. We use
use aa regular
regular grid with nn = 20
grid with 20 subintervals
subintervals (h(h = lin),
1/n), and
and apply
apply the
the RK4
RK4
method to
method to integrate the resulting
integrate the resulting ODEs.
ODEs. The
The fundamental
fundamental frequency of the
frequency of string is
the string is
48
However, in
48However, in aa sense,
sense, the
the use
use of
of the
the finite element obscures
finite element obscures the
the distinction
distinction between
between an an implicit
implicit
and an
and an explicit
explicit method.
method. The The mass
mass matrix
matrix couples
couples the
the derivatives,
derivatives, and
and so,
so, to
to advance
advance aa time-
time-
stepping method,
stepping method, it it is
is necessary
necessary toto solve
solve aa linear
linear system,
system, even
even in
in an
an explicit
explicit method.
method. ThisThis means
means
that explicit
that explicit methods
methods are are no
no more
more efficient
efficient than
than implicit
implicit methods.
methods. TheThe same
same was
was true
true in
in the
the case
case of
of
the heat equation,
the heat equation, with,
with, however,
however, aa key
key difference.
difference. For
For the
the heat
heat equation,
equation, the
the stability
stability requirement
requirement
is such
is such that
that it
it is
is not
not advantageous
advantageous to to use
use explicit
explicit methods
methods anyway,
anyway, and
and so
so the
the coupling
coupling introduced
introduced
by the
by the finite element method
finite element method isis not
not important.
important. For For the
the wave equation, explicit
wave equation, explicit finite
finite difference
difference
methods do
methods do not
not couple
couple the derivatives, and
the derivatives, and there
there is
is no need to
no need to solve
solve aa linear
linear system
system to to take
take aa time
time
step. For
step. For this
this reason, finite difference
reason, finite difference methods
methods areare preferred
preferred for
for the
the wave
wave equation
equation if if the
the geometry
geometry
is simple. Finite
is simple. Finite element
element methods
methods still
still have advantages for
have advantages for complicated
complicated geometries.
geometries.
7.3. Finite element methods
methods for the wave equation 311
311

c/(1i} == 261,
c/(2f) making the
261, making the fundamental
fundamental period
period

T = 261
1.
= 0.003814.
We compute
We compute the
the motion of the
motion of the string
string over one period,
over one using 50
period, using 50 steps (At =
steps {!:1t T/50J.
= T/50}.
The results
The are shown in
results are in Figure 7.12.
7.12.

0.01 , - - - - - - . . - - - - - . - - - - . . . , . - - - - . , . - - - - - ,

o.
0.006

0.004

~ 0.002
E
Q)

:\l
a.
:6 - 0.002
- 0 .004

- 0 .006

- 0 .008

0.2 0.4 0.6 0 .8


x

Figure 7.12. The


Figure 7.12. The solution to the
solution to the wave
wave equation
equation in
in Example
Example 7.7.
7.7. Shown
Shown
are
are 25
25 snapshots taken over
snapshots taken over one
one period of the
period of the motion.
motion.

The time step


The time step taken
taken in
in the
the previous
previous example,
example,

AT. 7 -5
Uot = 50 = .663· 10 ,

seems rather
seems small. Moreover,
rather small. Moreover, itit can
can be
be shown that it
shown that cannot be
it cannot much larger
be much larger without
without
instability appearing
instability in the
appearing in the computation.
computation. OnOn the
the other
other hand, as mentioned
hand, as above,
mentioned above,
the time
the time step
step !:1t
At must be decreased
decreased only inin proportion to hh to preserve stability.
stability.
This is
This is in
in contrast
contrast to the situation
to the situation with
with the
the heat equation, where
heat equation, At =
where !:1t O(/i 2 ) is
= O(h2) is
reauired.
required.

Example 7.8. We will


7.S. We will now
now solve (7.22) with
solve {7.22} with

O.Ol(x - 0.4), 0.4 < x < 0.5,


¢(x) ={ -O.Ol(x - 0.6), 0.5 < x < 0.6,
0, 0 < x < 0.4 or 0.6 <x <1
312
312 Chapter 7. Waves

(compare Example
(compare Example 1.3).7.3). Since the initial
Since the initial displacement
displacement '¢ if} is not very
is not smooth (V>
very smooth is
('¢ is
continuous but
continuous but its
its derivative
derivative has
has singularities),
singularities), ourour comments
comments at at the
the beginning
beginning ofof
the section
the section suggest
suggest that
that itit may
may bebe difficult
difficult to
to accurately
accurately compute
compute the
the wave
wave motion
motion
using finite elements.
using finite elements.
We use
We use the
the same spatial mesh
same spatial mesh (h (h = = 1/20),
1/20,), time-stepping
time-stepping algorithm
algorithm (RK4)
(RK4),,
and time-step
and time-step (ilt
(£±t == T T/50J as in
/ 50) as in the
the previous example. In
previous example. In Figure 7.13, we
Figure 7.13, we show
show
three snapshots
three snapshots of of the
the solution.
solution. We We already
already know
know how
how the the solution should look:
solution should look:
The initial
The initial "blip"
"blip" splits into two
splits into two pieces, one moving
pieces, one moving to to the
the right
right and
and the
the other
other to
to
the left,
the left, preserving
preserving the the original
original shape (see Figure
shape (see Figure 7.5).
7.5). The The computed
computed solution,
solution,
while demonstrating
while demonstrating the the basic
basic motion,
motion, is is not
not very
very accurate-the
accurate—the shapes are not
shapes are not well
well
represented.
represented.

E
Ql
E
Ql
o(1J
0.!I)
'6

-1

-20~------~-------L--------~------~------~
0.2 0.4 0.6 0.8 1
x

Figure 7.13.
Figure 7.13. The
The solution
solution to
to the
the wave
wave equation
equation in
in Example 7.8, computed
Example 7.8, computed
with
with aa mesh
mesh size of hh = 1/20
size of 1/20 and
and aa time
time step
step of A£ = T/50.
of ilt T/50. Shown are 33 snapshots
Shown are snapshots
corresponding tt = 0,
corresponding T/50; tt = 2T/50.
Q,tt = T/50, 2T/50.

To get
To an accurate
get an accurate computed
computed solution
solution requires
requires aa fine
fine grid.
grid. We We repeat
repeat the
the
calculations using hh = 1/100
calculations using 1/100 and At =
and ilt = TT/250, and obtain
/250, and obtain the
the results
results shown
shown in
in
Figure
Figure 7.14-
7.14. Even with this
Even with this finer
finer grid, there is
grid, there is aa distortion
distortion in the waves.
in the waves.

7.3.2
7.3.2 The wave equation under other boundary conditions
If an
If an IBVP for the
IBVP for the wave equation involves
wave equation involves aa Neumann
Neumann condition,
condition, we
we can apply the
can apply the
finite element
finite element method
method by
by adjusting
adjusting the
the weak form and
weak form and the
the approximating
approximating subspace,
subspace,
as explained
as explained in
in Section
Section 6.5.
6.5. By
By way
way of
of example,
example, we
we will
will consider
consider the
the following
following IBVP
IBVP
7.3. Finite element methods
methods for the wave equation 313
313

c
Q)
E
Q)
(.)
ttl
Ci
en
'5

-1

-2~------~------~--------~------~------~
o 0.2 0.4 0.6 0.8
x

Figure
Figure 7.14.
7.14. The solution to the wave equation in Example 7.B,
7.8, computed
computed
with a mesh size of h = 1/100 and a time step of 6..t
= 1/100 At =
= TT/250.
/250. Shown are
are 3
snapshots
snapshots corresponding 0, t —
corresponding t = 0, = TT/50, 2T/50.
/50, t = 2T /50.

with
with mixed
mixed boundary conditions:
boundary conditions:
aat2 u - 2 a2 u
c ax 2 = f(x, t), 0< x < e, t> to,
2

u(x, to) = 'I/J(x), 0< x < e,


au
at (x, to) = l'(x), 0< x < e, (7.23)
u(O, t) = 0, t> to,
au
ax (e, t) = 0, t > to.
Since the
Since the Dirichlet
Dirichlet condition
condition is essential, it
is essential, appears in
it appears in the definition of
the definition of the
the space
space
of test
of test functions;
functions; however,
however, the
the Neumann condition is
Neumann condition is natural and does
natural and does not appear
not appear
explicitly. Therefore,
explicitly. Therefore, the
the weak
weak form
form is
is

1t {~:~ (x, t)v(x) + c2 ~: (x, t) :~ (x) } dx = l' f(x, t)v(x) dx, t > to, v E ii,
(7.24)
where
where
ii = {v E C 2 [0,e] : v(O) = O}.
The reader
The reader should
should note
note that
that this
this is
is exactly
e~actly the
the same as the
same as the weak
weak form derived for
form derived for
the
the Dirichlet
Dirichlet problem, except for
problem, except the space
for the space of
of test
test functions used.
functions used.
314
314 Chapter 7. Waves

To apply the Galerkin method,


To method, we establish aa grid
we establish

o= Xo < Xl < X2 < ... < Xn = C

and
and choose
choose the
the finite
finite element subspace consisting
element subspace consisting of
of all
all continuous
continuous piecewise linear
piecewise linear
functions
functions (relative
(relative to
to the
the given mesh) satisfying
given mesh) satisfying the Dirichlet condition
the Dirichlet condition at
at the left
the left
endpoint. This subspace can be represented as

The only difference


difference between Sn Sn and S n, the subspace used for
Sn, for the Dirichlet problem,
is the inclusion
is the inclusion of the basis
of the function ¢n
basis function (f)n corresponding to the
corresponding to right endpoint.
the right endpoint. For
For
simplicity, we
simplicity, we will
will use
use aa regular
regular grid
grid in
in thethe following calculations.
following calculations.
The calculation
The calculation then
then proceeds
proceeds just
just as as for
for the Dirichlet problem,
the Dirichlet except that
problem, except that
there
there is an extra
is an extra basis
basis function and hence
function and hence an extra unknown
an extra unknown and and corresponding
corresponding
equation. We
equation. write
We write
n
vn(x, t) =L Ui(t)¢i(X)
i=l

for the approximation


for the approximation to
to the solution u(x,
the solution u(x, t). Substituting into
t). Substituting into the
the weak
weak form
form yields
yields
the equations
_ d2 u _ _
M dt 2 + Ku = f(t),

where MME 6R nxn


Rnxn, ,K€ ER nxn
Rnxn, ret)
€ Rn. The mass matrix M is
, and f(t) ERn. is tridiagonal,
with the
with the following nonzero entries:
following nonzero entries:

i = 1,2, ... ,n - 1,

MHI,i = Mi,HI, i = 1,2, ... , n - 1.

stiffness matrix K is also tridiagonal, with the following nonzero entries:


The stiffness
7.3. Finite element methods for the wave equation 315

Finally,
Finally, the load vector
the load f (t) is
vector f(t) is given
given by
by

!i(t) = fal f(x,t)¢i(x)dx, i = 1,2, ... ,n.


Having
Having derived the system
derived the system of
of ODEs,
ODEs, the
the formulation of the
formulation of initial conditions
the initial conditions
is just
is as before:
just as before:

The IVP
The IVP

- cPu - -
M dt 2 + Ku = f(t), t > to,
u(to) = Yo,
u'(to) = Zo

is then
is then converted
converted to
to the first-order system
the first-order system

dy
dt = z, y(t o) = Yo,
dz -
dt = Ay + g(t), z(to) = Zo,

where A = _M~l:K M~lf(t).


and g(t) = M~1f(t).
-M^K and

Example 7.9.
Exalllple 7.9. We will compute the motion
motion ofof the string in Example 7.7,
7.7, with the
only change
only change being that the
being that the right
right end
end of
of the
the string
string is
is now
now assumed to be
assumed to be free
free to
to move
move
vertically. The IBVP
IBVP is is

a2 u 2au
at 2 -
2
c ax 2
.
°
= 0, < x < 1, t > 0,
u(x,O)=x(l-x),O<x<l,
au
at (x, 0) = 0, x < 1, °<
u(O,t) = 0, t> 0,
au
ax (1, t) = 0, t > 0,
316
316 Chapter 7.
Chapter Waves
7. Waves

with
with cc = 522. The
= 522. The only change from
only change the earlier
from the calculations is
earlier calculations is that
that there
there is
is an
an
extra row
extra row and column in
and column the mass
in the mass and
and stiffness
stiffness matrix. We will
matrix. We will again use nn == 20
again use 20
subintervals
subintervals in
in the
the spatial mesh (h
spatial mesh (h = 1/20,). The
= 1/20). The fundamental
fundamental period
period is
is now
now

T = ~= 0.007663.
c
We use
We use the
the RK4
RK4 algorithm and 100
algorithm and 100 time
time steps to compute
steps to the motion
compute the motion over
over one
one
period (At =
period (Llt T/lOOj. The
= TIlOO). The results
results are
are shown
shown in
in Figure
Figure 7.15.
7.15.

0.01

0.008

0.006

0.004

-
C 0.002
Q)
~

-
E ~
Q)
0
cQ
a.
0......- ~~
~

:6 - 0.002 --=::::::::::-
- 0.004

- 0.006

- 0.008

- 0.01
0 0.2 0.4 0.6 0.8
x

Figure 7.15.
Figure 7.15. The
The solution
solution to the wave
to the wave equation
equation in
in Example
Example 7.9. Shown
7.9. Shown
are
are 25
25 snapshots
snapshots taken over one
taken over one period of the
period of the motion.
motion.

Exercises
1. Use
1. Use piecewise linear finite
piecewise linear finite elements
elements to
to solve
solve the IBVP
the IBVP
fPu 2 fpu
at 2 - c ax 2 = 0, 0 < x < 100, t > 0,
= 1O- 6 x(100 - X)2, 0 < X < 100,
u(x,O)
au
at (x, 0) = 0, 0 < x < 100,
u(O, t) = 0, t > 0,
u(lOO, t) = 0, t > 0
on the
on interval 00 < tt < T,
the interval where T
T, where T is the fundamental
is the fundamental period.
period. Take
Take cc = 1000.
= 1000.
Graph several
Graph several snapshots.
snapshots.
7.3.
7.3. Finite
Finite element
element methods for the
methods for the wave
wave equation
equation 317
317

2. Repeat the previous exercise, assuming the PDE is inhomogeneous with right-
hand side equal
hand side equal to
to the
the constant —100.
constant -100.

3. (Cf.
3. (Cf. Exercise
Exercise 7.2.2.)
7.2.2.) Consider
Consider aa string of length
string of length 50cm,
50cm, with
with cc == 400cm/s.
400cm/s.
Suppose that
Suppose that the
the string
string is
is initially
initially at
at rest,
rest, with
with both ends fixed,
both ends fixed, and
and that
that it
it
is struck by a hammer at its center so
is so as
as to induce an initial velocity of
of

-20, 24 < x < 26,


'Y(x) = { 0, 0 :::; x :::; 24 or 26 :::; x :::; 50.

(a) How
How long does it take for
for the resulting wave to reach the ends of the
the
string?
string?
(b) Formulate
(b) Formulate and solve the IBVP describing the motion of the string. Use
the finite element method with RK4 or
or some other
other numerical method for
solving
solving the system of
the system of ODEs.
ODEs.
(c) Plot several snapshots
snapshots of the string, showing the wave first
first reaching the
the
ends
ends of
of the string. Verify
the string. Verify your
your answer
answer to 3a.
to 3a.

4.
4. Repeat
Repeat Exercise 3, assuming
Exercise 3, assuming that
that the
the right
right end
end of
of the string is
the string is free
free to
to move
move
vertically.
vertically.

5. Solve (7.14) using the finite element method, and trytry to reproduce Figure
7.11.
7.11. How
How small
small must
must h (the length
h (the length of
of the
the subintervals in the
subintervals in the mesh)
mesh) be to
be to
obtain
obtain aa good graph?
good graph?

6.
6. (Cf.
(Cf. Example
Example 7.6.) Consider aa steel
7.6.) Consider steel bar
bar of
of length
length 11 m,
m, fixed at the
fixed at the top = 0)
top (x = 0)
with
with the
the bottom
bottom end
end (x = 1) free
= 1) free to
to move. Suppose the
move. Suppose the bar
bar is
is stretched,
stretched, by
by
means of a downward pressure applied to the free end, to a length of 1.002 m,
and then released. Using the finite element method, compute the motion of of
the
the bar, given that
bar, given that the
the type
type of steel has
of steel stiffness kk =
has stiffness 195 GPa
= 195 GPa and density
and density
pp = 7.9g/cm33.. Produce
= 7.9g/cm Produce aa graph
graph analogous
analogous toto Figure
Figure 7.9.
7.9.

7.
7. Consider
Consider aa heterogeneous
heterogeneous bar
bar with
with the
the top
top end
end fixed
fixed and
and the
the bottom
bottom end free.
end free.
According
According toto the
the derivation
derivation in Section 2.2,
in Section 2.2, the
the displacement
displacement u(x,t) of the
u(x, t) of bar
the bar
satisfies
satisfies the IBVP
the IBVP
2
p(x) aatu2 -
a ( k(x) au)
ax ax = f(x, t), 0 < x < e, t > to,
u(x, to) = 'lj!(x), 0 < x < e,
au
at (x, to) = 'Y(x), 0 < x < e, (7.25)
u(O, t) = 0, t > to,
au
8x(e,t) =0, t>to.

(a) Formulate
(a) Formulate the
the weak
weak form
form of
of (7.25).
(7.25).
318
318 Chapter
Chapter 7. Waves

(b)
(b) Apply
Apply the
the Galerkin
Galerkin method
method to
to obtain
obtain aa system
system of ODEs with
of ODEs initial
with initial
conditions.
conditions. How do the
How do the mass
mass and
and stiffness
stiffness matrices change from
matrices change from the case
the case
of
of aa homogeneous bar?
homogeneous bar?
8. Repeat
8. Repeat Exercise 6, assuming
Exercise 6, assuming now
now that
that the
the bar
bar is
is heterogeneous
heterogeneous with
with density
density

p(x) = 7500 + 1000x kg/m3


and stiffness
and stiffness
k(x) = 1.9.10 11 + 101O xN/m2 •
(The coordinate x is
(The coordinate is measured
measured in
in meters:
meters: 0
0 < x < 1.)
1.)

7.4
7.4 Point sources
Point sources and resonance
and resonance
We
We now
now consider
consider two
two special
special experiments
experiments that
that can
can lead
lead to resonance:
to resonance:
•• A
A metal
metal string
string (such
(such as
as aa guitar
guitar string),
string), with
with both
both ends
ends fixed, is subjected
fixed, is subjected
to
to an
an oscillatory
oscillatory electromagnetic
electromagnetic force
force generated
generated by
by aa small
small electromagnet.
electromagnet.
When
When the
the frequency
frequency ofof the
the external
external force
force equals
equals one
one of
of the
the natural
natural frequencies
frequencies
of
of the
the string, resonance occurs.
string, resonance occurs .
•• A
A string
string has
has one
one end
end fixed,
fixed, and
and the
the other
other is
is mechanically
mechanically moved
moved up
up and
and down:
down:
u(i,t) = sin(27ru;£).
u(l, t) = sin (21fwt). Again,
Again, resonance
resonance occurs
occurs when
when the
the applied
applied frequency, w,
frequency, w,
equals one of
equals one of the
the natural
natural frequencies
frequencies of
of the string.
the string.
49
In
In the
the first
first experiment,
experiment, the
the modeling
modeling involves
involves the
the Dirac
Dirac delta function.49
delta function.

7.4.1
7.4.1 The wave equation with a point source
We
We begin
begin with
with the following IBVP
the following IBVP for
for the
the wave equation:
wave equation:

fpu
at 2 -
2fPu
c ax 2 = f(t)8(x - a), °< x < £, t > to,
u(x, to) = 0, 0 < x < £,
ou
at (x, to) = 0, < x < £,
0 (7.26)
u(O,t) = 0, t > to,
u(£, t) = 0, t > to,
where
where we
we assume
assume that
that 00<a a < t.£. This
This models
models the
the vibrating string, where
vibrating string, where the
the string
string
is
is assumed
assumed toto vibrate
vibrate due
due to
to aa time-varying
time-varying force
force applied at the
applied at point xx = a.
the point a.
We can solve
We can solve (7.26)
(7.26) exactly
exactly asas in
in Section
Section 7.2.
7.2. We
We use
use the
the sifting
sifting property
property of
of
the
the delta
delta function
function to
to compute
compute thethe Fourier sine coefficients
Fourier sine of f(t}8(x
coefficients of f(t)8(x —- a):

cn(t) = ~ 1£ f(t)8(x - a) sin (n;x) dx


49
The reader
49The reader is
is assumed
assumed toto have
have read Section 4.6
read Section 4.6 and/or
and/or Section
Section 5.7;
5.7; the
the material
material on
on the Dirac
the Dirac
delta
delta function found in
function found in those
those two sections is
two sections is prerequisite
prerequisite for
for this section.
this section.
7.4. Point sources
7.4. Point and resonance
sources and resonance 319

- 2f(t)
- --
e
1£ 0
!i:(
ux-a ).
SIn (n1fX)
- dx
e
= 2 sin ~T) f(t).

We then must solve the following IVP to find the unknown


unknown coefficients an(t):
coefficients an(t):

According to the
the results derived
derived in Section 4.2.2,
in Section 4.2.2, the solution
solution to this IVP is

an(t) = 2 sin (n1ra)


£
c:n1f
it to
(c:n1f )
sin -----n(t - s) f(s) ds.
~

Oscillatory
Oscillatory forcing and resonance
forcing and resonance

We are interested
interested in the case in which f ( t ) is oscillatory. For convenience,
which f(t) convenience, we take
eI —
= 11 and
and to = 0,
to — 0, and
and let
let /(t) = sin
f(t) = Then
Then the
sin (2,-jrut).
(21fwt). the solution
solution to
to the
the IBVP
IBVP is
is
00

u(x, t) = L an(t) sin (mfx),


n=I

where
an(t) = 2 sin (mfa)
c:n1f 10
rt sin (21fws) sin (cn1f(t - s)) ds.
A lengthy but
A lengthy elementary calculation
but elementary calculation shows
shows that,
that, if u; =I
if w / c:n/2,
cn/2, then
then

2 sin (n1fa) (c:n sin (21fwt) - w sin (c:n1ft))


an (t ) = . (7.27)
cn1f2(c2n 2 - 4w2)

One the other hand, if cj = c:m/2,


if w cm/2, one of the natural frequencies
frequencies of the string, then

_ sin (m1fa) (sin (c:m1ft) -c:m1ftcos(c:m1ft))


()
amt- 222 (7.28)
cm1f
(formula
(formula (7.27) still holds,
(7.27) still holds, with
with w = c:m/2,
o> = cm/2, for the coefficients
for the coefficients an(t)
an(t) with n =I
with n / m).
m).
In the case that the external frequency a; w is a natural frequency of the string,
the result (7.28)
(7.28) shows that the string oscillates with an ever-increasing ampli-
tude. (The reader should
should notice the
the factor of t, which shows
shows that the amplitude
amplitude
increases without bound.) This phenomenon is called resonance.
resonance. When the exter-
exter-
nal frequency is close to but not equal to a natural frequency, formula (7.27) shows
that
that the
the nearby
nearby natural frequency is
natural frequency is amplified
amplified in
in the solution (though
the solution it remains
(though it remains
bounded)—this
bounded)-this is because the the denominator in (7.27) is very small.
320 Chapter 7. Waves
Chapter Waves

Example
Example 7.10. 7.10. We We now
now solve
solve (7.26) withwith c = 522 and
= 522 and l1 == 11 (this
(this corresponds
corresponds
to aa fundamental
to fundamental frequency
frequency ofof middle
middle C, C, as
as we
we saw
saw in in Example 7.3), to == 00 and
Example 7.3), and
( t ) = sin
ff(t) s'm(27rujt)
(27rwt) for various values
for various values of ofui. We locate
w. We locate the
the point source at
point source at aa = 1/0.
l/\/2-
Figure 7.16
Figure 7.16 shows
shows the
the solutions corresponding to
solutions corresponding u = 260,
to w 260, wLJ = 520,
520, wu; =
= 780,
780, and
and
u}
w= 1040, close
= 1040, close to
to the natural frequencies
the natural frequencies of 0/261, 522, 783,
261, 522, 783, and 1044, respectively.
and 1044, respectively.
The reader
The reader will
will notice
notice how the solutions
how the solutions resemble
resemble the
the first
first four normal modes
four normal modes of of the
the
string.
string. InIn Figure 7.17, we
Figure 7.17, display some
we display some snapshots
snapshots ofof the
the solution
solution for
for wu = 1044, the
= 1044, the
fourth natural frequency.
fourth natural frequency. TheThe effect
effect of
of resonance
resonance is is clearly
clearly seen
seen in
in the
the increasing
increasing
amplitude.
amplitude.

5
4 X 10-

-2

-4 -2~------------------~
0 0 .5 1 o 0 .5 1
x x
4 X 10-
6
2~
x~~ 10- 6 __________________ ~

- 1

-4 ~--------------------~ -2~--------------------~
o 0 .5 1 o 0 .5
x x

Figure 7.16. Solutions


Figure 7.16. Solutions toto (7.26) with
with an oscillatory forcing
an oscillatory term (see
forcing term (see
Example 7.10). The
Example 7.10). The four solutions shown
four solutions shown correspond toujw = 260,
correspond to w=
260, w = 520, u; =
520, w = 780,
780,
and uj =
and w = 1040;
1040; since these frequencies
since these are close
frequencies are to the
close to the natural
natural frequencies
frequencies of of 261,
261,
783, and
522, 783, and 1044,
1044) the
the solutions are almost
solutions are almost equal
equal to
to the
the corresponding
corresponding normal
normal
modes.
modes.
7.4. Point
Point sources and resonance 321
321

1 . 5 r-------~-------,--------~------~--------,

0.2 0.4 0 .6 0 .8
x

Figure
Figure 7.17.
7.17. Solution
Solution to (7.26) with
to {7.26} with an
an oscillatory
oscillatory forcing
forcing term (see Ex-
term {see Ex-
ample 7.10). The
ample 7.10}. The frequency
frequency of the forcing term
o/the/orcing term is
is 1044, the fourth natural
1044, the/ourth frequency
natural frequency
of the
0/ the string,
string, and
and the
the solution exhibits resonance.
solution exhibits resonance.

7.4.2
7.4.2 Another experiment leading to resonance
Next
Next we solve the
we solve the following IBVP (cf.
following IBVP (cf. Exercise
Exercise 7.2.8):
7.2.8):
2 2
a u 2a U
at2 - c ax 2 = 0, 0 < x < £, t > to,
u(x, to) = 0, 0 < x < £,
au
at (x, to) = 0, 0 < x < £, (7.29)
u(O, t) = 0, t > to,
u(£, t) = lOsin (211'wt), t> to.

We
We will
will continue
continue to
to take
take £ = 11 and
I = and to
t0 == 0.
O.
Since the
Since the Dirichlet
Dirichlet condition
condition at
at the
the right endpoint is
right endpoint inhomogeneous, we
is inhomogeneous, we will
will
shift
shift the
the data.
data. We define
We define
p(x, t) = lOX sin (211'wt)
and v(x,t)
and = u(x,t)
v(x, t) — p(x, t). Then
u(x, t) -— p(x,t}. Then aa straightforward
straightforward calculation
calculation shows
shows that
that vv
satisfies the
satisfies the IBVP
IBVP

aatv
2

2 -
2a v
2
2 2 • ( )
c ax 2 = 41T W EX sm 21TWt , 0 < x < 1, t> 0,
v(x,O) = 0, 0 < x < 1,
322 Chapter 7. Waves
Waves

av
at (x, 0) = -27fWEX, < X < 1, ° (7.30)
v(O, t) = 0, t > 0,
v(l, t) = 0, t > 0.
We write
We write the
the solution
solution as
as
00

v(x, t) = L an(t) sin (n7fx).


n=1

Then, by
Then, the usual
by the usual calculation,
calculation, the
the coefficient
coefficient an(t) satisfies the
an(t) satisfies the IVP
IVP

rPa n 2 2 2
dt 2 + C n 7f an
( )
= Cn t ,
an(O) = 0,
dan (0) = b
dt n,

where
where

Cn(t) = 211 47f2w2Exsin (27fwt) sin (n7fx) dx


87fW 2E( _l)nH
= sin (27fwt)
n
= en sin (27fwt)

and
and
4WE( _l)n
1
1 .
bn = 2 (-27fWEX) sm (n7fx) dx = .
o n
By the
By the results of Section
results of Section 4.2.2, we have
4.2.2, we have

an(t) = ~ sin (en7ft) + _1_


cn7f en7f 10rt sin (cn7f(t - s))cn(s) ds

4WE( _l)n
= 2 sin (cn7ft)
en 7f

+
8W 2E( _1)n+l
2
11 sin (cn7f(t - s)) sin (27fws) ds. (7.31)
en 0

If W
If 7^ en/2
u =I- cn/2 for
for all
all nn (that
(that is,
is, if
if W
u; is
is not
not one
one ofthe
of the natural
natural frequencies
frequencies of
of the string),
the string),
then we
then we obtain
obtain

10
rt sin (en7f(t - s)) sin (27fws) ds = 7f (c n22_ 4W2) c; sin (27fwt) - Wsin (en7ft)) .
2

(7.32)
7.4. Point sources and resonance 323

On the
On the other hand, if
other hand, w=
if W = c:n/2,
en/2, we obtain
we obtain

io
t .
sm (c:n7f(t - s)) sin (27fws) ds = sin2c:n7f
(cmrt)
- -2t cos (c:n7ft). (7.33)

The results are very similar to those for for the point source. If the externally
applied frequency
applied frequency is not aa natural
is not natural frequency of the
frequency of string, then
the string, then no
no resonance
resonance occurs.
occurs.
(7.32) shows,
Formula (7.32) shows, though, that the amplitude of the vibrations gets larger as
(jj approaches one of the
W the natural
natural frequencies.
If the external frequency is a natural frequency, then resonance occurs, as
If
indicated by the factor of tt in the formula for an(t).
an(t}.

Example 7.11.
Example 7.11. Suppose
Suppose c = = 522
522 and
and Wu) == c/2
c/2 =
= 261, the
the fundamental frequency
fundamental frequency
of the
of the string. With ef =
string. With = 0.001,
0.001, we obtain the
we obtain the motion
motion shown
shown in
in Figure
Figure 7.18.
7.18.

Exercises
1. Suppose a string with total mass of 10 g is stretched to a length of 40 cm. By
1.
varying the frequency
frequency of an oscillatory forcing term until resonance occurs, it
is determined that the fundamental
fundamental frequency of the string is 500 Hz.
(a) How
How fast do waves
waves travel along the string?
(b) What is the tension in the string? (Hint:
(Hint: See
See the derivation of the wave
equation in
equation in Section
Section 2.3.)
2.3.)
(c) At what other frequencies will the string resonate?
2. Consider an iron bar bar of length 1 m, with a stiffness
stiffness of kk = GPa and a
— 90 GPa
density of
density 7.2 g/cm33 .. Suppose
of pp == 7.2g/cm Suppose that
that the
the bottom end (x =
bottom end 1) of
= 1) of the
the bar
bar is
is
fixed, and the top end is subjected to an oscillatory pressure:
fixed,

k ~~ (0, t) = B sin (27rwt), t > o.


(a) What the smallest value of u;
What is the w that causes resonance? Call this fre-
fre-
quency w(Jrr..
(b) Find and graph the displacement of the bar for w
w==W
wrr ..
(c) Find
(c) and graph
Find and graph the
the displacement
displacement of
of the
the bar for W
bar for a; =
= Wr
w r /4.
/4.
3. If a string is driven by an external force whose
whose frequency equals a natural
natural
frequency, does resonance always occur? Consider the string of Example 7.10,
and suppose W u = 1/2. Produce a plot like Figure 7.17. Does
= 1044, a == 1/2.
resonance occur? Why
resonance occur? Why or
or why
why not?
not?
4. Solve the IBVP
2

8t 8x
2
-8 u2 - c2 _8 u2 = sin (27fwt)6 (2)
x --
3 '
0< x < 1, t> 0,

u(x, 0) = 0, 0 < x < 1,


324 Chapter 7. Waves

0.01 r-----------, 0.01 r-----------,

0.005 0.005

-0.005 -0.005

-0.01 '----------~ -0.01 '--_ _ _ _ _ _ _ _...J


o 0.5 1 o 0.5 1
x x
0.01 ,...---------""""1 0.01 , . . . - - - - - - - - - . . . . ,

-0.01 '--_ _ _ _ _ _ _ _...J -0.01 '----------~


o 0.5 1 o 0.5 1
x x

Figure 7.18.
7.18. Solution to (7.29) with an oscillatory Dirichlet
Dirichlet condition (see
Example
Example 7.11). The frequency of
7.11). The of the forcing term
term isis 261, the fundamental
261, the frequency
fundamental frequency
of the string. Shown are 10 snapshots from the first
of first fundamental
fundamental period (upper
(upper left),
left),
10 from the second fundamental
10 fundamental period (upper
(upper right),
right), 1010 from the
the third
third (lower
(lower left),
left),
and 10 from the lower right (lower right). The increase in the amplitude is due to
resonance.

au
at (x,O) = 0, 0< x < 1,
u(O, t) = 0, t > 0,
u(l, t) = 0, t > 0,
where c = 55 and w = 120. Graph several snapshots of the solution.

7.5
7.5 Suggestions for
Suggestions for further reading
further reading
The reader
The can consult
reader can Sections 5.8
consult Sections 5.8 and
and 6.7
6.7 for
for further
further information about PDEs,
information about PDEs,
Fourier series, and finite element
Fourier element methods.
methods.
There is another computational technique
technique that can be viewed as an alternative
Suggestions for further reading
7.5. Suggestions 325

to
to finite elements, namely,
finite elements, namely, the
the method
method ofof finite
finite differences. This method
differences. This method isis very
very
popular
popular forfor the wave equation
the wave equation and
and similar
similar PDEs,
PDEs, forfor the reason briefly
the reason mentioned
briefly mentioned
in the
in footnote on
the footnote Page 310.
on Page 310. Strikwerda
Strikwerda [47]
[47] is
is an
an advanced
advanced treatment
treatment of of the
the finite
finite
difference method
difference method forfor PDEs.
PDEs. Celia and Gray
Celia and [9] covers
Gray [9] covers both
both finite differences and
finite differences and
finite elements
finite elements (including
(including finite element methods
finite element methods that are not
that are not Galerkin methods).
Galerkin methods).
This page intentionally
This page intentionally left
left blank
blank
Chapter 8
Chapter 8

Jgihlems in multiple
multiple
spatial dimensions

menslons

Most practical
Most practical applications involve multiple
applications involve spatial dimensions,
multiple spatial dimensions, leading
leading toto partial
partial
differential equations
differential equations involving
involving two
two to four independent
to four independent variables:
variables: #1,
Xl, #2
X2 or
or #1,
Xl, xz,
X2, tt
or xi,X2,x$,t.
or Xl, X2, X3, t. The
The purpose
purpose of this chapter
of this chapter is
is to extend the
to extend the techniques
techniques of of the last
the last
three chapters-Fourier
chapters—Fourier series and finite elements—to
elements-to PDEs involving
involving two or more
spatial dimensions.
We begin by developing
developing the fundamental physical
physical models in in two
two and three
three
dimensions. We
dimensions. then present
We then present Fourier series methods;
Fourier series methods; as as we
we saw
saw earlier,
earlier, these tech-
these tech-
niques are applicable only in the case of constant-coefficient differential
differential equations.
Moreover, in
Moreover, in higher dimensions, we
higher dimensions, can only
we can only find
find the eigenfunctions explicitly
the eigenfunctions explicitly when
when
computational domain is simple;
the computational simple; wewe treat the case of a rectangle and a circular
disk in two dimensions.
We then turn to finite element methods, focusing on two-dimensional problems
and piecewise linear finite elements defined on a triangulation
triangulation of the computational
computational
domain.
domain.

8.1 in two or three spatial


Physical models in spatial
dimensions
The derivation of the physical models in Chapter 2 depended on the fundamental
theorem
theorem of calculus. Using
of calculus. Using this
this result,
result, we
we were able to
were able to relate
relate aa quantity
quantity defined
defined on
on
the boundary
the boundary of of an interval (force
an interval (force acting
acting onon aa cross-section
cross-section oror heat energy flowing
heat energy flowing
across aa cross-section,
across cross-section, for example) to
for example) to aa related
related quantity
quantity inin the
the interior
interior of the
of the
interval.
interval.
In higher dimensions, the
higher dimensions, the analogue
analogue of the fundamental
of the fundamental theorem
theorem of of calculus
calculus is
is
the divergence theorem, which relates a vector field acting on the boundary of aa
the divergence theorem, which relates a vector field acting on the boundary of
domain to
domain to the divergence of
the divergence of the vector field
the vector field in
in the interior. We
the interior. We begin
begin by explaining
by explaining
the divergence
the divergence theorem
theorem and
and proceed to apply
apply it it to
to a derivation
derivation of
of the
the heat equation.
equation.
We must
We must first establish some
first establish some notation.
notation.

327
328 Chapter 8. Problems in multiple spatial dimensions
Chapter dimensions

8.1.1
B.1.1 The divergence theorem
An
An advantage
advantage of of using
using vector
vector notation
notation is is that
that many
many results
results of
of calculus
calculus take the
take the
same form
same form for
for two
two and
and three
three dimensions
dimensions when when expressed
expressed inin vector
vector form.
form. Therefore,
Therefore,
we
we will
will treat
treat both
both two-dimensional
two-dimensional and and three-dimensional
three-dimensional problems
problems in in this section,
this section,
and much of the background calculus requires no distinction between R R22 and R R3.3
.
2 3
Let
Let f20 be
be aa domain
domain (a (a connected
connected open in R
set) in
open set) R2 oror R
R3 with
with aa piecewise
piecewise
smooth boundary 80. 50
<9fi.50 We will denote points in R R33 using either vector notation
notation
2
or coordinate notation
notation as as is convenient, and similarly for points in R R2. . Thus a point
in R33 can
in R can bebe denoted
denoted as as xx or
or as (xi,X2,xs).
as (Xl,X2,X3).
An important concept related to
An important concept related to aa domain
domain fi0 is
is that
that of
of the
the (outward)
(outward) unit
normal. At each point x of 80 dfl at which the boundary is smooth, there is a unique
unit vector n(x) that is orthogonal
orthogonal to dtl 80 at x (to be precise, n(x) is orthogonal
orthogonal
to
to the line or
the line or plane
plane tangent
tangent to dft at
to 80 at x)
x) and
and points
points toward
toward the
the exterior
exterior of of O.
fi. It
It
is
is customary
customary to to suppress
suppress thethe dependence
dependence of of the
the normal
normal vector
vector n
n onon x,x, writing
writing nn
instead
instead of n(x), butbut it is important
important to keep this dependence in mind. Figure 8.1
shows an example in two dimensions.

nix)

Figure
Figure 8.1.
8.1. A two-dimensional domain J7
0 with a sample unit normal vector.

A (volume) R3 will be denoted


(volume) integral over 0fJ in R3 denoted as
as

In f(x)dx
or simply by
or simply by

50
For our
SOFor our purposes,
purposes, it it does
does not
not seem
seem worthwhile
worthwhile toto define
define precise
precise conditions
conditions on fi and
on n its bound-
and its bound-
ary
ary that
that allow
allow the
the application
application of of the divergence theorem.
the divergence theorem. We We will
will assume
assume that
that the
the reader
reader has
has an
an
intuitive
intuitive idea
idea of
of the
the meaning
meaning of of "smooth
"smooth boundary"
boundary" and and "piecewise
"piecewise smooth
smooth boundary."
boundary." For exam-
For exam-
ple,
ple, the
the unit
unit ball,
ball, SS = X2, X3) G
{(xi,X2,xs)
= {(Xl, R33 :: x
ER 2
X2 + y
2
y2 + z
2
z2 < 1 j, has
I}, hasaa smooth
smooth boundary,
boundary, while
while the
the
3
unit cube, R
unit cube, R= { ( x i , XX2,
= {(Xl, z) e
2 , xX3) ERR3 :: 0 < x\
O:S 1,0 :S
< 1,0
Xl :S < #2
X2 :S< 1,0
1,0 :S
< #3 < ij,
X3 :S I}, has
has a
a boundary
boundary that
that is
is
piecewise smooth.
piecewise smooth.
8.1. Physical
8.1. Physical models in two or three spatial dimensions 329

where f/ : n
where £) --+
-> R.
R. If domain n
If aa domain £) in R/5 can
in R3 can be
be described
described as
as

{(Xl, X2, X3) : a < Xl < b, gl (xI) < X2 < g2(XI), h1 (Xl, X2) < X3 < h 2 (X1, X2)} ,
for example,
for example, then the volume
volume integral
integral can
can be
be rewritten
rewritten as
as an
an iterated
iterated integral:
integral:

A (surface)
A (surface) integral over an
integral over <9fJ will
will be
be denoted
denoted by
by

r g(x) dO",
i 8 1l
where 9g :: an
where d£l --+ R and
—»• R and da
dO" represents an infinitesimal
represents an infinitesimal surface
surface area.
area element,
element, or
or simply
simply

hll g.

Both volume
Both volume and and surface
surface integrals
integrals cancan have
have vector-valued
vector-valued integrands,
integrands, in
in which
which case
case
each component
each component is is integrated.
integrated.
If n
If Jl is
is aa domain
domain in R 22 ,, then
in R then

is an
is an area
area integral
integral that can, for
that can, for many
many regions fi, be
regions n, be rewritten as aa doubly
rewritten as doubly iterated
iterated
integral. Since an
integral. Since is aa curve
dQ, is curve in
in this case.
this case,

51
hll 9

is aa line
is line integral.
integral.51
A vector
A vector field
field defined on n
defined on £) is
is just
just aa vector-valued
vector-valued function-a
function—a mapping
mapping of
of the
the
form
form
f(x) = [ il (x) ]
hex)
22
if n
if fi is
is in R or
in R or

f(x) = [ ;~~:j 1
fs(x)
if n isis in
if f) R 33 .. The
in R The divergence of a.a vector
divergence of vector field
field ff is
is denoted
denoted by
by V'
V .•ff and
and isis defined
defined by
by

V' . f(x)
ail (x) + -a
= -a ah (x)
Xl X2

in two
in two dimensions
dimensions and
and

aa il (x) + aa h (x) + aa
fs
V' . f(x) = (x)
Xl X2 X3
51
Line integral
51 Line integral is
is aa misnomer, since the
misnomer, since the domain
domain of
of integration
integration is
is generally
generally aa curve,
curve, not
not aa (straight)
(straight)
line.
line.
330
330 Chapter 8. Problems in multiple spatial dimensions
dimensions

in three
in dimensions. The
three dimensions. The following
following theorem,
theorem, which
which holds in both
holds in both two and three
two and three
dimensions,
dimensions, explains
explains why this combination
why this combination of
of derivatives
derivatives is
is so
so significant.
significant.

Theorem 8.1.
Theorem 8.1. (The divergence theorem)
(The divergence theorem) Let n be
Let 17 be aa bounded
bounded open set with
open set with aa
piecewise
piecewise smooth boundary an.
smooth boundary $17. Assume that ff is
Assume that is aa smooth
smooth vector field defined
vector field on
defined on
n uU an,
17 d£l, and that nn is
and that is the
the (outward
(outward pointing) unit normal
pointing) unit normal to to an.
017. Then
Then

r\7 . ianr
in
f = f· n.

In the
In case of
the case of aa rectangular
rectangular domain
domain in R 22,, the
in R divergence theorem
the divergence theorem follows
follows
immediately
immediately from
from the
the fundamental
fundamental theorem
theorem of
of calculus (see Exercise
calculus (see Exercise 2).
2).

8.1.2
8.1.2 The heat equation for a three-dimensional domain
We
We now
now consider
consider aa three-dimensional solid occupying
three-dimensional solid domain n
occupying aa domain in R
fi in R 33.. (We
(We
will often
will often call
call the solid n,
the solid 17, although,
although, in fact, n
in fact, 17 is
is aa mathematical
mathematical description
description ofof
the location of
the location of the solid.) For
the solid.) simplicity, assume
For simplicity, assume that
that the solid is
the solid is homogeneous,
homogeneous,
with
with density
density p, specific heat
p, specific heat c, and thermal
c, and conductivity K.
thermal conductivity K,. Analogous
Analogous to to the
the one-
one-
dimensional case, if
dimensional case, if the domain w
the domain a; is
is aa subset
subset of
of n,
17, then
then the total heat
the total heat energy
energy
contained in
contained in o>
w isis
L
Eo + pc(u(x, t) - To) dx,

where w(x,t)
where u(x, is the
t) is the temperature
temperature at 6n
at xx E 17atattime
timet,i,ToT0isisthe
thereference
referencetemperature,
temperature,
and EQ
and is the
Eo is the thermal energy contained
thermal energy in the
contained in solid at
the solid at temperature
temperature T 0.
To.
The rate
The of change
rate of change of
of the energy contained
the energy contained in
in u; is given
w is given by
by

! [Eo + Lpc(u(x, t) - To) dX] = !L pcu(x, t) dx.

Moving the derivative


Moving the derivative through
through the
the integral sign, we
integral sign, we obtain
obtain the
the following
following expression
expression
for the
for the rate
rate of change of
of change of total
total heat
heat energy contained in
energy contained in w:
uj:

iwr pc au
at (x, t) dx. (8.1)

We can
We can also
also describe this rate
describe this of change
rate of change by computing the
by computing the rate
rate at
at which
which heat
heat
3
energy
energy flows across ow.
flows across Let q(x,
duj. Let q(x,£)
t) E€RR3 bebe the
the heat
heat flux at x
flux at En
x e 17atattime
timet.t. The
The
heat flux
heat flux isis aa vector-its
vector—its direction
direction is the direction
is the direction of
of the
the flow of energy,
flow of energy, and
and itsits
magnitude
magnitude givesgives the rate at
the rate at which
which energy
energy isis flowing across the
flowing across the plane at x
plane at x to
to which
which
q(x, t)
q(x, £) is
is orthogonal,
orthogonal, in in units of energy
units of energy/(time-area).
/(time·area). At At each
each point of ow,
point of duj, the
the rate
rate
at which
at which energy
energy isis flowing into w
flowing into u; is
is

-q-n.

(This follows
(This follows from
from the fact that
the fact that qq is
is aa vector
vector quantity and hence
quantity and hence can be decomposed
can be decomposed
into the
into the component
component in the direction
in the direction of of —n,
-n, which is -q
which is —q .• n,
n, and
and the
the component
component
8.1. Physical models in two or three spatial dimensions 331
331

orthogonal to
orthogonal to -— n.)
n.) The
The total
total amount
amount of
of energy
energy flowing into w
flowing into uj is then
is then

- Jawr q.n.

We now
We now make the assumption
make the assumption called
called Fourier's
Fourier's law,
law, that
that the
the heat
heat flux is pro-
flux is pro-
52
portional to
portional to the temperature gradient:
the temperature gradient:52

q(x, t) = -1\;\7u(x, t).

The constant
The constant of
of proportionality, K > 0,
proportionality, I\; 0, is the thermal
is the conductivity, just
thermal conductivity, in one
just as in one
spatial dimension.
spatial dimension. We
We therefore obtain the
therefore obtain the following
following expression
expression for
for the
the rate
rate of
of
change of heat energy contained in a;: w:

derive a PDE. To do so, we


We wish to equate this expression with (8.1) and derive we must
apply the divergence
apply the theorem to
divergence theorem to convert the boundary
convert the boundary integral
integral to
to aa volume integral:
volume integral:

We thus have
i pc ~~ (x, t) dx = i 1\;\7 . \7u(x, t) dx,

or
or
i (pc ~~ (x, t) - 1\;\7 . \7u(x, t)) dx = O. (8.2)

Since (8.2)
Since (8.2) holds
holds for
for every
every subdomain
subdomain w of n,
uj of £), by
by exactly
exactly the
the same
same reasoning
reasoning
as in one dimension,
in one the integrand
dimension, the must be
integrand must be identically
identically zero. We therefore
zero. We therefore obtain
obtain
the PDE
pc au
at - 1\;\7 . \7u = 0, x E n, t > to·
The combination
The combination \7 V .• \7
V of
of differential
differential operators
operators arises
arises frequently
frequently due
due to
to just
just such
such
an application
an application of
of the divergence theorem.
the divergence theorem. We
We have
have

gx~ 1
\7u = [ ~: '
aX3
52
The gradient
52 The gradient of
of aa scalar-valued
scalar-valued function
function of several variables
of several variables points
points in
in the direction in
the direction in which
which
the function
the function increases
increases most
most rapidly.
rapidly.
332 Chapter 8. Problems in multiple spatial dimensions
Chapter

and so
and so

The differential
The operator
differential operator
82 82 2
a
6.=8 Xl2 +8X 2 +aX32
2
53
is called the
is called the Laplacian.
Laplacian. 53
Using
Using this
this notation,
notation, we obtain the
we obtain the three-dimensional
three-dimensional heat
heat
equation:
equation:
au
pc 8t - ",6.u = 0, x E .11, t > to· (8.3)

If f/ : n
If fi xx (to, 00}
00) ->•
-+ RR is
is aa heat
heat source
source (or
(or sink),
sink), with
with units of energy
units of energy per
per volume
volume
per time, then
per time, then wewe obtain
obtain the
the inhomogeneous three-dimensional heat
inhomogeneous three-dimensional equation:
heat equation:

8u
pc 8t - ",6.u = f(x, t), x E .11, t> to· (8.4)

It should
It should be
be obvious
obvious to to the
the reader
reader how
how toto modify
modify this
this equation if the
equation if material
the material
properties (p, c,
properties K) are
c, "') are not
not constants
constants but rather functions
but rather functions of Gn
of xx E 0 (see
(see Exercise 1).
Exercise 1).

8.1.3
8.1.3 Boundary conditions for the three-dimensional heat
Boundary
equation
Two
Two common
common types of boundary
types of boundary conditions
conditions for the heat
for the equation are
heat equation are Dirichlet and
Dirichlet and
Neumann conditions. An
Neumann conditions. equation of
An equation of the form
the form

u = ° on an
is called
is called aa homogeneous
homogeneous Dirichlet condition; it
Dirichlet condition; it corresponds
corresponds to
to an
an experiment
experiment in
in
which
which the
the temperature
temperature ofof the boundary is
the boundary is held
held fixed o. Inhomogeneous
at 0.
fixed at Inhomogeneous Dirichlet
Dirichlet
conditions
conditions are
are also
also possible,
possible, and
and boundary data can
boundary data be time-dependent:
can be time-dependent:

u(x, t) = g(x), x E 8n, t > to, or u(x, t) = g(x, t), x E an, t > to.
It is
is also
also possible to insulate
possible to insulate the
the boundary,
boundary, which leads to
which leads to the
the condition that
condition that
the
the heat
heat flux
flux across the boundary
across the boundary isis zero:
zero:

\7u(x, t) . n = 0, x E an, t > to.

The
The directional derivative Vw
directional derivative \7 u .• nn is
is often referred to
often referred to as
as the
the normal and
derivative and
normal derivative
denoted
denoted
au
53
an·
53 Another
Another common
common symbol
symbol for the Laplacian
for the Laplacian is '\7 22 .•
is V
8.1. Physical models
8.1. Physical models in
in two or three
two or three spatial dimensions
spatial dimensions 333
333

Just as
Just as in
in the
the one-dimensional case, we
one-dimensional case, we can have mixed
can have mixed boundary conditions,
boundary conditions,
since it is possible
it is possible to to treat different parts
treat different parts of the boundary
of the differently. Suppose
boundary differently. Suppose
an == FI
dtl rl U r 2 isis aa partition
U F2 of the
partition of the boundary into two
boundary into disjoint sets.
two disjoint sets. Then
Then it
it is
is
possible
possible to
to pose
pose aa problem
problem with the following
with the following mixed
mixed boundary conditions:
boundary conditions:
u(x,t) = 0, x E rl, t > to,
au
an (x, t) = 0, x E r 2 , t > to·

8.1.4
8.1.4 The heat
The equation in
heat equation in a
a bar
bar
In Section
In Section 2.1 and in
2.1 and in subsequent
subsequent sections,
sections, we
we discussed heat flow
discussed heat in aa bar
flow in bar with
with insu-
insu-
lated sides.
lated sides. We
We mentioned
mentioned the following fact:
the following fact: If
If the initial temperature
the initial distribution
temperature distribution
in aa bar
in depends only
bar depends only onon the
the longitudinal
longitudinal coordinate (that is,
coordinate (that if it
is, if is constant
it is constant in
in
each cross-section), and if any heat source also depends only on the longitudinal
each cross-section), and if any heat source also depends only on the longitudinal
coordinate, then
coordinate, then the
the temperature
temperature at at all subsequent times
all subsequent times also
also depends
depends onlyonly on
on aa
single spatial
single spatial coordinate.
coordinate. We We can
can now
now justify
justify this statement.
this statement.
Let
Let the domain n
the domain in R
ft in R33 be
be defined
defined by
by
n= {(XI,X2,X3) : °< Xl < l, x~ +x~ < r2},
where
where li and
and rr are given positive
are given constants. The
positive constants. set n
The set fHsis aa circular cylinder centered
circular cylinder centered
on the
on interval [0,
the interval [0,^1
l] on
on the
the xi-axis. Consider the
Xl -axis. Consider following IBVP:
the following IBVP:
au
pc at - ",flu = I(Xl, t), x En, t> to,
u(x, to) = '¢(xt), x E n, (8.5)
au
an (x, t) = 0, x E rt, t> to,
u(x,t) = 0, x Ere, t > to,
where r ee represents
where F represents the ends of
the ends of the
the bar
bar and r t the
and T the transverse sides:
transverse sides:
re = {(O,X2,X3) : x~ +x§ < r2} U {(f,X2,X3) : x~ +x§ < r2},
rt ={(Xl,X2,X3): O<xl<l, x~+x~=r2}.
The
The reader should notice
reader should notice that
that both
both the
the heat
heat source
source /I and
and the
the initial temperature
initial temperature
distribution '¢
distribution are independent
if) are independent of of x-2 and X3.
X2 and x3.
The solution to
The solution (8.5) is
to (8.5) w(xi,x 2 ,x 3 ,i) = V(Xl,t),
is U(Xl,X2,X3,t) v(xi,t), where
where v is
is the
the solution
solution of
of
the IBVP
the IBVP
OV 02V
pc--;:;- - "'>:. 2 = I(Xl,t),
ut uX l
° < Xl < l, t> to,
V(XI, to) = '¢(xd, °< Xl < l, (8.6)
V(O, t) = 0, t > to,
v(i, t) = 0, t > to.
The proof
The of this
proof of this is
is aa direct
direct verification of the
verification of equations in
the equations (8.5) and
in (8.5) and is left to
is left an
to an
exercise.
exercise.
334
334 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial dimensions
spatial dimensions

8.1.5
8.1.5 in two dimensions
The heat equation in dimensions
It is
It is straightforward
straightforward to restrict the
to restrict the heat
heat equation
equation toto two dimensions. If
two dimensions. If heat
heat flows
flows in
in
aa solid,
solid, such
such as
as aa thin
thin plate,
plate, in
in such
such aa way
way that
that the
the temperature
temperature is is constant
constant in in one
one
dimension, the
dimension, the derivative
derivative with
with respect to the
respect to the third spatial variable,
third spatial say #3,
variable, say X3, vanishes.
vanishes.
The result
The result is
is the two-dimensional heat
the two-dimensional equation, which
heat equation, which isis usually
usually written
written exactly
exactly
as in
as in (8.3),
(8.3), since
since we
we will
will also
also use A to
use A denote the
to denote the Laplacian
Laplacian inin two independent
two independent
variables:
variables:

The distinction
The distinction between
between the
the two-
two- and
and three-dimensional
three-dimensional Laplacian
Laplacian will
will be
be under-
under-
stood from
stood from context.
context.

8.1.6
8.1.6 The wave equation for a three-dimensional domain
The derivation
The derivation of of the
the wave equation in
wave equation in three
three dimensions
dimensions is is considerably
considerably more
more com-
com-
plicated than that
plicated than that ofof the heat equation.
the heat equation. A complete treatment
A complete treatment begins with an
begins with an elastic
elastic
solid, and
solid, and applies
applies Newton's
Newton's law law to
to the
the forces,
forces, both internal and
both internal and external, acting on
external, acting on
the solid. The
the solid. The result
result isis aa system
system of three (coupled)
of three (coupled) PDEs
PDEs forfor the three components
the three components
of displacement
of displacement thatthat describes
describes thethe vibration
vibration of of the
the solid.
solid. (Each
(Each point in the
point in the solid
solid
can move
can move inin three
three dimensions,
dimensions, so so there are three
there are dependent variables.)
three dependent variables.) This
This system
system
is one
is one form
form ofof the
the wave
wave equation.
equation.
Much
Much useful physical modeling
useful physical modeling can can bebe performed under apparently
performed under apparently severe
severe sim-
sim-
plifying
plifying assumptions. Specifically, assuming
assumptions. Specifically, assuming that that the solid is
the solid is aa fluid (meaning that
fluid (meaning that
the only
the only stress
stress supported
supported is is aa pressure)
pressure) andand that
that the
the motion
motion under consideration is
under consideration is
aa small
small perturbation
perturbation of of an
an equilibrium
equilibrium state,
state, with
with the
the motion
motion induced
induced byby aa force
force
density F(x,
density F(x, t),
£), the
the result
result isis the acoustic wave
the acoustic wave equation
equationforforthe
the pressure
pressureperturbation
perturbation
uu == u(x,
u(x.t):
t):
(8.7)

In this
In this equation,
equation, the
the forcing
forcing function
function f/ is
is the
the negative
negative divergence of the
divergence of the body force:
body force:

f(x, t) = - \7 . F(x, t).


An example of
An example of aa physical phenomenon modeled
physical phenomenon modeled by the three-dimensional
by the three-dimensional acoustic
acoustic
wave equation is
wave equation is the
the propogation of sound
propogation of sound waves
waves in
in air.
air.

8.1.7
8.1.7 The wave equation in
in two dimensions
dimensions
The
The two-dimensional (acoustic) wave
two-dimensional (acoustic) wave equation
equation models
models thethe small
small transverse
transverse vibra-
vibra-
tions
tions of
of an
an elastic membrane. An
elastic membrane. An elastic membrane is
elastic membrane is analogous
analogous toto an
an elastic string,
elastic string,
in that it
in that does not
it does not resist
resist bending.
bending. The form of
The form of the
the wave
wave equation
equation is exactly as
is exactly as in
in
(8.7); however,
(8.7); however, thethe meaning
meaning is quite different.
is quite The dependent
different. The dependent variable
variable uu isis the
the
vertical component of
vertical component displacement, while
of displacement, while the
the right-hand side f/ is
right-hand side is the transverse
the transverse
pressure.
pressure. Figure 8.2 illustrates
Figure 8.2 illustrates the
the small
small deflection of aa square
deflection of square membrane.
membrane.
8.1. Physical models in two or three spatial dimensions 335

0.1

o 0

Figure 8.2.
Figure 8.2. The
The small
small vertical
vertical deflection
deflection of
of aa square membrane under
square membrane under
Dirichlet
Dirichlet conditions.
conditions.

Dirichlet boundary
Dirichlet boundary conditions
conditions for
for the
the vibrating membrane indicate
vibrating membrane indicate that
that the
the
boundary
boundary isis fixed (one can
fixed (one can picture,
picture, for example, aa circular
for example, circular drumhead
drumhead with
with its bound-
its bound-
ary
ary attached
attached to to the
the drum).
drum). Neumann conditions indicate
Neumann conditions that the
indicate that the boundary
boundary isis free
free
to move
to move in
in aa vertical
vertical direction.
direction.

8.1.8
8.1.8 Equilibrium problems
Equilibrium problems and
and Laplace's
Laplace's equation
equation
The differential
The operator A
differential operator appears in
~ appears in both the heat
both the heat equation
equation and
and the
the wave
wave equa-
equa-
tion, and
tion, and therefore
therefore in the equilibrium
in the equilibrium versions of these
versions of these equations.
equations. For
For example,
example,
steady-state heat
steady-state heat flow is modeled
flow is by Poisson's
modeled by Poisson's equation,
equation,
-K,~u = f(x), x E n,
or by
or by its
its counterpart for aa heterogeneous
counterpart for material,
heterogeneous material,
-~. (K,(x)~u) = f(x), x E n.
This equation
This equation can
can be applied in
be applied in either
either two or three
two or dimensions.
three dimensions.
An elastic membrane
An elastic subject to
membrane subject to aa steady
steady tr pressure f/ has
an verse pressure
tranverse has aa vertical
vertical
deflection approximately satisfying
deflection u approximately satisfying
-k~u = f(x), x E n.
The heterogeneous
The version of
heterogeneous version of this
this equation
equation is
is
-~. (k(x)~u) = f(x), x E n.
336
336 Chapter 8.
Chapter 8. Problems in multiple
Problems in multiple spatial dimensions
spatial dimensions

The homogeneous version of Poisson's equation is referred to as Laplace's


homogeneous version Laplace's
equation:
-~u = 0, x EO.

Of
Of course, this equation
equation is interesting
interesting only if the boundary conditions are inhomo-
geneous.
geneous.

8.1.9
8.1.9 Green's identities and
Green's identities and the
the symmetry of the
symmetry of the Laplacian
Laplacian
We should expect
expect to be able to extend the methods from the preceding chapters
chapters
only if —A
-~ is a symmetric operator. The inner product is

(f,g) = In fg,
and we
we must show that
(-~u,v) = (u,-~v)

for all u,v


u, v satisfying the desired boundary conditions. We
We define

c(722(J7)
(n) = = {u : n -+ R :: u and
{w:(]->R and its
its partial
partial derivatives
derivatives up
up to
to order
order 22 are
are continuous}
continuous}

(n
(£1 is
is the
the closure of
of Q,
0, that
that is,
is, fi
0 together with its
together with boundary: n
its boundary: J7 =
= 0 u ao)
i7 U 9fi) and
and

cb(n) = {u E C 2 (n) : x E ao =? u(x) = o}


and

LD : cb(n) -+ C(O),
LDu = -~u.

In
In one dimension, the
one dimension, the fundamental
fundamental manipulation
manipulation underlying
underlying the
the development
development
of both Fourier series and finite element methods is integration
integration by parts. The ana-
logue in higher dimensions is Green's (first) identity, which we derive. It
we now derive. It is
helpful
helpful to
to recall that integration
recall that integration by
by parts is based
parts is based on the product
on the product rule for differen-
rule for differen-
tiation and the fundamental theorem of calculus, as follows:
d dv du
dx [u(x)v(x)] = u(x) dx (x) + dx (x)v(x)

=?
r b
d rb
dv
fa dx [u(x)v(x)] dx = fa u(x) dx (x) dx + fa dx (x)v(x) dx
r du
b

=? u(x)v(x)l:
r u(x) dxdv (x) dx + far dudx (x)v(x) dx
= fa
b b

b lb
=?
la
dv
U(X) dx (x) dx = u(x)v(x)l: - a
du
dx (x)v(x) dx.

To derive
To derive Green's
Green's identity,
identity, we
we need
need an analogous product
an analogous product rule for higher
rule for higher dimensions
dimensions.
8.1.
8.1. Physical models in two or three spatial dimensions 337

It is
It is not completely obvious
not completely obvious how
how to
to obtain
obtain the
the needed
needed product
product rule, but we
rule, but we
can be
can guided by
be guided by the
the fact
fact that
that we
we want
want to
to obtain
obtain aa formula
formula involving
involving

v~u = v\7 . \7u.

The desired product rule is


u;
\7 . (v\7u) = \7u· \7v + vAu. (8.8)

This is
This is proved directly; see
proved directly; see Exercise 5. Combining
Exercise 5. (8.8) with
Combining (8.8) with the divergence theorem
the divergence theorem
gives the
gives the desired result:
desired result:

\7 . (v\7u) = \7u· \7v + vAu


=> l \7. (v\7u) = l \7u· \7v + l vAu

=> { v\7u· n = { \7u· \7v + r v~u


ian in in
=> { vAu
in
= r
ian
vaau - { \7u· \7v.
n in
This
This is first identity:
is Green's first identity:

{ vAu = { v au - ( \7u· \7v. (8.9)


in ian an in
We can
We now prove
can now the symmetry
prove the of the
symmetry of the Laplacian
Laplacian under
under Dirichlet
Dirichlet conditions.
conditions.
If u,
If w ,vv E
€ Cb(n),
07^(0), then
then

(LDu, v) = -l vAu

= { \7u· \7v - { vaau (Green's first identity)


in ian n
= l \7u· \7v (since v = 0 on an)
OV
= { u - { uAv (Green's first identity)
ian a n in
= - In uAv (since v = 0 on an)
= (U,LDV),

It is no more difficult
difficult to prove the symmetry of -A
—A under Neumann conditions
conditions
(see
(see Exercise 6).
Exercise 6).

Exercises
1. How
1. How does
does the
the heat equation (8.3)
heat equation change if
(8.3) change if p, and K,K are
c, and
p, c, are functions of x?
functions of x?
338 Chapter 8. Problems in multiple spatial dimensions

2.
2. Let
Let 0 C R22 be
nCR be the
the rectangular domain
rectangular domain

n = {x E R2 : a < Xl < b, c < X2 < d} ,


22 22
and
and let
let F
F :: R —»•
-+ R be
be aa smooth
smooth vector
vector field.
field. Prove
Prove that
that

ln
r\7 . F lenr F· n.
=

Hint:
Hint: Rewrite
Rewrite the
the area
area integral
integral on
on the left as
the left as an
an iterated
iterated integral and apply
integral and apply
the fundamental theorem
the fundamental theorem ofof calculus.
calculus. Compare
Compare thethe result
result to
to the boundary
the boundary
integral on
integral on the right.
right.
3. Let n
£7 c R2 be the unit square:
C R2 square:
n = {x E R2 : 0 < Xl < 1, 0 < X2 < I} .
Define F : n
ft -> R2 by
-+ R2 by
F(x) = [ Xl X+2 X2 ] •

Verify
Verify that
that the divergence theorem
the divergence theorem holds
holds for
for this domain n
this domain fl and
and this vector
this vector
fieldF.F.
field
4. Let n
4. Let il c
CRR22 be
be the
the unit
unit disk:
disk:

n = {x E R2 : xi + x~ < I} .
Define F : n
ft -» R2 by
-+ R2 by
F(x) = [ Xl X2+ X2 ] .

Verify
Verify that
that the divergence theorem
the divergence theorem holds
holds for
for this domain n
this domain Q and
and this
this vector
vector
field
field F.F.
5.
5. Prove
Prove (8.8) as follows:
(8.8) as follows: Write
Write

\7. (v\7u) = L -0
.
3
OXi
[ v~
0 ]
OXi
.=1

and apply
and apply the
the ordinary
ordinary (scalar)
(scalar) product
product rule
rule to
to each
each term
term on
on the right.
the right.
6. Define
6. Define

and
LN : C~(n) -+ C(n),
LNU = -~U.
Show that
Show LN is
that LN is symmetric:
symmetric:
8.2. Fourier
Fourier series on a rectangular
rectangular domain
domain 339

7. Suppose that
7. Suppose that the
the boundary
boundary of n isis partitioned
of £7 partitioned into
into two
two disjoint
disjoint sets: an —=
sets: dtl
rFI1 u r
UF 2 . Define
. Define

and
and

Lm : C~01) -t C(O),
Lmu = -~u.
Show
Show that
that L
Lmm is symmetric:
is symmetric:
2 -
(Lmu,v) = (u,Lmv) for all U,V E Cm(n).

8.
8. Verify
Verify that
that the solution to
the solution to (8.6)
(8.6) is
is also
also the solution to
the solution to (8.5).
(8.5).

8.2 Fourier series on a rectangular domain


We
We now
now develop
develop Fourier
Fourier series
series methods
methods for
for the
the fundamental
fundamental equations (Poisson's
equations (Poisson's
equation,
equation, the
the heat
heat equation,
equation, and
and the
the wave
wave equation)
equation) on
on the
the two-dimensional rect-
two-dimensional rect-
angular domain
angular domain

(8.10)

We
We will
will begin
begin by
by discussing
discussing Dirichlet
Dirichlet conditions, so the
conditions, so the operator
operator is Lp,
is L as defined
D , as defined
at the
at the end
end of
of the
the last section.
last section.

8.2.1
8.2.1 Dirichlet boundary
boundary conditions
As
As we should expect
we should expect from
from the development in
the development in Chapters
Chapters 5,5, 6,
6, and
and 7,
7, the crux of
the crux of
the matter
the matter isis to
to determine
determine the eigenvalues and
the eigenvalues eigenfunctions of
and eigenfunctions L D . We
of Lp. have
We have
already seen
already seen that LD is
that LD is symmetric,
symmetric, so so we
we know
know that
that eigenfunctions corresponding
eigenfunctions corresponding
to
to distinct
distinct eigenvalues
eigenvalues must
must be be orthogonal.'
orthogonal: Moreover,
Moreover, it is easy
it is easy to
to show directly
show directly
that
that LDLD has
has only
only positive eigenvalues. For
positive eigenvalues. suppose A is
For suppose is an
an eigenvalue
eigenvalue ofof LD
LD and
and uu
is
is aa corresponding
corresponding eigenfunction,
eigenfunction, normalized
normalized to
to have
have norm
norm one (the norm
one (the norm isis derived
derived
from
from the
the inner product: Ilull
inner product: = ^(u,u)}.
||w|| = Then
v(u,u)). Then

A = A(U,U) = (AU,U) = (LDu,u) = -lLlUU = l V'u· V'u,

with
with the last step
the last step following
following from
from Green's
Green's first
first identity and the
identity and fact that
the fact vanishes
that u vanishes
on
on the
the boundary
boundary ofof n.
f). Since
Since

V'u· V'u = IIV'ul1 2 :2: 0,


this certainly shows
this certainly shows that
that A > O.
A :2: 0. Moreover,
Moreover,

illV'u W= 0
340 Problems in multiple spatial
Chapter 8. Problems spatial dimensions
dimensions

only if
only if \7u
Vw is is identically
identically equal
equal toto the
the zero
zero vector.
vector. ButBut this
this holds
holds only
only if Uu is
is aa
constant function,
constant function, and,
and, due
due to to the boundary
boundary conditions,
conditions, thethe only
only constant
constant function
in C1(n)
in Cpfil) isis the zero function.
the zero function. By By assumption ||w|| =
assumption Ilull = 1,
1, so
so uu is
is not the zero
not the zero function.
function.
Thus we
Thus we see
see that, inin fact,
fact, AA > 00 must hold.
hold. This
This proof
proof did
did not
not use
use the
the particular
particular
form of n,
form of fJ, and
and the
the result
result is
is therefore
therefore true
true for
for nonrectangular domains.
domains.
Thus we wish
Thus wish to find allall positive values
values of
of A such
such that
that the
the BVP
BVP

-Llu = AU, x E n, (8.11)


u = 0, x E an

has aa nonzero
has nonzero solution.
solution. We
We are
are now faced with
now faced with aa PDE
PDE for
for which
which we
we have
have no
no general
general
solution techniques.
solution techniques. WeWe fall
fall back
back on
on aa time-honored approach: make
time-honored approach: make an
an inspired
inspired
guess as
guess as to the
the general
general form
form ofof the solution,
solution, substitute
substitute into
into the
the equation,
equation, and
and try
try
to determine
to determine specific
specific solutions.
solutions. We will look
look for
for solutions
solutions of
of the form
form

functions of two variables that can be written as the product of two func-
that is, functions func-
tions, each
tions, each with
with only
only one
one independent
independent variable.
variable. Such
Such functions
functions are
are called
called separated,
separated,
and this
and technique is
this technique is called
called the
the method
method ofof separation
separation ofof variables.
variables.
We therefore suppose
We therefore sunnose that
that u(x)
w,(x1 =
= U1
wi (XdU2(X2)
(x-i }u^(x^} satisfies
satisfies

-Llu = AU, x E n.
We have
We have

so the PDE becomes

Dividing through
Dividing by U1
through by U2 yields
u\ui yields

-1 ~U1 -1 ~U2
-U 1 - d2 - U2 -d2 = A, (X1,X2) En.
Xl X2

If we
If we rewrite
rewrite this as
this as
(8.12)

we obtain the
we obtain conclusion that
the conclusion that both
both
-1 d2 u1 -1 ~U2
U1 -d 2 and U2 _d
2
Xl X2
8.2. Fourier series on a rectangular
rectangular domain 341
341

must be
must be constant
constant functions.
functions. For
For onon the
the left
left side
side of
of (8.12)
(8.12) is
is aa function
function depending
depending
only on
only on x\, and on
Xl, and on the
the right
right is
is aa function
function depending
depending only
only on
on X2. If we
X2. If we differentiate
differentiate
with respect to
with respect to Xl,
0:1, we
we see
see that the derivative
that the derivative of
of the
the first function must
first function be zero,
must be zero,
and hence
and hence that
that the function itself
the function itself must
must be constant. Similarly,
be constant. Similarly, the
the second
second function
function
must
must be constant.
be constant.
We have therefore shown the the following: If A is positive andand
-~u = AU, x E n
has a solution
solution of the form U(Xl,
w(#i,£2) = ^(x^u^x^)-,
X2) = Ul (Xl)U2(X2), then u\ u% satisfy
Ul and U2
2
-1 ~Ul -1 d u2
-U l -d2 = (h, -U 2 -d2 = ()2,
Xl X2
where 9\ + 62
where ()1 = A.
()2 = These we
A. These we can
can rewrite
rewrite asas
2
d u1
--d 2 = ()l U l,
Xl
and so
and so we
we obtain
obtain ODEs
ODEs for
for U1 and U2.
u\ and u^.
Moreover, we
Moreover, we can
can easily
easily find
find boundary conditions for
boundary conditions for the
the ODEs,
ODEs, since
since the
the
boundary conditions
boundary conditions on
on the PDE also
the PDE also separate.
separate. The
The boundary
boundary ofof n
0 consists
consists of
of four
four
line segments
line segments (see
(seeFigure
Figure 8.3):
8.3):
f1 = {(X1,X2) X2 = 0, 0::; Xl ::; £t} (bottom),
f2 = {(X1,X2) Xl = 0::; X2 ::; £2} (right),
£1, (8.13)
f3 = {(X1,X2) X2 = £2, 0::; Xl ::; £1} (top),
f4 = {(X1,X2) Xl = 0, 0::; X2 ::; £2} (left).
On fFI1,, for
On for example,
example, we
we have
have
U = 0 =} Ul(Xt}U2(0) = 0 =} U2(0) = O.
(There is
(There also the
is also possibility that
the possibility that U1
u\(x\) 0, but
= 0,
(xt) == but then is the
u is
then U the zero function, and
zero function, and
we are
are only
only interested
interested in nontrivial
nontrivial solutions.)
solutions.) By similar
similar reasoning,
reasoning, we obtain
we obtain
U1(0) = u1(£d = 0, U2(0) = U2(£2) = o.
Our problem
Our problem now
now reduces
reduces to
to finding nonzero solutions
finding nonzero solutions to
to the BVPs
the BVPs
~Ul
--d
2 = ()lUl, 0 < Xl < £1,
Xl
U1(0) = 0, (8.14)
U1(£1) =0
and
and
~U2
--d
2 =
X2
()2 U 2, 0 < X2 < £2,
U2(0) = 0, (8.15)
U2(£2) = 0,
342
342 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial
spatial dimensions
dimensions

r,

Figure 8.3. The domain n


Figure 8.3. fJ and its boundary.
boundary.

#2 can be any real numbers adding to A.


9\ and (h
where (h A. But we
we have already solved
these problems
these problems (in
(in Section
Section 5.2).
5.2). For
For (8.14),
(8.14), the
the permissible
permissible values
values of
of (h are
B\ are

and the
and the corresponding
corresponding eigenfunctions
eigenfunctions are
are

'ljJ1(m) (Xl ) -_ sm
. (m1l' XI) , m -_ 1,2,3, ....
-------;;;--

For (8.15), we have


(n) _ n 21l'2
(}2 - e~ ,n= 1,2,3, ... ,

eigenfunctions are
and the corresponding eigenfunctions

'ljJ2(m)( X2 ) -sm
_ . (n1l'X2) _
T ' n-1,2,3, ....

Any solution to (8.14) times any solution to (8.15) forms a solution to (8.11), so we
we
obtained doublv
obtained a doubly indexed sequence of solutions to (8.11):
m21l'2
n 21l'2
(8.16)
Amn=-r+T'
I 2

'ljJmn(XI,X2) = sin (m;IXI) sin (n;:2), m,n = 1,2,3, ....

We have
We succeeded in
have succeeded in computing
computing all
all the
the eigenvalue-eigenfunction
eigenvalue-eigenfunction pairs
pairs of
of LD
LD
which the eigenfunctions
in which eigenfunctions are separated. We We have no guarantee
guarantee (at least, not from
from
far) that there are not other eigenpairs with nonseparated
our analysis so far) nonseparated eigenfunc-
eigenfunc-
tions. However,
tions. However, it
it turns
turns out
out that
that this
this question
question is
is not
not particularly important, because
particularly important, because
8.2. Fourier
Fourier series on a rectangular domain 343

we can
can show that the eigenpairs (8.16) are sufficient
sufficient for our
our purposes. Indeed,
Indeed, it is
not difficult to argue
difficult to argue that
that every
every function Uu £E CeO) should be representable as
C(ft) should

where the convergence is in the mean-square sense. We will call such a series a
Fourier (double)
Fourier (double) sine series. We
sine series. consider any
We consider u = U(Xl,X2)
any U (not necessarily
u(xi,x<2) (not necessarily satisfy-
satisfy-
ing
ing the
the Dirichlet
Dirichlet boundary conditions). Regarding
boundary conditions). X2 €E (0,^)
Regarding x% (0'£2) as
as aa parameter,
parameter, we
we
can write
can write

where
bm (X2) = £~ 1£1 U(Xl,X2) sin (m~Xl) dXl.
But now bmm is a function of #2 € (0,
X2 E (0,^2)
£2) that can be expanded in a Fourier sine
series
corioc as well:
QC iiroll-

where
amn = ~ 1£2 bm (X2) sin (n;:2 ) dX2.

Putting
Putting these
these results
results together,
together, we
we obtain
obtain

(8.17)

with
with

(8.18)

Equation
Equation (8.17) is valid in the mean-square sense.
It is
is straightforward to show that formulas
formulas (8.17), (8.18)
(8.18) are
are exactly what the
the
projection
projection theorem
theorem produces;
produces; that
that is,
is,

~~ . (m7rXl) . (n7rX2)
~l ~ amn sm --y;- sm T
is the best approximation L22 norm, from the subspace spanned by
approximation to u, in the L

{~mn: m=1,2, ... ,M, n=1,2, ... ,N}

(see Exercise 6).


344 Chapter 8. Problems dimensions
Problems in multiple spatial dimensions

Example Let n
Example 8.2. Let Q == {(X1,X2) eR
{(xi,x2) E R22 :: 0 < xi 1, 0 < xX22 < I},
Xl < 1, l}, and
and let
let

Then
Then
1 1
amn = 410 10 X1X2 sin (mnx1) sin (nnx2)
4(-1)m(-1)n
mnn 2

In
In Figure 8.4, we
Figure 8.4, we graph the resulting
gmph the resulting partial
partial series approximation to
series approximation u, using
to u, M =
using M = 20
20
and N
and = 20
N = 20 (for
(for aa total
total of
of 400
400 terms).
terms). Gibbs's
Gibbs's phenomenon
phenomenon isis clearly
clearly visible,
visible, as
as
would be
would be expected
expected since
since uu only
only satisfies
satisfies the
the Dirichlet boundary conditions
Dirichlet boundary conditions on
on part
part of
of
the boundary.
the boundary.

1.5

0.5

o
1
1

o 0

Figure 8.4.
Figure 8.4. AA partial
partial Fourier (double) sine
Fourier (double) sine series (400 terms)
series (400 terms) approxi-
approxi-
mating U(X1,X2)
mating ll(xi,X2) =
= X1X2.
XiX-2.
Fourier series
8.2. Fourier series on a rectangular
rectangular domain
domain 345

8.2.2
8.2.2 Solving a
Solving boundary value
a boundary problem
value problem
It is
It is no more difficult
no more difficult to
to apply
apply the
the Fourier series method
Fourier series to aa BVP
method to BVP in
in two or three
two or three
dimensions than
dimensions than itit was
was in
in one
one dimension,
dimension, provided,
provided, of
of course,
course, that
that we know the
we know the
eigenvalues and eigenfunctions.

Example 8.3.
Example 8.3. We
We will
will solve
solve the
the following
following BVP:

-~U = 1 inn, (8.19)


U = 0 on an,
where n
where £1 is
is the
the unit
unit square:
square:

We first
We first write
write the
the constant junction /(x)
constant function = 11 as
f(x) = as aa Fourier
Fourier sine
sine series. We have
series. We have
00 00

1 = L L Cmn sin (m1fxd sin (n1fX 2),


m=l n=l
where
where

Cmn = 411 11 sin (m1fxd sin (n1fX2) dX2 dX1


4((-1)n(-1)m - (_l)n - (_l)m + 1)
mn1f 2

We next
next write the solution u as
00 00

U(X1,X2) =L L a mn sin (m1fX 1) sin (n1fX2).


m=ln=l
It is
is straightforward to show that, since Uu satisfies
straightforward to homogeneous Dirichlet conditions,
satisfies homogeneous conditions,
00 00

-~U(X1,X2) = L LAmnamnsin(m1fxdsin(n1fx2),
m=l n=l
where
where
Amn = (m 2 +n2)1f2, m,n = 1,2,3, ...
(see Exercise
(see The PDE
Exercise 8). The therefore implies
PDE therefore implies that
that
00 00 00 00

L L Amnamn sin (m1fxd sin (n1fX 2) = L L Cmn sin (m1fxd sin (n1fX 2),
m=l n=l m=l n=l
and therefore
and therefore
Amnamn = Cmn ' m, n = 1,2,3, ....
346 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial
spatial dimensions
dimensions

This in turn implies that

We can approximate the solution by a partial Fourier series of


of the form
M N
L La mn sin (m1rxt) sin (n1rX2).
m=l n=l

In Figure 8.5, we graph the partial Fourier series with M = 10, N = 10.
— 10,

o 0
x,

Figure 8.5.
8.5. The solution to the BVP
BVP (8.19), approximated
approximated by a Fourier
series with 100 terms.
terms.

8.2.3
8.2.3 Time-dependent problems
Time-dependent problems
It is also straightforward
straightforward to extend
extend the one-dimensional
one-dimensional Fourier series techniques
techniques
time-dependent problems to two- or three-dimensional
for time-dependent three-dimensional problems, again
again assuming
assuming
eigenvalues and eigenfunctions are known. We
that eigenvalues We illustrate with an example.

Example 8.4. We
Example 8.4. We will solve the
will solve the following
following IBVP
IBVP for
for the
the wave equation on
wave equation on the
the unit
unit
square:

cPu
{)t 2 - c2 du = 0, x E n, t > 0,
8.2. Fourier series on a rectangular domain 347

u(x,O) = 0, x E n, (8.20)
au
at (x, 0) = ,,((x), x E n,
u(x, t) = 0, x E an, t > O.

velocity function
The initial velocity function will be
be taken to be function
be the function
2 3 2 3
(x) = - 1, 5 < Xl < 5' 5 < X2 < 5'
"( { 0, otherwise.

= 261V5.
We take c = 261.;2. This IBVP
IBVP models a (square)
(square) drum struck by a square
square hammer.
We write the solution u as
00 00

U(XI,X2,t) = L Lamn(t)sin(m7fxdsin(n7fX2),
m=l n=1
where
1 1
amn(t) = 410 10 U(Xl>X2,t) sin (m7fXI) sin (n7fX2) dX2 dx 1.

The PDE
PDE then takes the form

~ ~ { ~~r;n (t) + c Amnamn(t)} sin (m7fX1) sin (n7fX2) = 0,


2

= (m 2 +
2
where X mn =
Amn +nn22)7r 2
)7f2.. The initial conditions become

00 00

U(X1,X2,0) =L L amn(O) sin (m7fX 1) sin (n7fX2) =0


m=1 n=l
and

We have 00 00

"((X1,X2) =L L bmnsin (m7fxt} sin (n7fX2),


m=l n=l

where
1 1
bmn = 410 10 "((X1,X2) sin (m7fxt) sin (n7fX2) dX2 dX1

= -4 [3/5 [3/5 sin (m7fxd sin (n7fX 2) dX2 dx 1


12/5 12/5
4(cos (3n7f /5) - cos (2n7f /5)(cos (3m7f /5) - cos (2m7f /5))
mn7f 2
348 Problems in multiple spatial
Chapter 8. Problems dimensions
spatial dimensions

Putting together the


Putting together the PDE and the
PDE and the initial
initial conditions,
conditions, we obtain the
we obtain the following
following
sequence of IVPs:
of IVPs:

m, n=
m, n 1,2,3, —
— 1,2,3,. The solutions
... The solutions are
are

amn(t) = dmn sin (CVm2 + n 2 7ft) , m, n = 1,2,3, ... ,


where
where

We graph selected snapshots of u in Figure 8.6.

8.2.4
8.2.4 Other boundary conditions for the rectangle
Using separation of
Using separation of variables, it is
variables, it is straightforward
straightforward to to find
find the
the eigenvalues
eigenvalues and
and eigen-
eigen-
functions for
functions for the
the negative Laplacian, on
negative Laplacian, on aa rectangle,
rectangle, under
under Neumann conditions or
Neumann conditions or
some combination
some combination of Dirichlet and
of Dirichlet and Neumann conditions. For
Neumann conditions. example, if
For example, n isis the
if £) the
rectangle
rectangle (8.10) and an
(8.10) and dtl = r 1UU Tr 22 UU Tr33 UU rT44,, with
= TI with the r i defined
the F; as in
defined as in (8.13),
(8.13), wewe
can consider the
can consider the following
following IBVP:
IBVP:

au
pc at - K,Llu = f(x, t), x E n, t> 0,
u(x,O) = 'I/J(x), x E n,
u(x, t) = 0, x E rl, t> 0,
au
an (x, t) = 0, x E r 2 , t > 0, (8.21 )
au
an (x, t) = 0, x E r 3 , t > 0,
u(x,t) =0, xEr 4 , t>O.

By applying
By applying the
the method
method ofof separation
separation of variables, we
of variables, we can determine the
can determine the
appropriate Fourier series to represent the solution:
appropriate Fourier series to represent the solution:

(see Exercise
(see 14). The
Exercise 14). The determination
determination of
of the
the coefficients
coefficients amn(t) follows the
amn(t) follows the now-
now-
familiar pattern.
familiar pattern.
8.2. Fourier series
8.2. Fourier series on
on a
a rectangular
rectangular domain
domain 349

4
X 10- X 10-4

0 0

-2 -1
1 1
1

0 0 0 0

X 10-4 X 10-4

1 2

0 0

-1 -2
1 1
1 1

0 0 0 0

Figure
Figure 8.6.
8.6. Snapshots of the
Snapshots of the vibrating membrane of
vibrating membrane of Example
Example 8.4:8.4'- tt ==
1CT44 (upper
5 .• 10- (upper left), 1(T33 (upper
left), t == 10- 1(T33 (lower left),
2 • 10-
(upper right), t == 2· left), t == 3· 1(T33
3 • 10-
(lower right).
(lower right).

8.2.5
8.2.5 Neumann boundary
Neumann boundary conditions
conditions
Neumann conditions are
Neumann conditions are slightly more difficult
slightly more difficult to handle than
to handle Dirichlet or
than Dirichlet or mixed
mixed
boundary conditions. This
boundary conditions. This is simply because
is simply because Neumann conditions lead
Neumann conditions lead to
to two
two dif-
dif-
ferent kinds
ferent kinds of
of eigenfunctions,
eigenfunctions, the
the constant
constant function 1, and
function 1, and the
the cosines of increasing
cosines of increasing
frequencies.
frequencies. To
To be specific, the
be specific, the reader
reader will
will recall
recall from Section 6.2
from Section 6.2 that
that the
the eigenpairs
eigenpairs
of the
of the negative second derivative
negative second operator, under
derivative operator, under Neumann conditions, are
Neumann conditions, are

Ao = 0, ro(x) = 1,
2 2
An n 7r
=T ' rn(X) = cos (n7rx)
-e- , n = 1,2,3, ....

Just
Just asas in
in the
the case
case of
of Dirichlet
Dirichlet or
or mixed
mixed boundary
boundary conditions,
conditions, the
the eigenfunctions
eigenfunctions
of
of the
the negative Laplacian, under
negative Laplacian, under Neumann
Neumann conditions and on
conditions and on the rectangle, are
the rectangle, are
products
products of of the
the one-dimensional
one-dimensional eigenfunctions. Since there
eigenfunctions. Since there are
are two
two formulas
formulas for
for
the
the one-dimensional
one-dimensional eigenfunctions,
eigenfunctions, this
this leads
leads to
to four
four different
different formulas for the
formulas for the
350 Chapter 8.
Chapter 8. Problems
Problems in
in multiple spatial dimensions
multiple spatial dimensions

two-dimensional eigenfunctions
two-dimensional eigenfunctions (see
(see Exercise 12):
12):

Aoo = 0, ')'oo(x) = 1,

(8.22)

By the
By the same
same reasoning
reasoning given
given in
in Section
Section 8.2.1,
8.2.1, this
this collection
collection of
of eigenfunction
eigenfunction should
should
be sufficient
sufficient to represent any function in C(IT)j
(7(fi); the series representation
representation is

m7rXl n7rX2 )
+ fl~amnCOS l ; -
0000 ( )
cos (
T '
where
where
11
aoo = £:£21 112 f(Xl,X2) dX2 dx 1,
amo = £~2 foil fol2 f(Xl, X2) cos (m~Xl ) dX2 dx 1,

aO n= £12£2 foil fol2 f(Xl, X2) cos (n;:2 ) dX2 dXl,


a mn = £1~2 foil fol2 f(Xl, X2) cos (m~Xl ) cos (n;:2 ) dX2 dXl.

A steady-state
A steady-state Neumann
Neumann problem imposes aa compatibility
problem imposes compatibility condition
condition on
on the
the
right-hand side of
right-hand side of the
the PDE,
PDE, as as might
might be expected from
be expected from the
the existence
existence of
of aa zero
zero
picrpnva.liip Suppose
eigenvalue. Snnnnsp u 11. is
is a
a. solution
solution of
nf t.hp RVP
the BVP

-.:lu = f(x) in n, (8.23)


au
an = 0 on an.
The compatibility
The compatibility condition follows from
condition follows from the
the divergence theorem:
divergence theorem:

f f =- f .:lu =- f V' . V'u =- f V'u. n =_ f au = o.


Jo Jo Jo Jao Jao an
If f/ satisfies
If satisfies the
the compatibility
compatibility condition
condition

If=O,
8.2. Fourier
8.2. Fourier series
series on
on a
a rectangular
rectangular domain
domain 351
351

then the
then the Neumann problem (8.23)
Neumann problem (8.23) has infinitely many
has infinitely many solutions,
solutions, while
while if
if f/ does
does not
not
satisfy the
satisfy the compatibility
compatibility condition,
condition, then
then there is no
there is no solution.
solution.

Example 8.5. We
Example 8.5. We will
will solve the Neumann
solve the Neumann problem
problem
2 1
-~U=XIX2-6 inn, (8.24)
au
an = 0 on an,
where n
fi is the unit square.
square. We write the solution as
00 00

U(Xl' X2) = aOO +L amo cos (m1rxt) +L aO n cos (n1rX 2)


m=l n=l
00 00

+L L a mn cos (m1rxd cos (n1rX 2).


m=l n=l

Then
Then
00 00

-~U(Xl' X2) =L 2 2
m 1r a mOcos (m1rxt) +L n21r2aOn cos (n1rX2)
m=l n=l
00 00

+L 2:= (m21r2 + n 21r2) amn cos (m1rxd cos (n1rX2).


m=l n=l

We also have
00 00

f(Xl, X2) = Coo + L Cmo cos (m1rX l) + 2:= COn cos (n1rX2)
m=l n=l
00 00

+L L Cmn cos (m1rxd cos (n1rX 2) ,


m=ln=l

where
COO = 0,
2(-1)m
Cmo= 22'
m1r
2((-1)n-1)
COn = 3n1r
2 2 '

8 (( -1) m+n + (-1) m+1 )


Cmn = 2 2 4 .
mn1r
The reader
The reader should
should notice that CQO =
that COO = 00 is
is the
the compatibility
compatibility condition,
condition, and
and so
so there
infinitely many solutions. Equating the series for
are infinitely —Aw and f yields
for -~U
CmO
amo = ----:!2'
m1r
Con
aO n = 22'
n1r
352 Chapter
Chapter 8. Problems in
8. Problems multiple spatial
in multiple spatial dimensions
dimensions

withttQQ of u, with aoo == 0,


aoo undetermined. The graph of 0, is shown
shown in Figure 8.7.
8.7.

0.06

0.04

0.02

o
- 0.02

- 0.04
1

o 0

Figure 8.7.
8.7. The solution to the BVPBVP in Example 8.5. This graph was
produced
produced using a total of
of 120 terms of
of the (double)
(double) Fourier cosine
cosine series.

8.2.6
8.2.6 Dirichlet and
Dirichlet Neumann problems
and Neumann problems for Laplace's equation
for Laplace's equation
The PDE
°
-~U = in n (8.25)
is
is called
called Laplace's
Laplace's equation.equation. This This equation,
equation, with
with inhomogeneous
inhomogeneous boundary
boundary condi-
condi-
tions,
tions, is commonly encountered
is commonly encountered in applications. For
in applications. example, aa steady-state
For example, steady-state heat
heat
flow
flow problem
problem with with no no heat source, in
heat source, in aa homogeneous
homogeneous domain,
domain, leads
leads to Laplace's
to Laplace's
equation,
equation, which which can can be be paired
paired withwith inhomogeneous
inhomogeneous Dirichlet
Dirichlet or
or Neumann
Neumann con-
con-
ditions. The
ditions. The Dirichlet
Dirichlet conditions indicate that
conditions indicate that the
the temperature
temperature is is fixed
fixed on the
on the
boundary,
boundary, while while the the Neumann
Neumann conditions indicate that
conditions indicate that the
the heat
heat flux is prescribed.
flux is prescribed.
As another example,
As another example, if if aa membrane
membrane is stretched on
is stretched on aa frame
frame described
described by
by aa
curve (Xl,X2) €E an,
( x , y , g ( x i , X 2 ) ) , (xi,x<z)
curve (x,y,g(Xl,X2)), Oft, and
and if
if no
no transverse
transverse force
force is applied, then
is applied, then
the
the shape
shape of of the
the membrane
membrane is is described
described byby the
the solution
solution ofof Laplace's equation with
Laplace's equation with
inhomogeneous Dirichlet conditions U(Xl,X2) u(xi,#2) = = #(#15 #2), (Xl,X2)
g(Xl,X2), (^1,^2) EG an.
d^l.
We
We willwill consider
consider the the following
following Dirichlet
Dirichlet problem
problem forfor Laplace's equation:
Laplace's equation:
-~U = ° in n, (8.26)
U = 9 on an.
If we
If we wish
wish to solve (8.26)
to solve (8.26) using
using the
the method of Fourier
method of series, then
Fourier series, then it
it is desirable
is desirable
to shift the
to shift the data
data to
to obtain
obtain homogeneous
homogeneous boundary
boundary conditions.
conditions. The
The reader
reader should
should
8.2. Fourier series on a rectangular domain 353

function pp
recall the method of shifting the data from Section 5.3: Given a smooth function
n
defined on ft satisfying p(xi,#2) g(X1,X2) on an,
P(X1,X2) == 5(^1,^2) 5ft, we
we define vv == uu -— p, where uu
satisfies (8.26).
satisfies (8.26). Then,
Then, in
in n,
ft,
-Llv = -Llu + Llp = 0 + Llp = Llp,
and, on an,
5ft,
v =u - p =g- g = O.
Therefore, v satisfies the BVP
-Llv = Llp in n, (8.27)
v = 0 on an.
For aa general
For general domain
domain n, ft, it
it may
may bebe difficult
difficult or
or impossible
impossible to to find
find (explicitly)
(explicitly)
aa smooth
smooth function
function p, defined on
p, defined on all
all of n
of ft and
and satisfying
satisfying P(X1' X2) == g(X1'
p(x\,x<2) g(xi,xz] for all
X2) for all
(rci, #2)
(Xl, € an.
X2) E 5ft. However,
However, for
for such
such aa general
general domain,
domain, it it is
is probably
probably impossible
impossible to
to find
the eigenvalues and
the eigenvalues and eigenfunction
eigenfunction of of the
the negative
negative Laplacian,
Laplacian, also.
also. For the simple
For the simple
domains (rectangles
domains (rectangles and
and disks)
disks) for
for which
which wewe can
can explicitly
explicitly find the
the eigenpairs
eigenpairs ofof the
the
Laplacian, we
Laplacian, we can
can also
also find the function
find the function pp explicitly.
explicitly.
For the rectangle (8.10),
For (8.10), the boundary
boundary datadata g will
will typically be
be described
described as
follows:
follows:
(X1,X2) E r 1 ,
(X1,X2) E r 2 ,
(X1,X2) E r 3 ,
(X1,X2) E r 4 ,
where an
9ft is partitioned as in (8.13). There is a completely mechanical technique for
finding pp:: n
finding ft -+
—> R
R satisfying
satisfying P(XI,XZ)
P(X1,X2) == g(X1,X2) on an;
g(xi,#2) on 5ft; however, this technique
however, this technique
requires aa lengthy
requires lengthy explanation,
explanation, which we relegate
which we relegate to
to Appendix
Appendix B.B. In
In the following
the following
example, we
example, we use
use the
the results
results from
from that
that Appendix,
Appendix, which
which interested
interested reader
reader can
can consult
consult
for the details.

Example 8.6.
Example 8.6. We
We assume
assume that
that an
an elastic
elastic membrane
membrane of
of dimensions
dimensions 10 cm
cm by
by 15 cm
cm
occupies the
occupies the set
set
n= {x E R2 : 0 < Xl < 10, 0 < X2 < 15},
and the
and the edges
edges of
of the
the membrane
membrane are are fixed
fixed to
to aa frame, so that
frame, so that the
the vertical
vertical deflection
deflection
of the
of the membrane
membrane satisfies
satisfies the
the following boundary conditions:
following boundary conditions:
~ (X1,X2) E r 1,
200'
1 X2
2" - 30' (X1,X2) E r 2,
Jc. _ ~ (X1,X2) E r3,
10 100'
~
(Xl, X2) E r4·
15 '

Then uu satisfies
Then satisfies
-Llu = 0 in n, (8.28)
u = g on an.
354
354 Chapter 8. Problems in multiple spatial dimensions

A smooth
smooth function
function pp satisfying
satisfying pp = gg on an isis
on d£t

_ 20X2 - 2X1X2 - Xi(X2 - 15)


P( X1,X2 ) - 3000 '
and
and we
we have
have

We therefore
We therefore solve
solve

-b.v = f(x1,x2) in 0.,


v = 0 on an,
where /(xi,^)
where f(x1,x2) = (#2
(X2 — 15)/1500, by
-15)/1500, the Fourier
by the Fourier series method. The
series method. The eigenpairs
eigenpairs of
of
—A
-b. on fi are
on 0. are
2
Amn =
m
100
2
'Jr2
+ n 'Jr2
225 ' '¢mn(X1,X2) = sin (m'Jrx)
~ sin Ts '
(n'Jrx)
m,n = 1,2,3, ....

The Fourier
The Fourier coefficients
coefficients of
of ffare
are

Cmn = 1:0 fo10 fo15 f(x1,x2) sin (m;;l) sin (n~:2) dX2dxI
(-I)m-l
= 2 ' m,n = 1,2,3, ... ,
25mn'Jr
and so the solution v is given
given by

where
where
Cmn
a mn = ~, m,n = 1,2,3, ....
"mn
The desired
The desired solution
solution u is then
u is then given
given by
by

The
The graph
graph of
of uu is
is shown in Figure
shown in Figure 8.8.
B.B.

The Neumann problem for Laplace's equation can be handled in much the
same way.
way. An example is given in Appendix B (Example B.2).

8.2.7
8.2.7 Fourier series
Fourier series methods
methods for a rectangular
for a rectangular box
box in
in three
three
dimensions
dimensions
It is straightforward,
straightforward, in principle,
principle, to extend the Fourier series method to problems
posed on a rectangular box in three dimensions. For example, ifif
0. = {(Xl, X2, X3) E R 3 : 0 < Xl < £I, 0 < X2 < £2, 0 < X3 < £3} ,
rectangular domain
8.2. Fourier series on a rectangular 355

0.5

0.4

0.3

0.2

0.1

o
15
10

o 0

Figure 8.8. The


Figure 8.8. The solution to the
solution to the BVP
BVP inin Example 8.6. This
Example 8.6. This graph
graph was
was
produced using 100
produced using 100 terms
terms of
of the (double) Fourier
the (double) Fourier sine series.
sine series.

then the
the eigenpairs
eigenpairs of
of —A n and under Dirichlet
-b. on f) Dirichlet conditions
conditions are
are
k2~2 m2~2 n2~2
Akmn = T + ----er + T'
1/Jkmn (Xl, X2, X3) = sin (k~~l ) X2
sin ( m;2 ) sin (n~:3 ) , k,m,n = 1,2,3, ....

Again, having determined


Again, determined these eigenpairs, it is is straightforward
straightforward toto solve
solve Poisson's
Poisson's
equation,
equation, the
the heat equation, or
heat equation, or the
the wave equation under
wave equation under Dirichlet conditions. The
Dirichlet conditions. The
reader should
reader should note,
note, however,
however, that
that the resulting solutions
the resulting solutions are rather expensive
are rather expensive to
to
evaluate, however,
evaluate, however, because they are
because they are given as triply
given as indexed series.
triply indexed series. For
For example, to
example, to
include the
include lowest 10
the lowest 10 frequencies
frequencies in
in each
each dimension
dimension means
means working 1033 =
with 10
working with = 1000
1000
terms!
terms! Fast transforms, such
Fast transforms, such as
as the
the fast
fast Fourier
Fourier transform, can be
transform, can be used
used to
to reduce
reduce
the cost (see
the cost (see Section
Section 9.2).
9.2).

Exercises
2
1. Let n
1. the unit square in R
fJ be the R2, ,
n = {x E R2 0 < Xl < 1, 0 < X2 < 1} ,
and define f/ : n
and define fi —>
~ RR by
by

f(x) = XIX2 (~ - Xl) (1 - xd(l - X2)'


356
356 Chapter 8. Problems in
in multiple
multiple spatial dimensions

(a) Compute the


(a) Compute (double) Fourier
the (double) sine series
Fourier sine series
00 00

L LC mn sin (m1TxI) sin (n1Tx2)


m=ln=l

of
of /f (that
(that is,
is, compute
compute the
the coefficients
coefficients ccmn
mn ).
).

(b)
(b) Graph
Graph the
the error
error in approximating f/ by
in approximating by
M N

L LC mn sin (m1Tx l) sin (n1Tx 2)


m=l n=l

for M
for N =2
M =N and again
2 and again for
for M =N
M = N = 5.
5.

2.
2. Repeat
Repeat the
the previous exercise with
previous exercise with

3.
3. Solve
Solve the BVP
the BVP

-Llu = f(x) in n,
u = 0 on an,
where n R22 and f/ is the function
fJ is the unit square in R function in Exercise 1.
1.

4.
4. Solve
Solve the BVP
the BVP

-Llu = f(x) in n,
u =0 on an,

where n isis the


where £) the unit
unit square
square in R22 and
in R and f/ is
is the function in
the function in Exercise
Exercise 2.
2.

5.
5. Suppose
Suppose that
that aa square
square iron
iron plate
plate of
of side
side length
length 50cm
50 cm initially
initially has constant
has constant
temperature ofof 55 degrees Celsius and itsits edges
edges are placed in an ice bath (0
degrees Celsius)
degrees (the plate
Celsius) (the is perfectly
plate is perfectly insulated on the
insulated on the top
top and
and bottom).
bottom). AtAt
the
the same
same time
time that
that the edges are
the edges are placed
placed inin the
the ice
ice bath,
bath, we
we begin adding
begin adding
heat energy everywhere
heat energy everywhere in in the
the interior
interior of
of the
the plate
plate at
at the
the (constant)
(constant) rate
rate
of 0.02W/cm33.• The
of 0.02W/cm The material
material constants
constants for
for iron
iron are
are p
p = 7.88 g/cm33,, cC =
= 7.88g/cm =
0.437
0.437 J/(gK), and « =
J/(gK), and". = 0.836W/(cmK).
0.836 W/(cm K).

u(x,£).
(a) Formulate an IBVP that describes the temperature u(x, t).
(b) Find the (double)
(b) (double) Fourier sine
sine series of u.
u.
(c) Find the Fourier series of the steady-state
steady-state temperature us.
ua. What BVP
does satisfy?
us satisfy?
does Us
(d) How
(d) How close
close is u to
is u us after
to Us 10 minutes?
after 10 minutes? Graph
Graph the
the difference
difference in
in the
the two
two
temperature distributions.
distributions.
8.2. Fourier series on a rectangular domain
domain 357

6. Let
6. € C(f1)
Let u E C(fJ) be given, and
be given, and define FMN to
define FMN to be
be the
the subspace
subspace of C(f)) spanned
of C(f1) spanned
by
{~mn : m = 1,2, ... , M, n = 1,2, ... , N},

where
~mn(Xl' X2) = sin (m~Xl ) sin (n;:2 ).

Show that the best approximation L22 norm) from FMN


approximation to u (in the I/ FMN is given
by (8.17),
(8.17), (8.18).
(8.18).

7. Consider
7. Consider the
the iron
iron plate of Exercise
plate of 5. Suppose
Exercise 5. Suppose that
that plate initially has
plate initially constant
has constant
temperature
temperature 2 degrees Celsius
2 degrees Celsius and
and that
that at
at time
time tt = 0
0 the
the edges
edges are instantly
are instantly
brought
brought to
to temperature
temperature 55 degrees
degrees and
and held
held there.
there. How long does
How long does is
is take
take until
until
the
the entire
entire plate
plate has
has temperature at least
temperature at least 4 degrees? (Hint: To
degrees? (Hint: To deal with the
deal with the
inhomogeneous boundary
inhomogeneous condition, just
boundary condition, just shift
shift the
the data. is trivial
data. It is trivial in
in this
this
case,
case, because
because the
the boundary data is
boundary data constant.)
is constant.)

8. Suppose fi
n is the rectangle

and that
that u is aa twice-continuously differentiate
u is function defined
differentiable function defined on n.
fL Let
the Fourier sine
sine series
series of
of u be
be

Suppose
Suppose u
u satisfies u(x) =0
u(x) = 0 for x e an. Prove
E dfl. Prove that the Fourier —Aw
Fourier series of -.6.u
is
is

where

9.
9. In
In Example 8.4, how
Example 8.4, how long
long does it take
does it take for
for the
the leading
leading edge
edge of the wave
of the to
wave to
reach
reach the
the boundary
boundary of
of 0?
n? Is
Is the
the computed
computed time
time consistent
consistent with
with Figure 8.6?
Figure 8.6?

10. Suppose £)
10. n is a domain in R R33 with a piecewise smooth boundary an,
R22 or R dft,
and
and suppose an is
suppose Oft is partitioned into 22 disjoint
partitioned into disjoint subsets: dti, =
subsets: an = rFI1 U
U rF2-
2 . Define
Define

Let
Let L
Lm C^(fl) -t
m :: C!(f1) —>• C(f1)
C(fi) be defined by
be defined by LLmu = —Aw.
mu = Show that
-.6.u. Show that L
Lmm is
is
symmetric and has
has only positive eigenvalues.
eigenvalues.
358
358 Chapter 8. Problems in multiple spatial dimensions

11. Consider
11. Consider aa square drumhead occupying
square drumhead occupying the
the unit square,
unit square,
o= {(Xl, X2) E R2 : 0 < Xl < 1, 0 < X2 < I} ,
when
when at
at rest,
rest, and
and suppose
suppose the drum is
the drum "plucked" so
is "plucked" so that
that its
its initial
initial (vertical)
(vertical)
displacement is
displacement is the
the (piecewise
(piecewise linear) function
linear) function
(X1,X2) E 0 1,
(Xl, X2) E O2 ,
(Xl, X2) E 03,
(X1,X2) E 04.

Here 0 1(T44 and


f3 = 10- and
01 = {(X1,X2) E R2 o < X2 < !, X2 < Xl < 1 - X2} ,
02 = {(X1,X2) E R2 ! < Xl < 1, 1 - Xl < X2 < xI},
0 3 = {(X1,X2) E R2 ! < X2 < 1, 1 - X2 < Xl < X2} ,
04 = {(X1,X2) E R2 o < Xl < !, Xl < X2 < 1 - Xl }
(see Figure
(see 8.9). Find
Figure 8.9). Find the
the resulting vibrations of
resulting vibrations of the
the drumhead
drumhead by
by solving
solving
(Pu
c ~u = 0, x E 0, t
2
8t2 - > 0,
u(x,O) = ¢(x), x E 0,
8u
8t (x, 0) = 0, x E 0,
u(x, t) = 0, x E 80, t > o.

12. Let
12. Let ft
fl be
be the
the rectangle
rectangle (8.10). Define
(8.10). Define
civ(n) = {u E C 2 (n) : ~~(x) = 0, x E aO}.
Let LN :'• Civen)
Let LN Cpf(ft) —> C(ft) be
-+ C(O) be defined
defined by
by L^u
LNu == —Aw.
-~u. Use separation of
Use separation of
variables to find
variables to find the
the eigenpairs
eigenpairs of LN with
of LN with separated eigenfunctions.
separated eigenfunctions.
13. 54
13. 54 Suppose
Suppose an
an elastic
elastic membrane
membrane occupies
occupies the
the unit
unit square,
square,
0= {(XI,X2) ER2 : O<xI<I, 0<x2<1},
and something
and something pushes
pushes up at the
up at center of
the center of the
the membrane
membrane (a (a pin or the
pin or tip
the tip
of
of aa pencil,
pencil, for example). The
for example). The purpose
purpose of
of this
this question is to
question is to determine
determine the
the
resulting
resulting shape
shape of the membrane.
of the membrane. This
This can
can be
be done
done by solving the
by solving the BVP
-~u = 8(XI -
1/2)8(x2 - 1/2) in fl,
u = 0 on 00.
Graph
Graph the solution. Note:
the solution. Note: The Fourier coefficients
The Fourier coefficients of
of the
the point
point source
source can be
can be
found using
found using the sifting property
the sifting of the
property of the Dirac
Dirac delta function.
delta function.
54
5 4The
The material
material on
on the
the delta
delta function
function found
found in Section 4.6
in Section 4.6 or Section 5.7
or Section is needed
5.7 is needed for this
for this
exercise.
exercise.
8.3. Fourier series on a disk 359

Figure 8.9.
Figure 8.9. The partition of the unit square used in Exercise
Exercise 11.

14. Let
14. n be
Let (7 be the
the rectangle (8.10), and
rectangle (8.10), suppose an
and suppose d£l is partitioned as
is partitioned as in (8.13).
in (8.13).
Define
Define

Let
Let L C^(Q) -+
m :: C!(O)
Lm —>• C(O)
C(fi) be defined by
be defined by L —Aw. Use
mu = -~u.
Lmu Use separation
separation of
of
variables
variables to
to find
find the eigenpairs of
the eigenpairs of L
Lmm with
with separated
separated eigenfunctions.
eigenfunctions.

15. Repeat
15. Repeat Exercise
Exercise 5, 5, but assuming now
but assuming now that the edges
that the edges F2r 2and r3 are
and Fa are insulated,
insulated,
while edges
while r 1 and
edges FI and F4r 4 are
are placed in an
placed in an ice bath (an
ice bath is partitioned
(dft is partitioned as
as in
in (8.13)).
(8.13)).
(You will
(You will need the eigenpairs
need the eigenpairs determined
determined in in Exercise 14.)
Exercise 14.)

8.3
8.3 Fourier series
Fourier series on
on a
a disk
disk
We now
We now discuss
discuss another
another simple
simple two-dimensional domain for
two-dimensional domain for which
which we can derive
we can derive
Fourier series
Fourier series methods, namely, the
methods, namely, case of
the case of aa circular
circular disk.
disk. We
We define
define

where
where AA > 00 is
is aa constant.
constant. We
We wish to develop
wish to develop Fourier
Fourier series
series methods for the
methods for the
following Dirichlet
following Dirichlet problem:
problem:

-~U = f(x), x E n, (8.29)


u(x) = 0, x E an.
360 Chapter 8. Problems in multiple spatial
spatial dimensions
dimensions

The first
The first step
step is
is to
to find
find the eigenvalues and
the eigenvalues and eigenfunctions of the
eigenfunctions of Laplacian, subject
the Laplacian, subject
to the
to the Dirichlet
Dirichlet conditions
conditions on
on the circle.
We have only one technique for finding eigenfunctions
eigenfunctions of a differential operator
differential operator
in two
in two variables, namely separation
variables, namely separation ofof variables. However, this
variables. However, this technique is not
technique is not
very promising
very promising in in rectangular
rectangular coordinates,
coordinates, since
since the
the boundary
boundary condition does not
condition does not
separate. For this reason, we first change to polar coordinates. If we
we first we define

v(r,O) = U(Xl,X2),

where (r,O)
where (r, 9) are
are the polar coordinates
coordinates corresponding
corresponding to the rectangular
rectangular coordinates
coordinates
(#1,0:2), then the Dirichlet condition becomes simply
(Xl,X2), then the Dirichlet condition becomes simply

v(A,O) = 0, -7r::; 0 < 7r.


If we
If we apply separation of
of variables and write
write v(r, 0) = R(r)T(0),
v(r,0) then the Dirichlet
R(r)T(O), then Dirichlet
condition is
condition is R(A)T(O)
R(A}T(9] == 00 for
for all
all 0, which
which implies
implies (if v is
is nontrivial)
nontrivial) that R(A] = 0.
that R(A) O.
The use of polar coordinates introduces
The introduces periodic boundary conditions
conditions for
for T:
T(-7r) = T(7r),
dT dT
dO (-7r) = dO (7r).

There is
There is also
also aa boundary
boundary condition for R at
condition for at r = 0, although
= 0, although it
it is not one
is not one we have
we have
seen before.
seen before. We simply need
We simply that R(O)
need that R(Q) be
be aa finite
finite number.
number.

8.3.1
B.3.1 The Laplacian
Laplacian in
in polar coordinates
coordinates
Before wewe can apply separation
separation of variables to the PDE, we must change variables
to determine the form of the (negative) Laplacian in polar coordinates. This is an
exercise in
exercise in the
the chain
chain rule,
rule, as
as we
we now
now explain. The chain
explain. The rule implies,
chain rule implies, for example,
for example,
that
that
OU OV or OV 00
-
OXl
= -
or OXl 00 -
- + - OXl
.
This allows
This allows us
us to replace the
to replace the partial
partial derivative
derivative with
with respect
respect to Xl by
to x\ by partial deriva-
partial deriva-
tives with respect
tives with to the
respect to the new variables rr and
new variables and 0,
0, provided
provided we
we can compute
can compute
or 00
OX1' OX1·

To deal
deal with
with derivatives
derivatives with
with respect to
to #2,
X2, we will
will also
also need
need
ar ao
OX2' aX2·

It is
It is straightforward
straightforward to
to compute the needed
compute the needed derivatives from the
derivatives from the relationship
relationship
between rectangular and polar coordinates:
between rectangular and polar coordinates:

Xl = r cos (0), X2 = r sin (0),

r = VXi + x~, tan (0) = - .


X2
Xl
8.3. Fourier series on a disk 361
361

We have
Xl = r cos (61) = cos (61)
y'xi + x~ r '
and, similarly,
and, similarly,
:r = sin (61).
UX2
Also,
X2
tan(61)=-
Xl
::::} sec2 (61) 861 = _ X2 = _ r sin (61)
8XI xi r2 cos2 (61)
861 sin (61)
::::}-----
8XI - r'
and,
and, similarly,
similarly,
861 cos (61)
8X2 r
We collect these formulas
formulas for future reference:

:r =cos(61), :r = sin (61),


UXI UX2
861 sin (61) 861 cos (61)
r

We can now
We can compute the
now compute the Laplacian
Laplacian in
in polar
polar coordinates.
coordinates. We
We have
have
8u 8v 8r 8v 861
- =8r
8XI
-8XI
- +861-8XI
-
= cos (61) 8v _ sin (61) 8v
8r r 80'
and so
2
8 2u (8 2v 8r 8 v 861) . 861 8v
8xI = cos (61) 8r2 8XI + 8618r 8XI - sm (61) 8XI 8r
_ sin (61) (8 2v 8r + 8 2v 861 ) _ r cos (B)
r 8r861 8XI 8612 8XI
It -
r2
'*
sin (B) 8v
8B
2 2 2
= (l1) ( (l1) 8 v _ sin (61) 8 v) sin (61) 8v
cos Q cos Q 8r2 r 8618r + r 8r
_ sin (61) ( 2
(l1) 8 v _ sin (61) 8 v) 2
2 sin (61) cos (61) 8v
r cos Q 8r8B r 861 2 + r2 80
2 2 2 2 2
= cos2 (61) 8 v _ 2 sin (61) cos (B) 8 v + sin (61) 8 v + sin (B) 8v
8r2 r 808r r2 861 2 r 8r
2 sin (B) cos (61) 8v
+ r2 861·
362
362 Chapter 8. Problems in multiple spatial dimensions
Chapter

A similar
A similar calculation
calculation shows
shows that
that
(0) 8 2v 2 sin (0) cos (0) 8 2v 2 2 cos 2 (0) 8v
(Pu
- =
.
SIn
2
- + - - + cos (0) 8 v2 + -----'--'-
8x~ 8r2 r a08r r2 80 r 8r
2 sin (0) cos (0) 8v
r2 80'

Adding
Adding these
these two results and
two results and using
using the
the identity cos22 (0)
identity cos sin22 (9)
(0) + sin 1, we
= 1,
(0) = we obtain
obtain

8 2v 1 8 2v 18v
-Apv = - 8r2 - r2 802 - -:;. 8r'

where we
where we write — Ap for
write -Ap for the
the Laplacian in polar
Laplacian in polar coordinates.
coordinates.

8.3.2
8.3.2 Separation of
Separation of variables
variables in
in polar
polar coordinates
coordinates
We now
We apply separation
now apply separation of
of variables, and look
variables, and look for
for eigenfunctions
eigenfunctions of —A p (under
of -Ap (under
Dirichlet conditions)
Dirichlet conditions) of
of the
the form
form

v(r, 0) = R(r)T(O).

That is,
That is, we
we wish
wish to find all
all solutions
solutions of
of

-Apv = Av in n, (8.30)
v = 0 on an

that have the


that have the form
form v(r,9)
v(r,O) == R(r}T(0). Substituting the
R(r)T(O). Substituting separated function
the separated function v == RT
RT
into the PDE
into PDE yields the following:
following:

-Apv = Av
8 2v 1 8 2v 18v
::::}--------=Av
8r2 r2 80 2 r 8r
d2R 1 d2T 1 dR
::::} - - T2 - -R- - --T= ART
dr r2 d0 2 r dr
2
::::} _R-1 d R _ ~T-I d2T _ ~R-I dR = A
dr2 r2 d0 2 r dr
2
-1 d2T 2 -1 2 d R -1 dR
::::} - T d0 2 = Ar + R r dr 2 + R r dr'

Since the
Since the left side of
left side of this equation is
this equation is aa function
function of
of 00 alone,
alone, while the right
while the right side
side is
is aa
function of rr alone, both
function both sides
sides must
must be constant. WeWe will write
write

or
or
8.3. Fourier series on a disk 363
363

We then have

or
or
eF R + ~ dR + (A _ 2)
R = o.
dr 2 r dr r2
This last
This last equation can be
equation can be written as an
written as an eigenvalue
eigenvalue problem for R,
problem for R, but it is
but it is not
not one
one
we have studied before.
before. We
We will study it in detail below,
below, but
but first we deal with the
easier eigenvalue
easier eigenvalue problem for T.
problem for T.
As we
we mentioned above, the angular variable 0 introduces periodic boundary
conditions for T, so we
we must solve the eigenvalue problem

eFT
- d(}2 ='YT, -1f<O<1f,
T( -1f) = T(1f), (8.31)
dT dT
dO (-1f) = d(} (1f).

As we saw in
we saw in Section
Section 6.3, and n22 ,, n = 1,2,3,
6.3, the eigenvalues are 0 and 1,2,3, ....
— The
The constant
constant
function 11 is
function is an
an eigenfunction
eigenfunction corresponding to '7Y =
corresponding to = 0,
0, and each positive
and each positive eigenvalue
eigenvalue
= n 22 has
'7Y = has two
two independent
independent eigenfunctions,
eigenfunctions, cos
cos (nO) and
and sin
sin (nO).
(nO).

8.3.3 Bessel's equation


We
We now consider the
now consider the problem
problem

eFR + ~ dR + (A _ 2) R = 0,
dr 2 r dr r2
R(O) E R, (8.32)
R(A) = o.
We know that
We know that A must be
A must be positive, since the
positive, since the Laplacian has only
Laplacian has only positive
positive eigenvalues
eigenvalues
under
under Dirichlet conditions (see
Dirichlet conditions (see Section
Section 8.2.1).
8.2.1). We
We can
can considerably
considerably simplify
simplify the
the
analysis
analysis by
by the
the change
change of
of variables
variables

s = v>"r.
We define
We define
S(s) = R (Jx) ¢} R(r) = S (VXr) ,

so tnat
so that
dR(r) = V>..dS (V>..r) = V>..dS (s)
dr ds ds
and
and
364 Chapter 8. Problems in multiple spatial dimensions

We then have

The ODE
dl S
ds 2
+ ~ dS +
S ds
(1 _n2) 0 S2
S=

is called Bessel's equation of n. In the new variables, the BVP (8.32) becomes
of order n.

-dl8 + -1 -d8 + ( 1 - -s2 8 n2) = 0,


ds 2 S ds
8(0) E R, (8.33)
S(v'XA) = O.
Bessel's equation does not have solutions that can be expressed
Bessel's expressed in terms of
of
elementary functions. To find
find a solution of Bessel's equation, we
we can use a power
55
series expansion of the solution. We suppose55 that (8.33) has a solution of the
form
form
00 00

8(s) = r Laksk = LakSk+a, ao f:. O.


a

k=O k=O
The
The value of a, as well as the coefficients 005^15^2,
the coefficients • • •,, must be determined from
aO,al,a2, ...
the differential equation
the differential equation and
and boundary conditions. We
boundary conditions. We havehave

and so
and so
(8.34)

Also,
dlS 00
ds 2 (s) = L(k + a)(k + a - 1) ak sk+ a-2. (8.35)
k=O
55
This is yet another
55This another example
example of an
an inspired guess
guess at
at the form of a solution.
solution. It
It is
is based on the
the
fact that
fact that Euler's
Euler's equation,
2d 2R
r - + r -dR - >'R = 0,
dr 2 dr
has solutions
solutions of the form
form R(
R(r) =r
r) = rO;a.
8.3. Fourier series on a disk 365

It is
It is helpful
helpful to
to write
write
00 00

S(s) = Laksk+a = Lak_2Sk+a-2. (8.36)


k=O k=2
Substituting (8.36),
Substituting (8.36), (8.34),
(8.34), and
and (8.35)
(8.35) into Bessel's equation
into Bessel's equation yields
yields
00 00

L(k + o:)(k + 0: - 1) ak sk+ a -2 + L(k + 0:)akSk+a-2


k=O k=O
00 00

+ L ak_2 Sk +a - 2 - n 2 L ak sk+a - 2 = 0,
k=2 k=O
or
or

00

+ L {((k + o:)(k + 0: - 1) - n 2)ak + ak-d Sk+ a- 2 = 0.


k=2
This
This equation
equation implies
implies that
that the coefficient of
the coefficient of each
each power of s must
power of must vanish, and so
vanish, and so we
we
obtain
obtain the equations
the equations

(0:(0: - 1) + 0: - n 2 )ao = 0,
((0: + 1)0: + (0: + 1) - n 2 )al = 0,
((k + o:)(k + 0: - 1) + (k + 0:) - n 2)ak + ak-2 = 0, k = 2,3,4, ... ,
which
which simplify to
simplify to

(0:
2
- n
2
) ao = 0,
((0:+1)2-n2)al=0, (8.37)
((k + 0:)2 - n 2
) ak + ak-2 = 0, k = 2,3,4, ....
We have assumed
We have assumed that
that ao / 0, so
::j:. 0, so the
the first
first equation in (8.37)
equation in (8.37) implies
implies that
that

0:= ±n.

Moreover, the
Moreover, the condition that S(O)
condition that 5(0) be
be finite rules out
finite rules out the
the possibility
possibility that
that a = -n,
0: = —n,
so we conclude that
o:=n
must
must hold.
hold. This, together with
This, together with the
the second equation in
second equation in (8.37),
(8.37), immediately
immediately implies
implies
that
that
al = 0.
The third
The third equation
equation in (8.37) can
in (8.37) can be
be written as the
written as the recursion relation
recursion relation
ak-2 ak-2
ak = - (k + n)2 _ n2 = - k(k + 2n)' k = 2,3,4,.... (8.38)
366 Chapter 8.
Chapter 8. Problems
Problems in multiple spatial
in multiple spatial dimensions
dimensions

Since al
Since = 0,
a\ = 0, (8.38) implies that
(8.38) implies all of
that all of the
the odd
odd coefficients are zero:
coefficients are zero:

a2i+1 = 0, j = 0, 1, 2, ....
On the other
On the other hand,
hand, we
we have
have

a - ao - ao
2 - - 2(2 + 2n) - - 22(n + 1)'
a2 ao
a4 = - 4(4 + 2n) = 2!24(n + 1)(n + 2)'
a4 ao
a6 = - 6(6 + 2n) = - 3!2 6 (n + l)(n + 2)(n + 3)'

and, in
and, in general,
general,

(-I) iao .
a2i = j!22i (n + 1)(n + 2) ... (n + j)' J = 0,1,2, .... (8.39)

Since any
Since any multiple
multiple of
of aa solution
solution of
of (8.33)
(8.33) is
is again
again aa solution,
solution, we
we may as well
may as well choose
choose
the value
the of ao to
value of to give
give asas simple
simple aa formula
formula as
as possible for a2i'
possible for a 2 j • For
For this reason, we
this reason, we
choose
choose
1
ao = 2nn!
and obtain
and obtain
(-I)i .
a2i = 22i+nj!(n + j)!' J = 0,1,2, ....
We
We then obtain the
then obtain the solution
solution

00 ( -1)i (S ) 2i+n
S(s) = ~ j!(n + j)! 2 .
This function is
This function is aa solution
solution of
of Bessel's
Bessel's equation
equation of order n.
of order It is
n. It is usually written
usually written

(-I)i (S)2i+n
= ~ j!(n + j)! 2
00

In(s) (8.40)

and called
and called the
the Bessel
Bessel function of order
function of order n. The reader
n. The reader should
should note
note that the above
that the above
calculations are
calculations are valid for nn =
valid for °
= 0 as
as well asn
well as n =
= 1,2,3,
l,2,3, ....

8.3.4
8.3.4 Properties of
Properties of the Bessel functions
the Bessel functions
The Bessel functions
The Bessel functions have
have been
been extensively studied because
extensively studied because of
of their
their utility
utility in applied
in applied
56
mathematics, and their
mathematics, and their properties are well
properties are known.56
well known. We will
We will need
need the following
the following
properties of the
properties of the Bessel
Bessel functions:
functions:
1. If
1. If nn > 0,
0, then
then JIn(O)
n (0) =
= 0.
0. This
This follows
follows directly
directly from
from (8.40).
(8.40).
56
56Standard
Standard software packages,
software packages, including
including MATLAB,
MATLAB, Mathematica, and Maple,
Mathematica, and implement Bessel
Maple, implement Bessel
functions just
functions just as they do
as they elementary functions
do elementary functions such
such as
as the
the natural
natural logarithm or sine.
logarithm or sine.
8.3. Fourier series on a disk 367

2. The Bessel
2. The functions satisfy
Bessel functions satisfy

(8.41)

This recursion
This recursion relation can be
relation can verified directly
be verified directly by
by computing
computing the
the power
power series
series
of the
of the right-hand side and
right-hand side and simplifying
simplifying it
it to
to show
show that
that it
it equals the left-hand
equals the left-hand
side (see
side (see Exercise
Exercise 10).
10).
3. If, for
3. If, for aa given
given value
value of
of a,
a, JIn(aA)
n(aA) = 0, then
— 0, then

(8.42)

We will sketch
We will sketch the
the proof of this
proof of this result. Since IJn satisfies
result. Since satisfies Bessel's
Bessel's equation,
equation, we
we
have
have
2
d Jn 1dJn ( n2)
r
dr2 + dr + 1- r2 I n = 0,
and multiplying
and multiplying through by rr yields
through by yields
2 n
d Jn
r dr 2 + dJ
dr + r
-1 ( 2 2)
r - n In = 0,
or
or
! [r d~n (r)] + r- 1 (r2 - n 2) In(r) = O.

Next, we multiply
Next, we multiply through by 2rdJ
through by 2rdJnn/dr and manipulate
/dr and the result:
manipulate the result:

2r d~n (r)! [r d~n (r)] + 2 (r2 - n 2) In(r) d~n (r) = 0

~! [(r d~n (r)) 2] + ! [(r2 _ n 2) (In(r))2] = 2r (In (r))2 .

Integrating both
Integrating both sides
sides yields
yields

In the
In the last step, we
last step, we used
used the that n 22 J nn(0)
fact that
the fact = 00 since
(0) = either n = 00 or
since either or
JIn(O)
n (0) =
= 0.
O. We
We can
can now
now evaluate
evaluate the
the integral
integral
368 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial
spatial dimensions
dimensions

by
by making
making the
the change
change of
of variables or. The
variables s8 = aT. The result
result is
is

with the last


with the step following
last step following from
from the
the assumption
assumption that
that JIn(aa)
n(o:a) =
= 0. Finally,
O. Finally,
applying (8.41),
applying (8.41), we
we obtain
obtain (8.42).
(8.42).

4. Each IJnn,, nn =
4. Each = 0,1,2,
0,1,2,...,
... , has
has an an infinite
infinite number
number ofof positive
positive roots,
roots, which
which we
we
label s8 n i1 < s8 n22 <
label < 8snn33 <
< ....
• • •• (There
(There isis no simple formula
no simple formula for
for the roots 8snm
the roots nm.)
.)
We will
We will not not prove
prove this
this fact.
fact. Figure
Figure 8.10 shows the
8.10 shows graphs of
the graphs of Jo,
Jo, Ji, and J2.
J 1, and J^.
57
For future
For future reference,
reference, we we give
give here some of
here some of the
the roots
roots 57 of the
of the Bessel
Bessel functions:
functions:

80m = 2.404825557690968,5.520078109856846,
8.65372791291017,11. 79153381314112, ... ,
81m = 3.831704472655219,7.015586669057602,
10.17346813505608,13.32368935305259, ... , (8.43)
82m = 5.135622247449045,8.41724413443633,
11.61984117182147,14.79595178232688, ... ,
83m = 6.380161894536216,9.76102306245301,
13.01520072163691,16.22346616026436, ....

8.3.5
8.3.5 The eigenfunctions of the negative laplacian
Laplacian on
on the disk
Since IJn has
Since has an
an infinite sequence of
infinite sequence of positive
positive roots,
roots, there
there are infinitely many
are infinitely many positive
positive
solutions to
solutions to

namely,
namely,
2
\ snm
Amn = A2 ' m = 1,2,3, ....

Therefore, for
Therefore, for each
each value of n,
value of n, nn == 0,1,2,
0,l,2,..., there are
... , there are infinitely
infinitely many
many solutions
solutions to
to
(8.32). For
(8.32). For each
each value of n,
value of n, there are two
there are two independent solutions to
independent solutions (8.31):
to (8.31):

cos (nO), sin (nO).


57
These estimates
57These estimates were computed in
were computed in Mathematica,
Mathematica, using the BesselJ
using the function and
BesselJ function the Find-
and the Find-
Root command.
Root command.
8.3. Fourier series on a disk 369

- y=Jox
__ . y=J (X)
1
_._ y=J (X)
2

0.5

_0.51....-----'------'--------1
o 5 10 15
x

Figure 8.10.
Figure 8.10. The
The Bessel
Bess el function
function JQ,
Jo , J3\, and J^.
1 , andh.

We therefore
We therefore obtain
obtain the following doubly
the following doubly indexed
indexed sequence
sequence of
of eigenvalues
eigenvalues for
for — Ap
-~p
(on the
(on disk and
the disk and under
under Dirichlet
Dirichlet conditions),
conditions), with one or
with one or two
two independent
independent eigen-
eigen-
functions for
functions for each
each eigenvalue:
eigenvalue:
2
AmO -
_ SOm (1) ( B) _
A2' 'PmO r, - Jo (Snmr)
----;r- _
, m -1,2,3, ... ,
2
\
Amn -_ Snm (1) ( B) _ T (Snmr)
A2 ' 'Pmn r, - I n ----;r- cos (B)
n , m, n -_ 1,2,3, ... , (8.44)

'P~~(r,O) = I n Cn;r) sin (nO), m,n = 1,2,3, ....

Since —
Since Ap is
-~p is symmetric
symmetric under Dirichlet conditions,
under Dirichlet conditions, we know that
we know that eigenfunctions
eigenfunctions
corresponding to
corresponding distinct eigenvalues
to distinct eigenvalues are
are orthogonal.
orthogonal. It turns out that
turns out (pmn an
that 'Pgh d
and
/2"\
'P~~ are
(Pmn are orthogonal
orthogonal toto each
each other
other as
as well,
well, as
as aa direct
direct calculation
calculation shows:
shows:

('PgL'P~~) = !~IoA I n Cn;r) cos (nO)Jn Cn;r) sin (nB)r dr dO


= (1: cos (nO) sin (nO) dO) (loA I n (Sn;rf rdr)
=0· (loA Jncn;rfrdr)
= O.
370 8. Problems in multiple spatial dimensions
Chapter 8.

For convenience,
convenience, we will write
Snm
amn=T' n=0,1,2, ... , m=1,2,3, .... (8.45)

We now
now have aa sequence
sequence ofof eigenfunctions
eigenfunctions ofof --~p on n
Ap on fJ (the
(the disk
disk of
ofradius
radius AA
centered at the origin), and these eigenfunctions are orthogonal on n.
centered at the origin), and these eigenfunctions are orthogonal on £7. Just as Just as in
in
the case
the case in which n
in which f) was
was aa rectangle,
rectangle, it
it is
is possible
possible to
to represent any function
represent any in Cen)
function in C(0)
eierenfunctions:
in terms of these eigenfunctions:
<Xl <Xl <Xl

m=l m=l n=l


(8.46)
The coefficients
The coefficients are
are determined
determined by the usual
by the usual formulas:
formulas:

(I, ~~~)
C mn = (1) (1) ) , n = 0,1,2, ... , m = 1,2,3, ... ,
( ~mn,~mn

(J,~~~)
dmn = -;(,.....:...(2-)--(2~)7")' m, n = 1,2,3, ....
~mn,~mn

Using the properties


Using the properties of
of the Bessel functions
the Bessel functions developed
developed above,
above, we
we can
can simplify
simplify
2
(((VmniVmn)
~~~,
(!)
~~~)
(!) \
andA (~~h,
(((pmrnVmn):
~~~
(2) ( ) ^\
):
(~~b, ~~b) = i: loA (Jo(amor))2 r dr dB

= 27f ( ~2 (J1(a m oA))2)


= 7fA2 (J1 (a moA))2 ,

(~~~,~~~) = 1:loAcos2(nB)(Jn(amnr))2rdrdB
= (1: 2
cos (nB) dB) (loA (In(amnr))2 r dr)

7fA2 2
= -2- (In+1(a mn A)) ,

and, similarly,
and, similarly,
(2) (2) ) _ 7fA2 2
( ~mn'~mn - 2 (In+1(amnA)) .
We can now represent a function l(r,B)
/(r, 0) as in (8.46),
(8.46), where
(1) )
( I,~mn
Cmo = 2' m = 1,2,3, ... ,
7fA2 (J1(a moA))
8.3.
8.3. Fourier series on a disk
disk 371
371

2 (f, <p~h)
Cmn = 2 2' n = 1,2,3, ... , m = 1,2,3, ... , (8.47)
1fA (In+1(a mn A))
2 (1, <p~h)
dmn = 2' n = 1,2,3, ... , m = 1,2,3, ....
1fA2 (In+1 (a mn A))
Given
Given that
that software
software routines
routines implementing
implementing thethe Bessel
Bessel functions
functions are
are almost as readily
almost as readily
available as
available as routines
routines for
for the
the trigonometric
trigonometric functions,
functions, itit would appear that
would appear that these
these
formulas
formulas are
are as
as usable as the
usable as the analogous
analogous formulas
formulas onon the
the rectangle.
rectangle. However,
However, we we
must
must keep in mind
keep in mind that
that we
we do
do not
not have
have formulas
formulas for
for the
the values
values of
of a Therefore,
a mn . Therefore,
to
to actually
actually use
use Bessel
Bessel functions,
functions, we
we must do aa certain
must do certain amount
amount of of numerical
numerical work to
work to
obtain the
obtain the needed
needed values
values of a mn and
of a and the
the eigenvalues
eigenvalues \),mn
mn = c? mn.
a~n"

Example
Example 8.7. Consider the function
8.7. Consider € C(IT)
function f E C(£l) defined
defined by
f(x) = 1 - xi - x~,
where n
fi is
is the unit disk (A =
= 1).
I ) . The corresponding function expressed
expressed in polar
coordinates is
g(r,O) = 1- r2.
We wish to compute an approximation
approximation to g using the eigenfunctions
eigenfunctions of
of — A p . This
-~p.
is aa particularly
is particularly simple
simple example,
example, since,
since, for
for any 0,
any nn > 0,

(g, <p~h) = i: 11 g(r, O)<p~~ (r, O)r dr dO


= rr
1-7r 10
1
(1 _ r2) In(amnr) cos (nO)r dr dO

= (i: cos (nO) dO) (1 1


(l-r2) In(amnr)rdr)

(1
1
2
=0· (1-r ) In(amnr)rdr)
= 0.
Similarly,
Similarly,
(g, <p~h) = °
for every n > 0.
for O. It follows that g can be
be represented as follows:
follows:
00

g(r,O) =L cmOJo(amor).
m=1

This is not
not surprising;
surprising; since g is independent
independent of 9, it is reasonable that only
0, it only the
eigenfunctions independent
eigenfunctions independent of
of 09 are needed
needed to
to represent g.
Since we must compute numerical
numerical estimates of the eigenvalues \),mn,
mn, we
we will
content ourselves with using 3 eigenfunctions,
content eigenfunctions, those corresponding to the eigenvalues
),10, ),20, ),30.
372 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial dimensions
spatial dimensions

To six digits, we have


SlO == 2.40483, S20 == 5.52008, S30 == 8.65373
{see (8.43)). Since A = 1 in this example, we
(see {8.43}}. amn = s
we have Q Smn mn =
and \Amn
mn and = ^
s~n'
mn-
58
needed coefficients
The needed coefficients are
are58

ClO = 1 2111" (l g(r,())Jo(QlO r )rdrd() == 1.10802,


rr(Jl(QlO)) -1I"io
C20 = 1 2111" (l g(r, ())JO(Q20r)r dr d() == -0.139778,
rr(Jl(Q20)) -1I"io
C30 = 1 2111" (l g(r,())Jo(Q30 r )rdrdfJ == 0.0454765.
rr(Jl(Q30)) -1I"io
We now have the first three terms of of the Fourier series for
for g. The graph of 9g is
shown in Figure 8.11,
8.11, while the approximation
approximation is shown in Figure 8.12.
8.12. Exercise 1
approximation by using more terms.
asks the reader to improve the approximation terms.

0.8

0.6

0.4

0.2

o
1

-1 -1

2
8.11. The
Figure 8.11. The function
function g(r 9} =
g(r,: ()) = 11 - rr2..

8.3.6
8.3.6 Solving PDEs on a disk
Having found the the eigenvalues
eigenvalues and eigenfunctions
eigenfunctions of -Ll— App on the
the disk and under
Dirichlet conditions,
Dirichlet conditions, we we can now apply Fourier
Fourier series methods to solve any of the
familiar equations: thethe Poisson
Poisson equation, the
the heat equation, and the wave equation.
wave equation.
58
The integrals
58The integrals were computed in
were computed in Mathematica, using the
Mathematica, using the Integrate
Integrate command.
command.
8.3. Fourier
8.3. Fourier series on a disk 373

-1 -1

2
Figure 8.12.
Figure 8.12. The
The approximation
approximation to
to function
function g(r,0]
g(r, 0) =
= 1I —
- r
r2, , using three
using three
terms of the Fourier
of the Fourier series (see Example
series (see Example 8.7).
8.7).

Example 8.8.
Example 8.8. We
We will
will solve
solve (approximately) the BVP
(approximately) the BVP

-.:lpu =1- r2 in n, (8.48)


u = 0 on an,
where n
where 0, is
is the
the unit
unit disk. We have
disk. We have already
already seen
seen that
that
00

1 - r2 = L cmOJo(amor),
m=l

where the
where the coefficients
coefficients cCmO
mo can
can be computed as
be computed as in
in the
the previous
previous example. We now
example. We now
write
write
00

u(r,B) = L bmoJo(amor),
m=l

where
where thethe coefficients
coefficients b mo are
bmo are to
to be
be determined.
determined. (Since
(Since the
the forcing
forcing function is radial
function is radial
(i.e. independent
(i.e. independent of of 0), the solution
B), the solution will
will also be radial.
also be radial. Therefore,
Therefore, wewe do
do not
not need
need
the eigenfunctions that depend on 9.) Since
the eigenfunctions that depend on B.) Since each Jo(amor)each Jo(a mQr) is
is an eigenfunction of
an eigenfunction of
—A p under
-.:lp under the
the given boundary conditions,
given boundary conditions, we have
we have
00

-.:lpu(r,O) =L AmObmOJo(amor),
m=l
374
374 Chapter 8.
Chapter 8. Problems
Problems in
in multiple
multiple spatial
spatial dimensions
dimensions

where the eigenvalue A m o is given by A


AmO mo =
AmO = a~o.
#mo • Therefore,
Therefore, the PDE
PDE implies that
AmObmO = Cmo, m = 1,2,3, ... ,
and so the solution is 00

L
c~o Jo(amor).
u(r, B) =
m=1 a mO
C\Q, C20,
We computed ClO, c^o, C30, «iO; a20,
c^o, alO, &2Q, and
o,nd a30
0,3$ in the previous example, so we see
that
u(r,B) = 0.191594Jo(alOr) - 0.00458719Jo(a2or) + 0.000607268Jo(a30r) + ....

Example 8.9.
Example 8.9. We will now solve the wave equation on a disk and compare the
fundamental
fundamental frequency of
of a circular drum to that of
of a square drum. We consider
IBVP
the IBVP
(Pu
at 2 - c2 Ll p u = 0, (r,B) E fl, t > 0, (8.49)
u(r,B,O) = ¢(r,B), (r,B) E fl, (8.50)
au
at (r, B, 0) = 'Y(r, B), (r, B) E fl, (8.51)

u(A,B, t) = 0, -7r ~ B < 7r, t> 0,


f) is the disk of radius A,
where fl A, centered at the origin. We write the solution as
00

u(r, B, t) =L amo(t)Jo(amor)
m=1
00 00

+L L (amn(t) cos (nB) + bmn(t) sin (nB)) In(amnr).


m=1 n=1
argument,
Then, by the usual argument,

aat2 u(r, B, t) - C2 Llpu(r, B, t) =;;;:1


~ (dla mo 2 )
2 ~(t) + CAmOamO(t) Jo(amor)

+ ~1 ~ ( (,pd~;n (t) + 2
C Amnamn(t)) cos (nB)

+ (,p!r;n (t) + C2 Amnbmn(t)) sin (nB)) In(amnr).


The wave equation then implies the following ODEs:
,pamn 2
~ +C Amnamn = 0, m = 1,2,3, ... ,n = 0,1,2, ... ,
2
d bmn 2
~ + C Amnbmn = 0, m,n = 1,2,3, ....
8.3. Fourier series on a disk 375

From
From the
the initial
initial conditions
conditions for
for the
the PDE,
PDE, we obtain
we obtain

amn(O) = cmn'
dt (0) = d mn, m = 1, 2, 3, ... , n = 0 , 1 , 2, ... ,
damn

bmn(O) = emn ,
db mn (0)
--;]i'" = fmn, m, n = 1,2,3, ... ,
where
where c mn', d
Cmn d mn are
are the (generalized) Fourier
the (generalized) Fourier coefficients
coefficients for
for <f>,
l/J, and
and e mn,, fmn
emn fmn
are
are the (generalized) Fourier
the (generalized) Fourier coefficients
coefficients for 7. By
for 'Y. By applying the results
applying the of Section
results of Section
4-7 and using
4.7 and the fact
using the fact that
that \Amn
mn —
= o^ nn, we
O:~n' we obtain
obtain the
the following
following formulas
formulas for
for the
the
coefficients
coefficients of
of the solution:
the solution:

mn
amn(t) = Cmn cos (co:mnt) + d sin (Co:mnt) , m = 1,2,3, ... , n = 0, 1,2, ... ,
CO: mn
bmn(t) = e mn cos (co:mnt) + fmn sin (Co:mnt) , m, n = 1,2,3, ....
CO: mn
The
The smallest
smallest period of any
period of of these
any of these coefficients
coefficients is
is that of aw:
that of 0,1$:

Tw= ~ = ~= 2A1l'.
Co: 10 csodA CSOl

The corresponding
The corresponding frequency,
frequency, which is the
which is the fundamental
fundamental frequency
frequency of this circular
of this circular
drum,
drum, is
is
F = CSOl = ~ SOl == 0 382740~
10 2A1l' A 21l" A.
It would
It would be
be reasonable
reasonable toto compare
compare aa circular
circular drum
drum ofof radius
radius A (diameter 1A)
A (diameter 2A) with
with
aa square drum of
square drum of side
side length
length 2A.
1A. (Another
(Another possibility is to
possibility is to compare
compare the
the circular
circular
drum
drum with
with aa square
square drum
drum of the same
of the same area. This is
area. This is Exercise
Exercise 9.) The fundamental
The fundamental
frequency
frequency of
of such
such aa square
square drum is
drum is

The square
The square drum
drum sounds
sounds aa lower
lower frequency
frequency than the circular
than the drum.
circular drum.

Exercises
Exercises
2
1. Let
1. Let g(r,9)
g(r, B) = 1—
= 1 - rr2,, as
as in
in Example
Example 8.7.
8.7. Compute
Compute the
the next
next three
three terms
terms in the
in the
series for
series g.
for g.
2.
2. Let
Let f(r,9]
f(r,B) = I — r. Compute
= 1- Compute the
the first
first nine
nine terms
terms in
in the
the generalized Fourier
generalized Fourier
series for
series for /f (that
(that is,
is, those
those corresponding
corresponding toto the eigenvalues
the eigenvalues

Take n
Take fJ to
to be
be the
the unit disk.
unit disk.
376 Chapter 8. Problems in multiple spatial
Problems spatial dimensions
dimensions

3. Solve the BVP

-~u = 1 - Vx 2 + y2 in 0,
u = 0 on a~,

where £7
0 is the unit disk. Graph the
the solution. (Hint: Change to polar
polar coordi-
nates and use the results of the previous exercise.)
4. Let /(r,
4. Let 9} = r. Compute
f(r,O) Compute the
the first
first nine
nine terms
terms in
in the
the generalized
generalized Fourier series
Fourier series
for /f (that
for (that is,
is, those
those corresponding
corresponding to to the eigenvalues
the eigenvalues

Take f2
0 to be the unit disk.
5. Solve the
the BVP

-~u = VX2 +y2 in 0,


u = 0 on a~,
where £7
0 isisthe
theunit
unit disk.
disk. Graph
Graphthe
the solution.
solution. (Hint:
(Hint: Change
Changetotopolar
polar coordi-
coordi-
nates and use the results of the previous exercise.)
6.
6. Let
Let /(x)
f(x) == (1(1- xi -— Xz)(xi
— #1 X~)(XI + xz).
X2). Convert
Convert to
to polar
polar coordinates
coordinates and compute
and compute
the first 16
16 terms in the (generalized) Fourier series (that
(that is, those correspond-
ing to Amnmn ,, m = 1,2,3,4,
1,2,3,4, n = 0,1,2,3). Graph
n — Graph the approximation
approximation and its
error.
error.
7. Consider
7. Consider aa disk
disk made
made ofof copper 8.97 g/cm 33,, c =
copper (p = 8.97g/cm = 0.379J/(gK),
0.379 J/(gK), K,K =
4.04 WI
W/(cmK)),
(cm K)), of radius 10 10cm.
cm. Suppose that the temperature
temperature in the disk
is initially
initially 4>(r,6)
¢(r, 0) == rcos
r cos (0)(10 —
- r)/5. What
What is the temperature distribution
temperature distribution
after
after 30
30 seconds
seconds (assuming
(assuming that
that the
the top
top and
and bottom
bottom of of the
the disk
disk are perfectly
are perfectly
insulated, and the edge of the disk is held at 0 degrees Celsius)?
8. Consider
8. Consider an
an iron
iron disk
disk (p
(p == 7.88 gl cm33,, cc =
7.88 g/cm = 0.437 JI (g K), «
0.437 J/(gK), K, = WI (em K))
0.836W/(cmK))
= 0.836
of
of radius 15 cm.
radius 15 Suppose that
cm. Suppose that heat
heat energy
energy is is added
added to
to the
the disk
disk at
at the constant
the constant
rate of
of
f(r,O) = I~Or(sin (0) + eos (0)) W lem 3 ,
where the disk occupies the set

0= {(r,O) : r<15}.

Assume that the top and bottom


bottom of the disk are perfectly insulated
insulated and that
the edge of the disk is held at 0 degrees
degrees Celsius.
(a)
(a) What
What is
is the steady-state temperature
the steady-state temperature of
of the
the disk?
disk?
(b)
(b) Assuming
Assuming the disk is
the disk is initially
initially 00 degrees
degrees Celsius
Celsius throughout,
throughout, how
how long
long
does
does it
it take for the
take for the disk
disk to
to reach steady state
reach steady state (to
(to within 1%)?
within 1%)?
elements in two dimensions
8.4. Finite elements dimensions 377

9. Which
9. Which has
has aa lower fundamental frequency,
lower fundamental frequency, aa square
square drum
drum or
or aa circular drum
circular drum
of equal
of area?
equal area?
10. Show
10. Show that
that (8.41) holds by
(8.41) holds by deriving the power
deriving the power series
series for
for the
the right-hand side
right-hand side
and showing that
and showing it simplifies
that it simplifies to
to the
the power series for
power series for the
the left-hand
left-hand side.
side.

8.4 Finite elements in two


two dimensions
dimensions
We
We now
now turn our attention
turn our to finite
attention to finite element
element methods
methods for
for multidimensional
multidimensional problems.
problems.
For
For the sake of
the sake of simplicity,
simplicity, we will restrict
we will our attention
restrict our attention to problems in
to problems in two spatial
two spatial
dimensions and, as
dimensions and, as in one dimension,
in one dimension, to to piecewise
piecewise linear
linear finite
finite elements.
elements.
The
The general
general outline
outline of
of the
the finite
finite element
element method
method does
does not
not change
change when
when wewe
move
move toto two-dimensional
two-dimensional space.
space. TheThe finite element method
finite element method is is obtained
obtained via the
via the
following steps:
following steps:
1. Derive
1. Derive the
the weak form of
weak form of the given BVP.
the given BVP.
2. Apply
2. the Galerkin
Apply the Galerkin method to the
method to the weak form.
weak form.
3. Choose aa space
3. Choose space of
of piecewise
piecewise polynomials
polynomials for
for the approximating subspace
the approximating subspace in
in
the
the Galerkin method.
Galerkin method.
The first
The step is
first step is very similar to
very similar to the
the derivation in one
derivation in one dimension;
dimension; as one might
as one might
expect,
expect, the
the main
main difference
difference is
is that
that integration
integration by
by parts is replaced
parts is replaced byby Green's
Green's first
first
identity. The
identity. The Galerkin
Galerkin method
method is is unchanged
unchanged when applied to
when applied to aa two-dimensional
two-dimensional
problem. The
problem. The most significant difference
most significant difference in
in moving
moving to
to two-dimensional
two-dimensional problems
problems is
is
in defining
in defining the
the finite element spaces.
finite element spaces. WeWe must create aa mesh
must create on the
mesh on the computational
computational
domain and
domain and define
define piecewise
piecewise polynomials
polynomials on on the
the mesh.
mesh. WeWe will restrict ourselves
will restrict ourselves to
to
and piecewise
triangulations and
triangulations linear functions.
piecewise linear functions.

8.4.1
8.4.1 The weak form of a BVP
BVP in
in multiple dimensions
We
We begin
begin with the following
with the following Dirichlet
Dirichlet problem:
problem:

- \7 . (k(x)\7u) = f(x), x E 0, (8.52)


u(x) = 0, x E ao.
2 3
Here 0f) is
Here is aa domain
domain in
in R
R2 or
or RR3;; there
there is
is no difference in
no difference in the
the following derivation.
following derivation.
We
We define
define the space V
the space of test
V of functions by
test functions by

V= eben) = {v E e 2 (n) : v(x) = 0, x E ao}.


We
We then
then multiply
multiply the original PDE
the original PDE by an arbitrary
by an arbitrary vv E
€ V and apply
V and apply Green's
Green's
identity:
identity:

-\7. (k(x)\7u)(x) = f(x), x E 0


::::} -\7. (k(x)\7u(x))v(x) = f(x)v(x), x E 0, v E V

: : } -In \7 . (k(x)\7u)v = In fv for all v E V


378 Chapter 8. Problems in multiple spatial dimensions

=> - { k(x)v ~u + { k(x)\7u· \7v = ( Jv for all v E V


ien un in in
=> In k(x)\7u . \7v = In Jv for all v E V.

The
The last step follows
last step follows from
from the fact that
the fact on an.
vanishes on
that vv vanishes dtl.
We
We define
define the
the bilinear form a(·,
bilinear form a(-, .)•) by
by

a(u,v) = In k(x)\7u· \7v.

We then obtain
We then obtain the
the weak form of
weak form of the BVP (8.52):
the BVP (8.52):

Find u E V such that a( u, v) = (f, v) for all v E V. (8.53)

The proof
The proof that
that aa solution
solution of
of the weak form
the weak form also satisfies the
also satisfies the original
original BVP follows
BVP follows
the same
the same pattern
pattern asas in
in Section
Section 5.4.2
5.4.2 (see
(see Exercise
Exercise 6).
6).

8.4.2
8.4.2 Galerkin's method
Galerkin's method
To apply
To Galerkin's method,
apply Galerkin's method, we we choose
choose aa finite-dimensional subspace Vn
finite-dimensional subspace Vn of
of V and
V and
{^1,^2,
a basis {(1)1, • • • , ¢n}
¢2,···, <f>n} of
ofVVnn. · We then pose thethe Galerkin problem:
Find u E Vn such that a(u,v) = (f,v) for all v E Vn . (8.54)

We
We write
write the
the solution as
solution as
n
Vn = LUi¢i (8.55)
i=1

and note
and note that
that (8.54)
(8.54) is
is equivalent
equivalent to:
to:
Find U E Vn such that a( u, ¢i) = (f, ¢i), i = 1,2, ... , n. (8.56)

Substituting
Substituting (8.55)
(8.55) into
into (8.56),
(8.56), we obtain the
we obtain the following equations:
following equations:

n
=> La(¢j,¢i)Uj = (f,¢i), i = 1,2, ... ,n
j=1

=> Ku = f.
The stiffness
stiffness matrix K and the load
load vector ff are
are defined by

Kij = a(¢j,¢i), i,j = 1,2, ... ,n,


Ji = (f,¢i), i = 1,2, ... ,no
The
The reader will notice
reader will notice that
that the derivation of
the derivation of the equation Ku
the equation Ku = = ff is
is exactly as in
exactly as in
Section 5.5,
Section 5.5, since Galerkin's method
since Galerkin's method is
is described
described in
in aa completely abstract fashion.
completely abstract fashion.
8.4.
8.4. Finite elements in
Finite in two dimensions
dimensions 379

The
The specific
specific details,
details, and
and the
the differences
differences from
from the
the one-dimensional
one-dimensional case,
case, arise
arise only
only
59
when
when the
the approximating subspace Vn
approximating subspace is chosen.
Vn is chosen.59
Moreover,
Moreover, just as in
just as in the
the one-dimensional
one-dimensional case,
case, the
the bilinear form a(·,·)
bilinear form a(-, •) defines
defines
an
an inner
inner product,
product, called
called the energy inner
the energy inner product, and the
product, and the Galerkin
Galerkin method
method pro-pro-
duces
duces the
the best
best approximation,
approximation, in in the energy norm,
the energy norm, toto the
the true solution u
true solution u from the
from the
approximating subspace Vnn..
approximating subspace

8.4.3
8.4.3 Piecewise linear
Piecewise linear finite
finite elements
elements in
in two
two dimensions
dimensions
The
The graph of aa first
graph of first degree
degree polynomial
polynomial inin two
two variables
variables is
is aa plane,
plane, and
and three points
three points
determine
determine aa plane.
plane. Or,
Or, looking at it
looking at it algebraically,
algebraically, the
the equation
equation ofof aa first
first degree
degree
polynomial
polynomial is
is determined
determined by by three parameters:
three parameters:
z = a+bx+cy.
For
For this
this reason,
reason, it
it is
is natural
natural to to discretize
discretize aa two-dimensional domain fU
two-dimensional domain 0 by defining
by defining
aa triangulation onon O-that
fi—that is,is, 0f) is
is divided
divided into
into triangular
triangular subdomains.
subdomains. (If 0il is is not
not
aa polygonal
polygonal domain,
domain, then
then 0f) itself
itself must
must be be approximated
approximated by by aa polygonal
polygonal domain
domain at at
60
the cost of some approximation error. ) See Figure 8.13 for examples of triangular
the cost of some approximation error. 60) See Figure 8.13 for examples of triangular
meshes
meshes defined on various
defined on various regions
regions andand Figure
Figure 8.14
8.14 for
for the
the graph
graph ofof aa piecewise linear
piecewise linear
function.
function. TheThe reader should notice
reader should notice how
how thethe graph
graph ofof aa piecewise linear function
piecewise linear function isis
made up of of triangular "patches."
"patches."
For
For aa given
given triangulation
triangulation 7T of of il,
0, wewe write
write n for
for the
the number
number of of "free"
"free" nodes,
nodes,
that
that is,
is, nodes
nodes that
that dodo not
not lie
lie on
on the
the boundary
boundary and and hence
hence dodo not correspond to
not correspond to aa
Dirichlet
Dirichlet boundary
boundary condition.
condition. We We will
will denote
denote aa typical
typical triangular
triangular element
element of 7 by
of T by
T, and
and aa typical
typical node
node byby z.
z. Let
Let VnVn be
be the
the following
following approximating subspace of
approximating subspace of V:
Vn == {v
Vn {v E€ C(O)
C(fi) :: vv isis piecewise
piecewise linear
linear on
on 7,
T, v(z)
v(z) == 00 for
for all
all nodes
nodes zz E6 aO}
dfl} ..
To
To apply
apply the
the Galerkin
Galerkin method,
method, we
we must
must choose
choose aa basis for Vnn.. This
basis for This is is done exactly
done exactly
as
as in
in one
one dimension.
dimension. WeWe number
number the
the free
free nodes
nodes of
of T
7 as
as zZ1,
i5z 2 , ...
Z2, . . . ,, zZn.
n . Then,
Then, since
since
a piecewise
piecewise linear
linear function
function is
is determined
determined byby its
its values
values at
at the
the nodes
nodes of of the
the mesh,
mesh, we
define ~i e
define fa Vn by
E Vn by the
the condition
condition

,j, ( )
'l'i Zj = {I,0
,
i = j,
. ...t..
Z I J.
(8.57)

A typical <fo is shown in


~i is in Figure
Figure 8.15.
8.15. Just as in
in the one-dimensional case, it is
the one-dimensional
straightforward
straightforward to to use
use property
property (8.57) toto show
show that
that {</>i,
{~1' 02, • • • ,' 0n}
~2' ... ~n} is
is aa basis for
basis for
and that,
Vn and
Vn that, for
for any
any vv E6 VVnn,,
M
v(x) = 2.: V(Zi)~i(X).
i=1

59
59Just
Just as in Section
as in 5.5, each
Section 5.5, each of
of the
the symbols "u" and
symbols "u" and "f"
"f" has
has two
two meanings:
meanings: u is is the
the true
true
solution
solution of
of the
the BVP,
BVP, while
while u u GERRnn is
is the
the vector
vector whose
whose components
components are are the
the unknown
unknown weights
weights in
in
the
the expression
expression (8.55) for the
(8.55) for the approximate
approximate solution vn. Similarly,
solution Vn. Similarly, /f is
is the
the forcing
forcing function
function in
in the
the
BVP,
BVP, while e Rn is
while ffERn is the
the load
load vector
vector in
in the
the matrix-vector equation Ku
matrix-vector equation Ku = f. f.
60
60Another
Another way
way to
to handle
handle this
this is
is to
to allow "triangles" with
allow "triangles" with aa curved
curved edge.
edge.
380
380 Chapter 8. Problems
Chapter Problems in
in multiple
multiple spatial dimensions

-0.5

-1~----~~~~~
-1 o 1

1r-----~~----~
1

0.5 0.5

- 0.5 -0.5

-1 -1~----~~-----J
-1 0 1 -1 o 1

Figure 8.13. Triangular


Figure 8.13. Triangular meshes defined on
meshes defined on (1)
(1) aa square (upper left),
square (upper left), (2)
(2) aa
union of
union of three
three squares (upper
(upper right),
right), (3)
(3) an
an annulus
annulus (lower
(lower left),
left), and
and (4)
(4) aa rhombus
rhombus
(lower right).
(lower right). Since the annulus
Since the annulus is
is not
not polygonal, the triangulated
polygonal, the triangulated domain
domain is is only
only
an approximation
an approximation to to the
the original
original domain.
domain.

It is now
It straightforward (albeit quite tedious) to assemble the stiffness
now straightforward stiffness matrix
K and the
K and the load
load vector
vector f-it
f—it is
is just
just aa matter
matter of
of computing
computing the
the quantities
quantities a(
o(0j,0f)
<Pj, <Pi)
and (J,
and (/,<&). We will
<Pi). We illustrate this
will illustrate this calculation
calculation on
on an
an example.
example.

Example 8.10.
Example 8.10. For simplicity, we
For simplicity, we take
take as
as our
our example
example the
the constant
constant coefficient
coefficient
problem
problem

-~U=Xl, xEn, (8.58)


u(x) = 0, x E an,
where n
where £) is
is the
the unit
unit square:
square:
8.4. Finite
8.4. elements in
Finite elements in two
two dimensions
dimensions 381

0.4

0.2

o
-0.2
1

-1 -1

Figure 8.14. A
Figure 8.14. A piecewise
piecewise linear
linear function defined on
function defined on the triangulation of
the triangulation of
the annulus from
the annulus from Figure
Figure 8.13.
8.13.

o 0

Figure 8.15. One


Figure 8.15. One of the standard
of the standard piecewise
piecewise linear basis functions.
linear basis functions.
382 Chapter 8. Problems in multiple spatial dimensions
Chapter

We choose
We choose aa regular
regular triangulation
triangulation with
with 32
32 triangles, 25 nodes,
triangles, 25 nodes, and
and 99 free nodes.
free nodes.
The mesh
The mesh is
is shown in Figure
shown in 8.16, with
Figure 8.16, the free
with the free nodes labeled from
nodes labeled from 11 to
to 9.
9.

Figure
Figure 8.16. The mesh
8.16. The mesh for
for Example 8.10.
Example 8.10.

We begin
We begin with the computation
with the computation of
of

K11 = a((/h,¢>d = k \l¢>l' \l¢>l'

The support!H1 of
The support? fa is
of ¢>l is shown
shown in in Figure 8.17, which
Figure 8.17, also labels
which also labels the
the triangles in the
triangles in the
mesh,
mesh, TTI1 ,, TTI2 ,..., Ts2.
, •.. , T This support
32 • This support isis made
made upup of
of six triangles; on
six triangles; on each
each of
of these
these
triangles, ¢>l
triangles, fa hashas aa different
different formula.
formula. We We therefore
therefore compute
compute KHK11 byby adding
adding up the
up the
contributions
contributions from from eacheach of the six
of the triangles:
six triangles;

kr\l¢>l . \l¢>l = inr \l¢>l' \l¢>l + hr \l¢>l' \l¢>l + hr \l¢>l' \l¢>l


+ r \l¢>l . \l¢>l + irnl \l ¢>l . \l ¢>l + in2r \l¢>l . \l¢>l .
~o
On
On TTI,1 , V0i(x)
\l¢>l(X) == (l/h,O),
(l//i, 0), where
where h h = 1/4 1/4 (observing
(observing how fa changes
how ¢>l changes along
along
the horizontal
the horizontal and and vertical
vertical edges
edges ofT
ofTi1 leads
leads to to this conclusion). The
this conclusion). The area
area ofTi
ofT1 (and
(and
2
of
of all the other
all the other triangles
triangles in
in the
the mesh)
mesh) isis /i /2. Thus,
h 2 /2. Thus,

61
hi \l ¢>l . \l ¢>l = hi :2 (:2) (~2)
= = ~.
61 As
As we explained in
we explained in Section 5.6, the
Section 5.6, support of
the support of aa function is the
function is the set on which
set on which the
the function
function is
is
nonzero,
nonzero, together with the
together with the boundary
boundary ofof that set.
that set.
8.4. Finite
8.4. Finite elements
elements in
in two dimensions
two dimensions 383

On T
On T-2, V^i(x) =
2 , V'4>1(X) = (0,
(0, l/h), and we
I/h), and obtain
we obtain

V^i(x) =
On TT33,, V'4>1(X)
On = (-l/h,
(-1/fc, l/h),
I/h), and
and

Figure 8.17.
Figure 8.17. The
The support
support ofof 4>i (Example 8.10).
4>1 (Example The triangles
The triangles of
of the
the
mesh, TI1 ,, TT-2,...,
mesh, T T32 are
2 , •.• ,T are also
also labeled.
labeled.

It should be
be easy
easy to
to believe,
believe, from symmetry,
symmetry, that
that

Adding up the
Adding up the contributions
contributions from the six
from the triangles, we
six triangles, we obtain
obtain

Kll = k V'4>1 . V'4>1 = 4.


384 Chapter 8. Problems in multiple spatial dimensions
dimensions

Since the PDE


Since the PDE has
has constant
constant coefficients (and the
coefficients (and the basis
basis functions
functions are
are all the same
all the same,
up to
up to translation),
translation), it
it is
is easy
easy to
to see that
see that

Kii = 4, i = 1,2, ... ,9.


We now
We now turn
turn our
our attention
attention toto the
the off-diagonal
off-diagonal entries.
entries. For what values
For what values ofof
jj ^
=I- ii will
will Kij
Kij be
be nonzero
nonzero? ? By
By examining
examining thethe support
support of fa, we
of (PI, we see
see that
that only fa,
only <P2,
04, and
<P4, and <P505 have
have aa support
support that
that overlaps
overlaps (in
(in aa set
set of
of positive area, that
positive area, that is,
is, not
not just
just
along the
along the edge
edge of
of aa triangle)
triangle) that of <Pl.
that of fa. The
The reader
reader should study Figure
should study 8.16 until
Figure 8.16 until
he or
he or she
she is
is convinced
convinced ofof the
the following
following fundamental The support
conclusion: The
fundamental conclusion: support of of <Pj
fa
and the
and the support
support of of <Pi have aa nontrivial
fa have nontrivial intersection
intersection if if and
and only
only ifif nodes
nodes
and jj belong
ii and belong to to aa common
common triangle.
triangle. By By examining
examining Figure
Figure 8.16,
8.16, we
we see
see that
that
the following entries
the entries of K might
of K might be
be nonzero:

Ku, K 12 , K 14 , K 15
K 21 , K 22 , K 23 , K 25 , K 26
K32,K33,K36
K41, K 44 , K 45 , K 47 , K48
K51, K 52 , K 54 , K 55 , K 56 , K 58 , K59
K 62 , K 63 , K 65 , K 66 , K 69 K 74 , K 77 , K78
K 84 , K 85 , K 87 , K 88 , K89
K95,K96,K98,K99

We now
We now compute
compute the
the first
first row
row of
ofK. We already
K. We already know that KH
know that 4. Consult-
Kll == 4. Consult-
Fiaure 8.17,
ing Figure 8.17, we see
see that

OnT3,
\7 <Pi (x) = (-llh, Ilh), \7<P2(X) = (1Ih,o),
so
so

12,,
On T 12
\7<pl(X) = (-llh, 0), \7<p2(X) = (1Ih, -llh),
so
so

Thus K12
Thus Ki2 == -1.
-l.
The reader
The reader can
can verify
verify the
the following
following calculations:
calculations:
8.4. Finite elements in two dimensions 385
385

= -1,
K 15 = 1
Tn
\l¢5' \l¢l + 1 T12
\l¢5' \l¢l

= (0) (~2) + (0) (h;)


=0.
The rest
The rest of
of the
the calculations are similar,
calculations are and the
similar, and the result
result is
is the
the following stiffness
following stiffness
matrix:
4 -1 0 -1 0 0 0 0 0
-1 4 -1 0 -1 0 0 0 0
0 -1 4 0 0 -1 0 0 0
-1 0 0 4 -1 0 -1 0 0
K= 0 -1 0 -1 4 -1 0 -1 0
0 0 -1 0 -1 4 0 0 -1
0 0 0 -1 0 0 4 -1 0
0 0 0 0 -1 0 -1 4 -1
0 0 0 0 0 -1 0 -1 4
To compute
To compute the
the load
load vector f , we
vector f, we must evaluate the
must evaluate the integrals
integrals

L f(x)¢i(X) dx,

which is
which is quite
quite tedious
tedious when
when done
done by
by hand
hand (unlike V0j, ¢i
(unlike \l¢i, 0j itself
itself is not piecewise
is not piecewise
constant). We
constant). We just show one
one representative
representative calculation.
calculation. We
We have
Xl
h' X E T1 ,
X2
h' X E T2 ,
X2-X1+h
h
, X E T3 ,
¢1(Xl,X2) = Xl-X2+h
h
, X E T lO ,
2h-X2
-h- , X E Tu ,
2h-X1
-h- , X E T 12 ,
0, otherwise.
Therefore,
Therefore,
386 Problems in multiple spatial dimensions
Chapter 8. Problems dimensions

Continuing in
Continuing in this
this manner,
manner, we
we find
find

h3
2h 3
3h3
h3
f = 2h 3
3h3
h3
2h 3
3h3
62
We can
We can now solve62
now solve Ku =
Ku = ff to
to obtain
obtain

0.015904
0.027344
0.027065
0.020647
u = 0.035156
0.034040
0.015904
0.027344
0.027065

The resulting
The resulting piecewise linear approximation
piecewise linear approximation is
is displayed in Figure
displayed in Figure 8.18.
8.18.

The calculations
The calculations in the previous
in the example are
previous example are elementary,
elementary, but extremely time-
but extremely time-
consuming, and
consuming, and areare ideal
ideal for
for implementation
implementation in in aa computer
computer program.
program. WhenWhen these
these
calculations are
calculations are programmed,
programmed, the the operations
operations are are not organized in
not organized in the same way
the same way as as
in the
in above hand
the above hand calculation.
calculation. For For example,
example, instead
instead of
of computing
computing one one entry
entry inin KK
at aa time,
at time, it it is
is common
common to loop over
to loop over the elements of
the elements of the mesh and
the mesh and to compute
to compute
all
all the contributions to
the contributions to the various entries
the various entries inin K K and
and ff from
from each
each element
element in turn.
in turn.
Among other
Among other things, this simplifies
things, this simplifies the data structure
the data structure forfor describing
describing the mesh. (To
the mesh. (To
automate the calculations
automate calculations presented above, it would be necessary to know, know, given a
certain node,
certain node, which
which nodes
nodes areare adjacent
adjacent to it. This
to it. is avoided
This is avoided whenwhen oneone loops
loops over
over
the elements instead
the elements instead of of over the nodes.)
over the nodes.) Also,Also, the
the various integrations are
various integrations rarely
are rarely
carried
carried outout exactly,
exactly, but rather by
but rather using quadrature
by using quadrature rules. These implementation
rules. These implementation
details are
details are discussed
discussed in in Section
Section 10.l.
10.1.
As we
As we have discussed before,
have discussed an important
before, an important aspect
aspect ofof the
the finite element method
finite element method
is the fact
is the fact that
that thethe linear systems that
linear systems must be
that must be solved
solved are
are sparse.
sparse. In In Figure
Figure 8.19,
8.19,
we display
we display the sparsity
sparsity pattern of of the stiffness
stiffness matrix for for Poisson's
Poisson's equation,
equation, as as in
Example 8.10,
Example 8.10, but withwith a finer
finer grid. The The matrix K K is banded, that is, all of its
banded, that its
entries are
entries are zero
zero except
except those
those found
found in in aa band
band around
around thethe main diagonal. Efficient
main diagonal. Efficient
solution of
solution of banded
banded and and other
other sparse
sparse systems
systems is is discussed
discussed in in Section
Section 10.2.
10.2.
62
It
6 2 It is expected
is expected that
that aa computer
computer program will be
program will be used to solve
used to solve any
any linear system large
linear system large than
than 22 xx 22
or 33 xX 3.
or 3. We
We used
used MATLAB
MATLAB to solve Ku
to solve = ff for
Ku = for this
this example.
example.
8.4. Finite
8.4. Finite elements
elements in
in two
two dimensions
dimensions 387
387

0.01

o 0

Figure
Figure 8.18.

0,.
8.18. The
The piecewise linear approximation
piecewise linear

10~i_.
-.-.
approximation to

, ••••••••
_.
-.-.
to the
the solution of {8.58}.
solution of (8.58).

,,
20 ••••
e. , •••• _.

30
-.•••••• ,
-.••••••
-...... -......
40

50

~
••••

e.
••••
•.....• •.....•
••••

~
,,
... ••••... _.
~
..•.... ..•....
-. -.
.~... :,~~
70
....
80 ~.
o m ~ ~ 00
nz = 369

Figure 8.19. The


Figure 8.19. The sparsity
sparsity pattern of
of the
the discrete
discrete Laplacian {200
(200 triangular
triangular
elements).
elements}.
388 Chapter
Chapter 8.
8. Problems in multiple
Problems in multiple spatial
spatial dimensions
dimensions

8.4.4
8.4.4 Finite elements
Finite elements and
and Neumann
Neumann conditions
conditions
We will close
We will close by
by describing
describing briefly
briefly how Neumann conditions
how Neumann conditions areare handled
handled in in two-
two-
dimensional
dimensional finite elements. For
finite elements. For the sake of
the sake of generality,
generality, we
we will consider aa problem
will consider problem
with possibly
with possibly mixed
mixed boundary conditions. So
boundary conditions. So suppose n isisaadomain
suppose £7 domaininineither
eitherR2 R2 oror
R , and assume that an
3
R3, two disjoint sets: an
partitioned into two
dtl has been partitioned d£l == rI\1 ur
LJ T^.
2.
We consider the
We consider the following BVP:
following BVP:

-\7 . (k(x)\7u) = I(x), x E n,


u(x) = 0, x E r 1, (8.59)
au
an (x) = 0, x E r2.

As we
As discussed in
we discussed Section 6.5,
in Section 6.5, Dirichlet
Dirichlet conditions
conditions are
are termed essential boundary
termed essential boundary
conditions because
conditions because they
they must be explicitly
must be explicitly imposed in the
imposed in the finite
finite element method,
element method,
while Neumann
while conditions are
Neumann conditions are called
called natural
natural and
and need not be
need not mentioned. We
be mentioned. We
therefore define the space
space of
of test functions
functions by
by

v = {u E C 2
(O) : u(x) = O,X E rt}.
The weak
The form of
weak form of (8.59) is
is now derived exactly
now derived exactly as
as on
on page
page 378; the
the boundary
boundary
integral
integral
r k(X)V
au = r k(X)V au + r k(x)V au
Jon an Jrl an Jr2 an
now vanishes
now vanishes because = 00 on
because vv = on rFI1 and au/an =
and du/dn — 00 on
on rF22.. Thus
Thus the
the weak
weak form
form of
of
is:
(8.59) is:
Find u E V such that a(u, v) = (f, v) for all v E V. (8.60)
The bilinear
The form a(-,
bilinear form a(·,·)•) is
is defined
defined exactly
exactly asas before (the only
before (the only difference from (8.53)
difference from
is in
is in the space of
the space of test functions).
test functions).
We now
now restrict
restrict ourour discussion
discussion onceonce more
more to to two-dimensional
two-dimensional polygonal
polygonal do-
mains. To
mains. To apply
apply the
the finite element method,
finite element method, we must choose
we must choose anan approximating
approximating
subspace of
subspace of V. Since
Since thethe boundary
boundary conditions
conditions are are mixed,
mixed, there are at
there are at least
least two
two
points where
where the
the boundary conditions
conditions change
change from
from Dirichlet to Neumann.
Neumann. We We will
make
make thethe assumption
assumption thatthat thethe mesh
mesh is is chosen
chosen soso that
that all
all such
such points are nodes
points are nodes (and
(and
that all such
that all such nodes
nodes belong
belong to to rF11;, that
that is, that rFI1 includes
is, that includes itsits "endpoints").
"endpoints"). WeWe can
can
then choose the
then choose approximating subspace
the approximating subspace of of V as follows:
V as follows:

Vn = {v E C(O') : v is piecewise linear on /, v(z) = 0 for all nodes z E rt}.


A basis for
A basis for Vn is formed
Vn is formed byby including
including all
all basis
basis functions
functions corresponding
corresponding toto interior
interior
nodes (as in
nodes (as in the
the Dirichlet
Dirichlet case),
case), as well as
as well as the
the basis functions corresponding
basis functions corresponding to to
boundary nodes that
boundary nodes that do
do not
not belong to rFI.
belong to For an
1. For an example
example of
of aa basis function
basis function
corresponding
corresponding toto aa boundary
boundary node, see Figure
node, see Figure 8.20.
8.20.

Example 8.11.
Example 8.11. We
We consider
consider the BVP
BVP

-~U=X1, xEn,
8.4. Finite elements
elements in two dimensions 389

0.8

0.6

0.4

0.2

o
1

o 0

Figure 8.20. A
Figure 8.20. A standard
standard piecewise linear basis
piecewise linear basis function
function corresponding
corresponding to
to
aa boundary
boundary node.
node.

u(x) =
u(x) = 0,
0, x
x E€T r 3 ,, (8.61)
au
du
(x) =
—(x)
an = o,
0, x
x eE rril uUrr22uUrr44,,
an
where Jl
where 0 is
is the
the unit
unit square,
square, as
as in
in the
the previous
previous example,
example, and and TI, r 2 , T$,
fl' 1^, r 3 , and r 4 are
and T± are
defined
defined as in Figure 8.3.
8.3. We use the same regular triangulation of ft, 05 Example
of 0 as in Example
8.10. Now,
8.10. Now, however, the boundary
however, the boundary nodes
nodes belonging
belonging toto r
TI,l , r22,, and
and Fr 4 are
are free nodes
free nodes
(but not
(but not the corners (1,1) and
the corners and (0,1) of Ci). It
of OJ. It follows
follows thatthat VnVn has
has dimension
dimension 20. 20.
The free
The nodes are
free nodes are labeled
labeled in
in Figure
Figure 8.21.
8.21.
The calculation
The calculation ofof the
the new
new stiffness matrix K
stiffness matrix K and
and load vector ff proceed
load vector proceed as as
before, and the
before, and the resulting
resulting piecewise linear approximation
piecewise linear approximation to to the true solution
the true solution is is dis-
dis-
played
played inin Figure
Figure 8.22.
8.22.

If the BVP includes only Neumann conditions, then the stiffness


If stiffness matrix will
be
be singular,
singular, reflecting
reflecting the
the fact
fact that
that BVP either does
BVP either does not have aa solution
not have solution or
or has
has
infinitely many solutions. Special care must be taken
taken to compute a meaningful
meaningful
solution to
solution Ku =
to Ku = f.
f.

8.4.5 Inhomogeneous boundary conditions


conditions
In a two-dimensional problem, inhomogeneous boundary conditions are handled
just as in one dimension. Inhomogeneous Dirichlet
Dirichlet conditions
conditions are addressed
addressed via the
method of shifting
shifting the data (with a specially chosen piecewise linear function), while
390 in multiple spatial dimensions
Chapter 8. Problems in dimensions

20

15

10

Figure 8.21.
Figure 8.21. The
The mesh for Example 8.11.
8.11.

0.3

0.2

0.1

o
1

Figure 8.22. The piecewise linear approximation to the solution of (8.61).


Figure 8.22. (8.61).
8.4. Finite
8.4. elements in
Finite elements in two
two dimensions
dimensions 391

inhomogeneous Neumann
inhomogeneous Neumann conditions
conditions are
are taken
taken into
into account
account directly
directly when
when deriving
deriving
the weak
the form. Both
weak form. types of
Both types of boundary
boundary conditions
conditions lead
lead to
to aa change
change in
in the load
the load
vector. Exercises
vector. Exercises 55 and
and 77 ask
ask the reader to
the reader to derive
derive the
the load
load vectors
vectors in
in these
these cases.
cases.

Exercises
1. Consider the BVP
1.

-V'. (k(x)V'u) = I(x), x EO,


u(x) = 0, x E a~,

where
where 0£) is
is the
the unit square, k(x)
unit square, k(x) == 1I + x\x^
X1X2 and /(x) =
and I(x) = 1.
1. Produce the
Produce the
piecewise linear finite element (approximate) solution using a regular grid
with 18
18 triangles.
2. Repeat
2. Repeat Exercise 1, but
Exercise 1, but suppose
suppose that
that the
the boundary
boundary conditions
conditions are
are homogeneous
homogeneous
Neumann conditions
Neumann conditions on
on the
the right
right side
side f2
F2 of
of the square and
the square and homogeneous
homogeneous
conditions on the other three sides.
Dirichlet conditions sides.
3. Repeat Exercise 1, 1, but suppose that the boundary conditions are homogeneous
Neumann conditions
Neumann conditions on
on every
every part
part of
of the
the boundary of O.
boundary of fi. Let
Let the
the right-hand
right-hand
side be
side /(x) =
be I(x) = #1
Xl -—1/2
1/2 (so
(so that
that the compatibility condition
the compatibility condition is
is satisfied
satisfied and
and
aa solution
solution exists).
exists).
4. If
4. If Uu does
does not belong to
not belong to V then
Vnn,, then
n
W = LU(Zi)¢i
i=l

is not
is equal to
not equal Instead, w
to u. Instead, w isis the
the piecewise
piecewise linear interpolant of
linear interpolant of Uu (relative
(relative to
to
the given mesh
the given mesh T). TheThe interpolant
interpolant of of Uu is one piecewise
is one piecewise linear
linear approximation
approximation
to if Uu is
u] if
to U; is the
the solution
solution to
to aa BVP,
BVP, then
then thethe finite element method
finite element method computes
computes
another. The purpose of this exercise is to compare the two.

Verify that u(x)


(a) Verify w(x) =
= #1X2(1
X1X2(1 -— #i)(l
xd(1 -— #2)
X2) is the
the solution to the
the Dirichlet
problem
problem

-6.u = 2Xl(1 - Xl) + 2x2(1 - X2), x E fl,


u(x) = 0, x E a~,

where 0fi is
is the unit square.
square.
(b) Let
(b) Let T bebe the regular triangulation of
of 0£) with 18
18 triangles. Compute
Compute thethe
finite element approximation to u using piecewise linear functions on T.
finite element approximation to u using piecewise linear functions on T.
(c) Compute
(c) Compute the
the piecewise
piecewise linear
linear interpolant
interpolant of
of uu relative
relative to T.
to T.
(d) Which
(d) Which is
is aa better approximation of
better approximation of u, the
the finite element approximation
finite element approximation or
or
the interpolant?
the interpolant? Justify
Justify your answer both
your answer both theoretically
theoretically and
and numerically.
numerically.
392
392 Chapter 8. Problems in multiple spatial dimensions

5. (a)
5. (a) Explain
Explain how
how to solve an
to solve an inhomogeneous
inhomogeneous Dirichlet
Dirichlet problem
problem using
using piece-
piece-
wise linear
wise linear finite
finite elements.
elements.
(b) Illustrate the procedure on the following BVP:

-~u = 0 in 0,
u(x) = xi, x E a~.
Let 0J7 be
Let the unit
be the square and
unit square and use
use aa regular
regular grid with 18
grid with 18 triangles.
triangles.
6. Suppose uu is a solution to (8.53).
6. (8.53). Prove that uu also solves (8.52).
(8.52).
7. (a)
7. (a) Explain
Explain how to solve
how to solve an inhomogeneous Neumann
an inhomogeneous Neumann problem
problem using
using piece-
piece-
wise linear finite elements.
(b) What
(b) What is
is the
the compatibility condition for
compatibility condition for an
an inhomogeneous
inhomogeneous Neumann
Neumann
problem?
problem?
(c) Illustrate
(c) Illustrate the
the procedure on the
procedure on the following
following BVP:
BVP:

-~u = X1X2 + ~ in 0,
au 3xi
an(x) = -5' x E a~.

Let fi
0 be the unit square and use a regular grid with 18
18 triangles.

8.5
8.5 Suggestions
Suggestions for
for further reading
further reading
The foundation of PDEs in two or more spatial dimensions is advanced calculus.
Kaplan [29] gives
Kaplan [29] gives aa straightforward
straightforward introduction; an alternative
introduction; an at the
alternative at same level
the same level is
is
Greenberg
Greenberg [20]. A A more advanced treatment
more advanced can be
treatment can found in
be found in Marsden and 'Tromba
Marsden and Tromba
[37].
All of the
All of the references cited in
references cited in Sections
Sections 5.8
5.8 and
and 6.7
6.7 deal
deal with
with PDEs
PDEs in in multiple
multiple
spatial dimensions.
spatial Another source
dimensions. Another source of
of information
information about Bessel function
about Bessel is Folland
function is Folland
[15].
Chapter 9

f.+~,Mope about
iI?!ri~'~I¢.~~ bout Fourier
Fourier series
series

In the preceding chapters, wewe introduced several kinds of Fourier series:


series: the Fourier
sine series, cosine series, quarter-wave sine series, quarter-wave cosine series, and
the full Fourier series. These series were primarily used to represent the solution to
differential equations, and their usefulness was based
differential based on two facts:
facts:
1. Each
1. Each is
is based
based on
on an
an orthogonal
orthogonal sequence
sequence with the property
with the that every
property that every con-
con-
tinuous function can be represented
represented in terms of this sequence.
sequence.
2. The terms in the series represent eigenfunctions of certain simple differential
differential
conditions). This accounts for the fact
operators (under various boundary conditions).
tractable to determine a series representation
that it is computationally tractable representation of
of
the solution to the corresponding differential
differential equation.
equation.
In this chapter we
we will go deeper into the study of Fourier series. Specifically,
Specifically,
we will consider the following questions:

1. What is the relationship among the various kinds of Fourier series?


1.

2. How
2. How can
can aa partial Fourier series
partial Fourier series be
be found
found and
and evaluated
evaluated efficiently?
efficiently?
3. Under what conditions
conditions and in what sense can a function be represented by its
Fourier series?
4. Can
4. Can the Fourier series
the Fourier series method
method be generalized to
be generalized more complicated
to more complicated differential
differential
equations (including
equations (including nonconstant coefficients and/or
nonconstant coefficients and/or irregular
irregular geometry)?
geometry)?
Our discussion
Our discussion will
will justify
justify many
many ofof the
the statements
statements we we made
made earlier
earlier in
in the
the book
book
convergence
concerning the convergence of Fourier series. It also introduces the fast
fast Fourier
(FFT), which
transform (FFT),
transform which isis an
an exciting
exciting and
and recent
recent development
development (from
(from the last half
the last half
63
of the twentieth century63) ) in the long history of Fourier series. The calculation
calculation of
of
2
N Fourier coefficients
coefficients would appear
appear to require O(JV
O(N2) ) operations
operations (for
(for reasons that
63
The FFT
63The FFT was
was popularized
popularized inin the
the 1960s,
1960s, by
by the
the paper
paper [12].
[12]. However,
However, the
the method
method was
was known
to Gauss long
to Gauss long before;
before; see
see [25].
[25].

393
394 Chapter 9.
Chapter 9. More
More about
about Fourier
Fourier series
series

we explain
we explain in
in Section
Section 9.2).
9.2). The
The FFT
FFT reduces
reduces the operation count
the operation count to
to O(NlogN),
O(NlogN), aa
considerable savings
considerable savings when
when NTV is
is large.
large.
We begin
We begin by introducing yet
by introducing yet another type of
another type of Fourier
Fourier series, the complex
series, the complex
Fourier series,
Fourier series, that
that is
is convenient
convenient both for analysis
both for analysis and
and for
for expressing
expressing the
the FFT.
FFT.

9.1
9.1 The complex
The complex Fourier
Fourier series
series
We saw
We saw in in Chapter
Chapter 44 that
that problems
problems apparently
apparently involving
involving only
only real
real numbers can
numbers can
sometimes be
sometimes be best addressed with
best addressed with techniques
techniques that
that use
use complex
complex numbers. For ex-
numbers. For ex-
ample, if
ample, if the
the characteristic
characteristic roots
roots r\ and r2
rl and of the
r-2 of ODE
the ODE
rPu du
a dt 2 + b dt + cu = 0
are distinct, then
are distinct, then the
the general solution is
general solution is

u(t) = Cl e
Tlt
+ c2e T2t

This formula
This formula holds even if
holds even if rl and r2
r\ and are complex,
r% are complex, in which case
in which case uu is
is complex-valued
complex-valued
for most
for most choices
choices of
of Cl and C2.
c\ and (We also
c^. (We also saw,
saw, in
in Section
Section 4.2.1,
4.2.1, how
how toto recover
recover the
the
general real-valued
general real-valued solution
solution if if desired.)
desired.)
In aa similar
In similar way,
way, there
there are
are some
some advantages
advantages toto using complex-valued eigenfunc-
using complex-valued eigenfunc-
tions, even
tions, even when solving differential
when solving differential equations
equations involving
involving only
only real-valued
real-valued functions.
functions.
Using Euler's formula,
Using Euler's formula,
eiO = cos e + i sin e,
we see
we see that
that

d~ [eiW<V] = ! + i sin (wx)]


[cos (wx)
= -wsin (wx) + iwcos (wx)
= iw (cos (wx) + i sin (wx))
= iweiw<v,

and therefore
and therefore
2
_d_ [e'wx
, ] = -(iw) 2e'wx
'
dx 2

This suggests
This suggests that
that the negative second
the negative second derivative
derivative operator
operator has
has complex
complex exponential
exponential
eigenfunctions.
eigenfunctions.
We leave
We leave it to the
it to exercises (see
the exercises (see Exercise
Exercise 4) to show
4) to show that
that nonzero solutions to
nonzero solutions to
the
the BVP
BVP
rPu
- dx 2 = AU, -£ < x < £,
u( -f) = u(£), (9.1)
du (_£) = du (£),
dx dx
9.1. The complex
9.1. complex Fourier series 395
395

exist only
exist only for 0, 1f2 2/£2,
for A == 0,7r /7 2 ,...,
... ,nn 22?r22 2
/£ , .—
7r /£2, The eigenvalue
... The eigenvalue A == 00 has eigenfunc-
has eigenfunc-
tion
tion 11 (the
(the constant function), while
constant function), while eacheach eigenvalue
eigenvalue A
A== n 22ir7r 22/I/£22 has
has two
two linearly
linearly
independent eigenfunctions,
independent eigenfunctions,

e™nx/1 reduces to the constant


When n == 0, ei7fnx/l constant function 1 and A = = n22?r 2 2
/7 reduces
1f2/£2
to
to A =
= O.
0. Therefore,
Therefore, to
to simplify
simplify the notation,
notation, we will write the
we will the complete
complete list of
of
eigenvalue-eigenfunction pairs as
eigenvalue-eigenfunction pairs as
2 2
n 1f i7fnx/l ,n= 0,±,
T,e 1 ±2 , .... (9.2)

In this
In section we
this section use the
we use the eigenfunctions
eigenfunctions given
given in
in (9.2)
(9.2) to form Fourier
to form Fourier series
series
representing functions
representing on the
functions on interval (—£,(.).
the interval Since Fourier
(-£, f). Since series calculations
Fourier series calculations areare
based
based onon orthogonality,
orthogonality, we must take
we must take aa slight
slight detour
detour to
to discuss
discuss complex
complex vector space
vector space
and inner
and inner products. Some of
products. Some of the following results
the following results have
have been
been used earlier in
used earlier in the
the text,
text,
but only
but only briefly in the course
course of demonstrating
demonstrating that aa symmetric
symmetric operator
operator has only
real eigenvalues.
real eigenvalues.

9.1.1
9.1.1 products
Complex inner products
As we
As we discussed
discussed in Section 3.1,
in Section 3.1, aa vector
vector space
space is
is aa set
set of
of objects
objects (vectors),
(vectors), along
along
with two
with operations, (vector)
two operations, (vector) addition
addition and scalar multiplication.
and scalar multiplication. ToTo this
this point,
point, we
we
have used
have used real numbers as
real numbers the scalars;
as the scalars; however,
however, thethe complex
complex numbers
numbers can also be
can also be
used as
used as scalars.
scalars. For
For emphasis,
emphasis, when
when we we use complex numbers
use complex numbers as scalars, we
as scalars, refer
we refer
to
to the
the vector space as
vector space as aa complex
complex vector space.
vector space.
The most
The most common
common complex
complex vector space is
vector space C n , complex
is en, complex n-space:
n-space:

Just as
Just as for
for RR nn ,, addition
addition and scalar multiplication
and scalar multiplication are
are defined
defined componentwise.
componentwise.
The only
The only adjustment
adjustment that must be
that must be made
made in working with
in working complex vector
with complex vector
spaces is
spaces in the
is in the definition
definition of inner product.
of inner If u
product. If u is
is aa vector
vector from
from aa complex vector
complex vector
space, then
space, then it it is
is permissible
permissible to
to multiply
multiply uu by
by the
the imaginary
imaginary unit to get
unit ii to get iu.
iu. But
But ifif
there is
there is an
an inner
inner product (•, •) on
product (.,.) on the
the space,
space, and if the
and if the familiar
familiar properties of inner
properties of inner
product hold, then
product hold, then
(iu,iu) = i2(u,U) = -(u,u).
This suggests
This suggests that
that either (w,u) or
either (u,u) or (iu,iu) is
is negative,
negative, contradicting
contradicting one
one of
of the rules
the rules
of inner
of inner products (and making
products (and making it impossible to
it impossible define aa norm
to define norm based
based on
on the inner
the inner
product).
product).
For this reason,
For this reason, the
the definition
definition of inner product
of inner is modified
product is modified for
for complex
complex vector
vector
spaces.
spaces.
396 Chapter 9. More
More about
about Fourier
Fourier series
series

Definition 9.1.
Definition 9.1. Let V bebe a complex vector space. An
An inner product on V isis aa
function taking two vectors
vectors from V and producing a complex
complex number,
number, in such a way
that the following
following three properties satisfied:
properties are satisfied:
1. (w,t>) =
1. (u,V) = (v,u)
(v,u) for all vectors u and V;
v;
2. (au + j3v,
2. (au /3v, w] — a(u,
w) = w) + {3(v,
a(u, w) w) and
/3(v, w) au + /3v)
(w, au
and (w, — a(w,
fiv) = u) + 73(w,
a(w, u) fi(w, v)
v) for
for all
all
vectors u, v,
v, and w and all
wand all complex numbers
numbers a0: and /3;
0;
(w, w) >
3. (u,u) 2: 00 for
for all vectors u, — 00 if
u, and (u,u) = if and
and only if u is the zero vector.
only ifu vector.

In
In the
the above definition, z
above definition, z denotes
denotes the
the complex
complex conjugate of z E
conjugate of C. (If z =
€ C. =
+ iy, with
x+ with x,x,yy €E R, then ~zz =
R, then = x —- iy.)
For
For CCnn ,, the inner product
the inner product isis suggested
suggested by
by the fact that
the fact that

IZI=#
for z €E C.
for C. We define
We define
n
(U,V)cn = U· V = L UiVi·
j=1

It
It is
is straightforward
straightforward to
to verify
verify that the properties
that the properties of
of an
an inner
inner product
product are satisfied.
are satisfied.
In particular,
In particular,
n
(u,u)c n = LUi'lli
j=1
n
= L IUil 2 2: O.
j=1

If we
If we now
now consider
consider the
the space of complex-valued
space of functions defined
complex-valued functions defined on
on an interval
an interval
[a, bj, the
[a, b], the same
same reasoning as in
reasoning as Section 3.4
in Section 3.4 leads
leads to
to the
the complex
complex L L22 inner
inner product,
product,

(J,g) = i b
f(x)g(x) dx.

(We
(We will
will use
use the same notation
the same as for
notation as for the
the real L22 inner
real L inner product, when /f and
since, when
product, since, and g9
are
are real-valued,
real-valued, the
the presence
presence of the complex
of the conjugate in
complex conjugate in the
the formula
formula has
has no effect,
no effect,
and
and the
the ordinary
ordinary L L22 inner
inner product
product is obtained.)
is obtained.)

9.1.2
9.1.2 Orthogonality of the
Orthogonality of the complex exponentials
complex exponentials
A direct calculation
A direct calculation now
now shows
shows that the eigenfunctions
that the eigenfunctions given
given in
in (9.2) are orthogonal
(9.2) are orthogonal
with
with respect
respect to the (complex)
to the L22 inner
(complex) L inner product:
product:

(ei1fnX/t, em1fix/i) = rt ei1fnx/£e-m1fix/£ dx


i-I
9.1.
9.1. The complex Fourier series 397

= 1£

e(n-m)1rix/£ dx

= [e(n-m)1rix/£ ] £
(n - m)7ri/C _£

= C (e(n-m)1Ti _ e-(n-m)1Ti)
(n - m)7ri
= 0, m f. n.
n m 1
The last step follows because e^ ^ is
e(n-m)Oi is 27r-periodic.
27r-periodic. We
We also
also have
have

(ei1TnX/l,ei1rnX/l) = 1£-l
ei1rnx/fe-i1Tnx/fdx

= 1£-£
dx

= 2£.
This shows that
This shows that the L22 norm
the L norm of
of the is VU.
eigenfunction is
the eigenfunction y/%1.

9.1.3
9.1.3 Representing functions
Representing functions with complex Fourier
with complex Fourier series
series
If f/ is
If is aa continuous, complex-valued function
continuous, complex-valued denned on
function defined on [[-C,
— I , IC],
] , then
then its complex
its complex
Fourier series is
Fourier series is CXl

'""'
~ cn e i1Tnx /£ ,
n=-CXl

where
where

1
= 2C 1f-£
.
f(x)e-'1rnx/£ dx.

These complex
These complex Fourier coefficients are
Fourier coefficients are computed according to
computed according to the
the projection theo-
projection theo-
rem;
rem; it
it follows
follows that
that
N
L cnei1Tnx/£
n=-N
is
is the element of
the element of the subspace
the subspace

1 e i1rx,
span {e -i1rNX/£ , e-i1r(N-l)x/£ , ... , e- i1rx / L" /l
.. "' ei1rNX/L}

closest
closest to
to /f inin the L22 norm.
the L norm. Also,
Also, we
we will
will show
show in Section 9.6
in Section that the
9.6 that the complex
complex
Fourier series converges
Fourier series converges to
to f/ in
in the L22 norm
the L norm under
under mild
mild conditions
conditions on
on f/ (in
(in partic-
partic-
ular, if f/ is
ular, if is continuous).
continuous).
398 Chapter 9. More about Fourier series

9.1.4
9.1.4 The complex
The complex Fourier
Fourier series
series of
of a
a real-valued
real-valued function
function
If f/ €
If -e, e] isis real-valued,
C[—i,i]
E C[ real-valued, then,
then, according
according to to our
our assertions
assertions above,
above, it it can
can be
represented by its
represented its complex
complex Fourier
Fourier series.
series. We
We now show that,
now show that, since
since f/ is
is real-valued,
each partial sum (n = —TV, -N
= -N, — JV + 1,
1,..., AT) of the
... , N) the complex Fourier series is real,
and moreover
and moreover that
that the
the complex
complex Fourier
Fourier series
series is
is equivalent
equivalent to to the
the full
full Fourier
Fourier series
series
in this case.
So we
So we suppose
suppose f/ is is real-valued
real-valued and
and that cn, nn = 0,
that Cn, 0, ±1,
±1, ±2,
±2,... are its
... are its complex
complex
Fourier coefficients. For reference, we we will write the full full Fourier series of f/ (see
Section 6.3)
Section 6.3) as
as
00

ao + L (an cos (n;x) + bn sin (n;x)) ,


n=l
where

ao = 2f1 1£
-l
f(x) dx,

an ="£11£ f(x)cos (n7rx)



-e- dx, n = 1,2,3, ... ,

bn ="£11£ -£
. -e- dx, n
f(x)sm (n7rx) = 1,2,3, ....

Now,
Now,
1
Co = 2f
II-l
f(x) dx = ao·

For nn > 0,
For 0,

C n= 2~ ill f(x)e-i7rnx/l dx
= ;e ill f(x) (cos (n;x) - i sin (n;x)) dx

= ;e ill f(x) cos (n;x) dx - ;e ill f(x) sin (n;x) dx


1 i
= 2an - 2bn .
Similary, with n > 0, we
we have

C- n= ;e [ll f(x)ei7rnx/l dx
= ;e [i/(X) (cos (n;x) +isin (n;x)) dx

= ;e [le f(x) cos (n;x) dx + ;e [: f(x) sin (n;x) dx


9.1. The complex
9.1. The Fourier series
complex Fourier series 399
399

Therefore,
Therefore,

cnei7rnx/£ + c_ne-i7rnx/l = (~an _ ~bn ) (cos (n;x) + i sin (n;x))


+ (~an+~bn) (n;x) _isin(n;x))
(cos

= an cos (n;x) + bn sin (n;x).


(The reader should notice how all imaginary quantities
quantities sum to zero in this calcula-
tion.)
tion.)
Therefore,
Therefore, for any N >
for any 2 0,
0,
N N
L Cnei7rnx/l = ao +L (an cos (n;x) + bn sin (n;x)) .
n=-N n=1
This shows that every (symmetric)
(symmetric) partial sum of the complex Fourier series of a
real-valued function is
real-valued function is real
real and
and also that the
also that complex Fourier
the complex Fourier series
series is
is equivalent to
equivalent to
the full
the full Fourier series.
Fourier series.

Exercises
1. Let
1. f:
Let / : [-1,1]
[-1,1] ->•
-+ RR be
be defined
defined by
by f ( x ) =f(x) x
2
= 1I -— x2 .. Compute
Compute the
the complex
complex
Fourier series
Fourier series

of f,
of /, and
and graph
graph the
the errors
errors
N
f(x) - L cnei7rnx
n=-N
for
for TV
N == 10,20,40.
10,20,40.
2.
2. Let f:
Let / : [—7r,7r]
[-71",71"] -+—>• R
R be denned by
be defined f(x) x.
by f ( x ) = Compute the
= x. Compute the complex
complex Fourier
Fourier
coefficients Cn,
coefficients c n , nn = 0,
0, ±1,
±1, ±2,..., of /,
±2, ... , of j, and
and graph the errors
graph the errors
N
f(x) - L cne inx
n=-N
for N
for = 10,20,40.
TV =
3. Let
3. f:
Let / : [-1,1]-+
[—1,1] —> C be defined by
be defined f(x) e
by f ( x ) = lx
= eix Compute the
.. Compute complex Fourier
the complex Fourier
coefficients Cn,
coefficients cn, nn — 0, ±1,
= 0, ±1, ±2,..., of f,
±2, ... , of /, and
and graph
graph thethe errors
errors
N
f(x) - L cne7l"nx i

n=-N
400 Chapter 9.
Chapter 9. More
More about
about Fourier
Fourier series
series

for N
for = 10,20,40.
N = 10,20,40. (Note:
(Note: You
You will
will have
have to
to either
either graph
graph the
the real
real and imaginary
and imaginary
parts of
of the error
error separately
separately or just graph the modulus of of the error.)
4. Consider the
4. Consider the negative
negative second
second derivative operator under
derivative operator under periodic
periodic boundary
boundary
conditions on [—£,•£].
conditions on [-f,f].
(a) Show
(a) Show that
that each
each pair
pair listed
listed in
in (9.2) is an
(9.2) is eigenpair.
an eigenpair.
(b)
(b) Show
Show that
that (9.2)
(9.2) includes every eigenvalue.
includes every eigenvalue.
(c) Show
(c) Show that every eigenfunction
that every eigenfunction is is expressible in terms
expressible in terms ofof those given in
those given in
(9.2).
(9.2).
(d)
(d) Compare
Compare these
these results
results to
to those
those derived
derived in Section 6.3,
in Section 6.3, and
and explain
explain why
why
they
they are consistent.
are consistent.
5. Suppose that /f:: [—•£,•£]
[-f,f] —>
~ C is defined by ff(x)
(x) == g(x] + ih(x), where
g(x) +ih(x), where 9g and
are real-valued
hh are real-valued functions
functions defined
defined on
on [-f,f].
[—i,£]. Show
Show that
that the
the complex
complex Fourier
Fourier
coefficients
coefficients can
can be expressed in
be expressed in terms
terms of
of the
the full
full Fourier
Fourier coefficients
coefficients of and
of 9g and
h.
h.
6. Prove
6. Prove that,
that, for any real
for any real numbers
numbers 0 and A,
() and >.,
ei(II+>') = ei () e i >..

(Hint: Use Euler's


Euler's formula
formula and trigonometric identities.)
7. Let TV
7. Let N be
be aa positive
positive integer,
integer, jj aa positive
positive integer
integer between
between 11 and
and N
N — 1, and
- 1, and
e RN and v ERN
define vectors u ERN e RN by by

Un = cos ( jn~)
\
N ,Vn = SIn (jn~)
/
.
N ,n = 0,1, ... ,N -
\ /
1.

(For
(For this exercise, it is convenient to index the components of xx E RN as
€ RN as
0,1,...,
0, TV —
1, ... ,N 1, instead
- 1, instead of 1,2,...,
of 1,2, TV as
... , N as is
is usual.) The purpose
usual.) The purpose of
of this
this exercise
exercise
is to
is to prove
prove that
that
(a)
(a) u
u·• v
v== 0,
0, that is, u
that is, u and
and v
v are orthogonal.
are orthogonal.
(b) Ilull = IIvll = IN/2.
These results are based on the following trick:
trick: The sum
N-l
L
n=O
(e1fijn/N)
2
=
N-I
L (e
n=O
21fij N
/ f
is aa finite
is finite geometric
geometric series,
series, for
for which
which there
there is
is aa simple formula. On
simple formula. On the other
the other
hand.
hand,
N-I 2
L (e1fijn/N) (9.3)
n=O
7r l n N
can be
can be rewritten
rewritten by
by replacing ' J / by
replacing ee1fijn/N by cos
cos (jnir/N)
(jn~/N)+i +i sin (jn~/N), expand-
sin (jrnr/N), expand-
ing
ing the
the square,
square, and summing. Find
and summing. Find thethe sum
sum (9.3)
(9.3) both
both ways,
ways, and
and deduce the
deduce the
results
results given above.
given above.
9.2. Fourier series and the FFT
FFT 401

9.2 Fourier series and the FFT


FFT
We now show that there is a very efficient estimate Fourier coefficients
efficient way to estimate coefficients and
evaluate (partial)
evaluate (partial) Fourier
Fourier series.
series. We
We will
will use
use the BVP
the BVP

cf2u
dx 2 = f(x) ,-£
-K,- -
< x < £,
u( -e) = u(£), (9.4)
du(_£) = du(£)
dx dx
as our first
as our first example.
example. To
To solve
solve this
this by
by the
the method of Fourier
method of Fourier series,
series, we
we express
express u
u
and
and f/ in
in complex Fourier series,
complex Fourier series, say
say
00

u(x) =
n=-oo

(cn, n
(en, n = 0,
= 0, ±1,
±1, ± 2 , ...
±2, . . . unknown)
unknown) and
and
00

f(x) = L dnei7rnx/f
n=~oo

(dnn,n
(d = 0,0,±l,±2,...
,n = ±1, ±2, ... known).
known). The differential equation
The differential equation can then be
can then be written
written as
as
00 22 00
'""' K,n
~ £2
1f c
n
ei7rnx/f = '""'
~n,
d ei7rnx/f (9.5)
n=-oo n=-oo

and we
and we obtain
obtain
(9.6)

The reader will


The will notice the similarity to how the the problem was solved
solved in
in Section
Section
6.3.2. (The calculations,
6.3.2. (The calculations, however,
however, are simpler when
are simpler when using
using the complex Fourier
the complex Fourier
series instead
series instead of
of the full Fourier
the full series.) As
Fourier series.) As in
in Section
Section 6.3.2,
6.3.2, the coefficient do must
the coefficient must
be zero,
zero, that is,

1 ~f
f f(x) dx = 0

must
must hold, in order
hold, in order for
for aa solution
solution to exist. When
to exist. When this compatibility condition
this compatibility condition holds,
holds,
the
the value of CQ
value of is not
Co is determined by
not determined by the equation and
the equation and infinitely
infinitely many
many solutions exist,
solutions exist,
differing only
differing only in
in the choice of
the choice of cCo.
0.
For
For analytic
analytic purposes,
purposes, the
the formula (9.6) may
formula (9.6) may bebe all
all we
we need.
need. For example, as
For example, as
we discuss in
we discuss Section 9.5.1,
in Section 9.5.1, (9.6)
(9.6) shows that the
shows that solution uu is
the solution is considerably smoother
considerably smoother
than
than the
the forcing function f/ (since
forcing function (since the Fourier coefficients
the Fourier coefficients of
of u decay
decay to
to zero faster
zero faster
than
than those
those of
of /).
f). However,
However, in in many
many cases,
cases, we
we want
want toto produce
produce aa numerical
numerical estimate
estimate
of the
of solution u. We
the solution We may wish, for
may wish, for example,
example, to estimate the
to estimate the values of u on
values of on aa grid
grid
so that
so that we can graph
we can graph the
the solution accurately. This
solution accurately. This requires
requires three steps:
three steps:
402 Chapter 9.
Chapter 9. More
More about Fourier series
about Fourier series

1. Compute
1. Compute the
the Fourier coefficients ddnn,, nn == 0,
Fourier coefficients 0, ±1,
±1, ±2,...,
±2, ... , TV, of /f by
N, of evaluating
by evaluating
the appropriate
the appropriate integrals.
integrals.
2. Compute
2. Compute the
the Fourier
Fourier coefficients
coefficients en,
cn, nn = 0,
0, ±1,
±1, ±2,..., TV, of
±2, ... , N, of uu from
from formula
formula
(9.6).
(9.6).
3. Evaluate
3. the partial
Evaluate the partial sum
sum
N
un(x) = L cnei7rnx/£
n=-N
on aa grid
on grid covering
covering the
the interval
interval [-f,
[—I, f], say Xj
I], say — jh,
Xj = jh, jj = 0, ±1,
= 0, ±1,±2,...
±2, ... ,,±JV,
±N,
/ih == £/JV.
fiN.
If N
If JV isis chosen
chosen large
large enough,
enough, this
this will
will produce accurate estimates
produce accurate estimates of of u(Xj),
u(xj), jj —
=
0,±1,±2,...,±JV.
0, ±1, ±2, ... , ±N.
Until this
Until this point, we have
point, we have implicitly
implicitly assumed
assumed that
that all
all of
of the
the calculations
calculations nec-
nec-
essary to
essary to compute
compute Uu would
would be done analytically
be done analytically (using
(using various integration rules
various integration rules to
to
compute the
compute necessary Fourier
the necessary Fourier coefficients,
coefficients, for example). This
for example). This isis not always possi-
not always possi-
ble (some integrals
ble (some integrals cannot
cannot be
be computed
computed using
using elementary
elementary functions)
functions) and
and not always
not always
desirable when
desirable when itit is
is possible (because there
possible (because there may
may be
be more efficient methods).
more efficient methods). We We
will
will therefore consider how
therefore consider how to
to estimate
estimate u.u.

9.2.1
9.2.1 Using the trapezoidal rule to estimate Fourier coefficients
We
We begin by estimating
begin by estimating the
the integrals
integrals defining
defining the
the Fourier
Fourier coefficients
coefficients of
of f:/:

dn = :f ill f(x)e-i7rnx/l dx.

A simple
A simple formula
formula for
for estimating
estimating this
this integral
integral is
is the
the so-called
so-called (composite)
(composite) trapezoidal
trapezoidal
rule, which replaces
rule, which replaces the integral by
the integral by aa discrete
discrete sum
sum that
that can
can be interpreted as
be interpreted as the
the
eiim rvf
sum arooc nf
of areas trar^ovnirlc'
of trapezoids:

J{b g(x) dx = 2h
a
(
g(xo) +2 f;
N-l
g(Xj)
)
+ g(XN) + O(h2), (9.7)

where hh = (b
where a)/N and
(b -— a)IN and Xj Xj = a a + jh, = 0,1,2,
jh, jj = 0,1,2,...,
... , N. Figure 9.1
N. Figure 9.1 shows the
shows the
geometric interpretation
geometric interpretation ofof the trapezoidal rule.
the trapezoidal rule. Although
Although the the trapezoidal rule is
trapezoidal rule is
generally only
generally only second-order
second-order (that
(that is,
is, the error is
the error (h2}), it
is 0O (h2)), it is
is highly
highly accurate
accurate for
for
64
periodic functions
periodic functions ,.64
To apply
To apply thethe trapezoidal
trapezoidal rule
rule toto the computation of
the computation of ddnn,, we define the
we define the grid
grid
Xj = jh,
Xj 0, ±1,
jh, jj = 0, ±1, ±2,
±2,..., ±N, hh = fiN.
... , ±N, Then
i/N. Then

d . 1h
n = 2f2
6 4 For details, see any book on numerical analysis, for example, [2].
9.2. Fourier
Fourier series and the FFT 403

0.2 0.4 0.6 0.8


x

Figure
Figure 9.1.
9.1. Illustration
fllustration of
of the trapezoidal rule
the trapezoidal rule for
for numerical integration;
numerical integration;
the
the (signed)
(signed) area
area under
under the
the curve
curve is
is estimated
estimated by
by the
the areas
areas of
of the
the trapezoids.
trapezoids.

Since
Since

and
and
h 1 _ i7fnxj _ i7fnj
2f 2N' l -]\i'
we
we can simplify this
can simplify to
this to
N-l
d n ..:..
- F n -- ~ " f·Je -i7rnj/N , n -- -N, -N +,
'~ I...
O , , ...
N , - 1, (9.8)
2N.J=- N

where
where
Ii =f(xj), j=-N+l,-N+2, ... ,O, ... ,N-l

and
and
1
f-N = 2 (/(-l) + f(l)).
The reader
The should take
reader should take note of the
note of special definition
the special definition of of ff-N,
_N, which
which reduces
reduces to to simply
simply
f_
f-NN == f(x-N) =
f(X-N) = /(-£)
f(-l) when
when /f isis 2^-periodic
21-periodic (so
(so that
that f(-l)
f(-l) = = f(l)).
f(t}}.
The sequence of estimates
The sequence estimates F-N,
F-N, F_JV+I,
F_ N +1,""• • • , FN-I
F N - 1 is essentially
essentially produced by by
applying the
applying the discrete
discrete Fourier transform to
Fourier transform to the sequence /-AT,
the sequence f - N , f-N+i, • • • ,, /jv-i,
f - N +1, ... as
f N -1, as
we
we now
now show.
show.
404 Chapter 9. More about Fourier series

9.2.2
9.2.2 The discrete Fourier
The discrete Fourier transform
transform
Just as a function defined on \—i, —H\ can be synthesized from functions, each having
[-i, -f]
distinct frequency,
a distinct frequency, so
so a finite sequence can be synthesized from sequences with
distinct frequencies.
distinct

Definition 9.2.
Definition 9.2. Let 0,0,0,1,...,
Let ao, OM-I
al, ... , aM be a sequence
-1 be sequence of
of real or complex numbers. numbers.
Then the discrete Fourier transform (DFT) maps ao, ao, al,
a i , ...
. . . ,, aM
OM-I
-1 to the sequence
sequence

where
where
M-1
An =~
M "a·e-27rinj/M
L...J J , n 0 1, ... , M - 1.
=, (9.9)
j=O

The original sequence can be recovered by applying the inverse DFT:


M-l

L...JA n e27rinj/M , J. -- 0 , 1
aJ. -- " , 2
, ...M
, - 1. (9.10)
n=O

The proof relationship is a direct calculation


proof of this relationship calculation (see
(see Exercise 5). We We will often often
refer to
to the sequence A
the sequence ,Ai,...
A o0,A ,AM-1 as the
1, ... ,AM-I the DFT
DFT of ao,al,
ao>«i, ...• • • ,aM-1,
>«M-I, although
the correct way way to express the relationshiprelationship isis that AA o0,,Ai,...,
A 1, ... , AM-I
AM -1 is the image
under
under the
the DFTDFT of of ao,
OQ, a1,
a i , ...
. . . ,, aM-l
OM-I (the
(theDFT
DFT isisthe
the mapping,
mapping, not notthe the result
result ofofthe the
mapping). This abuse of terminology is just a convenience, and is quite common.
1 1
As another
another convenience, we we will write the sequence ao, 00,01,...
a1, ... ,,OM-I
aM -1 as {aj} {aj} ~01, ^ ,
or even
or even just {a,j} (if the
just {aj} the limits
limits of of jj are
are understood).
understood).
1 an
We will now now show that the relationshiprelationship between the sequences {fJ }.f=--.!-N
{/jj^T. ^ and d
can e
{Fn};;==-~N
[Fn}n=-N can b expressed in terms of the DFT. (The reader will recall that
be expressed in terms of the DFT. (The reader will recall that
Fn =
Fn == dd nn,, the
the nth
nth Fourier
Fourier coefficient
coefficient of of the
the function
function /f on on [—I,i}.}
[-i,i].) Since Since eelQ i () is
is
27r-periodic, we have
e-7ri(j+2N)n/N = e-7rijn/N-27rin = e-7rijn/N e- 27rin
= e-7rijn/N.

We can therefore
We can write, for
therefore write, for nn =
= -N, —N +
—N, -N + 1,
1,..., N —
... , N 1,
- 1,
and the FFT
9.2. Fourier series and 405

N-l 2N-l }
= 2~
{
L /je-1rijn/N + L /j_2Ne-1rijn/N .
j=O j=N

If we
If {jj}~:O-1
we define a sequence {fj}?= 0 *^
by

J. = { Ij, j=0,1, ... ,N-1,


) /j-2N, j = N, N + 1, ... , 2N - 1,
then
then we have
we have
2N-l
Fn -- 2N
1 "1-
~ je -1rijn/N , n -- - N , - N + 1, ... , N - 1.
)=0

ze
Moreover, by
Moreover, the periodicity
by the of eeifJ
periodicity of ,, we
we can
can write
write
2N-l
Fn =~
2N "
~ 1-·e-
J
1rij (n+2N)/N
, n = - N ,- N I, -l .
+ , ...
j=O

Defining the sequence (Fn}^0 l by

n = O,l, ... ,N - 1,
n = N, N + 1, ... , 2N - 1,

we have
we have
2N-l
F:n = _1_
2N "~ f-·e-1rijn/N
J , n =
0, 1, ... , 2N - 1.
j=O

Thus {Fn} is
Thus {Fn} is the DFT of
the DFT of {]j}.
{/j}. With
With this
this rearrangement
rearrangement of
of terms
terms understood,
understood, we
we
can say
can say that
that {Fn} is the
{Fn} is the DFT
DFT ofJ/j}.
of {fj}.
To actually compute {Fn}n~~N
{Fn}n=-N fromf rom {fj}f=-lN'
{/jljL^-V' we
we perform
perform the
the following
three steps:
three steps:
1. Replace
1. Replace the
the sequence
sequence

!-N'···' 1-1, to, It,···, IN-l


with
with
10, It,···, !N-I, I-N' ... ' 1-1,
latter sequence
and label the latter sequence as {fj}2j~~:0-1
as {]j} 0
l
. .
- 22N-l
2. Compute
2. Compute the
the DFT
DFT of ^1 to
of {!j}j=o
{fj} to get - 2N-l
get {Fn}n=O
{F n}^-i..

3. The
3. The desired
desired sequence {Fn};;==-~N
sequence {F n}^~^N isis
406 Chapter 9. More about Fourier series
Chapter

The representation
The representation ofof the
the original
original sequence
sequence in
in terms
terms ofof its
its DFT
DFT and
and the
the com-
com-
plex exponentials can
plex exponentials can be
be viewed
viewed as as trigonometric interpolation, since it
interpolation, since it provides
provides
aa combination
combination of of complex
complex exponentials
exponentials (and (and hence
hence sines
sines and
and cosines)
cosines) that
that inter-
inter-
sequence /_AT,/_JV+I,-•
polates the sequence f -N , f -N+1, ...• ,,/JY-I
fN -1 and therefore
therefore the function /.f. To To be
precise, define
precise, define aa function
function I/ :: R
R --t
-» CC by
by
N-1

I(x) = L (9.11)
n=-N

where F
where n, n
Fn, 0, ±1,
n == 0, ±1, ±2,
±2,... is defined
... is defined by
by (9.8).
(9.8). Then
Then I/ satisfies
satisfies

I (Xj) = 1 (Xj) , j = - N + 1, - N + 2, ... ,N - 1 (9.12)

and
and
(9.13)

(see Exercise
(see Exercise 4).
4).
3
Example 9.3.
Example 9.3. We define [—1,1] --t
define f : [-1,1] —>• R by /(#)
f(x) == x
X3. . We will compute the
interpolating function
interpolating function II of
of the
the previous
previous paragraph N = 3.
with N
paragraph with 3. The
The sequence {fj}
sequence {h}
(approximately)
is (approximately)

0, -0.29630, -0.037037,0,0.037037,0.29630

(recall /_ 3 =
that 1-3
(recall that - (f(X-3) f(X3))/2 = (f(-1)
( f ( x - 3 ) + fM)/2 f(1))/2 = (-1
(/(-I) + /(l))/2 l)/2 = 0).
(-1 + 1)/2 Q). The
The
65
sequence {F n} is then given b
{Fn} by
y65

F_ 3 == 1.9466.10- 17 + 1.5519. 1O- 17 i,


F-2 == 3.7066.10- 17 - 7.4842· 1O- 2 i,
F-1 == -1.0606.10- 16 + 9.6225· 1O-2 i,
17
Fo == 3.7007.10- ,
Fl == 1.4501· 10- 17 - 9.6225· 1O- 2 i,
F2 == -4.6788.10- 17 + 7.4842· 1O- 2 i.

In Figure 9.2,
In Figure 9.2, we
we display
display the function f,
the function f , the
the sequence
sequence {h},
{fj}, and
and the
the interpolating
interpolating
function
function
2
I(x) = L Fnei7rnx/l.
n=-3

We now
We now have
have two
two important
important facts:
facts:
1. By
1. By computing
computing aa DFT,
DFT, we
we can
can estimate
estimate 2N of the
IN of the complex
complex Fourier
Fourier coefficients
coefficients
of aa known
of known function.
function.
65
The calculation
65The calculation was
was performed
performed in
in MATLAB
MATLAB using
using aa built-in
built-in function
function for
for computing
computing the
the DFT.
DFT.
9.2. Fourier series and the FFT
FFT 407

0.8

0.6

0.4

0.2

o 0.5
x

Figure 9.2. The


Figure 9.2. The function (x) =
function ff(x) —x x 33,, the
the sequence {fj}, and
sequence {Ii}, and the
the trigono-
trigono-
twnx
metric
metric interpolating
interpolating function
function Ilex)
(x) = L~=-3
= X) n __ 3 nF e
Fnei1rnx (see
(see Example
Example 9.3).
9.3).

2.
2. Conversely,
Conversely, given
given the
the first
first 2AT
2N complex
complex Fourier coefficients of
Fourier coefficients of aa periodic func-
periodic func-
tion,
tion, we
we can estimate the
can estimate the function
function (on
(on aa regular
regular grid
grid with 2N +
with IN + 11 nodes)
nodes) by
by
computing
computing an
an inverse DFT.
inverse DFT.

These
These facts
facts are significant because
are significant because there is aa fast
there is fast algorithm
algorithm for for computing
computing the DFT;
the DFT;
this
this algorithm
algorithm is is called,
called, appropriately
appropriately enough,
enough, the the fast
fast Fourier transform (FFT).
Fourier transform (FFT).
There
There is is aa similar
similar fast
fast algorithm
algorithm for
for the
the inverse
inverse DFT,
DFT, whichwhich is simply called
is simply the
called the
inverse FFT.
inverse FFT.
A direct implementation
A direct implementation of of formula (9.9) requires
formula (9.9) O((M) 2 ) arithmetic
requires O((M)2) oper-
arithmetic oper-
ations
ations to compute aa DFT.
to compute DFT. TheThe FFT
FFT algorithm,
algorithm, on on the other hand,
the other hand, cancan require
require as
as
little
little as O(Mlog
as OeM log22 (M))
(M)) operations
operations toto obtain
obtain thethe same
same result.
result. The
The efficiency
efficiency of the
of the
FFT
FFT depends
depends on on the
the prime
prime factorization
factorization of M; if
of M; if MM isis the
the product
product of of small
small primes,
primes,
then
then the
the FFT
FFT is is very
very efficient.
efficient. The
The ideal situation is
ideal situation is that
that M M be be aa power
power ofof 2;
2; in
in
this
this case,
case, the
the O(Mlog
OeM log22 (M))(M)) operation
operation count applies. There
count applies. There areare many
many books
books that
that
explain
explain howhow the
the FFT
FFT algorithm
algorithm works,
works, such
such asas Kammler
Kammler [28], Chapter 6.
[28], Chapter 6. We
We will
will
not concern ourselves
not concern ourselves with
with the implementation of
the implementation of the algorithm in
the algorithm in this
this text, but
text, but
66
just
just regard
regard thethe FFT
FFT as as aa black
black box
box for
for computing
computing the the DFT.
DFT.66
66
The FFT
66The FFT isis one
one of
of the
the most
most important
important computer
computer algorithms
algorithms for
for computational
computational science
science (indeed,
(indeed,
the
the original
original paper
paper [12]
[12] announcing
announcing the
the algorithm
algorithm isis reputed
reputed to
to be
be the
the most
most widely cited mathemat-
widely cited mathemat-
ical
ical paper
paper of
of all
all time—see [28], page
time-see [28], page 295).
295). For
For this
this reason,
reason, implementations
implementations ofof the
the FFT
FFT exist
exist on
on
every
every major
major computer
computer platform
platform and
and it is also
it is also aa feature
feature of
of computer
computer packages
packages such
such as
as MATLAB,
MATLAB,
Mathematica, and
Mathematica^ Maple.
and Maple.
408 Chapter 9. More about Fourier series

Using
Using the
the above results, we
above results, we can devise an
can devise an efficient
efficient algorithm
algorithm for
for solving
solving (ap-
(ap-
proximately)
proximately) the BVP (9.4):
the BVP (9.4):

1. Using the FFT,


1. estimate the
FFT, estimate the Fourier
Fourier coefficients
coefficients d-w,d-N+i, • • •,djv-i
d-N, d_ N +1 , ... of f./.
, dN -1 of

2. Use
2. (9.6)totoestimate
Use (9.6) estimatethe
thecorresponding
corresponding Fourier
Fourier series
seriesofofthe
thesolution
solution u.u.
3.
3. Use
Use the
the inverse
inverse FFT to estimate
FFT to estimate the
the values of uu on
values of on the
the grid
grid —i,
-i, —l+h,...,
-i+h, . .. , i—h,
i-h,
h = iiN.
h t/N.

Example 9.4.
Example 9.4. We
We use the
the above algorithm
algorithm to
to estimate
estimate the solution
solution of
of

d2 u
- -dx 2 = x 3 ' -1 < x < 1,
-

u( -1) = u(l), (9.14)


du (-1) = du (1).
dx dx
The
The forcing
forcing function
function f(x] = xx33 satisfies
f(x) = satisfies the compatibility condition,
the compatibility condition, as can easily
as can easily
be verified.
be verified. AnAn exact
exact solution u(x) =
is u(x)
solution is (x -— xx55)/2Q,
= (x which corresponds
)/20, which corresponds to
to choosing
choosing
CQ =
Co = 00 in
in the
the Fourier series
Fourier series
00

u(x) = L cn ei 7l'nx.
n=-oo

We will
We will use N = 128
use N = 2277,; which
128 = makes the
which makes the FFT
FFT particularly
particularly efficient.
efficient. Using
Using
(9.8), implemented
implemented by
by the
the FFT,
FFT, wewe produce
produce the estimates
the estimates

(Recall the
(Recall the /_i28
f-128 isi$ taken
taken as the average
average of f(-l) and /(I);
of f(—1) in this
f(l); in this case,
case, this aver-
age
age is is 0.) To
To indicate accuracy of
indicate accuracy of the
the computed
computed Fourier
Fourier coefficients,
coefficients, wewe graph the
graph the
logarithm of
logarithm of the
the absolute
absolute error in the
error in the resulting
resulting trigonometric
trigonometric interpolating function
interpolating function
II(x),
( x ] , as
as given
given byby (9.11),
(9.11), in
in Figure
Figure 9.3.
9.3. As this graph
As this graph shows, the error
shows, the is essentially
error is essentially
zero
zero at at the
the interpolation
interpolation nodes
nodes andand very
very small
small inin between, except near
between, except the endpoints
near the endpoints
where Gibbs's
Gibbs's phenomenon is is evident (because
(because f is is not
not periodic). (We (We graph the the
logarithm of
logarithm the error
of the error because
because of of the
the great disparity in the magnitude
magnitude of of the error
near
near the the endpoints
endpoints andand in the interior
in the interior of
of the
the interval.
interval. If
If we
we graphed
graphed thethe error itself,
error itself,
only
only the the Gibbs's
Gibbs's phenomenon would be be discernible on on the scale of the graph.)
of the graph.)
We next
We compute the
next compute estimates 0/c_i28,C-i27
the estimates ... ,0127.'
of C-128, C-127, 5... ,C127:
_ Fn
Cj = 22' n = ±1,±2, ... ,
n7f

and
and we
we take Co =
take c$ 0. Finally,
— O. Finally, we use the
we use the inverse
inverse FFT to produce
FFT to produce the estimates
the estimates
127
u- J. -- '"'"
~ -
cne i7l'jn/N , J. -- -128 , -127 , ... , 127.

n=-128
9.2. Fourier series and the FFT
FFT 409

Log error in trigonometric interpolation

-15

-.:--20
g
-5;
..Q -25

-30

-4~~1---~0.8::-----:-0:-::.6---~0.~4--:-0~.2:----:0~-~0.2~~0~.4-~0.~6--:0~.8:--"""

Figure
Fi~ure 9.3.
9.3. Logarithm
Logarithm of error in
of error in the
the trigonometric
trigonometric interpolating function
interpolating function
I(x) = 2:~~-128 Fnei1rnx/f for f(x) = x3 . (See Example 9.4.)

We then
We then have
have
Uj == u C;8) , j = -128, -127, ... ,127.

We graph
We graph the error in
the error the computed
in the computed solution in Figure
solution in Figure 9-4-
9.4.

9.2.3
9.2.3 A note about using packaged FFT routines
packaged FFT
There
There isis more
more than
than one
one way
way toto define
define the
the discrete
discrete Fourier
Fourier transform,
transform, andand therefore
therefore
various
various implementations
implementations of of the
the FFT
FFT may may implement
implement slightly different formulas.
slightly different formulas. ForFor
example, the formulas
formulas for the DFT and the inverse DFT are are asymmetric in in that the
the
factor
factor of
of 1/M
11M appears
appears inin the
the DFT
DFT (9.9)
(9.9) but
but not
not inin the inverse DFT
the inverse DFT (9.10).
(9.10). However,
However,
some software packages
some software packages putput the
the factor
factor ofof 11M
1/M in in the
the inverse
inverse DFT instead. 67 It
DFT instead. It is
is
also possible
also possible to
to make
make symmetric formulas by
symmetric formulas by putting
putting aa factor of 1/VM
factor of 1/vM in in each
each of
of
68
the
the DFT
DFT and
and the
the inverse
inverse DFT.
DFT.68 One
One cancan also
also define
define the
the DFT
DFT while
while indexing from
indexing from
-N to
-N N - 1,
to N 1, as in (9.8).
as in (9.8).
Given
Given the
the diversity in definitions
diversity in definitions of of the
the DFT
DFT and and therefore
therefore ofof the
the FFT
FFT (which,
(which,
as the
the reader
reader should
should bear
bear inin mind,
mind, is is just
just aa fast
fast algorithm for computing
algorithm for computing the DFT),
the DFT),
it is
it is essential
essential that
that one
one knows
knows which
which definition
definition isis being
being used
used before
before trying
trying toto apply
apply
aa packaged
packaged FFT
FFT routine.
routine.
67
MATLAB is
57MATLAB is one
one such package.
such package.
68
58Mathematica does this
Mathematica does this by default.
by default.
410 Chapter 9. More
Chapter 9. More about Fourier series
about Fourier series

Error in computed solution

-1~--------~----------~--------~--------~
-1 -0.5 0 0.5
x

Figure 9.4.
Figure 9.4. Error in computed
Error in computed solution
solution in
in Example 9.4-
Example 9.4.

9.2.4
9.2.4 Fast transforms
Fast transforms and other boundary
and other boundary conditions;
conditions; the
the
discrete
discrete sine
sine transform
transform
Fast
Fast transform
transform methods are not
methods are not restricted
restricted to
to problems
problems with
with periodic boundary
periodic boundary
conditions. Discrete transforms
conditions. Discrete can be
transforms can be defined
defined that
that are
are useful for working
useful for working with with
sine,
sine, cosine, quarter-wave sine,
cosine, quarter-wave sine, and
and quarter-wave cosine series,
quarter-wave cosine series, as
as well
well as
as with
with the the
full Fourier
full series. A
Fourier series. A comprehensive source of
comprehensive source of software
software for
for the
the corresponding
corresponding fast fast
transforms
transforms is [48].
is [48].
As an
an example,
example, we discuss the discrete sine transform (DST) and and its use in
solving problems with Dirichlet conditions. The DST of a sequence /i, 12,
solving problems with Dirichlet conditions. The DST of a sequence ft, /2, •..• ·,
• , /AT-I
!N-1
is defined by
is defined by

~ Ii sin 7r;J ,n = 0,1, ... ,N -


= 2 N-1 (.)
Fn 1. (9.15)
)=1

It can
It can be
be shown
shown that
that the
the DST
DST is is its
its own
own inverse,
inverse, up
up to
to aa multiplicative constant:
multiplicative constant:
applying the DST
applying DST to F Fo0,FI, ...,, F
, F 1 , ••. N -1 produces the original sequence multiplied by
FN-I
27V
2N (see Exercise 9).
9).
In solving a BVP or an an IBVP with Dirichlet conditions, the main calculations
calculations
are:

1. computing
1. computing the
the Fourier
Fourier sine
sine coefficients
coefficients of
of aa given function;
given function;

2. computing
computing the solution from its Fourier coefficients.
coefficients.
9.2. Fourier series and the FFT 411
411

As
As with the DFT
with the DFT and
and complex Fourier series,
complex Fourier series, we can solve
we can solve these
these problems approx-
problems approx-
imately using
imately using the DST. If
the DST. If f/ e
E e[O, el, then
(?[(),£], then the Fourier sine
the Fourier sine coefficients
coefficients of
of f/ are
are
cnvpn V>v
given by
2 {l
cn=eJo f(x)sin
(n7rX)
-e- dx, n=1,2,3, ....
Using
Using the
the regular
regular grid
grid Xj
Xj == jh,
jh, jj = 0,1,2,...,
— 0,1,2, ... , A/",
N, h == t/N, and the
elN, and the trapezoidal
trapezoidal
rule,
rule, we obtain
we obtain

en = . C2" f (Xj ).sm (n7rXj)


N-1

~ -e- h
j=1

where
where fjfJ == ff(xj). The trapezoidal
( x j ) . The rule simplifies
trapezoidal rule simplifies due
due to
to the fact that
the fact sin(O)
that sin (0) =
(n?r) =
sin (n7r) = 0.
O. WeWe therefore see that the approximate
approximate Fourier sine coefficients
coefficients are
just a multiple of the DST of the sequence /(#i), f(xd, /(a^), ••••>, f(XN-d.
f(X2), ... f(%N-i)-
On the
On other hand,
the other suppose the
hand, suppose Fourier sine
the Fourier sine series
series of
of uu isis
00

u(x) = L Cn sin (n;x)


n=1

and we know
and know C1, Ci,C2,. - . ,, Ccjv-i
C2, .•. (or approximations
N -1 (or approximations to them). We then have, for
jj =
= l1,2,
, 2 , ....
. . ,, JNV-- l1,,

N-l
.~
u (Xj ) = " Cn sm
. (n7rXj)
-e-
n=1

N-l . 7rnJ
(.)
= ~Cnsm N '

and we
and see that
we see that u can be
u can estimated on
be estimated on aa regular grid by
regular grid by another
another application
application of
of the
the
DST.
DST.

9.2.5
9.2.5 Computing the
Computing the DST
DST using
using the FFT
the FFT
As mentioned above,
As mentioned above, there are special
there are special programs available for
programs available for computing
computing transforms,
transforms,
such as
such as the
the DST,
DST, using
using FFT-like
FFT-like algorithms.
algorithms. However,
However, these
these programs are more
programs are more
69
specialized and therefore less widely available than the FFT.
widely available FFT.69 Fortunately, the
Fortunately,
DST can
can be
be computed using
using the DFT
DFT (and hence
hence the
the FFT) and aa few
FFT) and additional
few additional
manipulations. We will
manipulations. We will now explain how
now explain to do
how to do this.
this.
69
For example,
69For example, MATLAB has an
MATLAB has an FFT
FFT command,
command, but
but no fast DST
no fast DST command.
command.
412 Chapter 9. More about Fourier series

l
We assume
We that {Ii
assume that {fj}f}f=11
=l is aa sequence
is sequence of
of real
real numbers
numbers and
and that
that we
we wish
wish to
to
1
compute the
compute the DST of {Ii}.
DST of {fj}. We We define
define aa new sequence {ij}~:0-1
new sequence {fj}™^ by by

Ij, j=1,2, ... ,N-1,


h= {
-hN-j, ~=N+1,N+2, ... ,2N-1,
0, J = O,N.

We then define {Fn}2^ to be the DFT of {fj}:


2N-1
Fn = 2~ L he-1rijnIN
j=O

1
= 2N ?= Ii cos
2N-1

J~
- (7rJn
.)
N
z.
- 2N
2N-1
L
J~
-.
fJ sm
(7rJn
. )
N .

Since we
Since are interested
we are interested in
in the
the DST,
DST, we
we will look at
will look at the
the imaginary part of
imaginary part of F n, which
Fn, which
is (using the
is (using fact that
the fact /0 =
that }o = /AT = 0)
}N = 0)

- 1
Im(Fn) = - 2N ?= Ii- sin
2N-1

J=O
(7rJn
. )
N

= _ 2~ {~}j sin (7r~n) + 2f1 }j sin (7r~n)}


}=o J=N+l

~-2~ {X;fjsm(~tn) - X;fN_jSin(~(j~N)n)}


(using
(using the
the fact
fact that
that fj+N = /ZN-N-J
jJ+N = /N-J for
hN-N-j = IN-j = 1,2,
for jj = 1,2,...,
... , TV
N — 1). We
- 1). have
We have

~
N-1 I . ( 7r(j + N)n ) ~
N-1 I. ( 7r ( 2N - j)n )
- L.....- N-j sm N =- L.....- j sm N
j=1 j=1

= - L
N-1
Ij
(
sin 2n7r _ 7r~n
. )

3=1

= ?=
N-l
Ij sin
(.
7r~n ,
)

J=1

and so
and so

Im(Fn) ~ - 2~ { 2 X; /; sin ( ~tn) } .


It
It follows
follows that
that the sequence
the sequence
Fourier series and the
9.2. Fourier the FFT 413
413

is the
is the DST
DST of of {lj}.
{/_,-}.
The reader
The reader should
should note
note that,
that, when
when using
using the
the FFT to compute
FFT to compute the
the DST,
DST, N
N
should be
should be aa product
product ofof small
small primes
primes for
for efficiency.
efficiency.
A similar technique
A similar technique allows
allows one
one to
to compute
compute thethe discrete
discrete cosine
cosine transform
transform (DCT)
(DCT)
using the
using the FFT.
FFT. The
The DCT is explored
explored inin Exercise 10.
10.

Exercises
1. Define
1. Define aa sequence
sequence {Ii
{fj}}=
g~o0 by
by
j
fj .
= sm (37r
10 ) .

Compute the
Compute the DFT
DFT {Fn} of {Ii}
{Fn} of and graph
{fj} and graph its
its magnitude.
magnitude.
2.
2. Let
Let /f :: [-7r,7r]
[—7r,7r] -+
—> R
R be defined by
be defined by /(#)
f(x) = = x x 22 .• Use
Use the
the DFT DFT to estimate
to estimate the
the
complex Fourier
complex Fourier coefficients
coefficients Ccnn of
of f,
/, nn == -8, — 8 ,-7,— 7 ,...
. . . ,7.
, 7 . Compare
Compare with
with the
the
exact values:
exact values: Co 7r22/3,
CQ =— 7r /3, Ccnn = 2( -I)nn/n
= 2(—l) /n 22 ,, n
n == ±1,±I, ±2, .... —
3. Let
3. Let f/ : [-1,1]
[—1,1] ^ R be
-+ R be defined
defined by
by ff(x) x(I -- x22}.
( x ) = x(l The complex
). The complex Fourier
Fourier
coefficients of / are
coefficients of f are
6i( -I)n
Co = 0, Cn = 3 3 ' n = ±I, ±2, ....
n7r
Use the
the inverse
inverse DFT estimate f/ on
DFT to estimate on aa grid,
grid, and and graph both f/ and
graph both and the
computed estimate
computed estimate on
on [-1,1].
[—1,1]. Use
Use C-16,
c_ie, C-15,·
c _ i 5 , .... . ,, C15.
Ci5.
4. Show that,
4. Show that, with
with I/ defined
defined by
by (9.11),
(9.11), the
the interpolation
interpolation equations
equations (9.12)
(9.12) and
and
(9.13) hold.
5. Let
5. Let ao,
ao, aI,
« i , ...
. . . ,, aN
CLN-I be aa sequence
-1 be sequence of
of real or complex
real or complex numbers,
numbers, and
and define
define
N-l
An = ~ " a 'e-21Tinj/N ,n="
N~J N- .
0 1 ... , 1
j=O

Prove that
Prove that
N-l

aJ. -- "
~
A n e21Tinj / N , J. -- 0 , 1 , ... , N - 1 .
n=O
Hint: Substitute
Hint: Substitute the formula for
the formula for A
An into
n into

N-l
L Ane21Tinj/N

n=O

and interchange the


and interchange order of
the order of summation.
summation. (A (A dummy
dummy index,
index, say
say m, must be
m, must be
used in
used in place
place of
of jj in
in the formula for
the formula for A Look for
n.) Look
An.) for aa geometric
geometric series
series and
and use
use

~ rn = K
r +
1
- 1.
~ r-I
n=O
414 Chapter 9.
Chapter 9. More
More about
about Fourier
Fourier series
series

boundary conditions
6. Suppose uu satisfies periodic boundary conditions on the interval [-£,
[—•£,•£],
£], and

L
<Xl

cnei1fnx/l
n=-(XJ

is the
is the complex
complex Fourier
Fourier series
series of
of u. Prove
Prove that
that

is the
is the complex
complex Fourier
Fourier series
series of
of -cPu/ dx 22.•
—d?u/dx
Use the
7. Use DST to
the DST to estimate
estimate the first 15
the first 15 Fourier
Fourier coefficients
coefficients of
of the function J(x)
the function =
f(x} =
on the
x(l -— x) on
x(1 interval [0,1]. Compare
the interval Compare toto the exact values
the exact values
4(-1 + (-I)n)
an = - 3 3 ' n = 1,2,3, ....
n7r

The Fourier
8. The Fourier sine
sine coefficients
coefficients of
of J(x)
f ( x ) == x(l on [0,1] are
x(l -— x) on are
4(-1 + (_l)n)
an = - 3 3 ' n = 1,2,3, ....
n7r
Use the
Use the DST
DST and
and a1,
ai, a2,
02, ...
• • • ,, a63 estimate /J on
«es to estimate on aa grid
grid with 63
63 evenly
evenly spaced
spaced
points.
points.
9. Let
9. Let Jo,ft,
/o, /i,..., /jv-i be
... , IN-1 be aa sequence
sequence of of real numbers, and
real numbers, and define
define Fo0,,F
FI1, ....
. . , FFN-I
N- 1
by (9.15). Then define 90,91,
by # 0 ,£i, ...
• • • ,9N-i
,9N-1 by by

N-1 (.)
9j =2L Fn sin 7r;; , j = 0,1, ... , N - 1.
n=l

I[
Show that
Show that QJ 2JV/j,
= 2N
9j = 0,1,...,
fJ, jj == 0,1, ... , N
N -— 1. Hint: Proceed
I. Hint: according to
Proceed according to the
the
hint in
hint in Exercise
Exercise 5.
5. You
You cancan use
use the fact that
the fact that the
the vectors
vectors

sin (~)
sin (2~"')
sin ( 1V )
sin (~)

.
sm
((N~1)m1f)
N
, .
sm
((;-1)j1f)
N

are orthogonal in RN
in R N l1
- for
for j,j, m
m== 1,2,...,
1,2, ... , N
N— j :j:. m (see Exercise
l,j^m
-1, Exercise 3.5.7).
Also, each
Also, each of
of these
these vectors
vectors has
has norm
norm \/N/1
IN/2 (see(see Exercise
Exercise 9.1.7).
9.1.7).
10. The
10. The DCT
DOT maps
maps aa sequence
sequence {h}f=o of real
{fj}^=0 of real numbers to the
numbers to the sequence
sequence {Fn};;=o,
{Fn}^=0,
where
where

N-l (.)
Fn=Jo+2~fJcos 7r;} + (-l)nJN' n=O,l, ... ,N.
3=1
9.3. Relationship
Relationship of sine and cosine series to the full
full Fourier series 415

(a) Reasoning
(a) as in
Reasoning as Section 9.2.4,
in Section 9.2.4, show
show how
how the
the DCT can be
neT can be used
used to estimate
to estimate
the
the Fourier cosine coefficients
coefficients of a function in C[O, fl.
C[0,£j.
(b) Reasoning
Reasoning as in Section
Section 9.2.4, show how the DCT
neT can be used to estimate
estimate
aa function
function from
from its
its Fourier
Fourier cosine
cosine coefficients.
coefficients.
(c) Modifying the technique presented
presented in Section 9.2.5, show how to compute
the DCT
neT using the DFT
nFT (and hence the FFT). {fj}?=0,
FFT). (Hint: Given {f;}.f=o,
- N-l
define {&*£„
define {fj} by
j=-N by

jj=fljl, j=-N,-N+1, ... ,N-1,

and treat {jj}f=-l-N


{fj}^-^N by the three step process on page 405.)
(d) Show that the DCT
neT is its own
own inverse, up to a constant multiple. To be
precise, show that if the DCT
neT is applied to a given sequence and then the
DCT
neT is applied to the result, one obtains
obtains 2N
IN times the original sequence.

9.3
9.3 Relationship of
Relationship of sine
sine and
and cosine
cosine series
series to the full
to the full
Fourier series
Fourier series
In Section 9.1,
In Section we showed
9.1, we showed that
that the complex and
the complex and full
full Fourier series are
Fourier series are equivalent
equivalent
for a real-valued function.
function. We
We will now show that both
both the Fourier
Fourier cosine and the
Fourier sine series can be recognized as special cases of the
the full Fourier series and
hence of the complex Fourier series. This will show that the complex Fourier series
is the most general concept.
To understand
understand the relationships
relationships between the various Fourier
Fourier series for real-
valued
valued functions,
functions, we must understand
we must understand the following terms:
the following terms:

Definition 9.5.
Definition 9.5. Let
Let f : R R. Then
->• R.
R -+ Then f is
1. odd
1. if f(-x)
odd if = -—f(x)
f( -x) = f(x) for all xx E
for all R;
G R;
2.
2. even if f(—x)
even if f( -x) —
= jf(x)
( x ] for 6 R;
all xx E
for all R;
3.
3. periodic with period
periodic with T if
period T if T (x +
T > 0, ff(x + T)
T) == f(x]
f(x) for e R,
all xx E
for all R; and
and this
this
condition does not
condition not hold
hold for any smaller positive value of
ofT.
T.

Examples
Examples of odd functions include polynomials with only odd powers and
Polynomials with only even powers and
(x). Polynomials
sin (x). and cos (x) are examples of even func-
func-
tions, while sine and cosine are the prototypical
prototypical periodic functions (both have period
2?r).
27f). The algebraic properties
properties defining odd and even functions
functions imply that the graph
of an odd function is symmetric through the origin, while the the graph of an even
function is symmetric across the y-axis (see Figure 9.5).
We will
We will show
show that the full
that the full Fourier
Fourier series of an
series of an odd
odd function
function reduces
reduces to
to aa sine
sine
series, and that the full Fourier series of an even function reduces to a cosine series.
We
We need this preliminary
need this preliminary result:
result:
416 Chapter 9.
Chapter 9. More
More about
about Fourier
Fourier series
series

2~---------r--------~

~ O~----~~-r--+-----~

-1

-2~--~----~----~--~
-1 o 1 2 -2 -1 o 2
x x

Figure 9.5.
Figure 9.5. Examples of odd (left)
(left) and even (right)
(right) junctions.
functions.

Lemma 9.6.
Lemma 9.6.
1. Suppose 1
1. Suppose f : R —>•
-+ R is odd.
odd. Then

1ft I(x) dx = o.

2.
2. Suppose R —>•
f :R
Suppose 1 -+ RR is
is even. Then

( I(x) dx =2 (f(x) dx.


1-t 10

Proof. Suppose 1
Proof. Suppose / is
is odd. Then
Then

rt I(x) dx = 1f(x) dx + 10r£ f(x) dx.


0

1- t l

Making the change


Making change of
of variables
variables x = — s in the
= -s the first integral
integral on the right, we
we obtain

rt I(x) dx = -1£ f( -8) ds + 10(f(x) dx


0
1-£
= -1£ I(s) ds + 1£ I(x) dx (since I( -s) = - I(s))
= O.
The result for even 1
result for / is proved by making the same change of variables. D

We can now derive the main result.


9.3. Relationship of sine and cosine
cosine series to the full Fourier series 417

2
Theorem 9.7.
Theorem 9.7. Let f E
6L (—t,I), and suppose
L2(-e,e), suppose that

is the full
full Fourier series of f·
f.
1. IfIf ff is odd,
odd. then
an = 0, n = 0,1,2, ...
and
bn = ~ 10£ f(x) sin (n;x) dx.
That is, the full
full Fourier series (on [—1, i]) of
[-e, f]) of an odd function
function is the same as
el).
[0,f\).
its Fourier sine series (on [0,
2. If
If f is even, then
6
bnn == 0,
0, nn == 1,2,3,
l,2,3,...
...
and

ao = ~ 10£ f(x) dx,


2 r£
an = C10 f(x) cos (n7rx)
-f- dx.

That is, the full


full Fourier series (on [—1,1])
[-e, e]) of
of an even function
function is the same as
its Fourier cosine series (on [0,
[Q,i]).
fl).

Proof. If f/ is
Proof. If is odd,
odd, then
then
n7rx)
f(x) cos ( -e-
is odd
is odd and
and
f(x) sin (n;x)
is
is even. This, together
even. This, with the
together with the previous
previous lemma, yields the
lemma, yields first result.
the first result.
If f/ is
If is even,
even, then
then
n7rx)
f(x) cos ( -e-
is even
is and
even and
f(x) sin (n;x)
Prom this we
is odd. From we obtain the second conclusion. 0

We
We can
can use the preceding
use the result in
preceding result the following
in the following fashion.
fashion. Suppose
Suppose we we wish
wish
to
to understand
understand the convergence of
the convergence of the Fourier sine
the Fourier series of
sine series of f/ : (0, i) —>•
(0, f) R. Define
-+ R. Define
fodd
fodd :'•(-f, f) —>•
(—£•,£) R-5 the
-+ R, odd extension of
the odd of /,f, by
by
f(x), o<x<e,
fOdd(X) = { _ f( -x), -e < x < 0.
418 Chapter 9. More about Fourier series

Then, by the previous theorem, the (full)(full) Fourier series of ffodd /,


0dd is the sine series of f,
so the
so convergence of
the convergence of the
the sine
sine series
series can
can be understood in
be understood in terms
terms of of the
the convergence
convergence
related (full) Fourier series.
of a related
Similarly, given
Similarly, given /f :: (0,
(0,^) -> R,
f) --t R, we define ffeven
we define even -> R,
(—£,£)f) --t
: (-f, R, the
the even
extension of /,
f, by
f(x), 0 < x < f,
feven(x) = { f( -x), -f < x < O.

even is the cosine series of /,


The Fourier series of ffeven so, again, the convergence of
f, so, of
related Fourier
the cosine series can be examined in terms of the convergence of a related
series.
Figure 9.6
9.6 shows the odd and even extensions
extensions of /f : [-1,1]
[-1,1] --t
->• R defined by
( x ) = 11 + x.
ff(x) x.

v ,,
2 2

1 1
,,
V
,

>- 0 >- 0

-1 -1
~'
~
~
~

-2 ~.
-2
-2 -1 o 1 2 -2 -1 o 1 2
X x

Figure 9.6. The


Figure 9.6. The function
function f(x} = 1l + xx and
f(x) = and its
its odd
odd (left)
(left) and
and even
even (right)
(right)
extensions.

Exercises
1. Compute
1. Compute the
the Fourier
Fourier sine
sine series
series of
of ff(x) = x on
(x) = on the
the interval
interval [-1,1]
[—1,1] and
and graph
graph
[—3,3]. To what function does
the sum of the first 50 terms on the interval [-3,3].
appear to converge? What is the period of this function?
the series appear function?
2. Compute the Fourier cosine series of ff(x)(x) = [—1,1] and
= x on the interval [-1,1]
graph it
graph it on
on the
the interval
interval [-3,3].
[—3,3]. To
To what
what function
function does
does the
the series
series appear
appear to
to
converge? What
converge? What isis the
the period
period of
of this
this function?
function?
9.4. Pointwise convergence of
of Fourier series
series 419
419

3. Suppose
3. Suppose I/ : [0,
[0,^] —>• R
f] -+ is continuous.
R is continuous.

(a) Under
(a) Under what
what conditions
conditions is
is lodd continuous?
f0dd continuous?
(b) Under
(b) Under what
what conditions
conditions is
is leven continuous?
feven continuous?

4. Consider aa function
4. Consider function I/ : [—•£,•£] —>• R,
[-f, f] -+ and let
R, and cn, n
let Cn, 0, ±1,±2,...
= 0,
n = ±1, ±2, ... be
be its
its
complex Fourier coefficients.
complex Fourier coefficients.

(a) Suppose
(a) Suppose I/ isis odd.
odd. What
What special
special property
property do
do the
the coefficients cn, nn =
coefficients Cn, =
0, ±1,
0, ±1, ±2,...
±2, ... have?
have?
(b) Suppose I/ is
(b) Suppose is even.
even. What special property
What special do the
property do the coefficients cn, n
coefficients Cn, n =
=
0, ±1,
0, ±2,...
±1, ±2, ... have?
have?

5. Show
5. Show how
how to relate the
to relate quarter-wave sine
the quarter-wave sine series of I/ : [0,
series of [0,£| -> R
f] -+ R toto the full
the full
Fourier series
Fourier series of
of aa related function. (Hint:
related function. (Hint: This
This other function will
other function be denned
will be defined
on the interval
on the [-2^,2^].)
interval [- 2£, 2£].)

6. Show
6. Show how
how toto relate
relate the
the quarter-wave cosine series
quarter-wave cosine series of
of I/ : [0,
[0, t]f] —>•
-+ RR to
to the full
the full
Fourier series
Fourier series of
of aa related function. (Hint:
related function. (Hint: This
This other
other function
function willwill be defined
be defined
on
on the
the interval [-2^,2^].)
interval [- 2f, 2£].)

9.4
9.4 Pointwise convergence
Pointwise convergence of Fourier series
of Fourier series
Given the
Given the relationships
relationships that
that exist among the
exist among the various
various Fourier
Fourier series, it suffices
series, it suffices to
to
discuss the
discuss the convergence
convergence ofof complex
complex Fourier
Fourier series.
series. The convergence of
The convergence of other
other series,
series,
such as
such as the Fourier sine
the Fourier sine series,
series, will
will then
then follow directly.
follow directly.
If I/ is
If is aa real- or complex-valued
real- or function defined
complex-valued function on [—.£,
defined on £], then
[-f, f], then the
the partial
partial
sums
sums
w
N
IN(X) = L cnei1fnx/l
n=-N

form
form aa sequence
sequence ofof functions.
functions. Before discussing the
Before discussing convergence of
the convergence these partial
of these partial
sums specifically,
sums specifically, we describe different
different ways in
in which
which a sequence
sequence of
of functions can
functions can
converge.
converge.

9.4.1
9.4.1 Modes of
Modes of convergence
convergence for
for sequences of functions
sequences of functions
Given any
Given any sequence
sequence {IN
{/AT}^}]V'=1 of functions defined
=I offunctions defined on
on [a, 6]
b] and
and any
any (target)
(target) function
function
I, also
/, also defined
defined on
on [a, 6], we
[a, b], we define
define three
three types
types of
of convergence
convergence ofof the
the sequence to I./.
sequence to
That is,
That is, we assign three
we assign three different meanings to
different meanings to "IN
"/AT ->•
-+ /I as
as N -+ oo."
N —>• 00."

1. We
1. say that
We say that {IN}
{/AT} converges
converges pointwise toto I/ on
on [a, b] if, for
b] if, for each
each x E£ [a, 6], we
[a, b], we
have /jv(ar)
have ->• fI(x)
IN(X) -+ as N
( x ) as ->• oo
N -+ 00 (i.e.
(Le. |/(ar) fN(X) I -)•
If(x) -- /AT(X)| °
-+ 0 asas N
N ->
-+ oo).
(0).

2. We
2. We say
say that
that {IN}
{/AT} converges to /I in
converges to L22 (or
in L (or in
in the mean-square sense) ifif
the mean-square
111-
ll/ ~ INII
/wll —>• °
-+ 0 as
as ./V
N —>• oo. The
-+ 00. The reader
reader will
will recall
recall that (L 2 ) norm
the (L2)
that the norm of
of aa real-
real-
420 Chapter
Chapter 9. More about
about Fourier series

or
or complex-valued
complex-valued function g on
function 9 on [a, b] is
b] is

Therefore, /TV
Therefore, fN —>
-+ f in
in the
the mean-square sense means
mean-square sense means that
that

lb If(x) - fN(X)12 dx -+ 0 as n -+ 00.

3. We
3. We say
say that {/AT} converges
that UN} converges to
to /f uniformly
uniformly on
on [a, b] ifif
[a, b]
max {If(x) - fN(X)1 : x E [a, b]} -+ 0 as N -+ 00.

Actually,
Actually, this
this definition
definition is
is stated correctly only
stated correctly only if if all
all of
of the functions involved
the functions involved
are continuous,
are continuous, so so that
that the
the maximum
maximum is is guaranteed
guaranteed to to exist.
exist. The general
The general
definition is:
definition {/AT} converges
is: UN} converges to to /f uniformly
uniformly on on [a, if, given
[a, b]b] if, given any
any te >> 0,0,
there
there exists
exists aa positive
positive integer
integer N N,e such
such that,
that, ifif NN > ~ NN,e andand x E e [a,
[a, 6], then
b], then
If(x) -— /TV(X)|
\f(x) fN(X)1 < < e.
t. The
The intuitive
intuitive meaning
meaning of of this
this definition
definition is is that,
that, given any
given any
small tolerance
small tolerance e,
t, by
by going
going far
far enough out in
enough out in the
the sequence,
sequence, /N fN will approximate
will approximate
/f to
to within
within this
this tolerance uniformly, that
tolerance uniformly, that is, on the
is, on entire interval.
the entire interval.
The following theorem
The following shows that
theorem shows that the
the uniform
uniform convergence
convergence of of aa sequence
sequence im-
im-
plies
plies its convergence in
its convergence in the
the other
other two
two senses.
senses. This
This theorem
theorem is
is followed
followed by examples
by examples
that
that show
show that
that no other conclusions
no other conclusions can
can be
be drawn
drawn in general.
in general.

Theorem
Theorem 9.8. 9.S. Let {/AT} be a sequence
Let {fN} sequence of complex-valued functions defined
of complex-valued defined on
[a,6].
[a,b]. //If this sequence converges uniformly
uniformly on [a,b] to f : [a,b] -» C,
[a,b]-+ C, then it
it also
converges to f pointwise and in the mean-square
mean-square sense.

Proof. See Exercise


Proof. See Exercise 5.
5. 0

Example
Example 9.9. define
9.9. We define

Nx, O::;X<*"
gN(X) =
{
1- N (x - *') , 1 < < N'
N - x
2

0, i.r::;x::;1.
Figure 9.79.7 shows
shows the
the graphs ofof g§,
g5, giQ, and #20
g1O, and g20·• Then {gN} converges pointwise
zero function. Indeed, pAr(O)
to the zero gN(O) = = 00 for all N, clearly pAr(O)
N, so clearly gN(O) -»
-+ 0,
0, and ifif
0 < xx ::;
0< 1, then
< 1, then for N sufficiently
for N sufficiently large,
large, 2/N
2/N < x. x. Therefore gN(x) = 00 for
Therefore gN(X) all N
for all N
sufficiently
sufficiently large,
large, and
and so
so gN(x)
gN(X) -+ 0.
—> O.
2
A direct calculation
calculation shows that gN —>• -+ 00 in
in L
L2: :
9.4.
9.4. Pointwise convergence of Fourier series
Pointwise 421
421

II
- Y=9 5 X
0.9 - _. Y=9 10 (x)
. _. _ Y=9 20 (X)
0.8

0.7

0.6 !
I
i I
-
~ J~
,I
.
if

>-0.5

0.4

0.1

0.2 0.4 0.6 0.8


x

Figure 9.7. The


The functions g$, gw, #20 (see
functions 95,910,920 (see Example
Example 9.9).
9.9).

The convergence
The is not
convergence is not uniform,
uniform, since
since

max {19N(x) - 01 : x E [0, I)} = g (~) = 1 for all N.

Example 9.10.
Example 9.10. This
This example is almost
example is almost the
the same
same as
as the
the previous
previous one. We define
one. We define

osx<:kr,
< < fij,
1 _ X
fij 2

~ Sx S1

(see Figure
(see Figure 9.8). We have
9.8). We hN ->
have HN -+ 0 pointwise
pointwise on
on [0,1], and {h^} does
and {hN} does not
not converge
converge
uniformly
uniformly to
to 0 on
on [0,1], by essentially the
by essentially the same
same arguments
arguments asas in the previous
in the exam-
previous exam-
ple.
ple. In this example,
In this however, the
example, however, the sequence
sequence also
also fails to converge
fails to converge in L22 norm.
the L
in the norm.
We have
We have

IlhN - 011£2 = 11 Ih N (x)12 dx

= f!: -+ 00.
422 Chapter 9.
Chapter 9. More
More about
about Fourier
Fourier series
series

18

16
Ii
14 I I
I I
I I
12 I
I I

>-10 I I"
~I ,
II \
8 I ~ \
'i ,
6! " ~I

0.2 0.4 0.6 0.8


x

Figure 9.8. The


Figure 9.S. The functions
functions h^,
h5; HIQ,
hlOJ H^Q (see Example
h 20 (see 9.10).
Example 9.10).

We saw
We saw in
in Theorem
Theorem 9.89.8 that
that aa uniformly
uniformly convergent
convergent sequence
sequence also
also converges
converges
pointwise and
pointwise and in
in the
the mean-square sense. Example
mean-square sense. Example 9.9
9.9 shows
shows that neither point-
that neither point-
wise nor
wise nor mean-square convergence implies
mean-square convergence implies uniform
uniform convergence,
convergence, while
while Example
Example 9.10
9.10
shows that
shows that pointwise convergence does
pointwise convergence does not imply mean-square
not imply mean-square convergence.
convergence. WeWe will
will
see, in
see, in the
the context
context of
of Fourier series, that
Fourier series, mean-square convergence
that mean-square convergence does not imply
does not imply
pointwise convergence
pointwise convergence either.
either.

9.4.2
9.4.2 Pointwise convergence of the complex
complex Fourier series
We now
We now begin
begin to
to develop
develop conditions
conditions under
under which
which the
the Fourier
Fourier series
series of
of aa function
function con-
con-
verges pointwise,
verges uniformly, and
pointwise, uniformly, and in
in the
the mean-square
mean-square sense.
sense. We
We begin with pointwise
begin with pointwise
convergence.
convergence.

The partial
The partial Fourier
Fourier series
series as integration against
as integration against a
a kernel
kernel

Our starting
Our starting point
point isis aa direct
direct calculation
calculation showing
showing that
that aa partial Fourier series
partial Fourier series of
of aa
function f/ can
function can be
be written
written as as the
the integral
integral of
of f/ times
times aa term
term from
from aa delta
delta sequence.
sequence.
The difficult
The difficult part
part ofof the
the proof
proof will
will be
be showing
showing that this sequence
that this sequence really
really is
is aa delta
delta
sequence; that
sequence; that is,
is, that
that it it satisfies
satisfies the
the sifting
sifting property. (Delta sequences
property. (Delta sequences andand the
the
sifting property
sifting were discussed
property were discussed inin Sections
Sections 4.6
4.6 and
and 5.7,
5.7, but the essence
but the essence of of those
those
discussion will
discussion will be repeated here,
be repeated here, so
so it
it is
is not
not necessary
necessary toto have studied the
have studied the earlier
earlier
sections. The
sections. The concepts
concepts fromfrom those section must
those section must be modified slightly
be modified slightly here
here anyway,
anyway,
to deal
to deal with
with periodicity.)
periodicity.)
9.4. Pointwise convergence of Fourier series 423

We assume that
We assume co,c±i,c±2,...
that Co, are the
C±1, C±2, . .. are the complex
complex Fourier
Fourier coefficients
coefficients of / :
of 1
[-e,e]-+ c:
[-*,<]->C:
C n = ;e [LL l(s)e-i7rns/L ds, n = 0, ±1, ±2, ....
We
We write
write

n=-N
and
and then substitute the
then substitute the formula
formula for and simplify:
for Ccnn and simplify:

IN(X) = ntN { ;e [LL l(s)e-i7rns/L dS} ei7rnx/L


= [LL { ;e ntN ei7rn(x-s)/f } I(s) ds.
We
We already
already see
see that
that the IN can
the /N can be
be written
written as
as

(9.16)

where
where the
the Dirichlet
Dirichlet kernel KN is
kernel KN is defined
defined by
by

With
With the formula for
the formula for aa finite
finite geometric
geometric sum,
sum,

and
and using some clever
using some clever manipulations,
manipulations, we
we can simplify the
can simplify the formula
formula for
for KN consid-
KN consid-
erably:
erably:

1 (e i7rli / i )N+1 _ (ei7rli / l rN


U e i7rIi / L - 1
1 (e i7rli / l (+1/2 _ (ei7rIi/L) -(N+1/ 2)
U (e i7rl!/f) 1/2 _ (e i7rli/ f ) -1/2
424 Chapter 9. More about
Chapter Fourier series
about Fourier

1 ei n:(N+l/2)9/l _ e- i n:(N+l/2)(J/i
= 2l ei n:(1/2)(J / l _ e-in:(1/2)£J / l

., ((N+~)n:(J)
1 2~sm i

2l 2i sin ( ~~ )
• ((2N+l)n:(J)
sm 2l

- 2lsin (~n
The kernel KN, for TV
The N == 20,
20, is graphed
graphed in Figure 9.9.
9.9.

25~---------r----------~--------~----------~

20

15

10

Figure 9.9.
9.9. The kernel K220
Q.•

Periodic convolution

The
The convolution of two functions g9 : R -t
—> C and
and h : R -t
-» C is defined by

(g*h)(x) = f g(x-s)h(s)ds.

The
The integral sign without
integral sign without limits
limits means
means integration
integration over
over the
the entire
entire real
real line
line (we
(we do
do
not discuss here conditions on g9 and hh that guarantee
guarantee that these integrals
integrals exists).
The formula for
The formula IN is
for /jv is similar
similar to
to aa convolution,
convolution, except
except that
that the
the integration
integration isis over
over
the
the finite
finite interval [-f, fl. A
interval [—1,1]. fundamental property
A fundamental property of
of an
an ordinary
ordinary convolution
convolution is its
is its
symmetry;
symmetry; thethe change
change ofof variables
variables that
that replaces - ss by
replaces xx — by ss yields
yields

f g(x - s)h(s) ds = f g(s)h(x - s) ds.


9.4. Pointwise convergence of
of Fourier series
Fourier series 425

A similar formula
A similar formula holds for integrals
holds for integrals such
such as
as that in (9.16),
that in (9.16), provided the functions
provided the functions
involved are periodic.
involved are periodic.
A direct
A direct calculation
calculation shows
shows that if g,
that if #, hare
h are 2C-periodic
2^-periodic functions
functions defined
defined on
on R,
R,
then
then

£_/(x - s)h(s) ds =
1x+£
x-£ g(s)h(x - s) ds
1
= 1£-l g(s)h(x - s) ds.

The last
The last step
step follows
follows from
from the
the fact
fact that
that s f-t g(s)h(x -— s)
>-)• g(s)h(x is 2^-periodic,
s) is 2C-periodic, and so its
and so its
integral over anv
integral over interval of
any interval of length
length 21
2C is
is the same. We
the same. We refer to
refer to

as the
as the periodic convolution ofof 9g and
and h.
We can extend
We can the idea
extend the idea of
of aa periodic
periodic convolution
convolution toto nonperiodic functions by
nonperiodic functions by
using the
using the periodic extension ofof aa function.
function. If
If 9 is defined
g is defined on
on [-C,
[—£, £],
C], then
then its
its periodic
periodic
is the
extension is the function
function ggper defined for
per defined for all
all x G
ER R by
by

_ { g(x), -C < x < C,


gper (X ) - g(x _ 2kC), (2k - l)C < x < 2kC.
For example, in
For example, in Figure
Figure 9.10
9.10 we graph the
we graph the function
function g
gper, where g(x]
per, where on [-1,1].
g(x) = x on [—1,1].
For any g and defined on [—i, ^], periodic or not, we interpret the periodic
For any 9 and h defined on [-C, C], periodic or not, we interpret the periodic
convolution of
convolution and hh to
of 9g and be
to be

We will
We will often
often write
write this convolution as
this convolution as simply
simply

[ll g(x - s)h(s) ds,


but and hh are
but 9g and assumed to
are assumed to be replaced by
be replaced by their periodic extensions
their periodic extensions if
if necessary
necessary
(that is,
(that if they
is, if they are
are not
not periodic).
periodic).
The kernel KN KN isis 2^-periodic.
2C-periodic. Provided
Provided the complex
complex Fourier series
series of
of /f con-
con-
Z7rnx
verges, the
verges, the limit
limit is obviously
obviously aa 2C-periodic
2£-periodic function
function (because
(because each
each function
function ei1fnx ^

is 2^-periodic).
is Therefore, it is
2C-periodic). Therefore, is natural
natural to
to consider
consider ffpen
per , the periodic extension
extension of
of
/, and
f, and to
to interpret
interpret (9.16)
(9.16) as
as aa periodic
periodic convolution.
convolution. WeWe then have
then have

(9.17)

aa fact
fact which
which we
we will
will use
use below.
below.
426 Chapter 9. More about Fourier series

3r-----~------~------~------~----~------~

-1

-2

-3~----~----~~----~----~~----~----~
-3 -2 -1 0 2 3
x

Figure The periodic extension


Figure 9.10. The extension of [—1,1] -> R, g(x)
of g9 :: [-1,1)-+ g(x) — x.
= x.

KN as
KN as a
a delta sequence
delta sequence

An examination
examination of the graph of the
the kernel KN
K^ (see Figure 9.9) shows that most of of
its "weight" is concentrated
concentrated on a small interval
interval around ()0 =
= 0.
O. The effect
effect of this on
the periodic convolution

integral produces a weighted average of the values of f,


is that the integral /, with most of of
the
the weight on the the values of fI(s)
( s ) near s =— x. Moreover, this effect
effect is accentuated
accentuated as
N —>
N 00, so that if 1
-+ oo, / is regular
regular enough, we obtain
obtain pointwise convergence. Thus KN KN
acts like a delta sequence (see Section 4.6).
regular must 1
How regular / be in order for for convergence to occur? It turns out that
mere continuity
continuity is not sufficient,
sufficient, as there
there are continous functions on [-€,[-l, i]l) whose
Fourier series fail to converge at an infinite number of points. Some differentiability
differentiability
of 1
/ is necessary
necessary to guarantee
guarantee convergence. On the otherother hand, wewe do not really want
to require /f to be continuous, since we we often
often encounter discontinuities
discontinuities in practical
practical
problems,
problems, if if not I, then
of /,
not of then of fper.
of fper.
A suitable
suitable notion of regularity
regularity for our purposes is that of piecewise smoothness.
We make the the following definitions.

9.11. Suppose
Definition 9.11. Suppose f is a real- or complex-valued
complex-valued function
function defined
defined on (a,b),
(a,b),
except possibly
except possibly at a finite
finite number of say that 1
of points. We say f has a jump discontinuity
convergence of Fourier series
9.4. Pointwise convergence 427

at Xo EG (a,
at XQ (a, b) if
b) if
lim f(x) and lim f(x)
x-tx;- x-txci

both exist
both exist but
but are
are not equal. (Recall
not equal. (Recall that if both
that if both one-sided
one-sided limits
limits exist
exist and are equal
and are equal
to ff(xo),
to ( x o ) , then
then ff is
is continuous at xx =
continuous at — xo.)
XQ.)
We say
We say that is piecewise
that ff is continuous on
piecewise continuous (a, b)
on (a, b) ifif
1. ff is
1. is continuous
continuous at
at all
all but
but aa finite
finite number
number of
of points in (a,
points in (a,b);
b);

2. every
2. every discontinuity
discontinuity of
of ff in
in (a,
(a, b)
b) is
is aa jump discontinuity;
jump discontinuity;

3. lima._>a+ ff(x)
3. limx-ta+ ( x ) and
and limx-tb-
\im.x_^b- f(x] exist.
f(x) exist.
Finally, we
Finally, we say
say that is piecewise
that ff is smooth on
piecewise smooth (a, b)
on (a, b) if
if both
both ff and
and df
df/dx
Idx are
are
piecewise continuous on
piecewise continuous (a, b).
on (a, b).

An example of
An example of aa piecewise
piecewise smooth
smooth function
function is
is given
given in
in Figure 9.11.
Figure 9.11.

10~------------------~------------------~

Figure 9.11. A
Figure 9.11. A piecewise
piecewise smooth function.
smooth function.

Before we
Before we give
give the
the main
main result, we give
result, we give two
two lemmas
lemmas that
that we will find
we will find useful.
useful.

Lemma
Lemma 9.12.
9.12.
(9.18)

Proof. This is
Proof. This is proved
proved by direct calculation
by direct calculation (see
(see Exercise
Exercise 4).
4). o
428 Chapter 9. More about Fourier series

The next lemma is called Bessel's inequality and follows directly from the
projection theorem.

Lemma 9.13.
Lemma 9.13. Suppose {0j ;: jj =
Suppose {cPj = 1,2,
l,2,...} is an
... } is an orthogonal
orthogonal sequence
sequence in
in an
an
(infinite-dimensional) inner product space V, and f E
{infinite-dimensional} € V. Then

Proof. By the
Proof. the projection theorem, for
for each
each JV,
N,

is the
is the element
element of
of the
the subspace
subspace V
VN span {{</>i,
N = span < / > 2...
cP1 , cP2, , . . . , cP
0jv} closest to
N} closest to f,
/, and
and f/AT
N is
is
orthogonal to f/ -— f/N.
orthogonal to Therefore, by
N· Therefore, by the Pythagorean theorem,
the Pythagorean theorem,

This implies that


IlfNII~ ::; Ilfll~ for all N = 1,2,3, ....
Moreover, since 0i, </>2, cP3,
cP1, c/>2, ^>s, ...
• • • are
are mutually orthogonal, we have (also by
by the
the Pythagorea
Pythagorea
theorem)
theorem)
JVf n

Therefore,
t l(f, cPj)12 ::;
j=l (cPj, cPj)
Ilfll~
holds for each N,
TV, and
and the
the result follows. 0

Since a Fourier series is based on an orthogonal series, Bessel's inequality


can be
can applied to
be applied to the
the sequence
sequence of
of Fourier
Fourier coefficients.
coefficients. For
For instance,
instance, if
if en,
cn, n
n =
=
2
0, ±1,
0, ±1, ±2,... are the
±2, ... are the complex
complex Fourier
Fourier coefficients of f/ E
coefficients of eLL2((—l,l), then
-f, f), then
(I, ei7rnx/l)

and

Therefore,
Therefore,
9.4. convergence of Fourier series
Pointwise convergence 429

Bessel's inequality yields


00

n=-oo

Similar results
Similar results hold
hold for
for Fourier sine or
Fourier sine or cosine
cosine coefficients.
coefficients.
We can now
We can now state
state and
and prove the main
prove the result concerning
main result concerning the the pointwise
pointwise conver-
conver-
gence of
gence of Fourier series. The
Fourier series. The reader
reader should
should note
note that the convergence
that the convergence of of the
the Fourier
Fourier
series is
series is naturally
naturally expressed
expressed in
in terms of the
terms of the properties of ffper
properties of rather than
per rather than those
those of
of
/•

Theorem
Theorem 9.14.
9.14. Suppose (—l,€)i) -»
Suppose f : (-i, C is piecewise smooth.
-+ C smooth. Then the complex
Fourier series of f,f,
00

L cnei1fnx/l,
n=-oo

converges to ffper(x)
per(x) if x is a point of
if of continuity of
of ffper,
per, and to
to

1
-2 [ lim fper(s)
s--+x -
+ s--+x+
lim fper(S)]

if fper
if fper has a jump atx.
jump discontinuity at x.

Proof. As before, we write


Proof.

fN(X) = L
n=-N
N
cnei1fnx/l = 1£

-l
KN(S)f(x - s) ds.

If ffper
If is continuous
per is continuous at
at x, then
then

1
fper(x) = -2 [lim fper(s)
s--+x-
+ s--+x+
lim fper(X)] .

From now
From now on,on, forfor conciseness,
conciseness, we will write
we will write /f rather than ffper
rather than and remember
per and remember toto
interpret ff(s)
interpret in terms
( s ) in terms of of the periodic
periodic extension
extension of
of /f whenever s is outside
outside of
of the
the
infprval (-i,
interval f — P i).
t\ Also, we write
Alsn -rarp writ.p

f(x-) = s--+x-
lim f(s), f(x+) = s--+x+
lim f(s).

With this
With understanding, our
this understanding, our task is to
task is to show
show that, for each
that, for each x G [—f.,1],
E [-i,i],

lim fN(X) =
N--+oo
~2 [f(x-) + f(x+ )].
To do
To do this, it suffices
this, it suffices to show that
to show that
0 1
lim
N--+oo 1 -l
KN(S)f(x - s) ds = - f(x+)
2
(9.19)
430 Chapter 9. More about Fourier series

and
and
l 1

We will prove
We will prove that
lim
N-+oo

that (9.20)
1
(9.20) holds;
0

holds; the
the proof
KN(S)f(x - s) ds

proof of
of (9.19)
(9.19) is
= -2 f (x-).
similar. Equation
is similar. (9.20) is
Equation (9.20) is
(9.20)

eauivalent to
equivalent

By (9.18),
(9.18),
1 fl ft
'2 f (x-) = f(x-) 10 KN(S) ds = 10 KN(S)f(x-) ds,
so
so

fl KN(S)f(x - s) ds - ! f(x-) = fl KN(S) (f(x - s) - f(x-)) ds


10 2 10
= ~ fl f(x - s) ~/(x-) sin ((2N + l)7rS) ds.
2i10 sin(u) 2i
We can recognize
We can this integral
recognize this integral as
as 1/(2i)
l/(2£) times the L
times the L22 inner
inner product (on the
product (on interval
the interval
(0,£))
(0, of the
£)) of the functions
functions
f(x-s)-f(x-)
F(x)(s) = . ('IrS)
sm 2l
and
and
sm
. ((2N +
2i .
l)7rX)
The sequence
The sequence
. ((2N+l)11'X)
{ sln 2l .. N -
- 0"1,
2 ... }

is an orthogonal
is an orthogonal sequence
sequence with
with respect
respect to L22 inner
the L
to the inner product (see, for
product (see, for example,
example,
Exercise
Exercise 5.2.2). Bessel's inequality
5.2.2). Bessel's inequality then
then implies
implies that
that

~
~o
1(
F(x),sm
. ((2N +
2i
l)7rS)) 12 < 00
and therefore
and therefore

~ f1f(x-s)-f(x-). ((2N+1)7rs)d
2£ 10 sin (~;) sm 2l
_(D . ((2N+1)7rS))
s- 2£
.l'(x),sm -t O.
This is the
This is desired result.
the desired result.
However, there
However, there is one problem
is one with this
problem with this argument.
argument. Bessel's
Bessel's inequality
inequality (Lemma
(Lemma
9.13) requires
9.13) requires that F^ and
that F(x) and the
the orthogonal sequence belong
orthogonal sequence belong toto aa common
common inner
inner
product space. We
product space. We will
will take this space
take this space to be the
to be the space
space V of all piecewise
of all continuous
piecewise continuous
functions defined
functions defined on
on [0, £J. Certainly
[0,£|. Certainly the
the functions
functions

. ((2N +
sm 2£
l)7rX) ' N = 0,1,2, ...
of Fourier
9.4. Pointwise convergence of Fourier series
series 431
431

belong to
belong to V (continuous
(continuous functions
functions are
are piecewise continuous). The
piecewise continuous). The proof,
proof, therefore,
therefore,
reduces to showing that F^ e V.
reduces to showing that F(x) E V.
Since ffper
Since per has only jump
has only discontinuities, F(
jump discontinuities, x) also
F(x) also has
has only
only jump discontinu-
jump discontinu-
ities, except
ities, except possibly
possibly at
at s == 0,
0, where
where there
there is
is aa zero
zero in
in the denominator. If
the denominator. If we
we show
show
that
that
lim F(x)(s)
s-+o+
exists as
exists as aa finite
finite number, this will
number, this show that
will show that F^
F(x) is piecewise continuous,
is piecewise continuous, and
and hence
hence
in V. Since
in Since /f and
and df/dx each has
df / dx each at most
has at most aa finite
finite number
number of of jump discontinuities,
jump discontinuities,
there is an
there is an interval (0,e) such
interval (O,E) such that
that the
the function
function s I-t
!->• ff(x is continuous
( x - s) is continuous and
and
differentiate on
differentiable on (0,
(0,e). follows from
E). It follows from the
the mean
mean value theorem that,
value theorem that, for
for each
each s €E
(0,e), there
(O,E), exists 7
there exists ISS Ee (0,1) such
such that
that
df
f(x - s) - f(x-) = - dx (x - fSS)S.

Also, by
Also, by the
the mean
mean value
value theorem, there exists
theorem, there exists A € (0,1) such
Ass E such that
that

. (7rS)
sm 2£ = cos (AS7rs)
U 7rS
2£ .

Thus, for
Thus, for all °
all s > 0 near zero, we
near zero, have
we have
f(x-s)-f(x-)
F(x)(s) = . (1[8)
sm 2f

-1x(x - ISS)S
= --"""--':7"'-,---'--
cos (>'.1[S) 1[S
2l 2f

1x(x - ISS)
cos (>'o1[S).1!:..
2l 2£
~(x-)
-+ - dx 1[ as s -+ 0+ .
2l
This shows
This shows that
that lims-+o+
lims_>0+ F( exists, which
x)(s) exists,
F(:r;)(s) completes the
which completes the proof.
proof. 0

Example
Example 9.15.9.15. We will compute the complex Fourier series of 9g :: [-1,1] [—1,1] -+-> R
R
defined by g(x)
defined by g(x) == x.x. Figure 9.10 shows
Figure 9.10 shows that
thatggper is piecewise
per is piecewise smooth,
smooth, and continuous
and continuous
except at integral
except integral values
values of of x. therefore expect
x. We therefore expect that the Fourier series of of 9g will
converge to ggper(x)
per(x} except
except when x is an integer.
integer. At
At the points of discontinuity, the
average ofof the left-
left- and right-hand limits is 0, 0, which
which will be
be the limit of
of the series
at those points.
The Fourier coefficients
The coefficients ofof 9g are

Co = ~ ill X
dx = 0,

en = -
111 .
2 -1
i(-I)n
xe-1[mx dx = - - - , n = ±1, ±2, ....
n7r
432
432 Chapter 9. More about
Chapter about Fourier
Fourier series

The partial Fourier series


N
L cn e7rin",
n=-N

for N = 10,20,40,
for 10,20,40, are
are shown in Figure 9.12.

1.5~-----r------r------r------r------r----~

-1 .5 I..-_ _ _ _--L._ _ _ _ _ _.L...-_ _ _ _--L._ _ _ _ _ _.L...-_ _ _ _--L._ _ _ _----l


-3 -2 -1 0 2 3
x

Figure 9.12.
Figure 9.12. The partial Fourier series /4o
f40 for Example 9.15.

The following
The following results can be
results can derived immediately
be derived immediately from
from the
the relationship
relationship be
be-
tween
tween the complex Fourier
the complex series and
Fourier series and various
various other
other forms of Fourier
forms of series.
Fourier series.

Corollary 9.16.
Corollary 9.16.

1. Suppose (—£, i)
Suppose f : (-I, -> R is piecewise smooth. Then the full Fourier series of
I) -t of
j,
f,

converges to !per(x)
fper(x} if
if x is a point
point of continuity of
of continuity of ffper,
per, ana
and to

~2 [lim
s---+"-
fper(s) + lim jper(s)]
s---+,,+

if ffper
if per has a jump
jump discontinuity atx.
discontinuity at x.
9.4. Pointwise convergence of Fourier series 433

2.
2. Suppose (0, £)
Suppose ff :: (0, t) -t R is
—> R is piecewise
piecewise smooth, and let
smooth, and let ffodd
0dd be
be the
the periodic,
periodic, odd
odd
extension of
extension of ff to
to R (that
(that is,
is, the
the periodic extension to
periodic extension to R of
of the
the odd
odd extension
extension
°f f to
of t° (-£,£)).
(—£•>£))• Then the Fourier sine series of of f,f,
00

Lb n sin (n;x),
n=l

converges to
converges to ffOdd(X)
0dd(%) if
if % is aa point
x is of continuity
point of continuity of
of ffodd'
0dd, and
and to
to

if fodd
if has aa jump
fodd has discontinuity at
jump discontinuity at x.
x.

3. Suppose
3. (0,£)
Suppose ff :: (0, —> R
£) -t R is
is piecewise
piecewise smooth, and let
smooth, and let ffeven
even be
be the
the periodic, even
periodic, even
extension of
extension of ff to
toU (that is,
R (that is, the
the periodic extension to
periodic extension to R ofof the
the even
even extension
extension
of ff to
of to (-£,
(—£,1)). Then the
£)}. Then the Fourier cosine series
Fourier cosine series of
of f,f,

converges to
converges to leven(x)
feven(x) if
if xx is
is aa point of continuity
point of continuity of
of leven,
feven, and
and to
to

if leven
if feven has
has aa jump discontinuity at
jump discontinuity atx.
x.

See Exercise
Proof. See
Proof. Exercise 6.
6. 0

Example 9.17.
ExalTIple 9.17. Let Let If : (0,1) —> R
(0,1) -t be defined
R be defined by
by ff(x) 1. Then
( x ) = 1. Then the
the periodic,
periodic, odd
odd
extension of
extension of ff,, lodd,
f0dd, is
is defined
defined by
by

f () = {1, if x E (2k, 2k + 1) (k an integer),


odd x -1, if x E (2k -1, 2k) (k an integer)

(the so-called
(the "square wave").
so-called "square wave"). Thus
Thus ffodd
0dd is
is discontinuous
discontinuous at at every
every integer
integer value
value of
of
x; at those
Xi at those points of dicontinuities,
points of dicontinuities, the
the average
average ofof the
the left
left and
and right
right endpoints
endpoints is
is
zero. Figure
zero. Figure 9.13
9.13 shows
shows lodd
f0dd together
together with
with its
its partial
partial sine series having
sine series having 5,
5, 10,
10, 20,
20,
and 40
and 40 terms.
terms. As the above
As the above corollary
corollary guarantees,
guarantees, the
the sine
sine series converges to
series converges to ff at
at
every point
every of continuity
point of continuity (every
(every nonintegral
nonintegral point, in this
point, in this case)
case) and
and to
to zero at every
zero at every
point of discontinuity.
point of discontinuity.

We can
We can draw
draw some
some further
further conclusions
conclusions from
from Theorem
Theorem 9.14
9.14 and
and Corollary
Corollary 9.16:
9.16:
434 Chapter 9.
Chapter More about
9. More about Fourier
Fourier series
series

2~------------------~ 2

- -
6 ........ ...A
- -
06 ......... 06

-1 -1
A
V .... ~
A
.... V
A A
V .... - .... V

-2 -2
-2 -1 o 1 2 -2 -1 o
x
2
X

2 2~------------------~

1 1 ....- ..

0 o
-1 -1

-2 -2~----------------~
-2 -1 o 1 2 -2 -1 o 1 2
x x

Figure 9.13. The square-wave


Figure 9.13. square-wave function
function from Example 9.17,
9.17, together with
its Fourier sine series with 5,
5, 10,
10, 20, and 40 terms.
terms.

Corollary 9.18.
Corollary 9.18.
1. If
If f : (-f,
(—£,£)f) —>
~ CC is
is continuous and
and piecewise smooth,
smooth, then ffper is continuous
per is
except {possibly}
everywhere except (possibly) at the points ±f,
±£,±31,—
±3f, . ... It follows that the
Fourier series of of f converges
converges to f(x) for all x €E (-f,
f(x) for (—i,i).
f).
2. If [-f,f] ->•
If f : [—t,£\ ~ C C is
is continuous andand piecewise smooth, and
and f(—t]
f( -f) == f(f),
f(l),
then ffper
per is
is continuous everywhere,
everywhere, and so the Fourier series of
of f converges
converges
to f(x]
f(x) for € [—•£,•£]
for all x E (including the endpoints}.
[-f,f] {including endpoints).
3. If [0,1]f] —>•
If f : [0, ~ R R is
is continuous andand piecewise smooth, then ffodd
0dd {the
(the periodic
periodic
extension of of the odd extension of of ff}) is
is continuous everywhere
everywhere except
except {possi-
(possi-
bly) at the points 0,
bly} 0, ±f, ±21, .—
±£, ±2£, ... It follows that the Fourier sine series of f
converges to f(x) e (O,f).
f(x) for all x E (0,^).

4- If [0,^] —>•
If f :'• [O,f] ~ R and /(O)
and piecewise smooth, and
R is continuous and f(O) == ff(f)
( i ) == 0,
then ffodd
0dd is everywhere. It follows that the Fourier sine series of
is continuous everywhere. of
ff converges
converges to
to f(x]
f(x) for all xx €E [0,£]
for all [0,£] (including
{including the
the endpoints).
endpoints}.
9.4. Pointwise convergence of Fourier series
Pointwise 435
435

5. If [0, t]£] -+
If ff : [0, —>• R and piecewise
R is continuous and piecewise smooth, then ffeven
even (the periodic
periodic
extension of the even extension of of ff)) is continuous everywhere.
everywhere. It follows that
the Fourier cosine of f converges to f(x)
cosine series of for all x EG [0,£]
f(x) for [0,^] (including
the endpoints).

Proof.
Proof. TheThe conclusions
conclusions all
all follow
follow directly from Corollary
directly from Corollary 9.16, except for
9.16, except for the
the
following: If
following: If /f : [0,1] —> R
[0, £] -+ R isis continuous,
continuous, then
then ffeven is continuous,
even is continuous, and
and ffodd
0dd is
is
continuous provided
continuous f(O) =
provided /(O) — f(i]
f(£) = = 0.0. The
The reader is asked
reader is asked to
to verify
verify these
these conclusions
conclusions
in Exercise 7.
in 7. D D

When
When ffper (or ffodd,
per (or or feven)
0dd, or is continuous
feven) is continuous everywhere,
everywhere, we can draw
we can draw aa stronger
stronger
conclusion, as
conclusion, as we show in
we show in the
the next section. The
next section. The reader should note
reader should that, from
note that, from the
the
point
point of of view
view ofof approximating
approximating aa givengiven function,
function, the
the cosine series is
cosine series is more powerful
more powerful
than the
than the sine
sine series,
series, since
since ffeven
even isis continuous
continuous everywhere for any
everywhere for any continuous
continuous /f :
-» R.
[Q,£]£] -+
[0, R. Therefore,
Therefore, for for example,
example, Gibbs's
Gibbs's phenomena
phenomena cannot occur with
cannot occur the
with the
cosine series
cosine series approximating
approximating such such aa function.
function.

Exercises
1. Let
1. Let /f:: [-7r,7r] ->• R
[-1f,1f]-+ R be
be defined
defined by f(x) == x33 .. Does
by f(x) Does the
the full Fourier series
full Fourier series of
of
f/ converge
converge (pointwise)
(pointwise) on R? If
on R? If so,
so, what
what is
is the limit of
the limit of the series?
the series?
3
2.
2. Define
Define f/ : [-2,2]-+
[-2,2] ->• R
R by
by f(x]
f(x) = x3 +
= x + 1.
1. Write
Write down
down the
the limits
limits of
of
(a)
(a) the
the Fourier
Fourier sine series of
sine series of f/ (regarded
(regarded as
as aa function
function defined
defined on [0,2]),
on [0,2]),
(b) the
(b) Fourier cosine
the Fourier cosine series
series of
of f/ (regarded
(regarded as
as aa function defined on
function defined on [0,2]),
[0,2]),
and
((c)
c) the
the full Fourier series
full Fourier series of
of f./.
3. Find
3. an example
Find an example ofof aa function
function f/ : [0,
[0,1] —>• R
1] -+ such that
R such that it
it is
is not the
the case that
case that
the Fourier
the Fourier cosine
cosine series
series of
of 1
/ converges
converges to to 1/ at
at every
every xx E [0,1].
€ [0, 1].
4.
4. Using the original
Using the original formula
formula for
for KKN,
N ,

N
K
N
(()) = ~
2£ "'"
~
ei1fnO/l
,
n=-N

prove that (9.18) holds.


5. Prove
5. Prove Theorem 9.8. For
Theorem 9.8. simplicity, assume
For simplicity, assume all
all of
of the functions are
the functions continuous.
are continuous.
6. Prove
6. Corollary 9.16.
Prove Corollary 9.16.
7. Suppose
7. Suppose /f : [0,
[0,1] —>• R
£] -+ is continuous.
R is continuous. Prove
Prove that
that feven is
is continuous
continuous every-
every-
where, and that
where, and that ifif 1(0)
/(O) == f(£) 0, then
— 0,
f(£) = then lodd is continuous
f0dd is continuous everywhere.
8. (a)
8. (a) Extend
Extend Corollaries
Corollaries 9.16
9.16 and
and 9.18
9.18 to the
the case
case of
of the
the quarter-wave
quarter-wave cosine
series. (Hint:
series. (Hint: see
see Exercise 9.3.6.)
9.3.6.)
436
436 Chapter 9. More about Fourier series

(b) Define /f :: [0,1] -+


-> R by
by f(x]
f(x) = = 11 + x. To what function does the
x. To
quarter-wave cosine series of f/ converge?
Extend Corollaries
9. (a) Extend Corollaries 9.16 and 9.18 to the case of the quarter-wave sine
(Hint: see Exercise 9.3.5.)
series. (Hint:
(b) Define
(b) Define /f :: [0,1]
[0,1] -+
—> R by by f(x]
f(x) = + x.
= 11 + To what
x. To what function
function does
does the
the
quarter-wave sine
quarter-wave sine series
series of
of f/ converge?

9.5
9.5 Uniform convergence
Uniform convergence of
of Fourier
Fourier series
series
In the previous section, we we proved the the pointwise convergence of the Fourier series
of aa piecewise smooth
of smooth function.
function. We We will now consider
consider conditions
conditions under
under which
which the
the
convergence is
convergence is actually
actually uniform.
uniform. The The property
property of of uniform convergence is
uniform convergence is very
very de-
de-
sirable, since
sirable, since it
it implies
implies that
that aa finite
finite number
number of of terms
terms from the Fourier series
series can
approximate the function accurately
approximate accurately on the entire interval; in particular,
particular, uniform
convergence rules out the possibility
possibility of Gibbs's phenomenon, which was introduced
in Section
in Section 5.2.2
5.2.2 and
and will
will be discussed further
be discussed further below.
below.
The rapidity with
The rapidity which aa Fourier
with which series converges,
Fourier series converges, and,
and, in
in particular, whether
particular, whether
it converges
it converges uniformly
uniformly oror not, is intimately
not, is intimately related
related toto the
the rate at which
rate at which its
its coefficients
coefficients
converge to zero. We We address this question first.first.

9.5.1 Rate of decay of Fourier coefficients


coefficients
In the following
In following theorems,
theorems, we will show
we will show that
that the Fourier
Fourier coefficients n =
coefficients Ccnn,, n =
0,±1,±2,...,
0, o f f/ satisfy
±1, ±2, ... , of satisfy
(9.21)

where the exponent determined by the degree of smoothness of f.


exponent kk is determined /. Recall that
(9.21) means that there is constant M
is a constant M > 0 such that
M
Icnl :::; Inlk for all n.
The same condition
The same condition that guarantees pointwise
that guarantees pointwise convergence
convergence of
of Fourier
Fourier series
series
also ensures that that the Fourier coefficients
coefficients decay-converge
decay—converge to zero-at
zero—at least
least as
fast as
fast as l/n,
1/n, n 1,2,3, ....
n == 1,2,3, —

Theorem 9.19.
Theorem 9.19. Suppose that f : (-£,
Suppose that (—£,1) -> C
£) -+ C isis piecewise smooth, and
piecewise smooth, and let
let c n,
en,
nn = 0, ±1,
= 0, ±2,...,
±1, ±2, be the
... , be the complex
complex Fourier coefficients of
Fourier coefficients of f.
f . Then
Then

Proof. Since f/ is piecewise


Proof. piecewise smooth, there are a finite
finite number of discontinuities of
of
f/ and/or
and/or dfldx.
df/dx. We label these
We label these points
points as
as
-£ < Xl < X2 < ... < Xm-l < £
convergence of Fourier series
9.5. Uniform convergence 437

and write
and write XQ — -e,
Xo = —t, x = e.
m =
xm t. We
We then
then have
have

Cn = ;e [ff !(x)e-i7rnx/f dx

= ~
21!
f= i
j=l
X
; f(x)e- i7rnx /£ dx.
X;-1
It then
It suffices to
then suffices to show
show that, for each
that, for each jj = 1,2,...,
= 1,2, ... , m,
m,
x
; f(x)e-i7rnx/£ dx = 0 (~) .
X;-1 i Inl
Since f/ is
Since is continuously
continuously differentiable
differentiable onon (x
( x jj --1 and the
i , X, Xj )j ,), and the limits
limits of
of both
both f/ and
and
df/dx
df exist at
/ dx exist at the endpoints of
the endpoints of this interval, we
this interval, we can can apply apply integration
integration by
by parts to
parts to
obtain
obtain

i
x;
X;_1
[
f(x)e- i7rnx /£ dx = f(x) e .
-i7rnx/£] x;
-z7fn/e X;_1 7fn X;-1 dx
__z_
i 'e X; df
_(x)e- i7rnx /£ dx

= !!...
n7f
(!(x, - )e- i7rnx ;/f - f(x '-1 + )e- i7rnX ;_l/f)
i
J J
X
- ie
- ; -df (x )e -i7rnx/f dx.
7fn X;_1 dx

Since each
Since of these
each of these three
three terms
terms is
is bounded
bounded by
by aa constant times l/lnl,
constant times l/|n|, the
the result
result
follows. We
follows. We have
have used
used the fact that
the fact that!/ and
and df/dx,
df /dx, being
being piecewise
piecewise continuous,
continuous, are
are
both bounded on
both bounded on (-e,
(—1,1).
e). 0

When
When f/ has
has some additional smoothness,
some additional smoothness, its
its Fourier
Fourier coefficients can be
coefficients can be shown
shown
to decay more rapidly.

Theorem
Theorem 9.20. 9.20. Suppose
Suppose f : (-e, —>• C
(—(.,£)e) -+ C has the property
property that its
its periodic
periodic exten-
sion
sion ffper
per and
and the
the first
first k
k —
- 2
2 derivatives
derivatives of
of f
fper
per are
are continuous,
continuous, where
where kk >2,
~ 2, and
and
the (k -— l)st
l)st derivative
derivative of f is piecewise smooth.
smooth. IfIf c = 0, ±1,
n, n =
Cn, ±1, ±2,...,
±2, ... , are the
complex Fourier coefficients of f,f, then
Fourier coefficients

In particular, if ffper
particular, if per is continuous
continuous and its derivative
derivative is piecewise smooth,
smooth, then

Proof. Suppose ffper


Proof. Suppose is continuous
per is continuous and
and df
df/dx is piecewise
/ dx is piecewise smooth.
smooth. Then,
Then, by
by inte-
inte-
gration
gration by
by parts, we have
parts, we have

t f(x)e-i7rnx/f dx = [-i7rnX/t]f z'e 1£ dlf


I _£
f(x) e .
-Z7fn/e -t
__ _(x)e-
7fn -f dx
i7rnx /£ dx
438 Chapter 9. More about Fourier series

per is continuous, fj((—(.+)


Since fjper -£+) = /(^—), eiTfnn = ee-I7rn
j(£-), and e™ iTfn since eel9
iIJ
is 27r-periodic.
Therefore, we obtain

C
n = __z_
. Ie dj
_(x)e-iTfnx/l dx
27m -l dx

--~d n,
-
7rn
where d n = 0,
d n,, n 0, ±1, ±2,...,
±I, ±2, ... , are the Fourier coefficients df/dx.
coefficients of dj 9.19,
/dx. By Theorem 9.19,
we have s * \

and so
and so

desired.
as desired.
The proof
proof of the general
general case is similar; one shows that the Fourier
Fourier coefficients
coefficients
of d kk~ 11
- f/dx
k k1 1
j /dX order I/Inl,
~ - are of order l/|n|, the Fourier coefficients of d kk~- 22f/dx
Fourier coefficients k k2 2
j /dX~ - are ofof
order l/|n| , and
order 1/lnI2, so forth
and so forth to
to obtain the desired
obtain the desired result.
result. 0

Example 9.21.
Example 9.21.

1. Define (—1,1) -t
Define f : (-1,1) —> R
R by fj(x)
(x) == x. Then fjper per has jump discontinuities
discontinuities
(at x = (2k
(at (2k -- 1), 0, ±I,
1), kk = 0, ±1,±2,...),
±2, .. .), and, by Theorem
and, by Theorem 9.20, the Fourier
9.20, the Fourier
coefficients of
coefficients of f must bebe of l/|ri|. In
of order I/Inl. In fact, the Fourier coefficients
coefficients are

i(-I)n
Cn = - - - , n = ±1,±2, ... ,
7rn
CQ =
with Co
with = 0.
0.

2. Define (—1,1) -t
Define f : (-1,1) —>• R
R by ff(x)
(x) = = x x 22.. Then ffper
per is continuous, but its
derivative has jump
derivative has jump discontinuities (at xx =
discontinuities (at = (2k
(2k -— 1), kk == 0, ±1, ±2, .. .J. By
±2,...). By
Theorem 9.20,
Theorem 9.20, the
the Fourier coefficients of
Fourier coefficients of ff must
must be
be ofof order l/|n|2. In
order 1/lnI2. fact,
In fact,
the Fourier
the coefficients are
Fourier coefficients are

2(-I)n
Cn = 2 2 ' n = ±I, ±2, ... ,
7rn
with Co
with — 1/3.
CQ = 1/3.

3. Define
3. Define ff :: (-1,1)
(—1,1) -t—>• R by
by ff(x) = xx 55—2x
(x) = -2x 33+x.
+x. Then
Then ffper and its
per and its derivative
derivative are
are
continuous,
continuous, butbut its
its second derivative has
second derivative has jump discontinuities (at
jump discontinuities = (2k
(atxx = (2k -1),
—I),
Fourier series
9.5. Uniform convergence of Fourier series 439

kk = ±1, ±2,
— 0, ±1, ±2,...). By Theorem
.. .). By Theorem 9.20,
9.20, the
the Fourier
Fourier coefficients
coefficients of
of ff must
must be
be of
of
order l/|n| 3 . In
order 1/lnI3. In fact, the Fourier
fact, the Fourier coefficients
coefficients are
are

-8i(n 2 7f2 - 15)( _1)n


Cn = 7fn
55 ' n=±1,±2,... ,

with Co
with 0.
CQ =— 0.
4- Define
4. (—1,1)
Define ff :: (-1, —>• R by
1) ~ by f(x]
f(x) = x4 -— 2X2
= X4 2x2 +
+ 1.
1. Then
Then ffper
per and its
and its first
first two
two
derivatives are
derivatives are continuous,
continuous, but
but its
its third
third derivative
derivative has
has jump discontinuities {at
jump discontinuities (at
xx —
= (2k
(2k —
- 1), = 0,±1,±2,...J.
1}, kk = 0, ±1, ±2, .. .). ByBy Theorem
Theorem 9.20, thethe Fourier coefficients
Fourier coefficients
of ff must
of must be
be of
of order l/\n 4 . In
order 1/lnI4. In fact,
fact, the
the Fourier
Fourier coefficients
coefficients are
are

-24( -1)n
Cn = 7fn
4 4 ' n=±1,±2,... ,

CQ == 8/15.
with Co
with 8/15.
In
In Figure 9.14 we
Figure 9.14 we graph
graph the
the error
error in
in approximating
approximating each
each of
of the
the above
above four functions
four functions
by aa truncated
by truncated Fourier
Fourier series
series with 41 terms
with 41 terms (the
(the constant
constant term
term and
and the
the 20
20 lowest
lowest
frequencies). The results
frequencies). The results are
are as
as expected;
expected; as
as fIper
per gets
gets smoother,
smoother, the
the convergence
convergence of
of
the Fourier
the Fourier series to 1
series to f becomes
becomes more
more rapid.
rapid.

9.5.2
9.5.2 Uniform convergence
Uniform convergence
It now
It now follows
follows immediately
immediately that, if fIper
that, if is sufficiently
per is sufficiently smooth,
smooth, then its Fourier
then its Fourier series
series
converges uniformly
converges uniformly to
to f./.

Theorem 9.22.
Theorem 9.22. Suppose ff :: (-l,l)
Suppose (—1,1) ~—> CC is
is continuous,
continuous, dfldx
df/dx is
is piecewise
piecewise
smooth, and
smooth, and f(—i) = 1f ((l).
f (-l) = l } . Then
Then the
the partial sums of
partial sums of the
the complex
complex Fourier
Fourier series
series of
01
ff converge
converge uniformly
uniformly toto f1 onon (—i,t)
(-l,l) (and
(and therefore
therefore to
to fIper
per on
on RJ.
R).

Proof. The boundary


Proof. The boundary conditions
conditions imply
imply that
that fIper is continuous,
per is continuous, so
so by Theorem
by Theorem
9.14, we
9.14, know that
we know that the Fourier series
the Fourier series of
of 1
/ converges
converges pointwise
point wise to
to !per on R.
fper on R. We
We
must therefore
must therefore show
show that
that the convergence is
the convergence is uniform.
uniform. Since
Since
00

fper(x) = L cnei1fnx/£,
n=-oo

we have
we have
N -N-l 00

Iper(x) - L cnei1fnx/l = L cnei1fnx/£ + L cnei1fnx/£.


n=-N n=-oo n=N+l

Therefore, by
Therefore, by Theorem
Theorem 9.20,
9.20, there
there is
is aa constant
constant M such
such that
that
N -N-l 00

Iper(x) - L cnei1fnx/£ L cnei1fnx/£ + L cnei1fnx/£


n=-N n=-oo n=N+l
440 Chapter 9. More about Fourier series

0.01 r--------------a

0.5

-0.01
-0.5

-1L------------~ -0.02 .......- - - - - - - - - - - - "


-1 -0.5 o 0.5 -1 -0.5 o 0.5 1
X X
10-4
5~X--------------------__,

-5L-------------~ _2L------------~
-1 -0.5 o 0.5 -1 -0.5 o 0.5 1
X X

Figure
Figure 9.14.9.14. The The errors
errors inin approximating
approximating each each function
function from Example
from Example
9.21 by
9.21 by its
its partial Fourier series
partial Fourier series with
with 41 terms:
terms: ff(x)
( x ) = xx (upper
(upper left), ( x ) = xx22
left), ff(x)
(upper right),
(upper ( x ) = xx 55 -— 2x
right), ff(x) 2x33 +
+ xx (lower
(lower left), f(x) = x
left), f(x] 2ar2 +
x44 -- 2X2 + 11 (lower
(lower right).
right).

-N-l 00

: :; 2: ICnei1rnx/il + 2: ICnei1rnx/ll
n=-oo n=N+l
00 1
:::; 2M 2: n2
n=N+l

(using the fact that Ieei7rnx/l


i1rnx / i I =
= 1). This
This holds
holds for all
all xx €E R,
R, and so
so

N 00 1
fper(x) - 2: cnei7rnx/i :::; 2M 2: 2" for all x E R.
n
n=-N n=N+l

series
Since the infinite series
00 1
Ln
n=l
2
9.5.
9.5. Uniform convergence
Uniform convergence of Fourier series
of Fourier series 441
441

is convergent,
is convergent, the
the tail of the
tail of series tends
the series tends to zero, which
to zero, which shows
shows that
that
N
fper(x) - L cnei'lmxll
n=-N

tends to zero
tends to at aa rate
zero at rate that is independent
that is independent of
of xx E
6 R. This proves
R. This proves the desired result.
the desired result.
D

As
As with
with pointwise
pointwise convergence,
convergence, the
the uniform
uniform convergence of other
convergence of other types
types ofof
Fourier series can
Fourier series can be
be deduced from their
deduced from their relationship
relationship to
to the complex Fourier
the complex Fourier series.
series.

Corollary 9.23.
Corollary 9.23.
1. Suppose
1. Suppose ff :: (-I!., —>• R
(—t,i]I!.) -+ is continuous
R is continuous and and piecewise
piecewise smooth, df/dx
smooth, elf is piece-
/ dx is piece-
wise
wise smooth,
smooth, and
and f(—£) = /(£)•
f( -I!.) = Then the
f(I!.). Then the full
full Fourier
Fourier series of ff converges
series of converges
uniformly to ff on
uniformly to (—1,1) (and
on (-I!.,I!.) (and therefore
therefore to
to ffper R,).
on R).
per on

2. Suppose
2. (0,^) -+
Suppose ff :: (O,I!.) -> R is
is continuous,
continuous, df/dx
df/dx is
is piecewise
piecewise smooth, and /(O)
smooth, and f(O) = =
f(i]
f(l!.) = 0. Then
= O. Then the the Fourier
Fourier sine
sine series converges uniformly
series converges uniformly to
to ff on (—£,£}
on (-I!., I!.)
(and hence
(and to ffodd,
hence to 0dd, the
the periodic, odd extension
periodic, odd extension of
of f,f, on
on all
all ofR).
ofH).
3. Suppose
3. (0,£)
Suppose ff :: (0, I!.) —>
-+ R is continuous and
is continuous df/dxdx is
and df/ is piecewise
piecewise smooth.
smooth. Then
Then
the Fourier
the Fourier cosine
cosine series converges uniformly
series converges uniformly to to ff on (—i-,K)I!.) (and
on (-I!., (and hence to
hence to
feven,
feven, the
the periodic, even extension
periodic, even of f,f, on
extension of on all
all ofofH).
R).

Proof.
Proof·
1. This
1. This follows immediately from
follows immediately from the equivalence of
the equivalence of the full Fourier
the full series and
Fourier series and
the
the complex Fourier series.
complex Fourier series.
2. This follows
2. This follows from
from the fact that
the fact that the sine series
the sine series of
of f/ is
is the full Fourier
the full series of
Fourier series of
fodd and from
fodd and from the fact that
the fact that the
the continuity
continuity ofof /f and
and the
the boundary conditions
boundary conditions
/(O) = f(t]
f(O) = =a
f(l!.) = 0 guarantee
guarantee that 0dd is
that ffodd is continuous.
continuous.
3.
3. This follows from
This follows from the
the fact
fact that
that the
the cosine series of
cosine series of f/ is
is the
the full
full Fourier series
Fourier series
of feven and
of feven from the
and from the fact
fact that
that the
the continuity
continuity ofof /f guarantees
guarantees that feven is
that Seven is
continuous.
continuous.
D

The special property


The special property ofof the cosine series
the cosine series is important; no
is important; no boundary conditions
boundary conditions
must
must be satisfied in
be satisfied order for
in order for the convergence to
the convergence to be
be uniform. Indeed, the
uniform. Indeed, relevant
the relevant
boundary
boundary conditions
conditions forfor aa cosine
cosine series
series are
are Neumann conditions, which
Neumann conditions, which involve
involve
df/dx.
df The Fourier
/dx. The cosine coefficients
Fourier cosine of /f are
coefficients of (l/|n| 3 ) or
are 0O (1/lnI3) (l/|n| 2 ) according
or 0O (1/lnI2) according
to
to whether
whether f/ satisfies or does
satisfies or does not
not satisfy
satisfy homogeneous
homogeneous Neumann
Neumann conditions
conditions (see
(see
Exercise
Exercise 4),
4), but
but inin either
either case,
case, the
the Fourier series converges
Fourier series converges uniformly
uniformly toto f./.

Example 9.24. Let


Example 9.24. —> R
Let ff :: [0,1] -+ R be defined by
be defined by f(x) = x
f(x) = x 22.• Since
Since ff does not
does not
satisfy the Dirichlet
satisfy the Dirichlet conditions, the sine
conditions, the sine series
series does
does not
not converge
converge uniformly [0,1].
on [0,
uniformly on 1].
442
442 Chapter 9.
Chapter More-about
9. More Fourier series
'about Fourier series

However,
However, even
even though
though ff does
does not
not satisfy the Neumann
satisfy the conditions either,
Neumann conditions either, the
the cosine
cosine
series does converge
series does uniformly on
converge uniformly on [0,1]. Figure illustrates these
Figure 9.15 illustrates these results.
results.

2
Odd, periodic extension of x Even, periodic extension of;

=
:! fi :
:

0.5
0.8
1\
ii 1\ I
0.6
0
0.4
-0.5
0.2

-1 o~-~~-~--~-~
-4 -2 0 2 4 -4 -2 o 2 4

x2 together with partial sine series x2 together with partial cosine series
1.Sr-----------~
1~--------------------~
0.8

0.6
0.5
0.4
0
0.2

-0.5 0
0 0.5 0 0.5

Figure 9.15.
Figure 9.15. Approximating
Approximating ff(x) — xx 22 by
(x) = by sine
sine and cosine series
and cosine (40 terms
series (40 terms
in each
in each series).
series).

In Example
Example 9.21, we showed several
several functions with progressively smoother
progressively smoother
periodic
periodic extensions. The smoother
smoother the periodic
periodic extension,
extension, the faster
faster the Fourier
Fourier
coefficients decay
coefficients decay to zero, and the better the partial Fourier
Fourier series approximates the
original function. We now give an extreme example
original example of this.

Example 9.25.9.25. Define


Define ff:: (-1,1) -t -»• R by ff(x)
(x) == eecos
cos 27ra;
( (21rJ;).
). Then
Then ffper
per and all
and
of its derivatives
of its derivatives are continuous. By
are continuous. Theorem 9.20,
By Theorem 9.20, the
the Fourier
Fourier coefficients
coefficients of
of ff
converge
converge to
to zero
zero faster than any
faster than any power
power of of l/lnl.
l/\n\. It is not
It is not possible
possible toto compute
compute aa
formula
formula for
for these coefficients (the
these coefficients (the integrals
integrals that must be
that must be computed
computed are intractable),
are intractable),
but
but we can estimate
we can estimate them
them using
using the
the techniques
techniques discussed
discussed inin Section
Section 9.2.
9.2. Figure
Figure 9.16
9.16
shows the error
error in estimating ff with
in estimating with 41 terms
terms inin its
its Fourier
Fourier series.
series. This graph
This graph
should
should bebe compared
compared with
with Figure 9.14-
Figure 9.14.
9.5.
9.S. Fourier series
Uniform convergence of Fourier 443

-2

- 1 - 0 .5 o 0 .5
x

Figure 9.16.
Figure 9.16. The
The errors
errors in
in approximating f(x) = eecos
approximating f(x) cos(27ra;
(27rx)) by
by its
its partial
partial
Fourier series
Fourier series with
with 41
41 terms
terms (see
(see Example 9.25).
Example 9.25).

9.5.3
9.5.3 A note about Gibbs's phenomenon
A standard
A standard theorem
theorem in in real
real analysis
analysis isis the
the following:
following: If If aa sequence
sequence of of continuous
continuous
functions converges
functions converges uniformly,
uniformly, then
then the limit function
the limit function is is also
also continuous.
continuous. Every Every par-
par-
tial Fourier
tial Fourier series
series is
is aa continuous
continuous function,
function, soso if
if ffper
per is
is discontinuous,
discontinuous, it
it is
is impossible
impossible
for its
for its Fourier
Fourier series
series toto converge
converge uniformly.
uniformly. Gibbs's
Gibbs's phenomenon
phenomenon is is the
the nonuniform
nonuniform
convergence of
convergence of the
the Fourier
Fourier series
series near
near aa jump discontinuity of
jump discontinuity of ffper.
per . Near
Near the end
the end ofof
the 19th
the 19th century,
century, Gibbs
Gibbs showed
showed that,
that, near
near aa jump discontinuity, the
jump discontinuity, the partial
partial Fourier
Fourier
70
series overshoot
series overshoot the
the true
true value
value of
of f/ by
by about
about 9%9% of of the
the jump
jump70(cf. (cf. Exercise
Exercise 3).3).

Exercises
1. Consider
1. Consider the following functions
the following functions defined
defined on
on [-1,1]:
[—1,1]:

f(x) = lxi,
g(x) = x - x 3 ,
h(x)=l+x.

Rank f,
Rank /, g, and hh in
g, and in order
order of
of the
the speed
speed of
of convergence
convergence of
of their
their Fourier
Fourier series
series
and illustrate
and illustrate with
with graphs.
eraohs.
70
The
70 The history is
history is briefly
briefly described
described by
by Kammler
Kammler [28],
[28], page
page 45.
45.
444 Chapter
Chapter 9. More about
9. More about Fourier
Fourier series
series

2. Find an example of a function


function /f:: [-1,1]
[—1,1] —>•
-+ R whose Fourier coefficients are
coefficients are

o C:14)
but
but not
not
o C:15).
(Hint: Choose f/ to
(Hint: Choose to be
be a
a fifth-degree polynomial.)
fifth-degree polynomial.)

3. Consider
Consider the
the function
function /f : [-1,1]
[— 1,1] —>•
-+ R defined
defined by
by

f(x) = {O, -1::; x < 0,


1, 0::; x ::; 1.

Verify
Verify numerically
numerically that
that the
the overshoot
overshoot in Gibbs's phenomenon
in Gibbs's phenomenon is
is about 9% of
about 9% of
the
the jump at xx =
jump at = 0.
O.
4. Suppose f/ :: (0,^)
4. Suppose (0, £) ->
-+ R is continuous
R is continuous and df / dx is
and df/dx is piecewise smooth.
piecewise smooth.

(a)
(a) Prove
Prove that
that the
the periodic,
periodic, even
even extension of /f is
extension of is continuous
continuous and therefore
and therefore
that
that the
the Fourier
Fourier cosine
cosine coefficients
coefficients of
of fare (l/|n| 2 ).
/ are 0O (1/lnI2).
(b) Prove
(b) Prove that
that the
the Fourier
Fourier cosine
cosine coefficients
coefficients of
of /f are (l/|n| 3 ) if
are 0 (1/lnI3) if and
and only
only
ifif
! =! (0) (£) = O.

9.6
9.6 Mean-square convergence
Mean-square convergence of Fourier series
of Fourier series
We
We now
now wish
wish to show that,
to show that, for
for aa large
large class of functions
class of functions f/ : (—1,1)
(-£, £) —> C, the
-+ C, the
complex Fourier
complex Fourier series of I,
series of /,

n=-oo

converges
converges to
to f/ in
in the
the mean-square sense. Mean-square
mean-square sense. Mean-square convergence
convergence means
means that
that ifif
we write
we write
N
IN(X) = L cnei1rnx/f,
n=-N

then
then
III - INII£2 -+ 0 as N -+ 00.

In
In contrast
contrast to
to pointwise or uniform
pointwise or uniform convergence,
convergence, it
it turns
turns out
out that
that the
the mildest
mildest as-
as-
sumption about I/ guarantees
sumption about guarantees mean-square
mean-square convergence
convergence of of the
the Fourier series.
Fourier series.
In
In order
order to
to discuss
discuss mean-square
mean-square convergence,
convergence, it
it had
had better
better be
be the that I/
case that
the case
has a finite £22 norm:
finite L
iff
a

IIIII = I/(xW dx < 00.


9.6. Fourier series
Mean-square convergence of Fourier series 445

It turns
It out that
turns out that this essential assumption
this essential assumption is is the
the only
only assumption
assumption required
required to guar-
to guar-
antee
antee the
the convergence
convergence ofof the
the Fourier
Fourier series to f/ in
series to in the
the mean-square sense. To
mean-square sense. To justify
justify
this statement, we
this statement, we must
must begin
begin with some technical
with some technical preliminaries.
preliminaries. The technicalities
The technicalities
are
are sufficiently subtle as
sufficiently subtle as to
to be
be beyond
beyond the
the scope
scope of
of this
this book—the
book~the reader
reader will have
will have
to accept certain assertions on faith.
to accept certain assertions on faith.

9.6.1 The space L2(


The -.e,.e)
L2(-t,£)
We
We wish
wish to identify the
to identify the space
space of
of all functions f/ : (-i,
all functions (—(., i)
i] —)•
-+ CC such
such that the complex
that the complex
Fourier series
Fourier series of
of f/ converges
converges to
to f/ in
in the mean-square sense.
the mean-square sense. Accepting the truth
Accepting the truth of
of
the statement
the statement inin the
the previous
previous paragraph,
paragraph, it it would
would be
be natural
natural to define
to define

L2(_£,£) = {f: (-i,i) -+ C : f~l If(x)j2dx < oo}. (9.22)

There is
There is more
more to
to this
this definition than meets
definition than meets the
the eye,
eye, however.
however.
First of all,
First of all, one
one of
of the essential properties
the essential properties of
of aa norm
norm is
is the
the following:
following:

11/11=0=*1=0. (9.23)

When
When 1 / is
is aa function, / =
function, 1 = 00 means
means that
that 1/ is the zero
is the zero function:
function: fI(x) —0
(x) = for all
0 for all
71
xe (-i, i). As long as we restrict
E (—1,1). restrict ourselves to continuous functions,
functions, (9.23) holds.
holds.71
2
However,
However, aa discontinuous
discontinuous function
function can
can be
be nonzero
nonzero and
and yet
yet have
have I/ norm equal
L2 norm to
equal to
zero. For example,
zero. For consider the
example, consider the function / : (-1,
function 1 (—1,1)
1) ->
-+ R
R defined
defined by
by

I x = 0,
I(x) = { '
0, x I:- O.
This function is
This function is not the zero
not the zero function, but
function, but

since the
since the integrand
integrand is zero everywhere
is zero everywhere except
except aa single
single point.
point. Therefore,
Therefore, in
in order
order
for (9.23)
for (9.23) to
to be
be satisfied,
satisfied, we
we have
have to agree that
to agree / and
that 1 and 9g are regarded as
are regarded as the same
the same
function provided
function provided
ill If(x) - g(x)j2 dx = O.

We
We will
will have
have more
more to say about
to say about this
this below.
below.
There is
There is another difficulty with
another difficulty with (9.22). Since our
(9.22). Since our interest
interest is mean-square
is mean-square
convergence of functions,
convergence functions, the
the following
following property is desirable: If
If UN}
{/N} is a sequence
71
If f/ is
71 If is continuous
continuous and
and not
not the
the zero function, then,
zero function, then, by
by continuity,
continuity, there
there must
must exist an interval
exist an interval

i:
(a, 6)
(a, b) C (—1,1)
C (-t, on which
t) on which /f is
is nonzero,
nonzero, and
and so
so

2
If(x)1 dx ~ lb If(x)1 dx
2

must be
must be positive.
positive.
446 Chapter 9.
Chapter 9. More
More about Fourier series
about Fourier series

of functions in
offunctions in LL22(—l,l)
(-f, f) and IN —>•
and /AT --+ /I in
in the
the mean-square then /I 6
sense, then
mean-square sense, E L2L2((—£,l).
-f, f).
Is
Is this
this property satisfied by
property satisfied by L?(-t, as defined
t) a.s
L2( -f, f) defined by (9.22)? The
by (9.22)? The answer
answer is,
is, it
it depends
depends
on the
on the definition
definition of
of the integral used
the integral used in (9.22). For
in (9.22). example, any
For example, any function with an
function with an
infinite singularity
infinite singularity fails
fails to
to be
be Riemann
Riemann integrable; as an
integrable; a.s an example,
example, consider
consider thethe
function I/ : [-1,
function [— 1,1]1] —>•
--+ R defined
defined by
by
1
I(x) = IxI 1 / 4 '
This function
This function is
is not
not Riemann
Riemann integrable on (-1,1)
integrable on (—1,1) because of the
because of the infinite disconti-
infinite disconti-
nuity
nuityatat x = 0.
O. However, \f(x}\2 has
However, I/(x)12 has aa finite
finite area
area under its graph,
under its as the
graph, a.s following
the following
calculation shows:
calculation shows:

lim {
€---+o+
r-€ I/(xW dx +
1-1 /1 I/(xW dX}
f
= lim 4(1 -
f---+O+
-IE) = 4.

Therefore, we would
Therefore, we would like to include
like to include I/ in L22 (—1,1),
in L (-1, 1), which
which means
means that
that wewe must
must
interpret the integral
interpret the integral a.s
as an
an improper
improper Riemann when I/ has
integral when
Riemann integral has aa finite
finite number
number
of singularities.
of singularities.
However, allowing
However, allowing improper
improper Riemann
Riemann integrals
integrals isis not
not enough, since it
enough, since it is
is pos-
pos-
sible to
sible to construct
construct aa sequence
sequence {/N} with the
{IN} with the following
following properties:
properties:

1. IN has
1. /jv has N infinite discontinuities;
infinite discontinuities;

2. /TV
IN is square-integrable
is square-integrable when
when the integral is
the integral is interpreted as an
interpreted as an improper Rie-
improper Rie-
mann integral;
mann integral;

3. {IN}
3. {/AT} converges
converges in
in the
the mean-square
mean-square sense
sense to
to aa function
function with
with an
an infinite
infinite number
number
of discontinuities.
of discontinuities.
A function with
A function with an
an infinite
infinite number
number of of discontinuities
discontinuities cannot
cannot be Riemann integrable,
be Riemann integrable,
even in
even in the
the improper
improper sense.
sense.
Faced with these
Faced with these difficulties,
difficulties, mathematicians eventually concluded
mathematicians eventually concluded that
that aa bet-
bet-
ter notion
ter notion ofof integration
integration was was needed, which was
needed, which was created
created by by Henri Lebesgue (the
Henri Lebesgue (the "L"
"L"
2
in L ). The definition of the Lebesgue
L2). Lebesgue integral
integral is beyond
beyond the scopescope of this book,
but we can
but we can describe
describe its important features.
its important features. The
The theory
theory begins
begins with
with aa measure
measure forfor
subsets of
subsets of R that
that agrees with our
agrees with intuition for
our intuition for simple
simple sets
sets (for
(for example,
example, the measure
the mea.sure
of an
of an interval
interval [a, b] is b-a).
b] is b — a). The
The Lebesgue
Lebesgue measure
mea.sure is is defined
defined inin aa consistent
consistent fashion
fa.shion
even for
even for very
very complicated subsets of
complicated subsets of R, but not for
but not for all subsets. Sets
all subsets. Sets whose Lebesgue
whose Lebesgue
measure is
mea.sure is defined
defined areare called
called (Lebesgue)
(Lebesgue) measurable.
measurable. Any set with
Any set measure zero
with mea.sure zero is
is
then
then neglible
neglible in
in aa certain
certain sense.
sense. Every set containing
Every set containing aa finite number of
finite number of points
points ha.s
has
zero.72
measure zero.72
mea.sure
The Lebesgue
The Lebesgue integral
integral is defined for
is defined functions that
for functions that are
are measurable; the the prop-
prop-
erty of
erty of measurability
measurability is is aa regularity
regularity property like continuity
property like continuity or or differentiability,
differentiability, but
but
72
Some sets
72Some sets having
having an
an infinite
infinite number
number of of points
points also have measure
also have zero. A
measure zero. countable set
A countable set (a
(a
set that
set that can
can be
be put
put in one-to-one correspondence
in one-to-one correspondence withwith the
the integers 1,2,3,...)
integers 1,2,3, has measure
... ) has measure zero.
zero.
For example,
For example, the
the set
set of
of all rational numbers
all rational numbers has measure zero.
has measure zero. Some
Some uncountable sets also
uncountable sets also have
have
measure zero,
measure zero, although,
although, obviously,
obviously, such
such aa set
set occupies
occupies aa neglible
neglible part of the
part of real line.
the real line.
9.6.
9.6. Mean-square convergence
Mean-square convergence of
of Fourier
Fourier series
series 447

much weaker-functions
much weaker—functions with
with anan infinite
infinite number
number of of discontinuities
discontinuities can
can be
be mea-
mea-
surable, for
surable, example. We
for example. cannot give
We cannot give the precise definitions
the precise definitions of
of these concepts—
these concepts-
measurable set,
measurable set, measurable function, Lebesgue
measurable function, Lebesgue integral-in
integral—in this
this text.
text. The
The defini-
defini-
tions, however,
tions, have the
however, have following consequences:
the following consequences:

1. Two
1. Two measurable
measurable functions
functions f/ and
and 9a satisfy
satisfy

if and
if and only
only if f/ and
and 9g differ
differ only
only on
on aa set
set of
of measure
measure zero.
zero. It is
is in
in this
this sense
sense
that a set
set of measure
measure zero is negligible: functions differing
differing only on aa set
set of
of
measure zero
measure zero are
are regarded
regarded as as being
being the same.
the same.

2. If f/ is
2. is Riemann
Riemann integrable,
integrable, then
then it
it is
is Lebesgue
Lebesgue integrable,
integrable, and
and the
the two
two integrals
integrals
have the
have the same
same value.
value.

This last
This last property assures us
property assures us that
that whenever
whenever wewe are
are dealing
dealing with
with aa continuous
continuous or or
piecewise continuous function,
piecewise continuous function, we we can
can compute
compute its
its integral
integral using
using the
the familiar
familiar tech-
tech-
niques
niques ofof caculus.
caculus. On On the other hand,
the other hand, the
the Lebesgue
Lebesgue integral
integral is
is sufficiently
sufficiently powerful
powerful
to handle pathological
to handle cases that
pathological cases arise inevitably
that arise inevitably when
when mean-square
mean-square convergence
convergence
is studied.
is studied. WeWe will
will discuss
discuss other
other properties of Lebesgue
properties of integration and
Lebesgue integration and LL22 ((—£,(.)
-f, f)
below.
below.
We can now define L L22(—l,l) measurable func-
( -f, f) more precisely as the set of all measurable
tions f/ : (-£,
tions (—t,K)f) --t
—> CC satisfying

with the
with the understanding that that two
two functions
functions that
that differ
differ only
only on
on aa set
set of
of measure
measure zero
represent the same
represent same element
element of
of the
the space.
space.
In order
In order toto understand
understand the L2 theory
the L2 theory of
of Fourier
Fourier series,
series, we need two
we need two more facts
more facts
2
about L L2(—l.,l}, we cannot prove here, as their development would take
( -f, f), facts that we
us
us too far astray.
too far astray. Even
Even stating
stating the
the second
second fact
fact takes
takes aa certain
certain amount
amount ofof work.
work.
The first
The first fact,
fact, Theorem
Theorem 9.26,
9.26, allows
allows us
us to
to prove
prove that
that the
the Fourier
Fourier series
series of
of every L2
every L2
function converges
function converges toto the
the function
function in
in the
the mean-square
mean-square sense.
sense.
2
Theorem 9.26.
Theorem 9.26. Let f e
ELL2( (—l,l), and let
-£, e), and let Ee be
be any
any positive real
real number (no (no matter
matter
how small).
how small). Then
Then there
there is
is an
an infinitely
infinitely differentiable
differentiate function [—•£,•£]
function 9g :: [-£, —>• C such
£] --t
that
that
Ilf - gll£2 < E.
Moreover,
Moreover, 9g can be
can be chosen
chosen to
to satisfy -f) = g(f)
g(—t]
satisfy g( g(i] = O.
0.

This theorem simply says that any L L22(—t, function can be approximated
(,} function
(-£, £) approximated ar-
bitrarily well, in
bitrarily well, in the
the mean-square
mean-square sense,
sense, using
using aa smooth
smooth function
function satisfying
satisfying Dirichlet
Dirichlet
conditions.
conditions.
448
448 Chapter 9. More about Fourier series

9.6.2
9.6.2 convergence of Fourier series
Mean-square convergence
2
Accepting the
Accepting the facts
facts presented
presented above
above about
about L
L2((—£,£), we can
-£, f), we can now prove the
now prove the desired
desired
result.
result.

Theorem 9.27.
Theorem 9.27. // L2(—l,t), then
II /I E€ L2(_£,£), then its
its Fourier
Fourier series converges to
series converges to fI in L2.
in L2.
That is,
That is, let
let

n=-oo
be the
be the complex
complex Fourier
Fourier series of fI,, and
series 01 and define
define
N
IN(X) = L cneiomx/l.
n=-N

Then
Then
III - INII£2 --+ 0 as N --+ 00.

Proof.
Proof. We We must
must show show that for any
that for any e€ > 0, 0, there
there exists
exists aa positive integer N
positive integer 7Vfe such
such
that
that
III - INIIL2 < €
for every
for every NN ::::
>N The proof
N e•.. The proof is
is aa typical
typical e/3 argument—we show
€/3 argument-we show that
that /N is close
IN is close to
to
I/ by using the
by using the triangle
triangle inequality
inequality with
with two
two intermediate
intermediate functions.
functions. To
To be specific,
be specific,
let 9g be
let be aa smooth
smooth function
function satisfying g( -f) =
satisfying g(—I) = g(i] and
g(£) and

III - gll£2 < a'
We
We will show that
will show that /N is close
IN is close to to I/ (for
(for TV sufficiently large)
N sufficiently large) by showing that
by showing that fw
IN is
is
close to
close to QN (where gN
gN (where is the
QN is corresponding partial
the corresponding partial Fourier
Fourier series
series for
for g) and
and QN is
gN is
close to
close we then
g- we
to g; then use
use the
the fact
fact thatthat 9g is
is close
close to
to I/ by
by construction.
construction.
Let n ==: 0
Let ddnn ,, n 0,, ±1,
±l,± 2 , ...
±2, . . . bbee the
the Fourier
Fourier coefficients
coefficients of
of g,
p, and
and define
define
N
gN(X) = L dnei7rnx/l.
n=-N

By Corollary
By Corollary 9.23,
9.23, QN
gN —>•
--+ g9 uniformly on [-£,
uniformly on and therefore
[—1, £], and therefore there
there exists
exists aa positive
positive
integer N
integer such that
Nf f such that

It follows
It follows that
that
9.6. convergence of Fourier series
Mean-square convergence 449

and so
and so
f
IIg - gNII£2 < 3'
Finally, we
Finally, have that
we have /AT -— QN
that iN is the
gN is partial Fourier
the partial Fourier series
series of
of the function if -— g,
the function and
g, and
hence
hence that /AT -— 9N
that iN is the
QN is projection onto
the projection onto the space spanned
the space spanned byby
e -i7rNx/l , e-i7r(N-l)x/l , ... ,
ei7rNx/l
.
It follows
It follows that
that

Thus we
Thus we obtain
obtain

This completes
This completes the
the proof.
proof. 0

Now that
Now that we have obtained
we have obtained this fundamental result,
this fundamental result, we can draw
we can draw somesome further
further
conclusions. First,
conclusions. First, aa question
question of of terminology:
terminology: thethe above
above theorem
theorem shows
shows that
that the
the
complex exponentials ee™ nx 1
i7rnx = 0, ±1,
//£,, n = ±1, ±2,...,
±2, ... , are complete I/ 2 (—£,£).
complete in L2( -C, C).

Definition 9.28.
Definition 9.28. Let be an
Let V be an (infinite-dimensional)
(infinite-dimensional) inner
inner product space. We
product space. We say
say
that an
that an orthogonal
orthogonal sequence
sequence {t/>j
{<f>j}^i
}i=l is complete if
is complete every vv £E V
if every V satisfies
satisfies

where the
where the convergence
convergence is
is in
in the
the sense of the
sense of the norm on V.
norm on V.

The completeness
The completeness of of an
an orthogonal
orthogonal sequence
sequence inin an
an infinite-dimensional
infinite-dimensional inner
inner
product space
product space isis thus analogous to
thus analogous to the
the property
property ofof spanning
spanning for
for aa finite
finite collection
collection of
of
vectors in
vectors in aa finite-dimensional vector space.
finite-dimensional vector space. Moreover,
Moreover, orthogonality
orthogonality implies
implies linear
linear
independence, so
independence, so aa complete
complete orthogonal
orthogonal sequence
sequence for
for an
an infinite-dimensional vector
infinite-dimensional vector
space is analogous to a basis for a finite-dimensional vector space.
space is analogous to a basis for a finite-dimensional vector space.
A result
A result that
that isis sometimes
sometimes useful is the
useful is the following.
following.

Theorem 9.29.
Theorem 9.29. Let
Let {t/>j
{(f)j : jj = 1,2,...}
— 1,2, be aa complete
... } be complete orthogonal
orthogonal sequence
sequence in
in an
an
inner product
inner product space V. Then
space V. Then
v E V, (v,t/>j)v = 0 for all j = 1,2,3, ... ~ v = O. (9.24)

Proof. By the
Proof. By the completeness
completeness of {</>j : j = 1,2,
of {t/>j 1,2,...}, we have,
... }, we for any
have, for any vv E
e V,
V,

v = f: (v,t/>j)v t/>j.
j=l (t/>j, t/>j)v

It follows
It follows immediately
immediately that
that if
if (v,t/>j)v
(v, 0j)y == 00 for
for all
all jj = 1,2,3,...,
= 1,2,3, ... , then
then vv =
= 0.
O. 0
450
450 Chapter 9. More about Fourier series

This result
This result justifies
justifies aa fact
fact that
that we
we have
have used
used constantly
constantly in
in developing
developing Fourier series
Fourier series
methods
methods for
for BVPs:
BVPs: Two Two functions
functions are
are equal if and
equal if and only
only if
if they
they have
have the same
the same
Fourier coefficients.
Fourier coefficients.

Corollary
Corollary 9.30.
9.30. Let
Let {¢j 1,2,...}
{fij :: j = 1,2, be aa complete
... } be complete orthogonal
orthogonal sequence in an
sequence in an
inner
inner product
product space V. Then,
space V. Then, for any u,
for any u, v
v Ee V,
V,
u = v {:} (u, ¢j)v = (v,¢j)v for all j = 1,2,3, ....

Proof. Obviously,
Proof. Obviously, ifif u
u == v,
v, then
then (u, 0j)y =
(u, ¢j)v = (v, 0j)v for
(v, ¢j)v for all j. On
all j. the other
On the hand,
other hand,
if
if (u, (f)j)v == ((v,
(u, ¢j)v v
> 0j)v
¢j)v for
for all j, then
all j, then ww == uu —
- vv satisfies
satisfies

(w,¢j)v = ° for all j = 1,2,3, ....

By the
By the preceding
preceding theorem,
theorem, this implies that
this implies that w
w = 0, that
= 0, that is,
is, that
that u
u = v.
= v. 0

Finally,
Finally, because
because all other Fourier
all other series (sine,
Fourier series (sine, cosine,
cosine, full,
full, quarter-wave
quarter-wave sine,sine,
quarter-wave cosine)
quarter-wave cosine) are
are special
special cases of the
cases of the complex
complex Fourier
Fourier series, all of
series, all of the above
the above
results
results extend
extend to
to these other Fourier
these other series as
Fourier series as well.
well. For example, we
For example, we define
define LL22 (0,^)
(0, £)
to be
to be the
the space
space of
of all
all measurable functions f/ : (0,
measurable functions (0,^) -> R
£) -+ R such
such that
that

Then,
Then, if
if /f e
E£L22(0,
(0, £),
i), the
the Fourier sine series
Fourier sine series of
of /f converges
converges to
to /f in
in the mean-square
the mean-square
sense (see
sense (see Exercise 6).
Exercise 6).
We
We have
have now
now completed
completed the
the basic
basic theory
theory used
used in the earlier
in the earlier chapters of this
chapters of this
book.
book. In
In the
the next
next section,
section, we discuss one
we discuss one further
further point for the
point for sake of
the sake tying up
of tying up aa
loose end.
loose end.

9.6.3
9.6.3 Cauchy
Cauchy sequences and completeness
We
We assume
assume that {^j}^!
that {¢j }~l isis an
an orthogonal
orthogonal sequence
sequence in in an
an inner
inner product space V
product space
and also,
and also, without
without loss of generality,
loss of generality, that
that each
each ¢j
(f>j has
has norm
norm one (so the
one (so the sequence
sequence is
is
orthonormal). If
orthonormal). If v
v 6
E V and
and

,/,) (v,¢j)v
aj= (v,'/'j v= (¢j,¢j)v' j=1,2,3, ... ,

then, by
then, by Bessel's inequality,
Bessel's inequality,
DO

Llajl2 < 00.


j=l

We
We now
now consider the converse:
consider the If al,
converse: If 01,02,03,...
a2, a3, . .. is
is any sequence of
any sequence of complex
complex
numbers
numbers satisfying
satisfying
DO
9.6. Mean-square convergence of Fourier series
of Fourier 451

does the series


does series 00

Laj</>j (9.25)
j=1

converge
converge to
to aa vector
vector in VI To
in V? consider this
To consider question, we
this question, write
we write
n
Un = Laj</>j,
j=1

and
and note
note that,
that, if m > n, then
if m then
n m m
Un - Um = L:aj</>j - Laj¢j = L aj</>j.
j=1 j=1 j=n+l

It follows that
that
2
m

IIUn - umll~ = L aj</>j


j=n+1
v

00

::; L lajl2
j=n+1

(using the orthogonality


orthogonality of {¢1,
{0i, ¢2,
02,0s, • • • }})).• Since we are assuming that (9.25)
¢3, ...
holds, we
we conclude that
00

L lajl2 -+ 0 as n -+ 00.
j=n+1

follows that
It follows that
Ilun - umllv -+ 0 as m,n -+ 00.
This is
is the mark
mark of
of a sequence
sequence that "ought"
"ought" to converge.

Definition 9.31. Let


Definition 9.31. V be
Let V be aa normed
normed vector
vector space,
space, and
and suppose {un} is
suppose {un} is aa sequence
sequence
in We say
in V. We say that {un} is
that {un} Cauchy if,
is Cauchy if, for any ef >
for any > 0, there
there exists
exists aa positive
positive integer
integer
N such
such that
that
m,n 2: N => Ilun - umllv < f,
or,
or, in brief,
in brief,
Ilun - umllv -+ 0 as m,n -+ 00.

The terms of a Cauchy sequence "bunch up,"


up," as do the terms of a convergent
sequence. Indeed, it is easy to show that every convergent sequence is a Cauchy
452
452 Chapter 9. More about Fourier
Fourier series

sequence. On
sequence. On the other hand,
the other the converse
hand, the converse (does
(does every
every Cauchy
Cauchy sequence
sequence converge?)
converge?)
depends on the
depends on space as
the space as well as on
well as on the
the norm of the
norm of space.
the space.

Example 9.32.
Example 9.32. Define
Define aa sequence
sequence of of rational numbers {xn}
rational numbers {xn} byby the
the rule that Xn
rule that xn
the number
is the number obtained
obtained byby truncating
truncating thethe decimal
decimal expansion
expansion of of 11"
IT after
after nn digits
digits {so
(so
Xl =
xi = 3,3, X2
X2 = 3.1, X3 = 3.14,
3.1, #3 3.14, and
and so on). Then
so on}. Then {xn}
{xn} is is certainly
certainly Cauchy
Cauchy {ifm
(ifm > n, n,
then \x
then /x m —x W~n+1). However,
-xnn\/ < lO-n+1}. However, thethe question
question of
of whether {xn}
{xn} converges
converges depends
depends
on the space
on the space under
under consideration.
consideration. If the space
If the Q, the
space is Q, the set
set of
of rational numbers, then
rational numbers, then
{xn} fails
{xn} fails to converge. On
to converge. On the
the other
other hand,
hand, ifif the space is R,
the space R, then {xn} converges,
then {xn} converges,
and the
and the limit
limit is the
the irrational
irrational number
number 11".TT.

This last
last example
example may seem
seem rather trivial; it
it just points out
out the fact that
that
the real number
the real system contains
number system contains numbers that are
numbers that are not
not rational, and that
rational, and without
that without
the irrational numbers there are "holes" in the system. The next example is more
relevant
relevant to our study.

Example 9.33.
Example 9.33. Define [0,1]
Define ff :: [0, -»• R
1] -+ R by
by

f(x) = {I, E[~,~) ,


X
0, XE[2,1].
Let /AT
Let fN :: [0,1] -+—>• R
R be
be the
the function defined by
function defined by the
the partial Fourier sine series series of
of
f with
with N
hence
N terms.
terms. Then
Then \\f
Cauchy. However,
hence Cauchy.
IIf —
However, if
- /N\\L*
if the
fNIIL2 ~*
the space
-+ 0 as
space under
° -+ °°j
as nn —> so
00, so {fn}
consideration is
under consideration
{In} isis convergent
is (7[0,1],
convergentand
e[O,I], the
the space
and
of all
space of all
continuous functions
continuous functions defined
defined onon the
the interval
interval [0,1], and the norm
and the norm is the the LL22 norm,
norm,
then {/AT} is
then {IN} is still Cauchy
Cauchy and
and yet is is not
not convergent (since f ¢
convergent (since 0 C[O,
C[0,1]).
1]).

We see that the second example is analogous


analogous to the first.
first. The space e[o,
(7[0,1],
1],
2
which is a subspace of L (0,1),
L2(0, 1), has some "holes" in it, at least
least when the norm is
L22 norm.
taken to be the L
We have a name for a space in which every Cauchy sequence converges.

Definition 9.34. Let


Definition 9.34. be aa normed
Let V be normed vector
vector space.
space. If every Cauchy
If every Cauchy sequence
sequence in
in V
converges to an
converges to an element
element of
of V, then
then we say that
we say that V is complete.

We now have two different (and unrelated) uses for the word "complete." An
different (and
orthogonal product space can be complete, and a normed
orthogonal sequence in an inner product
vector space can be complete.
examples show that Q is not complete, and neither is e[O,
The above examples C[0,1]
1] under
73
the L L22 norm.
norm.73 On the other
other hand, R is R n ). Also, the space
is complete (as is Rn).
2
L (0,1) is complete, the proof of which result is beyond the scope of this book.
L2(0,1)
73
73A standard result
A standard result from
from analysis
analysis is
is that C[0,1] is complete
that e[O,I] complete under
under aa different
different norm,
norm, namely, the
namely, the
norm of uniform
norm of uniform convergence:
convergence:
11/1100 = max {If(x)1 : x E [0, In.
This
This result
result follows from the
follows from the fact
fact that if aa sequence
that if sequence of continuous functions
of continuous functions converges uniformly to
converges uniformly to
aa function,
function, the
the limit
limit function
function must
must also
also bebe continuous.
continuous.
9.6. Mean-square convergence
9.6. Mean-square convergence of
of Fourier
Fourier series
series 453

2
Theorem 9.35.
Theorem 9.35. Both
Both real
real and complex L
and complex (a,b)
L2(a, are complete
b) are spaces.
complete spaces.

We can now
We can answer the
now answer the question
question we
we posed at the
posed at the beginning of this
beginning of section: If
this section: If
{{0j} is an
<pj} is an orthonormal sequence in
orthonormal sequence in aa complex
complex inner
inner product space V and
product space {a,j} is
and {aj} is aa
sequence
sequence of of complex
complex numbers
numbers satisfying
satisfying
00

Llajl2 < 00,


j=1

does
does
00

L aj<pj
j=1

converge
converge to an element
to an element of
of V? The answer
VI The answer is
is that if V is
that if complete, the
is complete, the convergence
convergence
is guaranteed.
is guaranteed.

Theorem 9.36.
Theorem 9.36. Let Let V V bebe aa complete (complex) inner
complete (complex) inner product
product space,
space, and
and let
let
<^i>02,03,
<PI, <P2, <P3, .• ..
• • be
be an
an orthonormal
orthonormal sequence V. IfIf 01,02,03,...
in V.
sequence in is aa sequence
aI, a2, a3, ... is of
sequence of
complex numbers
complex numbers satisfying
satisfying
00

then
then

converges to
converges to an
an element ofV.
element of V.

Proof. Since V is
Proof. Since complete, it
is complete, it suffices
suffices to
to show
show that
that the sequence {v
the sequence {vn}
n} of
of partial
partial
sums,
sums,
n
Vn = L aj<pj, n = 1,2,3, ... ,
j=1

is Cauchy.
is Cauchy. If
If m
m > n, then
n, then
m

Vm - Vn = L aj<pj,
j=n+l

and, since
and, since the
the sequence
sequence {4>j} is orthonormal,
{<pj} is we have
orthonormal, we have
m 00

j=n+l j=n+l

Since the series


00
454 Chapter 9. More about Fourier series

is convergent,
is convergent, its
its tail
tail must converge to
must converge to zero,
zero, which shows that
which shows that

Ilvm - vnllv -t °as n,m -t 00.

This completes
This completes the
the proof.
proof. 0

The conclusion
The conclusion of
of all
all this
this is
is that
that if
if aa (complex)
(complex) inner
inner product
product space
space contains
contains
aa complete
complete orthonormal
orthonormal sequence
sequence {cPj},
{0j}, then
then there
there is
is aa one-to-one
one-to-one correspondence
correspondence
between V and
between and the
the space
space

The vector v E 6 V corresponds to {(v, cPj)v} ^ 2 - In certain regards, then, V and


G f2.
(f>j)v} E
2
I are really the
f2 the same space, with the elements given different
different names. We say that
and £2
V and I2 are
are isomorphic.
isomorphic.
In particular, L2(—l,l)
particular, L2( I2 are isomorphic, and L2(0,
-£, £) and £2 I/ 2 (0,^)
£) is isomorphic to
real £2.

Exercises
1. Consider
1. Consider the
the sine
sine series
series
1
2: ;;: sin (mfx).
00

n=l

2
(a) Explain
(a) Explain why
why this
this series
series converges
converges to
to aa function
function f/ E
6L (0,1).
L2(0, 1).
the partial sine series with N
(b) Graph the TV terms, for various values of N,
TV, and
and
guess the
guess the function
function f.
/. Then
Then verify
verify your guess by
your guess by calculating
calculating the
the Fourier
Fourier
sine coefficients
sine coefficients of
of f./.
2. Consider
2. Consider the
the series
series
00

L cnein7rx,
n=-oo

where Ccnn = lin


where for n i'
1/n for 0, and
^ 0, CQ =
and Co — 0.
0.
2
(a) Explain
(a) Explain why
why this series converges
this series converges to function f/ in
to aa function in (complex)
(complex) £
L2( (-l, 1).
-1,1).
(b) Graph
(b) Graph the
the partial
partial series
series with 2TV +
with 2N + 11 terms,
terms, for
for various
various values
values of
of TV, and
N, and
guess the
guess the function
function f./. Then
Then verify
verify your
your guess
guess by
by calculating
calculating the
the Fourier
Fourier
coefficients of
coefficients of f./.

3. Does the sine series


series
00 1
~ vn sin (mfx)
2
mean-square sense to a function f/ E
converge in the mean-square €£ (0,1)?
L2(0, Why or why
I)? Why why
not?
9.7. A
9.7. note about
A note about general
general eigenvalue
eigenvalue problems
problems 455
455

4. Consider
4. Consider the
the function
function /f :: [0,1]
[0,1] -t
—»• R
R defined
defined by
by /(#) =x
f(x) = X1//4(1
(l -— x), and
and its
its
Fourier sine
Fourier sine series
series 00

L an sin (mrx).
n=l

(a) Which
(a) Which ofof the convergence theorems
the convergence theorems of
of this
this chapter
chapter apply
apply to
to /?
f? What
What
kind of
kind of convergence
convergence is
is guaranteed:
guaranteed: pointwise,
pointwise, uniform, mean-square?
uniform, mean-square?
(b) Estimate
(b) Estimate aI,01,02,... , OBS using
a2, ... ,a63 using some
some form
form of
of numerical
numerical integration.
integration. (One
(One
option is
option is to use the
to use the DST,
DST, asas described
described in
in Section
Section 9.2.4.
9.2.4. Another
Another possi-
possi-
bility is to
bility is to use the formula
use the formula
1
an = 210 Xl/4(1_ x) sin (mrx) dx

and some
and some form
form ofof numerical integration. In
numerical integration. In this
this case,
case, because of the
because of the
singularity at
singularity at xx =— 0,
0, it
it is
is aa good
good ideaidea to change variables
to change variables so
so that
that the
the
integrand is
integrand is smooth.
smooth. UseUse x = — s8 44.)
.)

(c) Graph
(c) Graph f/ together with
with its
its partial Fourier
Fourier sine
sine series.
series. Also
Also graph
graph the
the
difference between
difference the two
between the two functions.
functions.
5. (a)
5. (a) For
For what
what values of k does
values of does the
the function
function /f :: [0,
[0,1] -» R
1]-t R defined
defined by
by ff(x)
(x) =
= xkxk
2
belong to
belong to L (0,1)?
L2(0, (Consider both positive
1)? (Consider positive and
and negative
negative values of of k.)
(b) Estimate
(b) Estimate the
the first 63
63 Fourier sine
sine coefficients
coefficients ofof ff(x)
( x ) = x" 1
1 4
4
X- / .
(c) Graph /(#) x--11// 44 ,, together
f(x) == x together with its partial Fourier sine series (with
63 terms).
63 terms). Also
Also graph
graph the the difference
difference between
between the
the two
two functions.
functions.
2
6. Prove
6. Prove that if f/ E
that if 6L (Q,€),
L2(0, then the
f), then the Fourier
Fourier sine
sine series
series of
of f/ converges
converges to
to f/ in
in
the mean-square
the mean-square sense.
sense.
7. Let {Vj}
7. {vj} be a sequence of vectors in a normed vector space V, and suppose
Vj -t
-> vv E
E V. Prove
Prove that
that {Vj}
{vj} is
is Cauchy.
Cauchy.

9.7
9.7 A note about
A note about general
general eigenvalue
eigenvalue problems
problems
We
We will now briefly
will now briefly discuss
discuss the
the general
general eigenvalue
eigenvalue problem
problem
-\7. (k(x)\7u) = AU in n, (9.26)
u= °on an.
We assume that n
assume that fJ is
is aa bounded
bounded domain
domain in R2 with
in R2 with aa smooth
smooth boundary, and and that
the coefficient kk is
the coefficient
We have
We
is aa smooth
have already
smooth function
already seen,
function of
seen, for
of xx satisfying
for aa constant
satisfying fc(x)
constant coefficient
coefficient and
> ko
k(x) :2:
and the
°
ko > 0 for
for all
case in
the case in which
€ n.
all xx E
which £)
f).
n isis
rectangular domain or a disk, that (9.26)
a rectangular (9.26) has an infinite
infinite sequence of solutions.
solutions.
Moreover, the
Moreover, the eigenpairs
eigenpairs had certain properties
had certain properties that
that we could verify
we could directly: the
verify directly: the
eigenvalues were
eigenvalues positive, the
were positive, the eigenfunctions
eigenfunctions werewere orthogonal,
orthogonal, andand so
so forth.
forth.
The properties
The properties we we observed
observed inin Sections
Sections 8.28.2 and
and 8.3
8.3 extend
extend to the general
to the general
eigenvalue problem (9.26),
eigenvalue (9.26), although
although they
they cannot
cannot be verified
verified by directly
directly computing
computing
456 Chapter
Chapter 9. More about
9. More about Fourier series
Fourier series

the
the eigenpairs.
eigenpairs. Instead,
Instead, the
the results
results can
can be
be deduced from some
deduced from some fairly sophisticated
fairly sophisticated
mathematical arguments that
mathematical arguments that are
are beyond
beyond the
the scope
scope of
of this
this book.
book. Therefore,
Therefore, we
we will
will
not
not attempt
attempt to
to justify all of
justify all our statements
of our statements in
in this section.
this section.
KD : e1(n)
We define Kr> C&(ti) by

KDu = -\7. (k(x)\7u) ,


so that (9.26)
(9.26) can be written as simply

KDU = AU.

The following
The following results
results hold:
hold:
1. All
1. All eigenvalues
eigenvalues of are real
of KD are real and
and positive.
positive. To show this,
To show this, we assume that
we assume that
KDU = \u
KDU AU and (u,u) = 1.
and (u,u) I. Then
Then

A = A(U,U) = (AU,U) = (KDu,u) = L (KDU)U

= - L \7 . (k(x)\7u) U

=
Jn
rk(x)\7u. \7u - Janr k(x)u~U
un

= L k(x)\7u . \7u

= L k(x) II\7u112 .
(The
(The reader
reader should
should notice
notice that, since we
that, since we cannot
cannot assume priori that
assume aa priori that A and
and
are real,
uU are real, we
we use
use the
the complex I/2 inner
complex L2 inner product.)
product.) This
This shows
shows that
that A
A is
is aa
nonnegative
nonnegative real
real number.
number. Moreover,
Moreover,

A = 0 =? Lk(x) II\7u112 = 0
=? \7u = 0 (since k(x) > 0)
=? u(x) = constant
=? u(x) = 0,

the last
last step following from the Dirichlet boundary conditions. Therefore, KD
boundary conditions.
has
has only
only positive eigenvalues.
positive eigenvalues.
2.
2. Eigenfunctions
Eigenfunctions of corresponding to
of KD corresponding to distinct eigenvalues are
distinct eigenvalues orthogonal.
are orthogonal.
As
As we
we have
have seen
seen before,
before, the orthogonality of
the orthogonality of eigenfunctions
eigenfunctions depends
depends only on
only on
the
the symmetry
symmetry ofof the
the operator,
operator, which
which is easy to
is easy to verify
verify using
using integration
integration by
by
parts
parts (see
(see Exercise 1).
Exercise 1).
3. The
3. The operator
operator KD has
has an
an infinite
infinite sequence
sequence {\ n}^L1 of
{An}~=l of eigenvalues
eigenvalues satisfying
satisfying
9.7. A
9.7. A note
note about
about general eigenvalue problems
general eigenvalue problems 457
457

and
and
An -+ 00 as n -+ 00.

In the
In the sequence
sequence {An},
{An}, each
each eigenvalue
eigenvalue isis repeated according to
repeated according to the
the dimension
dimension
of the associated
of associated eigenspace,
eigenspace, that
that is,
is, according
according to the
the number ofof linearly
linearly in-
dependent eigenfunctions
dependent eigenfunctions associated
associated with that eigenvalue.
with that eigenvalue. In
In particular, each
particular, each
eigenvalue corresponds
eigenvalue corresponds to only
only finitely
finitely many
many linearly
linearly independent
independent eigenfunc-
tions.
tions.
It is always possible to replace a basis for
for a finite-dimensional subspace by an
74
orthogonal basis.
orthogonal basis. 74 Therefore, all
Therefore, all of
of the
the eigenfunctions
eigenfunctions of
of KD
KD can
can be taken
be taken
to
to be
be orthogonal.
orthogonal. We We will
will assume
assume that {~n}~=l is
that {^n}^Li an orthogonal
is an orthogonal sequence
sequence
satisfying
satisfying

4.
4. The set of
The set of eigenfunctions
eigenfunctions {ip is aa complete
n} is
{~n} complete orthogonal
orthogonal sequence
sequence in Z/ 2 (fi):
in L2(0):
2
For each f/ 6
For each EL (ft), the series
L2(0), series

(9.27)

2
converges in
converges in the
the mean-square sense to
mean-square sense /. The
to f. space L
The space (J7) is
L2(0) is defined
defined as
as
2
was
was L (a, &)—informally,
L2(a, it is
b)-informally, it is the space of
the space square-integrable functions
of square-integrable functions defined
defined
on 0,
on il, with
with the
the understanding that if
understanding that if two functions differ
two functions differ only
only on
on aa set
set of
of
measure zero,
measure zero, then
then they are
are regarded
regarded as as the
the same.
same. The
The series
series (9.27)
(9.27) is
is called
called
aa generalized
generalized Fourier
Fourier series for f./.
series for
For specific
For specific domains, it it may
may be
be more convenient
convenient to enumerate
enumerate the
the eigenvalues and
and
eigenfunctions in
eigenfunctions in aa doubly
doubly indexed
indexed list rather than
list rather than aa singly
singly indexed
indexed list
list as
as suggested
suggested
above. For
above. For example,
example, thethe eigenvalue/eigenfunction
eigenvalue/eigenfunction pairs of the
pairs of the negative
negative Laplacian
Laplacian
on the
on the unit square are
unit square are

It is
It is possible
possible (although
(although notnot necessarily
necessarily useful)
useful) to order the
to order the \Amn and ~mn
mn and in (singly-
^mn in (singly-
indexed) sequences.
indexed) sequences.
The
The usefulness
usefulness ofof the
the above
above facts
facts for
for many
many computational
computational tasks
tasks is limited,
is limited,
since, for
since, for most
most domains
domains 0f) andand coefficients
coefficients fc(x),
k(x), itit is not possible
is not to obtain
possible to obtain the
the
eigenvalues and
eigenvalues and eigenfunctions
eigenfunctions analytically
analytically (that
(that is,
is, in "closed
"closed form").
form"). However,
However, asas
we have
have seen
seen before,
before, the eigenpairs
eigenpairs give some
some information
information that that can
can be
be useful in its
its
own right.
own right. It
It may
may bebe useful to expend
useful to expend some
some effort
effort in
in computing
computing aa few
few eigenpairs
eigenpairs
numerically.
numerically. We illustrate this
We illustrate this with
with an
an example.
example.

Example 9.37.
Example 9.37. Consider
Consider aa membrane
membrane that
that at
at rest
rest occupies the domain
occupies the domain 0,
tl, and
and
suppose that
suppose that the
the (unforced)
(unforced) small transverse vibrations
small transverse vibrations of the membrane
of the membrane satisfy the
satisfy the
74
The technique
74The for doing
technique for doing this
this is
is called
called the Gram-Schmidt procedure;
the Gram-Schmidt procedure; it
it is explained in
is explained in elemen-
elemen-
tary
tary linear
linear algebra
algebra texts such as
texts such as [34].
458
458 Chapter 9.
Chapter More about
9. More about Fourier
Fourier series
series

IB VP
IBVP
aat2 u 2
c Au = 0, x E n, t > 0,
2 -

u(x,O) = ¢(x), x E n, (9.28)


au
at (x,O) = ,),(x), x E n,
u(x, t) = 0, x E an, t > O.
The question we wish to answer is: What is the lowest frequency at which the
membrane will resonate? This could be be an important
important consideration in designing a
device that contained such a membrane.
membrane.
The key
key point
point is that, if
if we knew the eigenvalues and eigenvectors of
of the nega-
tive Laplacian on nfi (subject
(subject to Dirichlet
Dirichlet conditions), then we could solve the IBVP
IBVP
just as in the Fourier series method. Suppose the eigenpairs
eigenpairs are

An, 'l/Jn(x) , n = 1,2,3, ....

Then we can write the solution w(x,£)


u(x, t) as
00

u(x, t) = l: an (t)'l/Jn(x).
n=l

Substituting
Substituting into the PDE
PDE yields

an(t) satisfies
and so an(t) satisfies

Therefore,
Therefore,
an(t) = bn cos (cAt) + Cn sin (cAt),
with the
with the coefficients
coefficients bbnn and
and c determined by
enn determined by the initial conditions.
the initial conditions. Therefore,
Therefore,
the fundamental
fundamental frequency—the
frequency-the smallest
smallest natural frequency—of
frequency-of the membrane is
cx/V^TT).
cv'):; / (2n).

This
This example shows that
example shows we would
that we would gain some useful
gain some information by
useful information by computing
computing
the smallest
the smallest eigenvalue
eigenvalue of
of the
the operator on n.
operator on £). We will revisit
We will revisit this
this example
example in Section
in Section
10.4, where
lOA, we use
where we finite element
use finite element methods
methods toto estimate
estimate the smallest eigenvalue
the smallest eigenvalue of
of
various domains.
various domains.

Exercises
Exercises
1. Prove
1. Prove that
that the operator K defined
the operator defined above
above is
is symmetric.
symmetric.
9.8. Suggestions
9.8. Suggestions for
for further
further reading
reading 459
459

2. Let the
2. Let the eigenvalues
eigenvalues and
and eigenvectors
eigenvectors of
of KD be
KD be

.An, '¢n(x), n=1,2,3, ... ,

as in
as in the
the text. Suppose that
text. Suppose that uu € Of,(17) is
E C1(0) is represented in aa generalized
represented in generalized Fourier
Fourier
series as
series as follows:
follows:
00

U(X) = L an'¢n(x).
n=l

Explain
Explain why
why the generalized Fourier
the generalized Fourier series
series of KDU is
of KDu equal to
is equal to
00

L .An an '¢n (x).


n=l

3. Consider
3. Consider anan iron
iron plate
plate occupying
occupying aa domain
domain 0 £) in R2. Suppose
in R2. Suppose that
that the
the plate
plate
is heated to
is heated to aa constant
constant 55 degrees
degrees Celsius,
Celsius, the
the top and bottom
top and bottom of of the
the plate
plate
are perfectly
are insulated, and
perfectly insulated, and the edges of
the edges of the
the plate are fixed
plate are at 00 degrees.
fixed at degrees. Let
Let
w(x, t) be
u(x, be the
the temperature
temperature at at xx E6 0fJ after
after t seconds.
seconds. Using
Using the
the first eigenvalue
first eigenvalue
and eigenfunction
and eigenfunction of of the
the negative
negative Laplacian
Laplacian on on 0,0, give
give aa simple
simple estimate
estimate ofof
w(x,£)
u(x, that is
t) that valid for
is valid for large
large t. What
What must
must be be true in order
true in order that
that aa single
single
eigenpair suffices
eigenpair suffices to
to define
define aa good
good estimate?
estimate? (The
(The physical
physical properties
properties ofof iron
iron
3
are p = 7.88 g/cm3, c = 0.437 J/(gK), ,.. = 0.836W /(cm K).)
are p = 7.88g/cm , c = 0.437 J/(gK), AC = 0.836 W/(cmK).)

9.8
9.8 Suggestions for
Suggestions further reading
for further reading
The books
The books cited
cited in
in Section
Section 5.8
5.8 as dealing with
as dealing Fourier series
with Fourier series all
all present
present the
the con-
con-
vergence theory.
vergence More specialized
theory. More specialized books,
books, both
both with
with aa wealth
wealth of
of information about
information about
Fourier series
Fourier series and
and other aspects of
other aspects of Fourier
Fourier analysis,
analysis, are
are Kammler
Kammler [28)[28] and
and Folland
Folland
[15]. Folland's
[15]. Folland's book
book is classical in
is classical in nature,
nature, while Kammler delves
while Kammler delves into
into aa number
number ofof
applications of modern interest.
applications
Briggs and Henson
Briggs and Henson [7][7] gives
gives aa comprehensive
comprehensive introduction
introduction to to the discrete
the discrete
Fourier transform
Fourier transform andand covers
covers some
some applications,
applications, while
while Van
Van Loan
Loan [50)
[50] provides an
provides an
in-depth treatment
in-depth treatment ofof the
the mathematics
mathematics of the fast
of the fast Fourier transform. Other
Fourier transform. Other texts
texts
that explain the
that explain the FFT
FFT algorithm
algorithm include
include Walker
Walker [51]
[51] and
and Brigham
Brigham [8].
[8].
This page intentionally
This page intentionally left
left blank
blank
Chapter
Chapter 10

More about
about finite
finite element
element
methods

In this
In this chapter,
chapter, we
we will
will look
look more
more deeply
deeply into
into finite
finite element
element methods for solving
methods for solving
steady-state BVPs.
steady-state BVPs. Finite
Finite element
element methods
methods form
form aa vast
vast area,
area, and
and even
even by the end
by the end
of this
of this chapter,
chapter, we
we will
will have
have only
only scratched
scratched the
the surface.
surface. Our
Our goal
goal is
is modest:
modest: We
We
wish to give the reader a better idea of how
how finite element methods are implemented
in practice,
in practice, and
and also
also to
to give
give an
an overview
overview of
of the
the convergence
convergence theory.
theory.
The main tasks involved in applying the finite element method are

•• Defining
Defining aa mesh
mesh on
on the
the computational
computational domain.
domain.
•• Computing
Computing the
the stiffness
stiffness matrix
matrix K
K and
and the
the load
load vector
vector f.
f.
•• Solving
Solving the
the finite
finite element
element equation
equation Ku
Ku == f.
f.
We will mostly ignore the first question, except to provide examples for simple do-
mains. Mesh
mains. Mesh generation
generation is is an
an area
area of
of study
study in
in its
its own
own right, and delving
right, and delving into
into this
this
subject is
subject is beyond
beyond the the scope
scope ofof this
this book.
book. We
We begin
begin by addressing issues
by addressing issues involved
involved
in computing
in computing the the stiffness
stiffness matrix
matrix andand load
load vector,
vector, including
including data
data structures
structures for
for
representing and
representing and manipulating
manipulating the the mesh.
mesh. We will concentrate
We will concentrate on on two-dimensional
two-dimensional
triangular meshes, and piecewise
problems, triangular piecewise linear finite elements, as these are suf-
ficient to illustrate
ficient illustrate the the main
main ideas.
ideas. Next, in Section
Next, in Section 10.2,
10.2, we
we discuss
discuss methods
methods for
solving the
solving the finite element equation
finite element equation Ku Ku == f,
f, specifically,
specifically, on
on algorithms
algorithms for
for taking
taking
advantage of
advantage of the
the sparsity
sparsity ofof this
this system
system ofof equations.
equations. InIn Section
Section 10.3,
10.3, we provide aa
we provide
brief outline
brief outline of
of the
the convergence
convergence theory
theory for
for Galerkin
Galerkin finite
finite element
element methods.
methods. Finally,
Finally,
we close the book with a discussion of finite element methods for solving eigenvalue
problems, such
problems, such as as those
those suggested
suggested in in Section
Section 9.7.
9.7.

10.1
10.1 Implementation of finite element methods
There are several issues that must be resolved in order to efficiently
efficiently implement the
finite element
finite element method
method in
in aa computer
computer program,
program, including
including

•• Data
Data structures
structures for
for representation
representation of
of the
the mesh.
mesh.

461
461
462 10. More about finite element methods
Chapter 10.

•• Efficient
Efficient computation
computation ofof the
the various
various integrals
integrals that
that define
define the
the entries
entries in
in the
the
stiffness matrix
stiffness matrix and
and load
load vector.
vector.
•• Algorithms
Algorithms for
for assembling
assembling the
the stiffness
stiffness matrix
matrix and
and the
the load
load vector.
vector.
We
We will
will now discuss these
now discuss these issues.
issues.

10.1.1
10.1.1 Describing a
Describing a triangulation
triangulation
Before we
Before can describe
we can describe data
data structures
structures and
and algorithms,
algorithms, we must develop
we must develop notation
notation
for the
for the computational
computational mesh. First of
mesh. First of all,
all, we
we will
will assume
assume that
that the domain n
the domain 0 on
on
which the BVP
which the BVP is is posed is aa bounded
posed is bounded polygonal
polygonal domain
domain in R2, so
in R2, so that
that it
it can
can be
be
75
triangulated.75
triangulated. Let
Let
Th = {Ti : i = 1,2, ... , L}
be the collection
be the collection of
of triangles
triangles in the mesh
in the mesh under
under consideration,
consideration, and
and let
let

Nh = {llj : j = I,2, ... ,M}

be the set
be the set of
of nodes
nodes ofof the
the triangles
triangles inin Th. (Standard notation
Th- (Standard notation in in finite
finite element
element
methods labels each
methods labels mesh with
each mesh with /i,
h, the length of
the length the longest
of the longest side
side of of any
any triangle
triangle in in
the mesh.
the Similarly, the
mesh. Similarly, the space
space ofof piecewise
piecewise linear
linear functions
functions relative
relative to to that
that mesh
mesh is is
denoted Vh,
denoted and an
Vh, and an arbitrary
arbitrary element
element of of Vh
Vh asas Vh.
Vh- WeWe will
will now
now adoptadopt this standard
this standard
notation.)
notation.)
To make
To make thisthis discussion
discussion as as concrete
concrete as as possible,
possible, wewe will
will useuse as as an
an example
example aa
regular triangular
regular triangular mesh,
mesh, defined on the
defined on unit square,
the unit square, consisting
consisting of of 32
32 triangles
triangles and and
25 nodes. This mesh is shown in Figure IO.1.
25 10.1.
In order
In order toto perform
perform thethe necessary calculations, we
necessary calculations, must know
we must know whichwhich nodes
nodes are are
associated with
associated with which
which triangles.
triangles. OfOf course,
course, each
each triangle has three
triangle has three nodes;
nodes; we we need
need
to know the
to know the indices
indices ofof these three nodes
these three nodes in in the
the list
list lll,
HI, ll2,
112,..
...- ,, llM.
HM- We define the
We define the
mapping ee by
mapping by the property that
the property that the
the nodes
nodes of of triangle
triangle Ti Tj are
are lle(i,1),lle(i,2),lle(i,3).
ne(i;1), n e (j ;2 ), ne(i,3) •
(So ee is
(So is aa function
function of of two
two variables; the first
variables; the must take
first must take anan integral
integral valuevalue from
from 11 to to
and the
L, and
L, second one
the second one ofof the
the integers
integers 1,2,3.)
1,2,3.)
In our
In our sample
sample mesh,
mesh, there are 32
there are 32 triangles
triangles (L = 32), 32), and
and they
they are are enumerated
enumerated
as in Figure 10.2.
10.2. The M == 25 25 nodes are enumerated as shown shown in Figure 10.3, which which
explicitly shows
explicitly shows the indices of
the indices of the
the nodes belonging to
nodes belonging each triangle.
to each triangle. For For example,
example,

e(IO, 1) == 6, e(IO,2) == 7, e(1O,3) = 12,

expressing the
expressing fact that
the fact that the vertices of
the vertices of triangle 10 are
triangle 10 are nodes 6, 7,
nodes 6, 7, and
and 12.
12.
Each of
Each of the standard basis
the standard basis functions
functions for
for the
the space
space of
of continuous
continuous piecewise
piecewise
linear functions
linear functions corresponds
corresponds to
to one
one node inin the triangulation.
triangulation. The
The basis functions
functions
75
If the
751f the domain
domain n fi has
has curved
curved boundaries, then, in
boundaries, then, in the context of
the context of piecewise linear finite
piecewise linear finite elements,
elements,
the
the boundary must be
boundary must approximated by
be approximated by aa polygonal
polygonal curve
curve made
made up of edges
up of edges of of triangles.
triangles. This
This
introduces an
introduces an additional
additional error
error into
into the
the approximation.
approximation. When
When using
using higher-order finite elements,
higher-order finite elements, for
for
example, piecewise
example, piecewise quadratic
quadratic oror piecewise cubic functions,
piecewise cubic then it
functions, then it is
is straightforward
straightforward to to approximate
approximate
the boundary
the boundary byby aa piecewise
piecewise polynomial curve of
polynomial curve of the
the same
same degree
degree as as is
is used
used for
for the
the finite
finite element
element
functions. This
functions. This technique
technique isis called
called the isoparametric method,
the isopammetric and it
method, and it leads
leads to
to aa significant
significant reduction
reduction
in the error.
in the error. We
We will ignore all
will ignore all such
such questions
questions here
here byby restricting
restricting ourselves
ourselves toto polygonal
polygonal domains.
domains.
Implementation of finite element methods
10.1. Implementation 463

Figure 10.1.
Figure 10.1. A triangulation of the unit square.
square.

Figure 10.2. Enumerating


Figure 10.2. the triangles
Enumerating the in the
triangles in the sample
sample mesh.
mesh.
464 Chapter 10. More
Chapter 10. More about
about finite
finite element
element methods
methods

25

20

15

10

0.1
5
0.2 0.4

Figure 10.3. Enumerating the nodes in the sample mesh.


Figure 10.3.

correspond
correspond to to the
the degrees
degrees ofof freedom
freedom inin the
the finite
finite element approximation. However,
element approximation. However,
not every node in in the triangulation need give rise to a degree of of freedom;
freedom; some
some
may be associated with Dirichlet boundary conditions which determine the weight
may be associated with Dirichlet boundary conditions which determine the weight
given
given to
to the
the corresponding
corresponding basis function. For
basis function. For this
this reason,
reason, it is not
it is sufficient to
not sufficient to
identify
identify the set of of all nodes in the the triangulation; we must also determine
determine the free free
nodes-those that
nodes—those do not
that do not correspond
correspond toto aa Dirichlet condition. We
Dirichlet condition. We will
will label
label the free
the free
nodes
nodes as
as n^, n/ 2 ,...,
ll/l,ll/2, n/^.
... ,llfN.
Referring again to the the sample mesh of Figure 10.1, if we we assume that this mesh
will
will be
be used
used inin aa Dirichlet
Dirichlet problem,
problem, only
only the interior nodes
the interior correspond to
nodes correspond degrees
to degrees
of freedom. Thus N N = = 99 and
and the free
free nodes can
can be enumerated
enumerated in the same same order
order
as the
as the set of all
set of all nodes (left-to-right and
nodes (left-to-right and bottom-to-top).
bottom-to-top). This
This yields
yields

It = 7, h = 8, h = 9, /4 = 12, 15 = 13, 16 = 14, h = 17, Is = 18, fg = 19.


We
We now
now define
define the
the standard
standard basis
basis function ¢>i by
function fa by the
the conditions
conditions that
that fa is aa
¢>i is
continuous
continuous piecewise
piecewise linear
linear function
function relative
relative to
to the
the mesh 7ft, and
mesh 1h, and

A. (
'l'i lli
)
= Vii =
J: {I,
0
,
i = j,
. ...J..
Z r J.

The finite element space-the


space—the space of continuous piecewise linear functions
(relative
(relative to
to the
the mesh 7ft) that
mesh 1h) that satisfy any given
satisfy any given homogeneous Dirichlet conditions-
homogeneous Dirichlet conditions—
is then
is then
10.1. Implementation
10.1. Implementation of
of finite element methods
finite element methods 465

10.1.2 Computing the stiffness matrix


We assume
We assume that
that the
the weak
weak form
form of
of the
the BVP
B VP in
in question
question has
has been
been written
written in
in the
the form
form

u E V, a(u,v) = (f,v) for all v E V

and that the Galerkin problem takes the form

NxN
We need
We need to
to compute
compute the
the stiffness
stiffness matrix
matrix K
K E
€RR NXN ,, where
where

By design,
By design, most
most ofof these
these values
values will
will be zero; let
be zero; let us
us focus
focus onon aa fixed
fixed ii between
between 11 and
and
AT,
N, andand ask
ask the
the question:
question: ForFor which
which values
values of of jj will
will Kij
KIJ bebe nonzero?
nonzero?
As an
As an example,
example, consider
consider ii =— 55 for
for our
our sample
sample mesh.
mesh. TheThe support
support ofof CP13
^13 == cP0/165
is shown
is shown in
in Figure
Figure lOA.
10.4. The
The question
question we we must
must answer
answer is:
is: What
What other
other basis functions
basis functions
have aa support
(f>fj have
CPt; support that
that intersects
intersects of of CP13
^13 (the
(the intersection
intersection must
must have
have aa positive
positive
area; if
area; if the
the intersection
intersection isis just an
an edge
edge ofof aa triangle,
triangle, this
this will
will not
not lead
lead to
to aa nonzero
contribution to
contribution to K).
K). ItIt is
is easy
easy to
to see
see that
that thethe desired
desired basis functions
functions correspond
correspond to to
nodes of
nodes of triangles
triangles of
of which
which n13
1113 is
is itself
itself aa node,
node, that
that is,
is, to
to the
the nodes
nodes ofof the
the triangles
triangles
shaded in Figure lOA. 10.4.

Figure 10.4.
Figure 10.4. The
The support 0/^13.
support of CP13.

It is
It is possible to store
possible to store all
all of
of the
the necessary
necessary connectivity
connectivity information
information (that
(that is,
is, to
to
store, along
store, along with
with each
each node,
node, aa list
list of
of nodes belonging to
nodes belonging to aa common
common triangle).
triangle). With
With
466 Chapter 10.
Chapter 10. More about finite
More about finite element
element methods
methods

this information,
this information, one
one can
can compute
compute the
the matrix K by
matrix K by rows, according to
rows, according to the following
the following
algorithm:
algorithm:
for ii =
for 1 , 2 ,...
= 1,2, . . . ,, N
N
for each
for each jj = = 1,2, l,2,...,N such that
... , N such that the
the supports
supports of
of cPlj and cPl.
(f)fj and overlap,
(f>ft overlap,
compute Kij
compute Kij = = aa (cPlj, 0^).
(<j>f., cPl.)·
However, this
However, this is
is probably not the
probably not the most
most common
common approach,
approach, forfor the
the following
following reason:
reason:
order to
In order to compute
compute thethe necessary integrals, one
necessary integrals, one must
must know
know thethe nodes
nodes that form the
that form the
vertices of
vertices of each
each triangle.
triangle. It
It turns out that
turns out that the
the stiffness
stiffness matrix
matrix can can be formed with
be formed with
only this
only this information,
information, thatthat is, without explicitly
is, without storing the
explicitly storing connectivity information
the connectivity information
mentioned above.
The integral
The integral represented
represented by (0^., cPf;)
by aa (cP/;, is naturally
<}>f.) is naturally decomposed
decomposed into into the
the sum
sum
of several
of several integrals,
integrals, one
one for
for each
each triangular
triangular element
element making
making up the domain
up the domain of of inte-
inte-
gration. It
gration. It is
is convenient
convenient toto make
make this decomposition, as
this decomposition, as cPf; and cPlj
<j>f4 and 0^. are
are given
given by by
different formulas
different formulas on on the different elements.
the different elements. It It is then natural
is then natural to to compute,
compute, for for each
each
element T k , the contributions to various entries of the stiffness
Tk, stiffness matrix K. K.
For example,
For example, consider
consider i%==5,5,j j ==11ininour oursample
samplemesh.
mesh. ThenThenaa(cPlj 0/J isis
((f>f^, cPl;)
the sum
the sum ofof two
two integrals,
integrals, one
one over
over triangle
triangle T12Ti2 and
and the
the other
other over
over T13:
Ti3:

There is
There is no reason that
no reason that these
these two integrals must
two integrals must bebe computed
computed together,
together, as as long
long as
as
both contributions to
both contributions to KK51 are eventually
5i are eventually accumulated.
accumulated.
Following the
Following above reasoning,
the above reasoning, aa standard
standard algorithm for computing
algorithm for computing K is is to
to
loop over
loop over the
the elements
elements (Le. (i.e. the
the triangles)
triangles) in in the
the mesh (rather than
mesh (rather than over
over the
the nodes)
nodes)
and compute
and compute the contributions to
the contributions to KK from
from each
each element
element inin turn. Since each
turn. Since each triangle
triangle
has three nodes, aa given element contributes to up to 99 entries in K. K. There is
one piece
one piece ofof information,
information, however, however, thatthat isis not available unless
not available unless we make aa point
we make to
point to
record
record it it in
in the
the data
data structure:
structure: the the "inverse"
"inverse" ofof the
the mapping t-t Ii.
mapping ii f-+ In the
fa. In the course
course
stiffness matrix, we need to be able to decide if aa given node n^
of assembling the stiffness nj is
aa free
free node
node (that
(that is,is, if
if jj == fa for some
Ii for some i) and, if
i) and, if so,
so, to
to determine
determine i. So let
i. So let us
us define
define
aa mapping
mapping jj f-+ •->• gj
gj byby

i, if j = Ii
0, if j :# Ii for all i = 1,2, ... , N.

The algorithm
The algorithm then
then takes
takes the following form:
the following form:

for A?k =
for = 1,1,2,...,L
2, ... , L
f o r »i = 1,2,3
for
for j = 1,2,3
forj=1,2,3
if P
if p == ge(k,i) ^ 00 and
9e(k,i) :# and q
q =
= g ± 00
e(kij) :#
ge(k,j)
Add the
Add the contribution to Kpq
contribution to obtained by
Kpq obtained integrating over
by integrating over Tk.
Tk.
The condition
The condition that ge(k,i) :#
that ge(k,i) / 00 indicates
indicates that the ith
that the ith vertex (i =
vertex (i 1,2,3) of
= 1,2,3) of triangle
triangle
n
Tkis aa free
is free node,
node, and
and similarly
similarly for
for ge(k,j).
<?e(fc,j) • The
The integral
integral mentioned in the
mentioned in the last
last line
line
10.1. Implementation of finite element methods
10.1. 467

of this algorithm is the contribution to K = aa (0


pq =
Kpq e (fc,j)>0e(M))
(tPe(k,j) fr°m the element
, tPe(k,i)) from
TV
T Also, it should be pointed out that, in the case that K is symmetric (as it is in
k . Also,
the examples considered
the examples considered in
in this
this book),
book), part of the
part of the work
work cancan be be eliminated:
eliminated: wewe just
just
compute the
compute the entries
entries K with q>p, and then assign the value
pq with q 2 p, and then assign the value of Kpq
Kpq of K to K
pq to Kqp.
qp .
We have described above the information needed to carry out this algorithm.
It is
It easy to
is easy store this
to store information in
this information in arrays
arrays for
for use
use inin aa computer
computer program.
program. A A
76
simple data structure would consist of four arrays:
arrays:76
1. NodeList:
1. NodeList: AnAn M x 22 array;
M x array; the ith row
the iih consists of
row consists of the
the xx and
and yy coordinates
coordinates
of node
of node n^.
ni.

2. ElementList:
2. ElementList: An
An L xx 33 array;
array; the
the kth row
row consists of e(k,1),e(k,2),e(k,3).
consists of e(fc,l),e(fc,2),e(fc,3).

3. FreeNodePtrs:
3. FreeNodePtrs: An
An N x 11 array;
N x array; the
the ith is k
entry is
iih entry /j.

4.
4. NodePtrs:
NodePtrs: An Mx
An M x 11 array;
array; the
the ith entry is
iih entry is gi.
gi.

By way
By way ofof example,
example, Table
Table 10.1
10.1 shows
shows these
these arrays
arrays for
for the sample
sample mesh of Figure
Figure
10.1. The information recorded in these arrays will suffice
suffice for straightforward finite
element problems
element with homogeneous
problems with Dirichlet or
homogeneous Dirichlet or Neumann
Neumann boundary conditions
boundary conditions
(or even
(or even for
for inhomogeneous
inhomogeneous Dirichlet
Dirichlet problems—see Exercise 5).
problems-see Exercise 5). For problems with
For problems with
inhomogeneous Neumann conditions, it may also be necessary to record whether a
given edge belongs to the boundary. The ElementList
ElementList array can be augmented by
columns containing
columns containing flags
flags indicating
indicating whether the edges
whether the edges lie
lie on
on the boundary. (Or,
the boundary. (Or, of
of
course, these flags
flags can be stored in independent arrays, if desired.) This extension
is left
is left to
to the reader.
the reader.

10.1.3 Computing the load vector


vector
Computing the load vector ff is similar to computing the stiffness
stiffness matrix, only easier.
We loop over
We loop over the
the elements
elements and,
and, for
for each
each node
node n/ of aa given
nt.{ of given triangle, compute the
triangle, compute the
contribution
contribution toto fIi.
i . The
The value Ii will
value fi will be
be the sum of
the sum integrals over
of integrals over one or more
one or more
triangles, and
and this sumsum is
is accumulated
accumulated as as we loop over
we loop over the
the triangular
triangular elements.
elements.
for kk = 1,2,
for 1 , 2 ,...
. . . ,, LL
for ii = 1,2,3
for 1,2,3
if P
if p = 9e(k,i) f:-
= ge(k,i) /0
Add the
Add the contribution to fIp
contribution to obtained by
p obtained by integrating
integrating over
over T
T^.

10.1.4 Quadrature
Quadrature
Up to this point, we
we have computed all integrals exactly, perhaps with the help of a
computer package such as Mathematica Maple. However,
Mathematica or Maple. However, this would be difficult
difficult to
incorporate into a general-purpose computer program for finite
incorporate finite elements. Moreover,
it is
it is not
not necessary
necessary to compute the
to compute the various
various integrals
integrals exactly,
exactly, and
and it
it may
may be
be more
more
76
Using modern
76Using techniques, such
modern techniques, as modular
such as modular programming
programming or
or object-oriented
object-oriented programming,
programming, one
one
might define
might define aa structure
structure or
or aa class
class to
to represent
represent aa mesh.
mesh.
468 Chapter
Chapter 10. More about finite element methods

ElementList
ElementList
11 11 66 7 7
22 11 2 2 7
7
3
3 2
2 7
7 88
NodeList
NodeList NodePtrs
NodePtrs
4
4 2
2 33 8
11 0
8
11 0
0 0
0 0
55 3 3 8 8 9 9
2
2 0.2500
0.2500 0
0 2
2 00
6
6 3 3 4
4 99
3
3 0.5000
0.5000 0
0 3
3 00
77 4 4 99 10
10
4
4 0.7500
0.7500 0
0 4
4 0 0
88 4 4 55 10
10
5
5 1.0000
1.0000 0
0 55 00
9
9 66 1111 1212
66 0
0 0.2500 66 0 0
10 66 7
10 12
7 12
7
7 0.2500 0.2500
0.2500 7 11
7
11 7
11 12 13
7 12 13
88 0.5000 0.2500
0.5000 88 2 2 PreeNodePtrs
FreeNodePtrs
12 7 7 88 13 13
11 7
12
9
9 0.7500 0.2500
0.7500 9
9 33 7
13 88 13
13 13 1414
10
10 1.0000 0.2500
1.0000 10 0
10 0 22 8 8
14
14 88 99 14 14
11
11 0
0 0.5000 11 0
11 0 33 99
15 99 14
15 14 1515
12
12 0.2500 0.5000 12 4
12 4 44 12 12
16 9
16 9 1010 1515
13
13 0.5000 0.5000
0.5000 13 55
13 55 1313
17 11
17 11 16 16 1717
14
14 0.7500 0.5000
0.7500 14 6
14 6 66 14 14
18 11
18 11 12 12 1717
15
15 1.0000 0.5000
1.0000 15 0
15 0 77 1717
19 12
19 12 17 17 1818
16
16 0
0 0.7500 16 0
16 0 88 18 18
20
20 12
12 13 18
13 18
17
17 0.2500
0.2500 0.7500
0.7500 17 77
17 99 19 19
21
21 13 13 18 18 1919
18
18 0.5000 0.7500 18 8
18 8
22 13
22 13 14 14 1919
19
19 0.7500 0.7500
0.7500 0.7500 19 9
19 9
23 14
23 14 19 19 2020
20
20 1.0000 0.7500
1.0000 20 0
20 0
24
24 14 14 15 15 2020
21
21 0 1.0000
0 1.0000 21
21 0 0
25 16
25 16 21 21 2222
22
22 0.2500 1.0000
1.0000 22
22 0 0
26
26 16 16 17 17 2222
23
23 0.5000 1.0000
0.5000 1.0000 23
23 0 0
27
27 17 17 22 22 2323
24
24 0.7500 1.0000
0.7500 1.0000 24
24 0 0
28 17
28 17 18 18 2323
25
25 1.0000 1.0000
1.0000 1.0000 25
25 0 0
29 18
29 18 23 23 2424
30
30 18 18 19 19 2424
31
31 19 19 24 24 2525
32
32 19 19 20 20 2525

Table 10.1. The


Table 10.1. The data
data structure
structure for the mesh
for the mesh of
of Figure
Figure 10.1.
10.1.

efficient
efficient to
to use
use numerical
numerical integration
integration (quadrature). It is
(quadrature). It only necessary
is only necessary to choose
to choose
aa quadrature
quadrature rule
rule that
that introduces
introduces an an error
error small
small enough
enough that
that it
it does
does not
not affect
affect the
the
rate
rate ofof convergence
convergence of
of the
the error
error in
in the
the approximate solution to
approximate solution to zero
zero as
as the
the mesh
mesh isis
refined.
refined.
10.1. Implementation
10.1. Implementation of
of finite
finite element
element methods
methods 469

quadrature rule is an approximation


A quadrature approximation of the form

(10.1)

w\, W2,
where W1, ... , Wk, the
w?,..., weights, are real numbers and (Sl'
the weights, (si, t1),
£1), (S2'
($2, t2),""
£ 2 ) , . . . , (Sk'
(fifc, tk),
£&),
the nodes, are
the are points
points inin the
the domain
domain ofof integration
integration R. Equation (10.1)
R. Equation (10.1) defines
defines aa kk
quadrature rule.
point quadrature

Choosing a
Choosing a quadrature
quadrature rule
rule
There are two issues that must be resolved:
resolved: the choice of a quadrature
quadrature rule and its
implementation for
implementation for an
an arbitrary
arbitrary triangle.
triangle. We We begin by discussing
begin by discussing the quadrature
the quadrature
rule. A
rule. A useful
useful way
way to
to classify
classify quadrature
quadrature rules
rules isis by their degree of
by their precision. While
of precision. While
it may
it not be
may not be completely
completely obvious
obvious at
at first, it is
first, it is possible
possible to
to define
define rules
rules of
of the
the form
form
(10.1) that give the exact value when applied to certain polynomials. A rule has
(10.1)
degree of precision d if the
the rule is exact
exact for all polynomials of degree d or less. Since
both integration and
both integration and aa quadrature
quadrature rule of the
rule of the form
form (10.1)
(10.1) are
are linear
linear in
in f,
/, it
it suffices
suffices
to consider only monomials.
As aa simple
As simple example,
example, consider
consider the
the rule
rule

[11 f(x) dx ~ 2f(0). (10.2)

This rule
This rule has
has degree
degree of
of precision 1,
1, since

p(x) [11 p(x) dx = 2 = 2p(0),


= 1 ::::}
p(x) = x::::} [11 p(x) dx = = 2p(0),
0

f1 2
p(x) = x 2 ::::} J_/(x) dx = 3 I=- 2p(O).

Equation (10.2) is the one-point Gaussian quadrature


Equation (10.2) quadrature rule. For one-dimensional
one-dimensional
quadrature rule is exact for polynomials of degree
integrals, the n-point Gaussian quadrature degree
2n -— 1 or less. For example, the two-point Gauss quadrature rule, which has degree
2n degree
of precision 3,
of 3, is
is

quadrature rules are defined on the reference


The Gaussian quadrature [-1,1];
reference interval [-1, 1]; to apply
the
the rules on aa different
rules on different interval
interval requires
requires aa simple
simple change
change ofof variables.
variables.
In multiple
In dimensions, it
multiple dimensions, it is
is also
also possible
possible toto define
define quadrature
quadrature rules
rules with
with aa
given degree
given degree of
of precision.
precision. Of
Of course,
course, things
things are
are more
more complicated
complicated because
because of of the
the
variety of
variety of geometries
geometries that
that are
are possible.
possible. WeWe will exhibit rules
will exhibit rules for
for triangles
triangles with
with
degree of
degree of precision 11 and
and 2.
2. These
These rules
rules will
will be
be defined
defined for
for the
the reference
reference triangle
triangle
470 Chapter 10.
Chapter 10. More
More about
about finite
finite element
element methods
methods

TR with
TR with vertices
vertices (0,0),
(0,0), (1,0),
(1,0), and
and (0,1)
(0,1) (see
(see Figure
Figure 10.5).
10.5). The
The following
following one-point
one-point
rule has degree of precision 1:

(10.3)

(see Exercise
(see Exercise 1),
1), while the following
while the following two-point
two-point rule
rule has
has degree
degree of
of precision
precision 2:
2:

(lOA)

(see Exercise 2).

(0,1)

(0,0) (1,0)

Figure 10.5.
Figure 10.5. The
The reference
reference triangle TR.
triangle TR.

What degree
What degree of of precision
precision is necessary in
is necessary in applying
applying the
the finite element method?
finite element method?
Here is
Here is aa rule
rule of
of thumb:
thumb: TheThe quadrature
quadrature rulerule should
should compute
compute thethe exact
exact entries
entries in
in the
the
stiffness
stiffness matrix in the case of a PDE with constant
constant coefficients. Such a quadrature
quadrature
rule will
rule will then be accurate
then be accurate enough,
enough, even
even in
in aa problem
problem with
with (smooth) nonconstant
(smooth) nonconstant
coefficients, that
coefficients, that the
the accuracy
accuracy ofof the
the finite element method
finite element method will not be
will not be significantly
significantly
degraded.
When using
When using piecewise linear functions,
piecewise linear functions, the
the stiffness
stiffness matrix
matrix is is assembled
assembled from
from
integrals of
integrals of the
the form
form
L k"VrPj . "VrPi,
and the
and integrand is
the integrand is constant
constant when
when k isis constant
constant (a (a linear
linear function
function has has aa con-
con-
stant gradient).
stant gradient). Therefore,
Therefore, thethe one-point
one-point rule
rule will give exact
will give exact results
results forfor aa constant
constant
coefficient problem,77 and,
coefficient problem,77 and, by ourour rule of
of thumb,
thumb, thethe same
same rule
rule isis adequate
adequate for
nonconstant coefficient
nonconstant coefficient problems.
problems.
If we
If we were
were to
to use
use piecewise quadratic functions,
piecewise quadratic functions, then
then "VV0j
rPj .• "V
V0j would be
rPi would be
piecewise quadratic as
piecewise quadratic as well,
well, and
and so
so we
we would
would need
need aa quadrature
quadrature rule
rule with
with degree
degree of
of
precision 2.
2. The
The three-point
three-point rulerule (lOA)
(10.4) would be
be appropriate
appropriate inin that
that case.
case.
77
77Actually,
Actually,aa rule
rule with degree of
with degree of precision
precision 00 would
would suffice;
suffice; however,
however, aa rule
rule cannot
cannot use
use less
less than
than
one quadrature
one quadrature node,
node, and
and so
so we
we use
use the above one-point
the above one-point rule,
rule, which
which has degree of
has degree of precision
precision 1.
1.
10.1. Implementation of finite element
10.1. methods
element methods 471
471

over an arbitrary triangle


Integrating over

There is still
There is still the
the following
following technical
technical detail
detail to
to discuss:
discuss: How
How can
can we
we apply
apply aa quadra-
quadra-
ture
ture rule
rule defined
defined onon the
the reference
reference triangle TR to
triangle TR an integral
to an integral over
over an
an arbitrary triangle
arbitrary triangle
T? We
T? assume that
We assume that T has
has vertices (pi,p2), (tfi^),
vertices (PI,P2), and (ri,r2).
(ql, q2), and (rl, r2). We
We can
can then
then map
map
R
(^1,^2) G T to (xi,#2) € by the linear mapping
(ZI,Z2) E TR to (XI,X2) E T by the linear mapping

Xl = PI + (ql - pt}ZI + (rl - PI)Z2, (10.5)


X2 = P2 + (q2 - P2)ZI + (r2 - P2)Z2.
The
The mapping (10.5) sends
mapping (10.5) (0,0), (1,0),
sends (0,0), (1,0), and
and (0,1)
(0,1) to (pi,p2), (tfi,<?2),
to (PI,P2), (ql,q2), and (ri,r 2 ),
and (rl,r2),
respectively.
respectively. We
We will
will denote
denote this
this mapping
mapping by
by xx == F(y),
F(y), and
and wewe note
note that the
that the
Jacobian
Jacobian matrix
matrix of
of F
F is
is

J = [ qi - PI rl - PI ] .
q2 - P2 r2 - P2
78
We can now
We can aonlv the
now apply the rule
rule for
for aa change
change of
of variables
variables in
in aa multiple
multiple integral:
integral: 78

iTr f(x)dx= iTR


{ f(F(y))ldet(J)1 dy.

As
As the
the determinant
determinant of
of JJ is
is the constant
the constant

it is
it easy to
is easy to apply
apply the
the change
change of
of variables
variables and
and then
then any
any desired
desired quadrature rule.
quadrature rule.
For example, the
For example, the three-point
three-point rule
rule (10.4)
(10.4) would
would be applied as
be applied follows:
as follows:

h f == I~I (! (X~l), X~I)) + f (X~2) , X~2)) + f (X~3) , X~3))) ,

(X~I), X~I)) = (PI + (qi - PI)/6 + (ri - PI)/6,P2 + (q2 - P2)/6 + (r2 - P2)/6),
(x~2), x~2)) = (PI + 2(ql - pt}/3 + (ri - PI)/6,P2 + 2(q2 - P2)/3 + (r2 - P2)/6),
(X~3), X~3)) = (PI + (ql - pd/6 + 2(rl - Pt}/3,P2 + (q2 - P2)/6 + 2(r2 - P2)/3).

Exercises
1. Verify
1. Verify that
that (10.3)
(10.3) produces
produces the exact integral
the exact integral for
for the
the monomials 1, x,
monomials 1, y.
X, y.

2
2.
2. Verify
Verify that
that (10.4)
(10.4) produces
produces the
the exact
exact integral
integral for
for the
the monomials 1, x,
monomials 1, X, ?/,
y, xx2,,
2
xy, y.
xy, y2.

3.
3. Let
Let T T be
be the
the triangular
triangular region
region with
with vertices (1,0), (2,0),
vertices (1,0), (2,0), and (3/2,1), and
and (3/2,1), and let
let
/f :: TT ->
-+ R
R be
be defined
defined by
by /(x) = x\x\.
f(x) = XIX~. Compute
Compute

78
This rule
78This rule is
is explained
explained inin calculus
calculus texts such as
texts such as Gillett [17], or
Gillett [17], or more
more fully
fully in advanced calculus
in advanced calculus
texts
texts such
such as
as Kaplan [29].
Kaplan [29].
472
472 Chapter
Chapter 10. More about finite element methods

R
directly,
directly, and
and also
also by
by transforming
transforming the integral to
the integral to an integral over
an integral over T
TR, , as
as
suggested in
suggested in the
the text.
text. Verify
Verify that
that you
you obtain
obtain the
the same result.
same result.

4.
4. A
A common
common wayway to to create
create aa mesh
mesh on domain n
on aa domain il is
is to
to establish
establish aa coarse
coarse
mesh,
mesh, andand then
then to to refine
refine it
it until
until it
it is suitable. A
is suitable. simple way
A simple way to to refine
refine aa
triangular
triangular mesh
mesh isis to
to replace each triangle
replace each triangle with
with four
four triangles
triangles by connecting
by connecting
the
the midpoints
midpoints ofof the
the three
three edges of the
edges of the original
original triangle.
triangle. An An example
example is is shown
shown
in Figure
in 10.6, in
Figure 10.6, in which
which aa mesh
mesh with
with two
two triangles
triangles isis refined
refined to
to aa mesh
mesh with
with
eight triangles by this method. This technique of of replacing a triangle with
triangle with
four triangles
four can be
triangles can be repeated
repeated several
several times
times until
until the
the mesh
mesh isis fine enough.
fine enough.

(a) Consider
(a) Consider the
the coarsest
coarsest mesh
mesh inin Figure 10.6. Describe
Figure 10.6. Describe the
the mesh
mesh using
using
the
the notation
notation in
in the
the text,
text, and
and also
also compute
compute the arrays NodeList,
the arrays NodeList, Ele-
Ele-
mentList, FreeNodePtrs,
mentList, FreeNodePtrs, NodePtrs.
NodePtrs. Assume
Assume that
that the
the mesh
mesh will
will be
be
used for a Dirichlet problem.
used for a Dirichlet problem.
(b)
(b) Repeat
Repeat for
for the
the finer
finer mesh
mesh in
in Figure 10.6.
Figure 10.6.
(c)
(c) Refine
Refine the
the (right-hand)
(right-hand) mesh
mesh from
from Figure 10.6 one
Figure 10.6 one more
more time,
time, and
and com-
com-
pute
pute the
the arrays
arrays describing
describing the
the refined
refined mesh.
mesh.

Note:
Note: There
There is
is not
not aa unique
unique right
right answer
answer to
to this
this exercise, since the
exercise, since the nodes
nodes and
and
elements can
elements can be
be ordered
ordered inin various
various ways.
ways.

Figure 10.6.
Figure 10.6. A A coarse
coarse mesh (left), refined
mesh (left), refined inin the
the standard
standard fashion (right).
fashion (right).
(Note: The
(Note: The mesh
mesh is
is aa triangulation
triangulation of
of the
the rhombus
rhombus in in both figures; the
both figures; the circumscribed
circumscribed
box just
box just indicates
indicates the
the axes.)
axes.)
10.2. Solving sparse linear systems
10.2. 473

5. Explain
Explain how
how to use the information stored in the data structure suggested
suggested in
the
the text
text to solve an
to solve an inhomogeneous Dirichlet problem.
inhomogeneous Dirichlet problem.
6. Consider
6. Consider the data structure
structure suggested
suggested in
in the
the text. What information is
What information is lacking
that is needed to solve an inhomogeneous Neumann problem?

10.2
10.2 Solving
Solving sparse linear systems
sparse linear systems
As we
we have mentioned several times, the finite element method is a practical practical nu-
merical
merical method,
method, even for large
even for large two-
two- and
and three-dimensional
three-dimensional problems,
problems, because the
because the
matrices that
matrices that it
it produces
produces have mostly zero
have mostly entries. A
zero entries. A matrix
matrix is is called
called sparse if aa
sparse if
large percentage of its entries are known to be zero. In this section, we we wish to
briefly survey the subject of solving sparse linear systems.
Methods forfor solving linear systems
systems can be divided into into two categories. A
method that will produce the exact exact solution in a finite number of steps is called a
(Actually, when implemented on a computer, even a direct method
direct method. (Actually,
will not compute the the exact
exact solution
solution because of unavoidable round-off
round-off error. To be be
precise, a direct method will compute the exact solution in a finite number of steps,
provided it is implemented in exact arithmetic.) The most common direct methods
are
are variants
variants of Gaussian elimination.
of Gaussian elimination. Below,
Below, we discuss modifications
we discuss modifications of Gaussian
of Gaussian
elimination for sparse matrices.
An algorithm that computes
computes the exact solution
solution to a linear
linear system only as
the
the limit of an infinite sequence of approximations
approximations is called an iterative method.
There are
There are many
many iterative
iterative methods
methods inin use;
use; we
we will discuss the
will discuss the most
most popular: the
popular: the
conjugate gradient algorithm. We also touch on the
conjugate gradient the topic of preconditioning, the the
art of
of transforming
transforming a linear system system so as as to
to obtain
obtain faster convergence
convergence with an an
iterative
iterative method.

10.2.1
10.2.1 Gaussian elimination
Gaussian for dense
elimination for systems
dense systems
In order to have some standard of comparison, we first briefly discuss the standard
Gaussian
Gaussian elimination
elimination algorithm
algorithm for the solution of dense systems. Our interest is
in the
in the operation
operation count—the number of
count-the number arithmetic operations
of arithmetic operations necessary
necessary to solve an
to solve an
n
n xx nn dense
dense system.
system. The
The basic
basic algorithm
algorithm is is simple
simple to
to write
write down.
down. In
In the
the following
following
description, we
we assume that no row interchanges are required, as these do not use
79
any arithmetic
arithmetic operations anyway.
anyway. 79 The following pseudo-code solves Ax = = b,
nxn n
where A € R
E Rnxn and b 6 R , overwriting
bERn, overwriting the values of A and b: b:
for i = 1,2, ... , n - 1
for j = i + 1, i + 2, ... , n
______
k· t- ~
3'_ Aii
79
In general,
79In Gaussian elimination
general, Gaussian elimination is
is numerically
numerically unstable
unstable unless
unless partial pivoting is
is used. Partial
used. Partial
pivoting
pivoting isis the
the technique of interchanging
technique of interchanging rows
rows to get the
to get the largest
largest possible
possible pivot entry. This
pivot entry. This ensures
ensures
that
that all
all of
of the
the multipliers
multipliers appearing
appearing in the algorithm
in the algorithm are
are bounded
bounded above
above by one, and
by one, and inin virtually
virtually
every
every case,
case, that
that roundoff
roundoff error does not
error does not increase
increase unduly.
unduly. There are special
There are special classes of matrices,
classes of matrices,
most
most notably
notably thethe class of symmetric
class of symmetric positive
positive definite
definite matrices, for which
matrices, for Gaussian elimination
which Gaussian elimination isis
provably stable
stable with
with no
no row interchanges.
474 10. More about finite element methods
Chapter 10.

bj +- bj - Ajibi
for k = i + 1, i + 2, ... , n
Ajk +- Ajk - AjiAik

for i = n, n - 1, ... ,1
bi +- (bi - E7=i+1 Aijb j ) /Aii
The first (nested)
The first (nested) loop
loop isis properly
properly called Gaussian elimination;
called Gaussian elimination; it systemati-
it systemati-
cally eliminates variables to produce an upper triangular triangular system that is equivalent
to the original system.
to system. The second second loop is called back back substitution;
substitution; itit solves
solves thethe
last equation,
last equation, whichwhich now
now hashas only
only oneone variable,
variable, forfor #X n ,, substitutes
substitutes this
this value
value inin
the preceding
the preceding equation
equation and solves for
and solves for or _i, and
X nn-1, and soso forth.
forth. The The pseudo-code
pseudo-code above above
overwrites the
overwrites the right-hand-side
right-hand-side vector
vector b b with
with the solution x.
the solution x.
The
The Gaussian elimination part
Gaussian elimination part ofof the
the algorithm
algorithm is is equivalent
equivalent (when,
(when, as as we
we
have assumed,
have assumed, no no row
row interchanges
interchanges are are required)
required) to to factoring
factoring A into into the
the product
product of of
an upper
an upper triangular
triangular matrix
matrix U U and
and aa unit
unit lower
lower triangular
triangular matrix
matrix (that
(that is,
is, aa lower
lower
triangular matrix
triangular matrix with all ones
with all ones on
on the
the diagonal)
diagonal) L: L: A A = = LU.
LU. As As the algorithm
the algorithm
is written
is written above,
above, the
the matrix
matrix A is overwritten
A is overwritten with with thethe value
value ofof U
U (on
(on and above
and above
the diagonal) and L (below the diagonal-there
the diagonal—there is no need to store the diagonal of of
L, since it is known
known to consist of all ones). At the same time, the first loop above
-1
effectively
effectively replaces b by L L -1 b.
b. The back substitution phase is then equivalent to
x
1 1 11 -1
replacing L- L~ b by U-1L-
U~ L~ b = =A A -lb.b. The factorization A A = = LU is simply
simply called
the LU factorization.
the factorization.
It
It is
is not
not difficult
difficult to
to count
count thethe number
number of of arithmetic
arithmetic operations
operations required
required by by
Gaussian
Gaussian elimination
elimination andand back
back substitution.
substitution. It turnsturns out
out to to be
be

with most
most of the operations used to factor factor A into LU L U (the computation of L -1x b
11 1 2
and then U- U~ L~ L -1 bb requires only O(2n2)
O(2n ) operations). (Exercise 1 asks the reader
to
to verify
verify these results.)
these results.)
When
When thethe matrix
matrix A A is symmetric and
is symmetric and positive definite80
positive definite 80 (SPD), then one can
(SPD), then one can
take
take advantage
advantage of of symmetry
symmetry to factor the
to factor the matrix
matrix as as A
A = LLTT,, where
= LL where L L is
is lower
lower
triangular.
triangular. This
This factorization
factorization is is called
called the
the Cholesky factorization. (The
Cholesky factorization. Cholesky
(The Cholesky
factor L is not the same matrix L appearing in the LU factorization—in particular,
factorization-in particular,
it does not
it does not have
have all all ones
ones onon the
the diagonal—but
diagonal-but it is closely
it is closely related.) The symmetry
related.) The symmetry
of
of A makes
makes thethe Cholesky
Cholesky factorization
factorization less less expensive
expensive than
than the LU factorization;
the LU factorization;
the
the operation count is
operation count O(n33/3). For
is O(n For simplicity
simplicity (because
(because the
the Cholesky
Cholesky factorization
factorization
is less familiar and harder harder to describe than the LU LU factorization), we we will discuss
the
the direct
direct solution
solution of linear systems
of linear systems in in terms
terms of Gaussian elimination
of Gaussian elimination andand the
the LU
factorization. However,
factorization. However, the the reader should bear
reader should in mind
bear in mind that
that the stiffness matrix
the stiffness matrix KK
is SPD, and
is SPD, and soso thethe Cholesky
Cholesky factorization
factorization is is preferred
preferred in practice.
in practice.
80 nXn
80The
The reader
reader should
should recall
recall that
that aa symmetric
symmetric matrix
matrix A
A e
ERRnxn is
is called
called positive definite ifif
positive definite
x G Rn,, x
xER ^ 0 =» x • Ax > 0.
x,tO=}x·Ax>O.
The
The matrix
matrix A is positive
A is positive definite
definite if
if and
and only
only if all of
if all of its
its eigenvalues
eigenvalues are
are positive.
positive.
10.2. Solving
10.2. Solving sparse
sparse linear
linear systems
systems 475

n
n time (s)
(s)
100 0.0116
200
200 0.107
0.107
400
400 1.57
800
800 12.7
1600 102

Table 10.2.
Table Time required
10.2. Time required to
to solve an nn xx nn dense
solve an dense linear
linear system on aa
system on
personal
personal computer.
computer.

The operation
The operation counts
counts shows
shows how how thethe computation
computation time time increases
increases as as the
the size
size
of the
of the system
system increases--doubling
increases—doubling the the size
size ofof the system causes
the system causes an an 8-fold
8-fold increase
increase
in computation
in computation time. time. As As aa frame
frame of of reference, Table 10.2
reference, Table 10.2 gives
gives the
the time
time required
required to to
solve an
solve an nn xx nn linear
linear system
system on on aa reasonably
reasonably good good personal computer at
personal computer at the
the time
time
81
of this
of this writing.
writing.81
With the rapid
With the improvements in
rapid improvements in computer
computer hardware
hardware of of the
the last
last two decades,
two decades,
it might
it might seem
seem that
that concerns
concerns aboutabout algorithmic
algorithmic efficiency
efficiency are
are less
less significant
significant thanthan
they used
they used toto be.
be. Indeed,
Indeed, manymany problems
problems that that required mainframe computers
required mainframe computers 25 25
years ago
years ago can
can now
now easily
easily bebe solved
solved on on inexpensive
inexpensive personal
personal computers.
computers. However,However,
3
with an
with an operation
operation countcount of of O(2
0(2n /3), it
n 3/3), it is
is not difficult to
not difficult encounter problems
to encounter problems that that
exceed available
exceed computing power.
available computing power. For For example,
example, consider
consider the
the discretization
discretization of of aa
three-dimensional cube.
three-dimensional cube. If If there
there are
are N divisions in
N divisions in each
each dimension,
dimension, then the size
then the size of
of
the system
the system will
will be
be onon the order of
the order N33 x
of N xNN3,3
and, if
, and, if aa dense
dense linear
linear system
system of of this
this order
order
is to
is to be solved (or
be solved (or even
even ifif aa sparse
sparse linear
linear system
system is is solved
solved byby aa dense
dense method,
method, that that
is, aa method
is, method thatthat does
does not take advantage
not take advantage of of sparsity),
sparsity), then the operation
then the operation count count
will
will be O(N9). Merely
be O(N9). Merely to to refine
refine the
the mesh
mesh by by aa factor
factor ofof 22 in
in each
each dimension
dimension will will
increase the
increase the computation
computation time time by by aa factor
factor of of 512.
512. (We(We are
are not even considering
not even considering the the
memory requirements.) Thus,
memory requirements.) Thus, given
given the times in
the times in Table
Table 10.2,
10.2, to
to solve
solve aa problem
problem on on
aa 10
10 xx 10
10 xx 10
10 grid
grid might
might taketake aa minute;
minute; to to solve
solve the
the same
same problem
problem on on aa 20
20 xx 2020 xx 20
20
grid would
grid would take more than
take more than 88 hours!
hours!
This discussion
This discussion should
should convince
convince the the reader
reader that algorithmic efficiency
that algorithmic efficiency is critical
is critical
for solving
for solving some
some realistic
realistic problems.
problems. We We nownow discuss
discuss thethe solution
solution of of sparse
sparse systems;
systems;
aa comparison
comparison of of operation
operation countscounts will
will show
show the the advantages
advantages of of aa method,
method, such such asas
finite elements,
finite elements, thatthat leads
leads toto sparse
sparse linear
linear systems.
systems.

10.2.2 Direct solution of banded systems


When the
When the mesh employed in
mesh employed in the
the finite element method
finite element has aa regular
method has structure, the
regular structure, the
resulting stiffness matrix
resulting stiffness tends to
matrix tends to be
be banded. The entries
banded. The entries of
of aa banded matrix are
banded matrix are
zero except for
zero except for those
those in
in aa band
band close
close to the main
to the diagonal. The
main diagonal: The precise
precise definition
definition
is the
is following.
the following.
nxn
Definition 10.1.
Definition 10.1. Let A e
Let A ERRnxn.. We
We say A is
that A
say that banded with
is banded with half-bandwidth
half-bandwidth
81
The CPU
81The CPU isis aa 450
450 MHz Pentium II.
MHz Pentium II. Of
Of course,
course, the
the rate of improvement
rate of improvement ofof CPUs
CPUs being
being what
what
it is,
it is, this
this will
will no longer be
no longer be considered
considered aa reasonably
reasonably good CPU by
good CPU by the
the time
time this
this book is published!
book is published!
476 10. More about finite element methods
Chapter 10.

Pp ifif
li-jl >p=>Aij =0.

As anan example,
example, consider
consider the stiffness matrix
the stiffness matrix arising
arising from solving Poisson's
from solving Poisson's
equation:
equation:

-~u = f(x) in n, (10.6)


u = 0 on an.
2
Suppose n
Suppose £7 is the unit
is the square (n
unit square (J7 =
= {x
{x €ER R2 :: 0 0 < x\ 1,0 < #2
Xl < 1,0 l})> and
X2 < I}), and we
we
apply the method with a regular triangulation of n
the finite element method f) and piecewise
linear finite element functions. Dividing the xX and y intervals, [0,1], [0,1], into n subin-
2 2
tervals
tervals each,
each, we
we obtain
obtain 2n elements
2
and (n + 1)2
elements and I) nodes. Only the
nodes. Only interior nodes
the interior nodes
are free, so the stiffness matrix
the stiffness matrix is (n — I) 22 xX (n —
- 1) I) 2 . As we showed in Example
- 1)2.
8.10, aa typical
8.10, typical free
free node rifi iteracts
node n/; with nodes
iteracts with nodes

(also with
(also with nodes
nodes n n//;-n
i-n and
and n/ i+n, but,
n /;+n' but, with
with constant coefficients, the
constant coefficients, corresponding
the corresponding
entries of
entries of K K turn
turn out
out toto be zero due
be zero due to cancellation), so
to cancellation), so that
that the subdiagonals
the sub diagonals of
of
A
A indexed
indexed by by -n—n +
+ 1,1, -1
— 1 and
and the superdiagonals indexed
the superdiagonals indexed byby 1,
1, n -— 1,
1, along
along with
with
the main diagonal, contain nonzero entries. Thus A is banded banded with half-bandwidth
1. See
n -- 1.
n See Figure
Figure 10.7
10.7 for
for the
the sparsity
sparsity pattern
pattern of
of A.
A.
is completely
It is straightforward to
completely straightforward apply Gaussian
to apply Gaussian elimination
elimination with
with back sub-
back sub-
stitution to
stitution to aa banded system. Indeed, the typical step of the algorithm
banded system. algorithm is just as
in the
in the dense
dense case,
case, except that the innerinner loops run over a limited
limited range of of indices-
indices—
keeping the
keeping the computation
computation within
within the
the band.
band. Here
Here is
is the algorithm:
the algorithm:
for i = 1,2, ... , n - 1
for j = i + 1, i + 2, ... , mini i + p, n}
k· t- ~
J~ Ai;
bj t- bj - Ajibi
for k = i + 1,i + 2, ... ,min{i + p,n}
Ajk t- Ajk - AjiAik

for i = n, n - 1, ... ,1
bi t- (bi - Ej=i+l Aijbj ) jAii

(Here, again, we
we assume that no row interchanges
interchanges are required.)
It is easy to show that the above algorithm requires O(2p22n) n) operations
operations (see
Exercise 2)—a considerable
Exercise 2)-a considerable savings if pp «n.
savings if For example,
<£ n. For example, consider
consider solving
solving Pois-
Pois-
son's equation in two dimensions, as discussed above. The discrete Laplacian (under
son's equation in two dimensions, as discussed above. The discrete Laplacian (under
(n —
Dirichlet conditions), is an (n I) 2 x (n -— 1)2
- 1)2 I) 2 banded matrix with half-bandwidth
1. The cost of solving such a banded system is O(2(n -— 1)4),
n -— 1. I) 4 ), as opposed to a
cost
cost of
of
10.2. Solving sparse linear systems
10.2. 477

..••
..

,,
10 _. , ••••••

20
_.
-.••••
e. ,
-.••••
e.

_.
_. e.
.....• ..••..
-..•... -....•.
,,
30

40 -.-.
-...•... -.-.-.•..•..
50

60

70
_.
....e.
-.-.
e.

,....
_.

...-. -....-.
-.
-.-.-. -.-.-.
....
80~ ______ ~ ______ ~
•• __
_____________ ~~. ~

o 20 40 60 80
nz = 369

Figure 10.7.
Figure 10.7. The
The sparsity
sparsity pattern of the
pattern of the discrete
discrete Laplacian (200 triangular
Laplacian (200 triangular
elements).
elements).

if the
if the standard
standard Gaussian elimination algorithm
Gaussian elimination algorithm isis used. (For SPD
used. (For SPD matrices,
matrices, these
these
operation counts
operation counts can
can be divided by
be divided by two.)
two.)
The
The cost of aa direct
cost of direct method
method performed
performed on on aa sparse
sparse matrix
matrix isis controlled,
controlled, not
not
merely by
merely the number
by the number of of nonzeros
nonzeros in
in the
the matrix,
matrix, but
but by
by the
the fill-in that occurs
fill-in that occurs during
during
the course
the course of
of the algorithm. Fill-in
the algorithm. is said
Fill-in is said to
to have occurred whenever
have occurred whenever an an entry
entry that
that
is originally zero becomes nonzero during the course of the algorithm. In factoring
aa banded
banded matrix,
matrix, fill-in occurs within
fill-in occurs within the
the bands,
bands, as
as can
can be
be seen
seen by
by inspecting
inspecting the
the
L and U
Land U factors
factors (see
(see Figure
Figure 10.8).
10.8). Entries
Entries that
that become
become nonzero
nonzero during
during the
the course
course
of the
of algorithm must
the algorithm must be be included in subsequent
included in subsequent calculations,
calculations, increasing
increasing the cost.
the cost.

10.2.3 Direct solution of general sparse systems


When A
When A isis sparse
sparse but not banded,
but not banded, it
it is
is more difficult to
more difficult to predict
predict the cost of
the cost of aa direct
direct
method. The cost cost is governed
governed by the degree of of fill-in,
fill-in, and
and when thethe matrix
matrix isis not
not
banded,
banded, the the fill-in is unpredictable.
fill-in is Figure 10.9
unpredictable. Figure 10.9 shows
shows aa symmetric
symmetric sparse
sparse matrix
matrix
A with
with the
the nonzeros
nonzeros placed
placed randomly,
randomly, and
and also
also the
the resulting fill-in.
fill-in. The
The original
original
matrix has
matrix has aa density
density ofof 9.46%,
9.46%, while the lower
lower triangular factor of
triangular factor of A has
has aa density
density
of over
of over 61%.
61%.
Sparse matrices
Sparse matrices whose
whose sparsity
sparsity pattern
pattern is unstructured are
is unstructured are particularly suited
particularly suited
to iterative
to methods. Iterative
iterative methods. Iterative methods
methods only
only require
require the ability to
the ability compute matrix-
to compute matrix-
vector
vector products,
products, suchsuch as
as Ap
Ap (and
(and possibly, for nonsymmetric
possibly, for matrices, the
nonsymmetric matrices, the product
product
T
A p). Therefore, the particular sparsity pattern is relatively unimportant; the cost
AT p). Therefore, the particular sparsity pattern is relatively unimportant; the cost
478 10. More about finite element
Chapter 10. element methods

20

40 40

60 60

80"'-_ _ _ __ 80"'-_ _ _ _ __
o 20 40 60 80 o 20 40 60 80
nz = 737 nz =737

Figure 10.8.
Figure 10.8. The
The sparsity
sparsity pattern of the
pattern of L {left}
the L and U
(left) and (right) factors
U {right} factors of
of
the discrete Laplacian (200 triangular elements).
the discrete Laplacian {200 triangular elements}.

of the
of the matrix-vector
matrix-vector product is mostly
product is mostly governed
governed by
by the density of
the density of the matrix (the
the matrix (the
percentage of
percentage of nonzero
nonzero entries).
entries).

10.2.4
10.2.4 Iterative solution
Iterative solution of sparse linear
of sparse linear systems
systems
Even when
Even when A is sparse,
A is sparse, itit may
may be too costly,
be too costly, in terms of
in terms of arithemtic
arithemtic operations
operations or or
memory (or
memory (or both),
both), to solve Ax
to solve Ax = = bb directly.
directly. An
An alternative
alternative is is to
to use
use anan iterative
iterative
algorithm, which
algorithm, which produces
produces aa sequence
sequence of of increasingly
increasingly accurate
accurate approximations
approximations to to the
the
true solution.
true solution. Although
Although the exact solution
the exact solution can
can generally
generally notnot be obtained except
be obtained except in
in
the limit
the limit (that
(that is,
is, an
an infinite
infinite number
number of of steps
steps is
is required
required to to get the exact
get the exact solution),
solution),
in many
in cases aa relatively
many cases relatively fewfew steps
steps can
can produce
produce an an approximate
approximate solution
solution that
that
is sufficiently
is sufficiently accurate.
accurate. Indeed,
Indeed, we should keep
we should keep inin mind
mind that,
that, inin the
the context
context ofof
solving differential
solving differential equations,
equations, the "exact" solution
the "exact" solution to Ax = b
to Ax is not
b is really the
not really the
exact solution-it
exact solution—it is is only
only an
an approximation
approximation to to the true solution
the true solution ofof the
the differential
differential
equation. Therefore,
equation. Therefore, as long long as the
the iterative algorithm introduces
iterative algorithm introduces errors
errors no larger
no larger
than the
than discretization errors,
the discretization errors, it
it is
is perfectly satisfactory.
perfectly satisfactory.
Many iterative
Many iterative algorithms
algorithms have
have been
been developed,
developed, and and itit is
is beyond
beyond the the scope
scope of
of
this book to survey them. We will content ourselves with outlining the conjugate
this book to survey them. We will content ourselves with outlining the conjugate
gradient (CG)
gradient (CG) method,
method, the most popular
the most algorithm for
popular algorithm for solving
solving SPDSPD systems.
systems. (The
(The
stiffness matrix
stiffness matrix K from aa finite
K from element problem,
finite element being aa Gram
problem, being Gram matrix,
matrix, is is SPD-see
SPD—see
Exercise 6.)
Exercise 6.) We
We will
will also
also briefly
briefly discuss
discuss preconditioning,
preconditioning, aa method
method for for accelerating
accelerating
convergence.
convergence.
10.2. Solving
10.2. Solving sparse linear systems 479

o 50 100
nz =946 nz =3096

Figure 10.9.
Figure 10.9. A random sparse
A random matrix (left)
sparse matrix (left) and
and its lower triangular
its lower triangular factor
factor
(right).
(right).

The CG
The CG method
method is
is actually
actually an
an algorithm
algorithm for minimizing aa quadratic
for minimizing form. If
quadratic form. If
n
nxn igisSPD
A eE RRnxn SPDand
and0¢: :RRn-»--tRRisisdenned
definedbyby
1
¢(x) = "2x. Ax - b· x, (10.7)

then aa direct
then direct calculation
calculation (see
(see Exercise 3) shows
Exercise 3) shows that
that
"\l¢(x) = Ax - h. (10.8)
Therefore,
Therefore, the
the unique
unique stationary
stationary point
point of 0 is
of ¢ is
x = A-lb.
Moreover, aa consideration
Moreover, consideration ofof the second derivative
the second derivative matrix shows that
matrix shows that this stationary
this stationary
point
point is
is the
the global
global minimizer
minimizer of of ¢0 (a
(a quadratic form defined
quadratic form defined by an SPD
by an SPD matrix
matrix isis
analogous to
analogous to aa scalar
scalar quadratic
quadratic ax ax22+bx+c
+bx+c with
with aa> > 0—see
O-see Figure 10.10). Therefore,
Figure 10.10). Therefore,
solving Ax =
solving =b b and
and minimizing
minimizing ¢ 0 are
are equivalent.
equivalent.
We
We can
can thus
thus apply any iterative
apply any iterative minimization
minimization algorithm
algorithm to 0, and,
to ¢, and, assuming
assuming
it works,
it works, itit will converge to
will converge to the desired value
the desired value of x. A
of x. A large class of
large class of minimization
minimization
algorithms are
algorithms descent methods
are descent methods based
based onon aa line
line search. Such algorithms
search. Such algorithms areare based
based
on the
on the idea
idea ofof aa descent direction: Given
Given anan estimate
estimate x^ of the
x(i) of the solution,
solution, aa descent
descent
direction p
direction p isis aa direction
direction such
such that,
that, starting
starting from
from x^, 0 decreases
x(i), ¢ decreases in in the direction
the direction
of p.
of This means
p. This means that,
that, for all a
for all a > 00 sufficiently
sufficiently small,
small,
¢(x(i) + ap) < ¢(x(i))
480 10. More about finite element methods
Chapter 10. methods

y x

Figure 10.10.
Figure 10.10. The
The graph of aa quadratic
graph of quadratic form defined by aa positive
form defined definite
positive definite
matrix. The
matrix. The contours
contours of
of the
the function are also
junction are also shown.
shown.

holds. Equivalently,
holds. Equivalently, this
this means
means that the directional
that the directional derivative
derivative of
of ¢0 at
at x(i)
xW inin the
the
direction of
direction of pp is
is negative, that is,
negative, that is,
V'¢(x(i)) . p < O.
Given aa descent
Given descent direction,
direction, aa line
line search
search algorithm
algorithm will
will seek
seek to minimize ¢0 along
to minimize along the
the
ray (x^ + ap
ray {x(i) ap :: aa > 0} (that
20} (that is, is, it
it will
will search
search along
along this
this "line,"
"line," which is really
which is really aa
ray).
ray).
Since ¢0 is
Since is quadratic,
quadratic, it it is
is particularly easy to
particularly easy to perform the line
perform the line search-along
search—along
aa one-dimensional
one-dimensional subset,
subset, ¢(j> reduces
reduces to to aa scalar
scalar quadratic.
quadratic. Indeed,
Indeed,

¢(x(i) + ap) = ~(x(i) + ap) . A(x(i) + ap) - b· (x (i) + ap)


2
= ~x(i) . Ax(i) + ap' Ax(i) + a
2
p. Ap - b· x(i) - ab· p
2 2
2
= ~ p. Ap +a (p. Ax(i) - P . b) + ¢(x(i))
= ~2 p.Ap-ap. (b-Ax(i))
A was used to combine the terms x(i)
(the symmetry of A x^ .• Ap/2 p • Ax^/2)-
Ap/2 and p. Ax(i) /2).
The minimum
The is easily
minimum is easily seen
seen to occur at
to occur at
p. (b - Ax(i))
a- --'----.:.... (10.9)
- p·Ap .
10.2. Solving sparse linear systems
10.2. 481
481

How should the


How should descent direction
the descent direction be
be chosen?
chosen? The
The obvious
obvious choice is the
choice is steepest
the steepest
descent direction
descent direction

since the
the directional derivative of ¢ </> at x^
x(i) is as negative as possible in this direction.
The resulting
The algorithm (choose
resulting algorithm (choose aa starting
starting point,
point, move
move to to the
the minimum
minimum in in the
the
steepest descent
steepest descent direction, calculate the
direction, calculate steepest descent
the steepest descent direction at that
direction at that new point,
new point,
and
and repeat)
repeat) is is called
called the
the steepest
steepest descent algorithm. It
descent algorithm. is guaranteed
It is guaranteed to converge to
to converge to
the
the minimizer
minimizer x x of
of 0,
¢, that
that is,
is, to
to the
the solution
solution of
of Ax
Ax == b.
h. However,
However, it it can
can be
be shown
shown
that
that the steepest descent
the steepest descent method
method converges slowly, especially
converges slowly, especially when
when the
the eigenvalues
eigenvalues
of A differ
differ greatly inin magnitude (when (when this is is true, the matrix A is said said to be
ill-conditioned)..
ill-conditioned)
For an
For example of
an example of aa line search in
line search in the steepest descent
the steepest descent direction, see Figure
direction, see Figure
10.11 and
10.11 and Exercise
Exercise 7.7.

5~--~----------~--~----~--~

-10~--~----~2----~3~---4~--~5----~6

Figure 10.11. The contours


Figure 10.11. of the
contours of the quadratic form from Figure 10.10. The
10.10. The
steepest
steepest descent
descent direction from xx =
direction from = (4,2) (marked by
(4,2) (marked the "0")
by the "o") is
is indicated, along
indicated, along
with the
with the minimizer
minimizer in the steepest
in the descent direction
steepest descent direction (marked
(marked by "o").
by "<:> "). The desired
The desired
(global) minimizer is marked by
(global) minimizer is marked by "x."

Example 10.2. To
Example 10.2. To test
test the algorithms described
the algorithms described in this section,
in this section, we
we will
will use
use the
the
BVP
BVP

-~u = f(x) in n, (10.10)


u = 0 on an,
482 10. More about finite element methods
Chapter 10. methods

where n
where fi is
is the
the unit
unit square
square and
and
f(x) = -2 (-xi + x~ - (-1 + X2)X2 + 3X1(-1 + X2)X2).
The exact
The exact solution
solution is
is
u(x) = xix2(1- x1)(1- X2).
We establish
We establish aa regular
regular mesh
mesh on on n£7 by
by dividing the x\
dividing the and #2
Xl and intervals into
X2 intervals into 64 subin-
subin-
tervals
tervals each. This results
each. This results in 6422 triangles
in 22 .• 64 and 63
triangles and 6322 =
= 3969
3969 free
free nodes. The finite
nodes. The finite
element
element equation,
equation, K Kuu == f, isis therefore
therefore 3969
3969 x 3969
3969 (a (a fairly
fairly large
large system,
system, but very
but very
sparse).
sparse).
We apply
We apply thethe steepest
steepest descent
descent algorithm
algorithm toto solve
solve KuKu = f. f. One
One hundred
hundred steps,
steps,
starting with the
starting with the zero
zero vector
vector asas the
the initial estimate, produces
initial estimate, produces an estimate of
an estimate of u
u that
that
differs from
differs from thethe exact value uu by
exact value about 76% in
by about the Euclidean
in the Euclidean norm.norm. TheThe error
error inin
the corresponding
the corresponding piecewise linear function,
piecewise linear function, compared
compared to to the
the exact
exact solution
solution u,u, isis
about 72% in
about 72% in the
the energy
energy norm.
norm. By comparison, the
By comparison, the exact solution uu of
exact solution Ku =
of Ku = ff
corresponds to
corresponds to aa piecewise linear
linear function thatthat has
has an an error of about 3% in in the
the
energy norm.
energy
Clearly these results
Clearly results are notnot very good. If If we take 10001000 steps instead of of 100,
the errors become about 25% Euclidean norm and 23%
25% in the Euclidean 23% in the energy
energy norm.
It appears that
It appears that wewe can
can obtain
obtain an an accurate
accurate answer using steepest
answer using steepest descent,
descent, but only
but only
by taking
by taking aa large
large number
number of of steps.
steps.

10.2.5 The conjugate gradient algorithm


The conjugate
The conjugate gradient (CG) algorithm
gradient (CG) algorithm isis another descent algorithm
another descent algorithm thatthat is is usually
usually aa
great improvement
great improvement over over the
the steepest
steepest descent
descent method.
method. The The problem
problem withwith the steepest
the steepest
descent method is that,
descent that, while
while the steepest
steepest descent direction
direction is locally optimal,
optimal, from from
aa global
global point
point of of view,
view, the
the search
search directions
directions areare poorly
poorly chosen.
chosen. Indeed,
Indeed, it it can
can bebe
shown that
shown successive search
that successive search directions
directions are
are orthogonal
orthogonal (see
(see Exercise
Exercise 4). 4). It It is
is not
not
efficient to
efficient approach the
to approach desired solution
the desired solution via orthogonal steps
via orthogonal steps (after
(after all,
all, the shortest
the shortest
path between
path between two two points follows aa straight
points follows line).
straight line).
The
The CGCG algorithm defines the
algorithm defines successive search
the successive search directions
directions to to satisfy
satisfy aa pleas-
pleas-
ing global
ing global property—basically
property-basically that each step
that each step preserves
preserves the optimality property
the optimality property of of
previous steps. To
previous steps. To be be precise, after kk steps
precise, after steps ofof CG,
CG, the estimated solutions
the estimated solutions is the
is the
minimizer of
minimizer of ¢0 over
over the
the /^-dimensional subset spanned
k-dimensional subset spanned byby the first k search
the first search direc-
direc-
tions.
tions.
It is
It is rather
rather difficult to derive
difficult to derive the
the CG
CG algorithm—the
algorithm-the final form results
final form results fromfrom
several nonobvious
several simplifications. We
nonobvious simplifications. will content
We will content ourselves
ourselves with showing the
with showing the
critical step:
critical step: the computation of
the computation of the search direction.
the search direction. WeWe will assume that
will assume that the
the
initial estimate
estimate of the solution is x^°^ x(O) = 0, that the first kk search directions are
p(i) ? p(2)
p(l), p(2),^ ... ^,p(k),
p(fc) ^ ^d
and tthat
nat after
after kk steps
steps we
we have
have determined
determined ai,a1, 0:2,
0:2, •...
• • ,,ak
&k soso that
that
k
x(k) =L aiP(i)
i=l

solves
min {¢(x) x E span{p(1), ... ,p(k)}} .
Solving sparse linear systems
10.2. Solving 483

fe+11
We now wish to find a new search direction p(
p(k+ )) with the following property: If
If

x(k+1) = x(k) + ak+lp(k+1) ,


where ak+l
ctk+i solves

fc+11
then x(
x(k+ )) solves

min {¢>(x) : x E span{p(1), ... ,p(k+1)}} . (10.11)


fc+1
It is not clear that such a p(
p(k+1) ) can be found; however,
however, it can be, as we
we now
now show.
To (10.11), we
To solve (1O.11), we must /?i, /92, ...
must find f31,/h • • • ,,f3k+1
0k+i such that
that

is as small as possible. (We 0k+ip(k+11)\ , from the sum


(We separate the last term, f3k+1p(k+
because
because we already
already know how to make

as small as possible.) Some straightforward


straightforward algebra
algebra shows that

¢> (t, f3iP(i) + f3k+lP(k+1)) = ¢> (t, f3iP(i))

1
+f3k+lP(k+ ) . A (t, f3iP(i)) + ¢> (f3k+ 1P(k+1)) .

fc+1
Here is the
the crucial observation: If we can choose p(
observation: If p(k+1)) so that

is zero, then

The minimization
minimization problem
problem is then "decoupled."
"decoupled." That is, we can independently
choose 8-1. 8<> 81. to minimize
choose f31, f32, ... ,f3k to minimize

(10.12)
484 10. More about finite element methods
Chapter 10.

and Pk+I
and @k+i to minimize
minimize
¢' (Pk+ I P(k+1)) ,

and the
and the resulting /?i,$2, ...
resulting PI,P2, • • • ,flk+i
,Pk+1 will
will be
be the solution of
the solution of (10.11).
(10.11). This
This is
is what
what we
we
want, since we
want, since we already
already have
have computed
computed thethe minimizer
minimizer of of (10.12).
(10.12).
Our problem
Our problem then
then reduces
reduces to to finding p(fe+1I )) to
finding p(k+ satisfy
to satisfy
k
L (PiP(k+1) . Ap(i)) = O.
i=1

It is
It is certainly
certainly sufficient
sufficient to
to satisfy
satisfy
p(k+1) . Ap(i) = 0, i = 1,2, ... , k.
We can assume by induction that
p(j) . Ap(i) = 0, i,j = 1,2, ... ,k, i ¥-j. (10.13)
We can
can recognize condition (10.13) as stating
stating that the vectors p^,p^,...
p(1), p(2), ... ,, p(k)
p^
82
are orthogonal with respect
respect to the inner product82
(X,Y)A = X· Ay.
To compute the search
search direction p( fc+1I ),
direction p(k+ ), then, we
we just take aa descent
descent direction
direction
and
and subtract
subtract off its component
off its component lying
lying in
in the subspace
the subspace

Sk = span {p(1), p(2), ... , p(k) } ;

the result will be orthogonal to each of the


the vectors p(1),
p^\p^,. - - ,p(k).
p(2), ... , p^- We will use
the steepest
steepest descent direction r == — V^(x( fc )) to generate the new search direction.
-\7¢,(x(k))
To
To achieve
achieve the desired orthogonality,
the desired orthogonality, we
we must
must compute
compute the
the component
component of of rr in
in SSkfc
by projecting
projecting r onto SkSk in the inner product
product defined by A. We We therefore take

(k+1) _ _ ~ r· Ap(i) (i)


P - r ~ p(i) . Ap(i) P .
• =1

For reasons
For reasons that
that we
we cannot
cannot explain
explain here,
here, most
most of
of the
the inner
inner products
products rr·• ApW are
Ap(i) are
zero, and the result is
(k+I) _ _ r· Ap(k) (k)
P - r p(k). Ap(k) P (10.14)

We can then
We can then use use the formula from
the formula from (10.9)
(10.9) toto find
find the
the minimizer Ctk+1 in
minimizer ak+i in the direction
the direction
fe+1
of p(
p(k+ I ),
) , and
and we will have found x(k+x(fe+1I ).
).
By
By taking advantage of
taking advantage of the common features
the common features ofthe
of the formulas
formulas (10.9)
(10.9) and
and (10.14)
(10.14)
(and
(and using
using somesome other simplifications), we
other simplifications), can express
we can express the
the CG
CG algorithm
algorithm in in the
the
fc
following efficient
efficient form. (The vector b -— Ax( Ax(k)) is called the
the residual in the
the equation
Ax
Ax = = b—it
b-it is is the
the amount
amount by
by which
which the
the equation
equation fails
fails to
to be
be satisfied.)
satisfied.)
82
It can
82It can be
be shown
shown that, since A
that, since is positive
A is positive definite,
definite, x
X·• Ay
Ay defines
defines an
an inner
inner product R n ; see
on Rnj
product on see
Exercise 5.
Exercise 5.
10.2. Solving sparse
10.2. sparse linear systems 485
485

rr == bb -— Ax Ax (* (* Compute
Compute the
the initial
initial residual
residual *)*)
pp «— r (* Compute the initial search
+- r (* Compute the initial search direction direction *)
Ci <- r • r
Cl+-r·r
for fc
for k == 1,2,
l , 2 , ...
...
v «— Ap
v+- Ap
c2 <- p • v
C2+-P'V
o: +-
0: <— ~^ (* (* Solve
Solve the
the one-dimensional
one-dimensional minimization
minimization problem
problem *)
*)
-f- xx + o:p
xx +- ap (*(* Update
Update the
the estimate
estimate of of the
the solution
solution *)
rr +-
«— rr -—o:v
CKV (* Compute
Compute thethe new
new residual
residual *)
c3 «- rr ·• rr
c3+-
£<-S
f3 +- ~ Cl
p -f-
P ftp + rr (*
+- f3p (* Compute
Compute thethe new
new search
search direction
direction *)
*)
Ci <-C
Cl +- C33

The reader
The reader should
should note that only
note that only aa single
single matrix-vector
matrix-vector product
product isis required
required at
at each
each
step of
step of the
the algorithm,
algorithm, making
making it it very
very efficient.
efficient. We
We emphasize
emphasize that
that we
we have
have not
not
83
derived all
derived all of
of the
the steps
steps in
in the
the CG
CG algorithm.
algorithm.83
The name
The "conjugate gradients"
name "conjugate gradients" isis derived
derived from
from the
the fact
fact that
that many
many authors
authors
refer to
refer to the orthogonality of
the orthogonality of the
the search
search directions,
directions, in
in the inner product
the inner product defined
defined
by A, as
by A, as A-conjugacy. Therefore, the
A-conjugacy. Therefore, the key
key step
step is
is to
to make
make thethe (negative)
(negative) gradient
gradient
direction conjugate
direction to the
conjugate to the previous
previous search
search directions.
directions.

Example 10.3.
Example 10.3. We
We apply
apply 100
100 steps
steps of
of the
the CG
CG method
method to
to the
the system
system KuKu == ff from
from
Example 10.2. The
Example 10.2. The result
result differs
differs from the exact
from the solution uu by
exact solution by about
about 0.001%
0.001% inin the
the
Euclidean norm, and
Euclidean norm, and the
the corresponding
corresponding piecewise linear function
piecewise linear is just
function is as accurate
just as accurate
(error of
(error of about
about 3% inin the
the energy
energy norm)
norm) asas that
that obtained
obtained from Ku = f
solving Ku
from solving
exactly.
exactly.

10.2.6 CG algorithm
Convergence of the CG
The CG
The CG algorithm
algorithm was was constructed
constructed soso that
that the
the fcth x( fc ), of
estimate, x(k),
kth estimate, of the
the solution
solution
2
xx minimizes
minimizes 4> over the
(j> over the fc-dimensional subspace Sk == span{p(1),
k-dimensional subspace spanjp^^p^ p(2), ),... ,p^}.
... ,p(k)}.
Therefore, x^ n ) minimizes
Therefore, x(n) minimizes 4> 0 over
over an
an n-dimensional
n-dimensional subspace
subspace of R n , that
of Rn, that is,
is, over
over all
all
of Rn. It
of Rn. It follows
follows that x(n) must
that x(n) must be
be the
the desired
desired solution: x(n) == x.
solution: x(n) x.
Because of
Because of this
this observation,
observation, the
the CG
CG algorithm
algorithm cancan be
be regarded
regarded as as aa direct
direct
method—it computes
method-it computes the the exact
exact solution
solution after
after aa finite
finite number
number of of steps
steps (at(at least
least
when performed
when performed in in floating
floating point arithmetic). There
point arithmetic). There are
are two
two reasons,
reasons, though,
though, why why
this property
this property isis irrelevant:
irrelevant:
1. In
1. In floating
floating point arithmetic, the
point arithmetic, the computed
computed search
search directions
directions will
will not
not actually
actually
be A-conjugate
be A-conjugate (due
(due to
to the
the accumulation
accumulation of
of round-off errors), and
round-off errors), and so,
so, in
in fact,
fact,
x^ n ) may
x(n) may differ
differ significantly
significantly from
from x.
x.

2. Even
2. Even apart
apart from
from the
the issue
issue of
of round-off
round-off errors,
errors, CG
CG is
is not
not used as aa direct
used as direct
method for the
method for the simple
simple reason
reason that
that nn steps
steps is
is too
too many!
many! We
We look
look to
to iterative
iterative
83
For aa complete
83For complete derivation
derivation and
and discussion
discussion of
of the
the CG
CG algorithm,
algorithm, see
see [19],
[19], for
for example.
example.
486 Chapter 10.
Chapter 10. More about finite
More about finite element
element methods
methods

methods when n is very large, making Gaussian elimination


methods elimination too expensive.
In such
In such aa case,
case, an
an iterative
iterative method
method must give aa reasonable
must give approximation in
reasonable approximation in
much less than
much less n iterations, or it also is too expensive. The CG algorithm
than n iterations, or it also is too expensive. The CG algorithm
is useful
useful precisely because it can give very good results in a relatively small
number of iterations.
iterations.

The
The rate
rate of convergence of
of convergence of CG
CG is is related
related to
to the condition number
the condition of A, which
number of which
is denned
is defined as
as the
the ratio
ratio of
of the
the largest eigenvalue of
largest eigenvalue of A toto the
the smallest.
smallest. When
When the the
condition
condition number
number is is relatively small (that
relatively small (that is,
is, when
when A is well-conditioned), CG
is well-conditioned), CG will
will
converge
converge rapidly.
rapidly. TheThe algorithm also works
algorithm also works well
well when
when thethe eigenvalues
eigenvalues ofof A are
are
clustered into
clustered into aa few
few groups.
groups. In this case,
In this even if
case, even if the
the largest eigenvalue is
largest eigenvalue is much
much
larger than
larger than the smallest, CG
the smallest, CG will
will perform
perform well.
well. The
The worst
worst case
case for
for CG is aa matrix
CG is matrix
A whose
A whose eigenvalues
eigenvalues areare spread
spread out over aa wide
out over range.
wide range.

10.2.7
10.2.7 Preconditioned CG
Preconditioned CG
It is
It is often
often possible
possible toto replace
replace aa matrix
matrix A A with
with aa related
related matrix
matrix whose
whose eigenvalues
eigenvalues
are clustered, and
are and for
for which CG CG will converge
converge quickly.
quickly. This technique is called called
preconditioning, and
preconditioning, and itit requires
requires that
that one find aa matrix
one find matrix M M (the
(the preconditioned
preconditioner) thatthat is
is
somehow similar
somehow to A (in
similar to (in terms
terms ofof its
its eigenvalues)
eigenvalues) butbut is
is much simpler to
much simpler to invert.
invert. At
At
each step
each step of
of the
the preconditioned
preconditioned conjugate gradient (PCG)
conjugate gradient (PCG) algorithm,
algorithm, it it is
is necessary
necessary
to solve an
to solve an equation
equation of of the form Mq
the form Mq == r. r.
Preconditioners
Preconditioners can can be be found
found in in many
many different
different ways,
ways, but
but most
most require
require anan
intimate knowledge
intimate knowledge of of the
the matrix
matrix A.
A. ForFor this
this reason, there are
reason, there are few
few general-purpose
general-purpose
methods.
methods. One One method
method that that is is often
often used
used isis to define aa preconditioner
to define preconditioner from from anan
incomplete factorization
incomplete factorization of of A.
A. An incomplete factorization
An incomplete factorization isis aa factorization
factorization (like
(like
Cholesky) in in which fill-in
fill-in isis limited by fiat.
fiat. Another method for constructing pre- pre-
conditioners is
conditioners is to
to replace
replace A A by
by aa simpler
simpler matrix
matrix (perhaps arising from
(perhaps arising from aa simpler
simpler
PDE)
PDE) that
that can
can be inverted by
be inverted by FFT methods.
FFT methods.

Exercises
nxn
1. Suppose
1. Suppose AA E6 RRnxn. . Determine the exact
Determine the exact number of arithmetic
number of arithmetic operations
operations
required for the computation ofof A = LU via
= LU via Gaussian elimination.
elimination. Further
count the number of operations L-1b and U-1L-1b.
operations required to compute L-1b U~ 1 L~ 1 b.
Verify
Verify the
the results
results given
given in the text.
in the text. The
The following formulas will
following formulas will be useful:
be useful:

ti =
i=l
n(n + 1),
2
ti
i=l
2 = n(n+1)(2n+1).
6

nxn
2. Suppose A
A E€ RRnxn is banded with half-bandwidth
half-bandwidth p.p. Determine
Determine the exact
number of arithmetic
number of arithmetic operations
operations required
required to
to factor
factor A into L
A into LU.
U.
10.2. Solving sparse linear systems
10.2. 487

nxn
3. Let A E
6 RRnxn € R n . Define ¢(f> as in (10.7).
be symmetric, and suppose bbERn.
Show that
Show that (10.8)
(10.8) holds. (Hint: One
holds. (Hint: One method is to
method is to write out
write out

and then
and show that
then show that
8¢ n
-8

(x) = "L...J AijXj - bi ·
Z j=i

Another method is to show that

¢(x + y) = ¢(x) + (Ax - b) . y + 0 (1IYI12) .


In either case, the symmetry
symmetry of A is essential.)
nxn
Let A e
4. Let ERRnxn Rnn be given,
be SPD, let b,y eE R given, and suppose a*
a* solves

min¢(y - aV'¢(y)),
'"
where
1
¢(x) = -x·
2
Ax - b . x.

Show that
Show that
V'¢(y - a*V'¢(y))
is orthogonal to V'
V0(y).
¢(y ).
nxn
5. Suppose A eE R
Rnxn is SPD. Show that

(X,y)A = X· Ay

R nn..
defines an inner product on R

6. Let {Vi,
6. {vi, v 2 , ...
V2, . . . ,, vvnn}} be
be aa linearly
linearly independent set
set of
of vectors in an
an inner
inner prod-
prod-
uct space, and let G E Rnxn R n x n be the corresponding Gram matrix:

Prove
Prove that G is
that G SPD. (See
is SPD. (See the
the hint for Exercise
hint for 3.4.6.)
Exercise 3.4.6.)

quadratic form shown in Figures 10.10


7. The quadratic 10.10and
and 10.11
10.11is is
1
¢(x) = 2'x, Ax - b .x + 20,
where
where
A=[i ~],b=[~].
488 Chapter 10.
10. More about finite element methods

(a) Perform one step


step of the steepest descent algorithm, beginning
beginning at x(°) =
x(O) =
(4,2). Compute the steepest descent direction at x(°)
x(O) and the minimizer
minimizer
along the line defined by the steepest
steepest descent direction. Compare your
results to Figure 10.1I.
10.11.
(b) Now compute the
(b) second step of the steepest
the second steepest descent algorithm. Do you
arrive
arrive at
at the
the exact solution of
exact solution of Ax
Ax == b?
b?
(c) Perform two steps of CG, beginning with x(°) = o.
x(O) = 0. Do you obtain the
exact solution?
exact solution?

8. When applying an iterative


iterative method, a stopping
stopping criterion is essential:
essential: One
must decide, on
must decide, on the
the basis
basis of
of some computable quantity,
some computable quantity, when
when the computed
the computed
solution
solution is
is accurate
accurate enough
enough that
that one
one can
can stop
stop the
the iteration.
iteration. A common stop-
common stop-
ping
ping criterion
criterion is
is to stop when
to stop when the
the relative residual,
relative residual,

iiAx(k) - bii
Ilbll
falls below some
some predetermined tolerance e.
E.

(a) Write a program implementing the CG algorithm with the above stop-
stop-
ping criterion.
ping criterion.
(b)
(b) Use
Use your
your program
program to solve the
to solve finite element
the finite element equation
equation Ku = = f arising
arising
from the
the BVP (10.10) for meshes of various sizes. For a fixed value of of
e,
E, how does the
how does the number
number of
of iterations
iterations required depend on
required depend on the
the number
number of
of
unknowns (free nodes)?

9. Explain
Explain how the CG algorithm
algorithm must be modified if the initial estimate
estimate x(°)
x(O)
is not the zero vector. (Hint: Think
Think of using the CG algorithm to compute
compute
y =x — - x(°).
x(O). What linear
linear system does y satisfy?)

10.3
10.3 An outline of
An outline of the convergence theory
the convergence theory for
for finite
finite
element methods
element methods
We will now present
present an overview
overview of the
the convergence theory for Galerkin finite ele-
ment
ment methods for BVPs.
methods for BVPs. Our
Our discussion
discussion is
is little
little more
more than
than an
an outline, describing
outline, describing
the kinds of analysis that are required to prove that the finite element method
method
converges to the true solution as the mesh is refined. We will use the Dirichlet
problem
problem

-V'. (k(x)V'u) = f(x) in 0, (10.15)


u = 0 on ao

as
as our
our model problem.
model problem.
10.3. An outline of the convergence theory for finite element methods
10.3. 489

10.3.1 The
10.3.1 Sobolev space
The Sobolev H*(n)
space H~(n)
We begin
We begin by addressing the
by addressing the question
question of the proper
of the proper setting for the
setting for the weak form of
weak form the
of the
BVP. In Section
Section 8.4,
8.4, we derived
derived the
the weak form asas
find U E eben) such that a(u,v) = (f,v) for all v E eben). (10.16)
However, as we pointed out in Section 5.6 (for (for the one-dimensional case), the choice
of eb
of Cf^rj)
(n) for the space
space of
of test functions is not really appropriate for
for our purposes,
since the finite element method uses functions
functions that are not smooth enough to belong
to Cb(n).
<?£>(£)) • Moreover,
Moreover, the
the statement of the weak form does not require that the the test
functions be soso smooth.
smooth.
We can define the appropriate space of test functions by posing the following
question:
question: What
What properties
properties must the test
must the test functions
functions have
have in
in order
order that
that the variational
the variational
equation
equation
a(u,v) = (f,v)
L22 inner product of
be well-defined? The energy inner product is essentially the L of
OU OV ou OV
OXl OXl + OX2 OX2 .
(The coefficient
(The coefficient of
of the
the PDE,
PDE, fc(x),
k(x), is also involved.
is also However, if
involved. However, if we
we assume
assume that
that kk
is smooth and
is smooth and bounded,
bounded, then, for the
then, for the purposes
purposes ofof this
this discussion,
discussion, it
it may
may asas well
well
be constant and therefore can be ignored.)
ignored.) ItIt suffices, therefore,
therefore, that the partial
2
derivatives
derivatives of and v belong
of u and to L
belong to and it
(t)}, and
L2(O), it is
is natural to define
natural to define the
the space
space

(10.17)

An
An issue
issue that immediately arises
that immediately arises is
is the definition of
the definition of the
the partial derivatives of
partial derivatives u.
of u.
Need
Need du/dxi, OU/OX2 exist
OU/OX1, du/dx^ at every
exist at every point
point of
of £)? If so,
O? If so, then
then thethe use
use ofof piecewise
piecewise
linear functions
functions is still ruled out.
The classical
The classical definition
definition of
of partial
partial derivatives
derivatives (as
(as presented
presented in in calculus
calculus books
books
and courses), in terms of limits of difference
difference quotients, is purely local. There is
another
another way to define derivatives that is more global in nature, and therefore more
tolerant of certain kinds of singularities. We begin by defining the the space C8"(O)
Co°(tl) to
84
be the set of all infinitely differentiable
differentiable functions whose support84 does not intersect
the boundary of of fi. (That is, the support of
O. (That of a e8"CO)
(70°(fJ) function
function is strictly in in the
the
interior of 0.) If f/ is any
fi.) If any smooth function defined on fK and ¢
0 and G C8"(O),
(f> E (70° (fJ), then, by
integration
integration by parts,
by parts,
(10.18)

(the boundary integral must vanish since ¢ 0 and all of its derivatives are zero on the
2
boundary). We can define derivative of f/ E
define aa derivative G LL2(O)
(f2) by this equation:
equation: If
If there is
is aa
2
function g E
€L (17) such that
L2(O)

r
in
g¢ = - rf ~¢ for all ¢ E ego(o),
in UXl
84
The reader
84The reader will
will recall
recall that
that the
the support of aa function
support of function is
is the
the closure
closure of
of the
the set
set on which the
on which the
function is nonzero.
function is nonzero.
490 Chapter 10. More about finite element methods

then 9g is called the (weak)


(weak) partial derivative of
of 1
/ with respect
respect to x\,
Xl, and denoted
denoted
1/ aXI. The
df/dxi.
a The definition of a
definition of 1/ aX2 in
df/dx2 in the weak sense
sense is entirely analogous.
analogous.
We use the same notation for the weak partial derivatives
notation for derivatives asas we
we do for thethe
classical partial derivatives;
classical derivatives; it can be proved that if if the classical
classical partial derivatives
derivatives
of / exist,
of 1 exist, then so do
then so the weak
do the weak partial
partial derivatives,
derivatives, and
and the
the two
two are the same.
are the same. The
The
definition (10.17) is to be interpreted
interpreted in terms of weak derivatives. The space HI Hl(tl)
(0)
is an example of
is of aa Sobolev space.
Sobolev space.
It can
It can be shown
shown that continuous
continuous piecewise linear functions
functions belong to HI /f1(J7),
(0),
while, for example, discontinuous piecewise linear functions do not. Exercise 2
explores
explores this question in
this question one dimension;
in one dimension; aa more complete justification
more complete justification is
is beyond the
beyond the
scope of
scope of this
this book.
book.
The standard inner
The standard inner product
product for Hl(tl) is
for HI(O) is

(f,g)Hl = i(
n
Ig
a 1 ag
+ -a
Xl Xl
a 1 ag )
-a + -a -a
X2 X2
'

and
and the induced norm
the induced norm is
is

A
A function
function 9 g isis aa good
good approximation
approximation to to 1
/ in
in the H1 sense
the HI sense if
if and
and only
only if is aa
g is
if 9
good approximation to
good approximation to 1/ and \7 9 is
and Vg is aa good
good approximation
approximation to to V#. If we
\7 g. If we were
were toto
measure closeness in the L L22 norm, onon the other hand, V# \7 9 need not be close to \71.
close to V/.
For an
For an example
example of of the
the distinction
distinction (in(in one
one dimension,
dimension, whichwhich isis easier
easier toto visualize),
visualize),
see Figure
see 10.12.
Figure 10.12.
l
Just as the
Just as the expression
expression a(u, v) makes
a(u, v) sense as
makes sense as long
long as u and
as u and vv belong
belong to to H (0),
HI(O),
the right-hand
right-hand side (/, (f, v) of the variational equation well-defined as long as 1/
equation is well-defined
belongs
belongs to L 2 (f2). It
to L2(0). It is in this
is in this sense that the
sense that the variational
variational equation
equation a(u,v)
a(u,v) = (f,v) is
= (f'v) is
called the weak form of the BVP: the equation makes sense under under relatively
relatively weak
assumptions on
assumptions on the functions involved.
the functions involved.
l
We
We now define the
now define subspace HJ(O)
the subspace #o(fJ) ofof H (ft) by
HI(O) by
HJ(O)={uEHI(O): u=OonaO}.

Then,
Then, by
by the so-called trace
the so-called trace theorem, HQ (17) is
theorem, HJ(O) is aa well-defined
well-defined and
and closed subspace
closed subspace
1
of H ^). Moreover, it can be shown that HI(O)
HI(O). Hl(fl) (and hence HJ(O))
#Q(^)) is complete
under the HIHl norm. (The notion of completeness was defined in Section 9.6.)
Moreover, the energy inner product is equivalent
equivalent to the HIH1 norm on the subspace
HQ($I), which
HJ(O), implies that
which implies that HJ(O) is complete
HQ(O,) is complete under
under the energy norm
the energy norm as
as well. It
well. It
then follows from the
the Riesz
Riesz representation theorem that the weak form of
representation theorem of the BVP,
which
which we
we now
now pose as
pose as
find u E HJ(O) such that a(u,v) = (f,v) for all v E HJ(O), (10.19)
2
has aa unique solution
solution for
for each / E
each 1 e L When /f is
(f2). When
L2(0). is continuous
continuous and
and there is
is a
classical solution uu to the
classical solution the BVP, then uu is also the unique solution
solution to
to the weak form
form
the BVP.
of the
element methods
10.3. An outline of the convergence theory for finite element 491

1.5,....------"""1 5-------"""1

), 0

-0.5'---------' -5'"-------
o 0.5 o 0.5
X X

Figure 10.12.
Figure 10.12. Two functions belonging to Hl(Q, 1)
to HI(O, 1) (left)
(left) and their deriva-
difference in the two functions is less than 5% in the L2
tives (right). The difference L2 norm,
norm,
1
but it 91%
it is more than 91 H norm.
% in the HI norm.

analytical results mentioned in this section, such as the trace


The various analytical
l
theorem, completeness of the Sobolev space H representation
(£t), and the Riesz representation
HI(O),
theorem, are
theorem, are discussed
discussed in
in advanced
advanced books on finite
books on finite elements,
elements, such
such as
as [6].
[6].

10.3.2
10.3.2 Best approximation
Best approximation in
in the
the energy
energy norm
norm
We now know
We now know that
that the
the weak
weak form
form of
of the
the BVP
BVP (10.15)
(10.15) has
has aa unique
unique solution
solution uu E€
for each
HQ($}) for
HJ(fl) each f/ E L 2 (f)). Moreover,
e L2(0). Moreover, given
given aa triangulation
triangulation T ofof fl,
fi, the
the space
space
of continuous
Vh of
Vh continuous piecewise linear functions
piecewise linear functions relative
relative toto T, satisfying
satisfying the
the Dirichlet
Dirichlet
boundary conditions, is a finite-dimensional
finite-dimensional subspace of -ffg(fl).
HJ(O). We can therefore
apply the Galerkin method to compute the best approximation approximation from V Vh,
h , in the
energy norm,
energy norm, to
to the
the true
true solution
solution u.u.

10.3.3 Approximation by
Approximation by piecewise
piecewise polynomials
polynomials
We have
We have seen
seen (at
(at least
least in
in outline)
outline) that
that the weak form
form (10.19)
(10.19) has
has aa unique solution
solution
and that
u, and that we
we can
can compute
compute thethe best
best approximation
approximation to
to u from
from the finite element
element
space Vh.
space The next
Vh. The question is:
next question is: How
How good
good is
is the
the best
best approximation
approximation fromfrom Vh?
V/j,?
approximation, and the simplest way
This is a question of piecewise polynomial approximation, way to
answer it
answer it is
is to
to consider
consider the
the piecewise linear
linear interpolant
interpolant of
of the
the true
true solution,
solution, which
492 10. More about finite element methods
Chapter 10.

is (using
is (using the
the usual
usual notation)
notation)
N
UI(X) = L U(XfJ¢i(X),
i=l

where
where x^, x / 2 , . ..
X/I, X/2,' . . ,, ~x.f
XfN are the
N are the free
free nodes
nodes of
of the
the mesh.
mesh. IfIf we
we can
can determine
determine how how well
well
HI
UI approximates Uu in
approximates in thethe energy
energy norm,
norm, then,
then, since
since UI
uj E€ Vh and the
Vh and the finite
finite element
element
approximation Uh
approximation Uh is is the
the best
best approximation
approximation to to U from Vh,
u from we know
Vh, we know that
that the
the error
error
in Uh
in is no
Uh is no greater.
greater.
can be
It can be shown
shown that, that, if
if Uu has
has some
some extra
extra smoothness
smoothness (in (in particular,
particular, if
if Uu is
is aa so-
lution of
lution of the
the strong
strong form form of of the
the BVP,
BVP, so
so that
that it
it is
is twice
twice continuously
continuously differentiable),
differentiable),
then
then

where h is
where is the
the length
length of
of the
the largest
largest side
side of
of any
any triangle
triangle in
in the
the mesh
mesh 1h and C is
Th and is aa
85
constant that depends on the particular
constant particular solution Uu but is independent of the mesh.
mesh.85
It follows that
(10.20)
also holds,
also holds, since
since \\u - Uh\\E ~ \\u - UI\\E'
piecewise linear
This completes the outline of the basic convergence theory for piecewise
Galerkin finite
Galerkin finite elements.
elements.

10.3.4
10.3.4 Elliptic regularity
Elliptic regularity and L2 estimates
and L2 estimates
would be desirable to have an estimate
It would estimate on the error in the L L22 norm. This can
be obtained
be obtained by by aa standard
standard "duality"
"duality" argument,
argument, provided
provided "elliptic
"elliptic regularity"
regularity" holds.
holds.
Assuming
Assuming that that the
the coefficient
coefficient kk is
is smooth,
smooth, when
when the
the domain
domain 0£) has
has aa smooth
smooth bound-
bound-
86
ary, or
ary, or when
when 0£) is is convex
convex86 with aa piecewise
with smooth boundary,
piecewise smooth boundary, then
then the solution of
the solution of
(10.15) is smoother than the right-hand side f/ by two two degrees of differentiability.
differentiability.
2
Thus, if
Thus, if f/ lies
lies in
in LL2, , then Uu and
and its
its partial derivatives
derivatives up
up to
to order
order two
two lie
lie in L2.
in L2.
This property (that the solution is smoother than the right-hand side) side) is referred
referred
to as elliptic regularity. As As long as elliptic regularity holds, it can be shown (by the
duality argument mentioned above) that

so that
so that

In each
In each of
of the
the three
three previous
previous inequalities,
inequalities, the
the constant
constant C represents
represents aa generic
generic con-
con-
stant (not
stant (not necessarily
necessarily the
the same
same in
in each
each inequality)
inequality) that
that can
can depend
depend on
on the
the particular
particular
solution Uu and
solution and the
the domain
domain 0f) but
but is
is independent
independent ofof h.
h.
85
There are
85There are some
some restrictions
restrictions on
on the
the nature
nature of
of the
the meshes
meshes Th as hh -+
TH as —>• 0,
0, basically
basically that the
that the
triangles do
triangles do not
not become arbitrarily "skinny."
become arbitrarily "skinny."
86
A set
86 A set 0fi is
is called
called convex
convex if,
if, whenever
whenever the endpoints of
the endpoints of aa line
line segment
segment lie
lie in
in 0,
J7, then
then the
the entire
entire
line segment
line segment lies
lies in
in O.
fi.
10.3. An
10.3. An outline
outline of
of the
the convergence theory for
convergence theory for finite
finite element
element methods
methods 493

Exercises
1. Suppose
1. Suppose ¢>
0E € CoCO) and I/ : n
Co*(ti) and fi -+
->• R
R is
is smooth.
smooth. Prove
Prove that
that

for = 1,2.
for i = 1,2. What would the
What would boundary integral
the boundary integral be in this
be in this integration
integration by parts
by parts
formula if
formula it were
if it were not assumed that
not assumed 0 is
that ¢> is zero on aO?
zero on dfi?
2. The
2. The purpose of this
purpose of this exercise
exercise is
is to
to illustrate why continuous
illustrate why continuous piecewise linear
piecewise linear
functions belong
functions belong to /^(O,!),
to HI but discontinuous
(0,1), but discontinuous piecewise linear functions
piecewise linear functions do
do
not.

(a) Define I/ : [0,1]


(a) Define [0,1] -+
-» R
R by
by

x,
I(x) = { I-x, °: ; x ::;
~<x::;1.
~,

Then
Then I/ is
is differentiable
differentiate (in
(in the
the classical
classical sense)
sense) everywhere
everywhere except
except at
at
= 1/2,
xx = 1/2, and
and
dl (x) =
dx
{I, ~ < x < ~,
-1, 2' < x < 1.
Show that
Show that I/ belongs
belongs to H1 (0,1)
to HI (0,1) and
and that
that its
its weak derivative is
weak derivative as defined
is as defined
above by
above by verifying
verifying that
that

{I dl (I d¢>
io dx (x)¢>(x) dx = - io I(x) dx (x) dx

for every
for every 0 6 Co(O,
¢> E 1). (Hint:
C™(Q, 1). (Hint: Start
Start with the integral
with the integral on
on the
the right,
right,
rewrite it
rewrite it aB
as the sum of
the sum of two
two integrals,
integrals, and
and apply
apply integration by parts
integration by parts to
to
each.)
each.)
(b) Define
(b) Define 9g :: [0,1]
[0,1] -+
->• R by
R by

g(x) ={ x,
2-x,
°: ; x ::; ~,
~<x::;1.

Then g,
Then g, just like /,
just like I, isis differentiable
differentiate (in
(in the
the claBsical
classical sense)
sense) except
except at
at
xx = 1/2, and
= 1/2, and
dg (x) = { 1, 0< x < ~,
dx -1, ~<x<1.

However, ^1(0,1).
However, 9g ¢£ HI(O, Show that
1). Show that it
it is
is not the
the CaBe
case that
that

{I dg (I d¢>
io dx (x)¢>(x) dx = - io g(x) dx (x) dx

for every
for every ¢>
0e C^°(0,l).
E CoCO, 1).
494 10. More about finite element
Chapter 10. element methods

l
3. Let
3. Let 0f] be the unit
be the square and
unit square and define
define /, €H
I,gg E (ty by
HI(O) by

I(x) = 1 + Xl + X2,
g(x) = I(x) + sin (m1fXI) sin (n1fX2).

Compute the
Compute the relative
relative difference in 1
difference in / and
and 9 in the
g in L22 and
the L HI1 norms.
and H norms.

4. The
4. The exact
exact solution
solution of
of the
the BVP
BVP

-cPu
- = 12x2 -
dx 2
6x 0
'
< X < 1,
u(O) = 0,
u(l) = 0

is u(x) = xx33(l
is u(x) (1 -— x). Consider the
x). Consider the regular mesh with
regular mesh three elements,
with three elements, the
the
subintervals [0,1/3]'
subintervals [0,1/3], [1/3,2/3],
[1/3,2/3], and
and [2/3,1].
[2/3,1].

(a) Compute
(a) Compute the
the piecewise
piecewise linear
linear finite element approximation
finite element approximation to
to u, and call
u, and call
it v.
it v.
(b) Compute
(b) Compute the
the piecewise linear interpolant
piecewise linear interpolant of
of u,
w, and
and call
call it
it w.
w.
approximations to u) in the energy
(c) Compute the error in v and w (as approximations
norm. Which is
norm. Which is smaller?
smaller?

10.4
10.4 Finite element
Finite element methods
methods for
for eigenvalue
eigenvalue problems
problems
In Section
In Section 9.7,
9.7, we described how
we described how eigenvalues
eigenvalues andand eigenfunctions
eigenfunctions exist
exist for
for noncon-
noncon-
stant coefficients
stant coefficients problems
problems onon (more
(more or
or less)
less) arbitrary
arbitrary domains,
domains, but
but we
we gave
gave no
no
techniques for
techniques for finding
finding them.
them. WeWe will
will now show how
now show finite element
how finite element methods
methods can
can
be used
be used to estimate
estimate eigenpairs.
eigenpairs. This
This will
will be
be aa fitting
fitting topic
topic to
to end
end this
this book,
book, as it
it
ties together
ties together our
our two
two main
main themes: (generalized) Fourier
themes: (generalized) Fourier series
series methods
methods and
and finite
finite
element methods.
element methods.
We
We will consider the
will consider following model
the following model problem:
problem:

-V'. (k(x)V'u) = Au in 0, (10.21)


u = 0 on ao.

We follow
We follow the
the usual
usual procedure to
to derive
derive the
the weak
weak form:
form: multiply
multiply by
by aa test
test function,
function,
integrate by parts:
and integrate

-V'. (k(x)V'u) = AU, x E 0


~ -V'. (k(x)V'u) v = AUV, x E 0, v E H6(O)

~ -In V' . (k(x)V'u) v AIn uv, v H6(O)


= E

~ In k(x)V'u· V'v = AIn uv, v HJ(O). E


10.4. Finite element
10.4. element methods for eigenvalue problems 495

In the
In the last
last step,
step, the boundary term
term vanishes
vanishes because ofof the boundary conditions
conditions
satisfied by the
satisfied the test function
function v. The
The weak form
form of
of the eigenvalue
eigenvalue problem is
is therefore

U E HJ(O), a(u,v) = A(U,V) for all v E HJ(O). (10.22)

We
We now apply Galerkin's
now apply Galerkin's method
method with
with piecewise linear finite
piecewise linear finite elements.
elements. We
We
write V
write for the
Vhh for the space
space of continuous piecewise
of continuous linear functions,
piecewise linear satisfying Dirichlet
functions, satisfying Dirichlet
conditions, relative
conditions, relative to
to a given
given mesh
mesh 'Th.
7ft. As usual, {</h,¢2,
{0i,02, ...
• • • ,¢n} will represent
,(f>n} will represent
the standard
the standard basis for Vh.
basis for Galerkin's method
Vh- Galerkin's method now reduces to
now reduces to

or to
or to
n
Uh = 2: Clj¢j, a(uh' ¢i) = A(Uh' ¢i), i = 1,2, ... , n.
j=l

Substituting the
Substituting the formula
formula for
for Uh, we obtain
we obtain

n n
=> 2: a(¢j, ¢i)CXj = A 2:(¢j, ¢i)CXj, i = 1,2, ... , n
j=l j=l
=> Ku= AMu,
where K E R n x n and ME
6 Rnxn M eR nxn
Rnxn areare the stiffness
stiffness and
and mass matrices, respectively,
encountered
encountered before.
before. IfIf we
we find
find A and
and u satisfying Ku
u satisfying Ku = = AMu, then
then A and
and the
the
corresponding
corresponding piecewise linear function
piecewise linear function Uh will approximate
Uh will approximate an an eigenpair
eigenpair of
of the
the
differential operator.
differential operator.
We do
We do not have the
not have space here
the space here to
to discuss
discuss the accuracy of
the accuracy of eigenvalues
eigenvalues and
and
eigenfunctions approximated
approximated by this method; the analysis depends on the theory
that was only
that was only sketched
sketched in in the
the previous section. Only
previous section. Only thethe smaller
smaller eigenvalues
eigenvalues com-
com-
puted by the above method will be reliable estimates estimates of the true eigenvalues. To
keep
keep our discussion on
our discussion on anan elementary
elementary level,
level, we
we will restrict our
will restrict attention to
our attention to the
the
computation
computation of of the
the smallest
smallest eigenvalue. (The (The reader will recall that that this
this smallest
smallest
eigenvalue can be quite important, for example, in mechanical vibrations. It defines
the fundamental frequency
the fundamental frequency of of aa system
system modeled
modeled by the wave
by the wave equation.)
equation.)
nxn nxn
Given two
Given two matrices
matrices KK Ee R R nxn and
and M M E eR Rnxn ,, the
the problem
problem

u ERn, U 1:- 0, A E C, Ku = AMu


is called a generalized
generalized eigenvalue problem. It can be converted to an ordinary eigen-
eigenvalue problem.
value
value problem
problem inin aa couple
couple of
of ways.
ways. For
For example,
example, when M is
when M is invertible,
invertible, then multi-
then multi-
plying
plying both sides of
both sides of the equation by
the equation M""11 yields
by M- yields
496 Chapter 10. More
Chapter 10. More about finite element
about finite element methods
methods

1
which
which is is the
the ordinary eigenvalue problem
ordinary eigenvalue problem for
for the
the matrix
matrix MM-1K. K. However,
However, this
this
-11
transformation
transformation has has several
several drawbacks,
drawbacks, notnot the
the least
least of
of which
which is is that M K
that M- will
K will
usually
usually not
not be
be symmetric even if
symmetric even if both
both KK and
and MM are
are symmetric.
symmetric. (The(The reader should
reader should
recall that symmetric
recall that symmetric matrices
matrices have many special
have many special properties
properties with
with respect
respect toto the
the
eigenvalue
eigenvalue problem:
problem: realreal eigenvalues, orthogonal eigenvectors,
eigenvalues, orthogonal etc.)
eigenvectors, etc.)
The preferred
The method for
preferred method for converting
converting Ku
Ku = AMu into
= .AMu into an
an ordinary eigenvalue
ordinary eigenvalue
problem
problem usesuses the
the Cholesky
Cholesky factorization
factorization.. Every SPD matrix
Every SPD matrix cancan be
be written
written as as
the product
the product of of aa nonsingular lower triangular
nonsingular lower matrix times
triangular matrix times its
its transpose.
transpose. TheThe
mass matrix,
mass matrix, being
being aa Gram
Gram matrix,
matrix, is SPD (see
is SPD Exercise 10.2.6),
(see Exercise 10.2.6), soso there exists aa
there exists
T
nonsingular
nonsingular lower
lower triangular
triangular matrix
matrix L such that
L such that MM == LL
LLT. . We
We can
can then
then rewrite
rewrite
the
the problem
problem as as follows:
follows:

Ku=.AMu
:::} Ku = .ALLT U
:::} L -lKu = .ALT u
:::} L -lKL -T (LT u) = .A (LT u)
:::} Ax = .Ax, A = L -lKL -T, x = LT u.

This
This isis an
an ordinary eigenvalue problem
ordinary eigenvalue problem forfor A,
A, andand A A isis symmetric
symmetric because
because K K is.
is.
This shows that
This shows that the
the generalized
generalized eigenvalue
eigenvalue problem
problem Ku Ku = AMu has
= .AMu has real
real eigenval-
eigenval-
ues.
ues. The eigenvectors corresponding
The eigenvectors corresponding to to distinct eigenvalues are
distinct eigenvalues are orthogonal
orthogonal when
when
expressed in
expressed in the
the transformed
transformed variable
variable x,
x, but not necessarily
but not in the
necessarily in original variable
the original variable
u.
u. However, given distinct
However, given distinct eigenvalues
eigenvalues A .A and
and //
J.1. and
and corresponding eigenvectors uu
corresponding eigenvectors
and
and v,v, the
the piecewise
piecewise linear
linear function
function Uh and Vh
Uh and Vh with nodal values
with nodal given by
values given by uu and
and vv
are
are orthogonal
orthogonal in in the
the LL22 norm
norm (see
(see Exercise
Exercise 1).
1).
There is aa drawback
There is drawback to to using
using the
the above
above method
method for converting the
for converting generalized
the generalized
eigenvalue problem
eigenvalue problem to to an ordinary one:
an ordinary one: There
There is
is nono reason
reason why
why A A should
should be sparse,
be sparse,
even though
even though K and M
K and M are sparse. For
are sparse. this reason,
For this reason, thethe most
most efficient
efficient algorithms
algorithms for
for
the generalized
the generalized eigenvalue
eigenvalue problem
problem treat
treat the
the problem
problem directly instead of
directly instead of using the
using the
above
above transformation.
transformation. However,
However, thethe transformation
transformation is is useful
useful if one has
if one has access
access only
only
to software for
to software for the
the ordinary
ordinary eigenvalue problem.
eigenvalue problem.

Example 10.4. We
Example 10.4. We will estimate the
will estimate the smallest eigenvalue and
smallest eigenvalue and the corresponding
the corresponding
eigenfunction
eigenfunction ofof the negative Laplacian
the negative (subject to
Laplacian (subject to Dirichlet
Dirichlet conditions)
conditions) on
on the unit
the unit
square n.
square fi. The
The reader
reader will
will recall that the
recall that exact eigenpair
the exact is
eigenpair is

We establish
We establish aa regular mesh on
regular mesh on n,
£), with 2n22 triangles,
with 2n (n+1)2 nodes,
triangles, (n+1)2 nodes, and (n—I)2 free
and (n-1)2 free
nodes.
nodes. We We compute
compute thethe stiffness matrix K
stiffness matrix K andand the
the mass
mass matrix M, and
matrix M, and solve
solve the
the
generalized eigenvalue problem
genemlized eigenvalue using the
problem using function eig
the function eig from
from MATLAB.
MATLAB. The The results,
results,
for
for various values ofn,
various values are shown
of n, are shown in in Table
Table 10.3. The reader
10.B. The reader should
should notice
notice that the
that the
eigenvalue
eigenvalue estimate
estimate is converging faster
is converging than the
faster than the eigenfunction estimate. This
eigenfunction estimate. This isis
typical. As
typical. As the
the results
results suggest, the error
suggest, the in the
error in the eigenvalue O(h22),), while
is O(h
eigenvalue is the error
while the error
in the
in the eigenfunction
eigenfunction is is O(h)
O(h) (measured
(measured in in the energy norm).
the energy norm).
10.4. Finite element methods for eigenvalue problems
10.4. 497

n
n Error in
Error in AH
Au Error in '¢u
Error in t/>n
22 12.261 1.5528
1.5528
44 3.1266
3.1266 0.84754
0.84754
88 0.76634
0.76634 0.43315
16
16 0.19058
0.19058 0.21772
0.21772
32
32 0.047583
0.047583 0.10900
0.10900

Table 10.3.
Table 10.3. Errors in the finite
finite element estimates of the smallest eigen-
value and corresponding
corresponding eigenfunction
eigenfunction of
of the negative
negative Laplacian on the unit
unit square.
square.
The errors
The errors in
in the
the eigenfunction
eigenfunction are computed
computed in the
the energy
energy norm.

The reader will recall


The recall from
from Section
Section 9.79.7 that
that the
the fundamental
fundamental frequency of aa
membrane occupying
membrane domain n
occupying aa domain 17isisc";>::;/(27r),
ci/A7/(27r),where
whereAlAI isisthe
the smallest
smallesteigenvalue
eigenvalue
the negative Laplacian on n
of the 17(under
(underDirichlet
Dirichletconditions)
conditions)and andccisisthe
the wave
wavespeed.
speed.
Therefore, the fundamental
Therefore, fundamental frequency
frequency of aa square
square membrane of of area
area 11 is

cv'27r = .~ == 0.7071c.
2

27r v2

Using finite elements, we can compute the fundamental frequency


frequency for membranes
of other
of other shapes.
shapes. In
In the
the next example,
example, we
we consider an equilateral
equilateral triangle with area
area
1.
1.

Example 10.5. Consider the triangle n


Example 10.5. 17 whose vertices are

triangle is equilateral and has area 1. We use the finite


This triangle finite element method to
eigenvalue of the negative
estimate the smallest eigenvalue negative Laplacian on this domain,domain, using
successive regular grids. The coarsest has 16
5 successive 16 triangles,
triangles, and is shown
shown in Figure
10.13. The
10.13. The remaining
remaining grids are obtaining
grids are obtaining by refining the
by refining the original
original grid
grid in the standard
in the standard
fashion (see
(see Exercise 10.1.4).
10.1.4). The
The finest
finest mesh hashas 4096 triangles.
triangles. The
The estimates
estimates
of the smallest eigenvalue, as obtained on the successively
of successively finer meshes, are

27.7128, 23.9869, 23.0873,


27.7128, 23.9869, 23.0873, 22.8662, 22.8112.
22.8662, 22.8112.

We conclude that the smallest eigenvalue AI ==


eigenvalue is Al = 22.8, and the fundamental
fundamental fre-
quency is
quency is
cA27r == 0.7601c.

In
In Exercise 3, the
Exercise 3, the reader
reader is asked to
is asked study the
to study fundamental frequency
the fundamental frequency of
of aa
membrane in the
membrane in the shape
shape of
of aa regular
regular n-gon
n-gon having area 1.
having area 1.
498 Chapter 10. More
Chapter 10. More about
about finite element methods
finite element methods

1.4.-------,------r-----.----.....,

1.2

0.8
x'"
0.6

0.4

0.2

0
-1 -0.5 0 0.5
x1

Figure 10.13. The


Figure 10.13. The coarsest mesh from Example
Example 10.5.

Exercises
1.
1. (a) Suppose
(a) Suppose u,u, v e Rn contain
v ERn contain the
the nodal
nodal values of piecewise
values of piecewise linear functions
linear functions
2
Uh,Vh
Uh, Vh E€ Vh, respectively. Explain
Vh, respectively. Explain how
how to compute the
to compute L2 inner
the L product
inner product
of and Vh
Uh and
of Uh from u
Vh from u and
and v.v.
(b) Show
(b) Show that
that if
if uu and
and vv satisfy
satisfy

Ku = AMu, Kv = p,Mv,
where
where A A/ // and
=I- JL and K and M
K and M are
are the stiffness and
the stiffness and mass
mass matrices, respec-
matrices, respec-
tively,
tively, then
then thethe corresponding
corresponding piecewise
piecewise linear functions Uh,
linear functions Vh €
Uh,Vh are
Vh are
E Vh
2
orthogonal
orthogonal in in the
the I/ inner product.
L2 inner product.
2. The results
2. The of this
results of section are
this section are easily
easily specialized
specialized to
to one-dimensional problems.
one-dimensional problems.
Consider the eigenvalue
Consider the eigenvalue problem
problem

d (k(x) dx
- dx dU) = AU, 0 < x < 1,
u(O) = 0,
u(1) = 0,
where = 11 +
k(x] =
where k(x) + x. Use finite elements
Use finite elements to
to estimate
estimate the smallest eigenvalue
the smallest A.
eigenvalue A.
3. (Hard)
3. (Hard) This exercise requires
This exercise that you
requires that you write
write aa program to assemble
program to assemble the stiff-
the stiff-
ness and mass
ness and mass matrix for -..6.
matrix for —A on on an arbitrary triangulation
an arbitrary of aa polygonal
triangulation of polygonal
10.5. Suggestions
10.5. Suggestions for
for further
further reading
reading 499

domain fJ.
D. You
You will also need access to a routine to solve the generalized
eigenvalue problem.
(a) Repeat
(a) Repeat Example 10.5, replacing
Example 10.5, replacing the
the triangular domain by
triangular domain by aa domain
domain
bounded by
bounded by aa regular
regular pentagon
pentagon with area 1.
with area 1.
(b) Let A~n) -~ on a region having area 1 and
AI be the smallest eigenvalue of —A
bounded by a regular n-gon. Form a conjecture about
·
11m dn)
Al .
n-+oo

(c) Test your hypothesis by repeating Example 10.5 for a regular n-gon,
choosing nn to
choosing to be the largest
be the largest integer
integer that is practical.
that is (Whatever value
practical. (Whatever value of
of
nn you choose, you have to create one or more meshes on the corresponding
n-gon.)
n-gon.)
4. Repeat = 1+
Repeat Exercise 2 using k(x) = + (x — I) 2 .
_1)2.

10.5
10.5 Suggestions for
Suggestions further reading
for further reading
An excellent
An excellent introduction
introduction toto the
the theory of finite
theory of finite element
element methods
methods is is the
the book
book by
by
Brenner and
Brenner Scott [6]
and Scott [6] mentioned
mentioned earlier.
earlier. Strang
Strang and Fix [45]
and Fix [45] also
also discusses
discusses the
the con-
con-
for finite elements applied to time-dependent
vergence theory for time-dependent PDEs and eigenvalue
problems.
Most finite element
Most finite element references
references discuss
discuss the computer implementation
the computer implementation of of finite
finite
elements in only general terms. Readers wishing to learn more about this issue can
consult the
consult the Texas Finite Element Series [3] [3] and
and Kwon
Kwon and
and Bang
Bang [32].
[32].
As
As mentioned early in
mentioned early in this chapter, mesh
this chapter, mesh generation
generation is
is an
an important
important area
area of
of
study in its own right; it is treated by Knupp and Steinberg [31].
This page intentionally
This page intentionally left
left blank
blank
Appendix A

Proof of 3.47
of Theorem 3.47

Theorem
Theorem A.I. A.I. Let A E R n x n be
6 Rnxn suppose A has
be symmetric, and suppose has an eigenvalue
XA of
of (algebraic)
(algebraic) multiplicity
multiplicity kk (meaning that A
(meaning that A is
is aa root
root of
of multiplicity
multiplicity kk of the
of the
characteristic
characteristic polynomial
polynomial of of A). Then
Then A has
has kk linearly
linearly independent eigenvectors
independent eigenvectors
corresponding
corresponding toto A.
A.

Proof. We
Proof. We argue by induction on n. The result holds trivially
n. The trivially for
for n
n = 1. We
= 1. We
nxn
assume it holds for symmetric (n -— 1) x (n -— 1) matrices, and and suppose A e ER Rnxn
is symmetric
symmetric and
and has an eigenvalue
eigenvalue A of (algebraic) multiplicity k. There exists exists
xi ^ 00 such
Xl ::f- such that
that Axi
AXl == Axi. We can
AXl. We can assume
assume that
that Ilxlll
||xi|| =
= 11 (since Xi/||xi|| is
(since xdlixlil is also
also
an eigenvector
an eigenvector of
of A),
A), and we extend
and we extend xi to an
Xl to orthonormal basis
an orthonormal {xi,x 2 ,...
basis {Xl,X2, •.. ,x
,Xn}.}.
Then
Then

[ Xl Ax,
xfAxl
xf Ax 2
xf Ax 2
x[Axn
xfAxn 1
XTAX= . . ,
X;AXl X;AX2 x;Axn

nxn
where X
where X e
ERRnxn is defined by X
is X = [xi|x2| • • ·Ix
= [xllx21·· • |xn].
]. We have

and
and

xi AXi = (AXlf Xi (since A is symmetric)


= Axi Xi
= AJil .

501
501
502 Appendix A. Proof of Theorem
Theorem 3.47

(The symbol
(The symbol 8ij
<% is
is 11 if
if ii == jj and if ii ¥-
and 00 if ^ j.) Therefore,
j.) Therefore,

~ xI ~X2 xIAxn
XTAX= 0: o 1
[
X;AX2 ::: x nT lx n

=[~ ~],
where BE RCn-1)*^-1) is
B <E R(n-1)x(n-1) [s defined by

The matrix
matrix B is symmetric. Also,

det (..xl - XT AX) = det (XT (..xl - A)X)


= det (XT) det (..xl - A) det (X)
= det (..xl - A),

X TT == X"
since X X- 11 and
and therefore det (XT) =
det (XT) = det l
(X)-1.
det (X) . It
Itfollows
follows that
that

det (..xl - A) = ..x-..x


0 ..xl 0_ B I
l
= (..x -..x) det (,\1 - B).

Since ,\
Since A is
is an
an eigenvalue
eigenvalue of
of A of
of multiplicity
multiplicity k, Ar, it
it must
must be
be an
an eigenvalue
eigenvalue of of B
B of
of
multiplicity 1, and
multiplicity kk -- 1, and therefore,
therefore, by
by the the induction hypothesis, B
induction hypothesis, B has
has kk -— 11 linearly
linearly
independent
independent eigenvectors y2,ys, • • • ,,Yk
Y2, Y3, ... yfc corresponding toto A. We
We define

for ii =
for 2,3,...,
= 2,3, and define
k, and
... , k, define Ui
Uj == XYi'
XyV Then
Then

AUi = X [ ~
= X [ ~
Appendix A. Proof of Theorem
Theorem 3.47
3.47 503
503

T T
(the columns of X are orthonormal, so X
XTX X== I; this is why the factor of X XTXX dis-
dis-
appeared in the above calculation). This shows
appeared shows that uU2,
2 ,113,...,
U3, ... , u/t
Uk are eigenvectors
of A corresponding
of A corresponding to A. Moreover,
to >.. Moreover,

(0 is
(0 is the zero vector
the zero vector in Rn 1 ] , from
in Rn-l), from which
which wewe can
can deduce
deduce that
that {ui, 112,...,
{Ul,U2, u^} is
... ,Uk} is
aa linearly
linearly independent
independent set
set of
of eigenvectors
eigenvectors of
of A
A corresponding
corresponding to
to >..
A. This
This completes
completes
the proof. D
This page intentionally
This page intentionally left
left blank
blank
Appendix
Appendix B

Shifting
eng the data in two
dmensionss

B.O.I
B.O.l Inhomogeneous Dirichlet
Inhomogeneous Dirichlet conditions
conditions on
on a
a rectangle
rectangle
The method of shifting the data can be used to transform an inhomogeneous Dirich-
let problem to a homogeneous Dirichlet problem. This technique works just as it
did for a one-dimensional problem, although
although in two dimensions it is more difficult
difficult
to
to find
find aa function
function satisfying
satisfying the
the boundary
boundary conditions.
conditions. We
We consider
consider the
the BVP
BVP
-~u = f(x), x En,
gl(xd, x E r 1,
u(x) = g2(X2), x E r 2, (B.1)
{ g3(xd, x E r 3,
g4(X2), x E r 4,

where n
Q, is the
the rectangle and an
rectangle defined in (8.10) and dtt = r 1U Tr 22 U Tr33 U rT4,4, as in (8.13).
= TI
We will
We assume that
will assume the boundary
that the boundary data
data are
are continuous,
continuous, so
so
gl(fd = g2(O), g2(f 2) = g3(fI), g3(O) = g4(f2), g4(O) = gl(O).
Suppose we
Suppose we find defined on n
find aa function p defined J7 and
and satisfying
satisfying p(x) == g(x)
#(x) for
for all
e an.
xE dfL We
We then
then define
define vv == uu -— pp and
and note
note that
that
-~v = -~u + ~p = f(x) + ~p(x)
and
and
v(x) = u(x) - p(x) = 0 for all x E an
(since p satisfies the same Dirichlet conditions that uu is to satisfy). We
We can then
solve
-~v = j(x), xE n,
v(x) = 0, x E an,

where
j(x) = f(x) + ~p(x).
RDR
505
506 Appendix B. Shifting the data in two dimensions

The result
The result will
will be
be aa rapidly converging series
rapidly converging series for
for v,
v, and
and then
then uu will
will be
be given
given by
by
u = v
u v +p.+ p.
We
We now describe aa method
now describe method (admittedly
(admittedly rather tedious) for
rather tedious) for computing
computing aa func-
func-
tion p that satisfies the given Dirichlet conditions. WeWe first
first note that there is a
polynomial of the
polynomial of form
the form
q(X1, X2) = a + bX1 + CX2 + dx1X2
which
which assumes
assumes the
the desired
desired boundary
boundary values
values at
at the corners:
the corners:
q(O,O) = 91(0) = 94(0),
q(£l,O) = 91(£t) = 92(0),
q(£1,£2) = 92(£2) = 93(£t),
q(0'£2) = 93(0) = 94(£2).
A direct calculation
calculation shows
shows that
that
a=91(0),
b = 91(£1) - 91(0)
£1 '
94(£2) - 94(0)
c= ,
£2
d = 92(£2) + 91(0) - 91(£t} - 94(£2).
£1£2
We then define
91(£d - 91(0) )
h 1(X1)=91(Xl)- ( 91(0)+ £1 Xl,

92(£2) - 92(0) )
h 2(X2) = 92(X2) - ( 92(0) + £2 X2,

h3(Xt} = 93(Xt} - ( 93(0) + 93(it) i1- 93(0) Xl,


)

94(i2) - 94(0) )
h 4(X2) = 94(X2) - ( 94(0) + £2 X2·

We
We have
have thus replaced each
thus replaced 9i by
each gi by aa function
function hi
hi which differs from
which differs from gi
9i by
by aa linear
linear
function, and which has value zero at the two endpoints:

Finally, we
Finally, define
we define
Appendix B. Shifting
Appendix B. Shifting the
the data
data in two dimensions
in two dimensions 507

The
The reader should notice
reader should notice how
how thethe second
second term interpolates between
term interpolates between thethe boundary
boundary
values
values onon rFI1 and
and r 3,
F 3 while the third term interpolates between the boundary values
, while the third term interpolates between the boundary values
on rF22 and
on and rIT^. In order
4. In order forfor these
these two
two terms not to
terms not to interfere
interfere with each other,
with each other, it
it is
is
necessary that the
necessary the boundary data data be zero atat the corners. It It was
was for
for this
this reason that
that
we transformed
we transformed the the g^s into the
gi's into hi'S. The
the h^s. The first term in
first term in the
the formula
formula forfor pp undoes
undoes
this transformation.
transformation.
It is
It straightforward to
is straightforward to verify
verify that satisfies the
that p satisfies desired boundary
the desired conditions.
boundary conditions.
For example,
For example,

h3(xd - h1(xd
P(X1'0) = a + bX1 + cO + dx 10 + h1(xd + £2 0
h2(0)-h4(0)
+h4 (0) + £1 Xl
= a + bX1 + h1(xd (since h4(0) = h2(0) = 0)
= gl(O) + bX1 + gl(xd - (gl(O) + bX1)
=gl(xd·
Thus the
Thus boundary condition
the boundary on rFI1 is
condition on satisfied. Similar
is satisfied. Similar calculations show that
calculations show that pp
satisfies the
satisfies the desired
desired boundary conditions on
boundary conditions on the
the other
other parts of the
parts of the boundary.
boundary.

Example B.1.
Example B.I. We will solve the BVP
BVP

x E r 1,
x E r 2,
(B.2)
x E r 3,
x E f4

by the
by the above
above method, where n
method, where fJ is
is the
the unit
unit square:
square:

To compute p, we define
define

a=91(0)=0,
b = 91(1) - gl(O) = 1
1 '
c = 94(1) - 94(0) = 1
1 '
d = g2(1) + gl(O) -gl(l) - g4(1) = -2
1·1 '
h1 (Xl) = xi - (0 + xd = xi - Xl,
h2(X2) = 1- x~ - (1 + (-I)x2) = X2 - x~,
h3(xd = (1- X1)2 - (1 + (-I)X1) = xi - Xl,
h4(X2) = X2 - (0 + X2) = o.
508 B. Shifting the data in
Appendix B. in two dimensions

We can
We can then
then define
define

P(XI,X2) = Xl + X2 - 2XIX2 + xi - Xl + o· X2 + 0 + (X2 - X~)XI


2 2
= X2 - XIX2 + Xl - XIX2·

Having computed
Having computedp, we define
p, we define vv = uu—p, so that
- p, so that

-Llv = -Llu + Llp = 0 + Llp = 2 - 2XI, X En

and
and
v(x) = 0, xE an.
We then
We then see
see that
that

where
where

We then
We then obtain
obtain the
the following
following formula
formula for u:
for u:

The solution
The solution is
is shown
shown in
in Figure B.I.
Figure B.1.

B.0.2
8.0.2 Inhomogeneous
Inhomogeneous Neumann
Neumann conditions on
on a rectangle
We
We can
can also
also apply
apply the
the technique
technique of
of shifting
shifting the
the data
data to
to transform
transform aa BVP
BVP with
with
inhomogeneous
inhomogeneous Neumann
Neumann conditions
conditions to
to aa related
related BVP
BVP with
with homogeneous
homogeneous Neumann
Neumann
conditions.
conditions. However,
However, the
the details
details are
are somewhat
somewhat moremore involved
involved than
than in
in the Dirichlet
the Dirichlet
case.
case.
Suppose
Suppose the
the Neumann
Neumann conditions
conditions are
are

x E rl ,
x E r 2,
x E r 3,
x E r 4.

We
We first
first note
note that
that this
this is
is equivalent
equivalent to
to
Appendix B.
Appendix B. Shifting
Shifting the
the data
data in
in two
two dimensions
dimensions 509

o 0

Figure B.t.
Figure B.I. The
The solution to the
solution to the BVP
BVP (B.2),
(B.2), approximated
approximated by
by aa Fourier
Fourier
series with 400 terms.
series with 400 terms.

We make
We make the following observation:
the following observation: If
If there is aa twice-continuously
there is twice-continuously differentiable
differentiable
function uu satisfying
function satisfying the given Neumann
the given Neumann conditions,
conditions, then,
then, since
since

82 u 82 u
8:lh 8X2 8X28xl '

we have
we have
510 Appendix
Appendix B. Shifting the
B. Shifting data in
the data in two
two dimensions
dimensions

and
and

which together
which together imply
imply that
that
dg 1 (0) = dg4 (0).
dx 1 dx 2
By similar
similar reasoning, we have all of the
the following conditions:
conditions:

dg 1 (0) = dg4 (0),


dX1 dX2
1
_ dg (£1) = dg2 (0), (B.3)
dx 1 dX2
dg 2 (£ ) = dg 3 (£ )
dx 2 d 1,
2 Xl

_ dg 4 (£2) = dg3 (0).


dx 2 dx 1

We
We will assume that
will assume that (B.3)
(B.3) holds.
holds.
We now explain how
now explain to compute
how to compute a function pp that satisfies
satisfies the desired
desired Neu-
mann conditions.
conditions. The method is is similar
similar to that used to shift
shift the data in aa Dirichlet
problem: we will "interpolate"
"interpolate" between the the Neumann conditions
conditions inin each dimension
and
and arrange
arrange things so that
things so that the two interpolations
the two interpolations do not interfere
do not interfere with
with each other.
each other.
We
We use the fact
use the fact that
that
(BA)

satisfies
satisfies
(B.5)
The
The first step is
first step is to
to transform
transform the
the boundary data g\
boundary data gl to
to aa function
function h\
h1 satisfying
satisfying

dh1 (0) = dh1 (£1) = 0,


dX1 dX1
and similarly
and similarly for
for 92,93,94 and h/i2,/is,/i4.
g2, g3, g4 and Since these
2, h3, h4. Since these derivatives of the
derivatives of the boundary
boundary
data
data at the corners
at the corners are
are (plus or minus)
(plus or minus) thethe mixed
mixed partial
partial derivatives of the
derivatives of the de-
de-
sired function
sired function at
at the
the corners, it suffices
corners, it suffices to
to find
find aa function
function Q(X1, X2) satisfying
q(xi,xz) the
satisfying the
conditions
Appendix
Appendix B. Shifting the
B. Shifting the data in two
data in dimensions
two dimensions 511
511

We
We can
can satisfy these conditions
satisfy these conditions with
with aa function
function of
of the form
the form

The reader can verify


verify that the necessary coefficients
coefficients are
are

If pp is
If is to
to satisfy
satisfy the desired Neumann
the desired Neumann conditions, then
conditions, then

where
where

hl(xd = gl(Xl) + aXl + bxi,


h2(X2) = g2(X2) - (a + 2i1 b)X2 - (c + 2ild)x~,
ha(xd = ga(xd - (a + 2i2C)Xl - (b + 2i2d)xi,
h4(X2) = g4(X2) + aX2 + cx~.

We can now
We can now define
define pp — q by
- q by the interpolation described
the interpolation described by (B.4), (B.5):
by (BA), (B.5):

Then pp satisfies
Then satisfies the original Neumann
the original Neumann conditions, as the
conditions, as the interested
interested reader
reader can verify
can verify
directly. We will illustrate this
We will this computation
computation with
with an example.
example.

Example
Example B.2.
B.2. We will solve the BVP
BVP

x E fl'
X E f2'
(B.6)
X E fa,
x E f4

by the above
by the above method, where n
method, where f) is
is the
the unit
unit square:
square:
512 Appendix B. Shifting the data in two dimensions

To compute p, define
p, we define
dg l
a= --(0) = 0,
dx l
b = ! (d9l (0) _ dg l (1)) = 0,
2 dXl dXl
ga l
C = ! (d (0) + dg (0)) = 0,
2 dXl dXl
d = ! (d92 (1) + dg l (1) _ dga (0) _ dg l (0)) = !,
4 dX2 dXl dXl dXl 2
hI (xd = gl(Xl) = -1,
h2(X2) = g2(X2) - x~ = 0,
ha(Xl) = ga(Xl) -xr = 1,
2
h4(X2) = g4(X2) = -a'
We can
We can then
then define
define
ha(xd + hl(xl) 2 h2(X2) + h4(x2) 2
P(Xl,X2) = q(Xl,X2) - hl (Xl)X2 + 2£2 X2 - h4(X2)Xl + 2£1 Xl

1 2 2 2 1 2
= 2XlX2 + X2 + aXl - aXl'

Having computed
computed p, we define
define v == U
u -— p, so that
2
-Av=-Au+Ap=O+Ap=xr+x~--, XEO
. 3
and
and
ov
on (x) = 0, x E 80.
We can
We can write
write the
the solution
solution V(Xl,X2)
v(x\,xi} in
in the
the form
form
00 00

U(Xl, X2) = aOO +L amo cos (mnxd +L aO n cos ( nnx2)


m=l n=l
00 00

+ L La mn cos (mnxl) cos (nnx2).


m=ln=l

With
With

we have
we have
00 00

f(xl,x2) = Coo + L CmO cos (mnxd + L Con cos (nnx 2)


m=l n=l
00 00

+L L Cmn cos (mnxd cos (nnx2),


m=l n=l
Appendix B. Shifting the data in two dimensions 513

where
where
1 1
Coo = 10 10 f(X1,X2)dx2dx1 =0,

111 4(-1)m
CmO =2 f(x1,x2) cos (m1fx1)dx2 dx1 = 2 2 ' m = 1,2,3, ... ,
1o 0 m 1f
111 4(-1)n
Con = 2 f(x1,x2) cos (n1fX2) dX2dx1 = 2 2 ' n = 1,2,3, ... ,
1o 0 n 1f
1 1
Cmn = 410 10f(x1, X2) COS (m1fxd COS (mrX2) dX2 dX1 = 0, m, n = 1,2,3, ....

It then follows
It then follows that
that

u(xi,X2)
and U(X1' = V(X1,
X2) = X2) +
^(^1,^2) + p(a?i,#2)-
P(X1' X2). -^
A graph of the solution u, aoo == 0, is
u, with aOO
shown in Figure
shown in Figure B.2.
B.2.

1.5

0 .5

o
- 0 .5
1

o 0

Figure B.2.
Figure The solution
B.2. The to the
solution to the BVP
BVP in in Example
Example B.2. This graph
B.2. This graph was
was
produced using aa total
produced using total of
of 40 terms
terms of the (double)
of the (double) Fourier cosine series.
Fourier cosine series.
This page intentionally
This page intentionally left
left blank
blank
Appendix C
Appendix

Solutions
ions to
to
odd-numbered
bered exercises

exercises

Chapter 1
1
1.
1. (a) First-order,
(a) First-order, homogeneous,
homogeneous, linear,
linear, nonconstant-coefficient,
nonconstant-coefficient, scalar
scalar ODE.
ODE.
(b) Second-order,
(b) Second-order, inhomogeneous,
inhomogeneous, linear,
linear, constant-coefficient,
constant-coefficient, scalar
scalar PDE.
PDE.
(c) First-order,
(c) First-order, nonlinear,
nonlinear, scalar
scalar PDE.
PDE.
3.
3. (a) Second-order,
(a) Second-order, nonlinear,
nonlinear, scalar
scalar ODE.
ODE.
(b) First-order,
(b) First-order, inhomogeneous,
inhomogeneous, linear,
linear, constant-coefficient,
constant-coefficient, scalar
scalar PDE.
PDE.
(c) Second-order,
(c) Second-order, inhomogeneous,
inhomogeneous, linear,
linear, nonconstant-coefficient,
nonconstant-coefficient, scalar
scalar PDE.
PDE.
5.
5. (a) No.
(a) No.
(b) Yes.
(b) Yes.
(c) No.
(c) No.
7. There
7. There is
is only
only one
one such
such /: ( t ) = ttcos
f: ff(t) (t).
cos (t).
9. For
9. For any
any constant
constant C f:.
^ 1, the function
1, the function w(t)
w(t) = Cu(t) is aa different
Cu(t) is different solution
solution of
of the
the
differential equation.
differential equation.

2.1
Section 2.1
1. The
1. The units
units of
of '"K are
are energy
energy per
per length
length per
per time
time per
per temperature, for example,
temperature, for example, J/(cm
J / (cm ss K)
K) ==
W/(cmK).
W/(cmK).
3. The
3. The units
units of
of Apcu&x are
Apcu~x are
2 g J
cm - - 3 -Kcm = J.
cm gK

5. ~~(f,t)=ll<,t>to.
5- &&*) = £ , « > *>.
7. Measuring
7. in centimeters,
Measuring xx in centimeters, the
the steady-state
steady-state temperature
temperature distribution
distribution is
is u(x)
u(x] =
O.lx +
0.1x + 20,
20, the
the solution
solution of
of

d2 u
- dx 2 = 0, u(O) = 20, u(100) = 30.

515
515
516 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises

The heat
The heat flux
flux is
is
du
-K, dx (x) = -0.802 ·0.1 = -0.0802 W /cm 2 .
Since the
Since the area
area of
of the
the bar's
bar's cross-section
cross-section is
is 1r cm22,, the
vr cm the rate
rate at
at which
which energy
energy is
is flowing
flowing
through the
through bar is
the bar is 0.08021r
0.08027T ~= 0.252
0.252 W (in the
W (in the negative
negative direction).
direction).
9. Consider
9. Consider the
the right endpoint (x = f).
right endpoint Let the
I). Let temperature of
the temperature of the
the bath
bath be
be Ul, so that
ue, so that
the difference
the difference in
in temperature between the
temperature between the bath
bath and
and the end of
the end of the
the bar
bar is
is u(f,
u(i, t}
t) -—Ul.
ut.
The heat
The heat flux at xx = fi is,
flux at is, according
according to Fourier's law,
to Fourier's law,

so the
so the statement
statement that
that the heat flux
the heat is proportional
flux is proportional to
to the
the temperature
temperature flow is written
flow is written

where aa > 00 is
where is aa constant
constant of
of proportionality.
proportionality. This
This can
can be
be simplified
simplified to
to

The condition
The condition at
at the
the right end is
right end is similar:
similar:

au(O, t) - K,
au
ax (0, t) = auo·
(The sign
(The sign change
change appears
appears because,
because, at
at the
the left
left end,
end, aa positive
positive heat
heat flux
flux means that
means that
heat flows
heat into the
flows into the bar, while at
bar, while at the
the right
right end
end the
the opposite
opposite is
is true.)
true.)
11. The IBVP
11. IBVP is
au au 2

at - D ax = lex, t), 0< x < f, t > to,


2

u(x, to) = tf;(x), ° < x < f,


au
ax (0, t) = 0, t > to,
au
ax (f, t) = 0, t > to.
13.
13. (a) The
(a) The rate
rate is
is
u-o)
-1rT 2D (Ul
-- - f .

(b) The
(b) The rate
rate of
of mass
mass transfer
transfer varies
varies inversely
inversely with
with ft and
and directly
directly with
with the
the square
square
of T.
of r.
15. We
15. We have
have
[sin~Xy)]1
and
and
1 o
1 cos (xy)dy =
y=O
sin x
x

.!:... [SinX] = xcosx - sin x = cosx _ sinx


dx x x2 X x2 •
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises 517
517

On the
On the other
other hand,
hand,

11 d
o dx [cos (xy)] dy= -
11
0 ysin(xy)dy

= [YCOS (X Y)]
x y=o
1-11 0
cos (xy) dy
x
_ cosx [Sin (X y )] 1
- -x- - -x-2-
y=o
cos x sinx
= -x--7·

Section 2.2
1. The
1. The sum
sum ofof the forces on
the forces on the cross-section originally
the cross-section originally at
at x = t£ must
must bebe zero.
zero. As
As
derived in
derived in the
the text,
text, the
the internal (elastic) force
internal (elastic) force acting
acting on
on this
this cross-section
cross-section is
is

-Ak(£) ~: (£),

while the external


while the external traction
traction results in aa total
results in force of
total force of pA (force per
pA (force per unit
unit area times
area times
area).
area). Therefore,
Therefore, we obtain
we obtain
du
-Ak(£) dx (£) + pA = 0,
or
or
du
k(£) dx (£) = p.
The other boundary
The other condition, of
boundary condition, of course,
course, is — 0.
u(Q) =
is u(O) O.
3.
3. (a) The stiffness
(a) The stiffness is the ratio
is the ratio ofof the internal restoring
the internal restoring force
force to
to the relative change
the relative change
in length.
in length. Therefore,
Therefore, if if aa bar
bar of
of length
length £ t and
and cross-sectional
cross-sectional area
area A is stretched
A is stretched
to aa length
to length ofof 11 +p (0 < pp < 1)
+p (0 1) times I, then
times f, the bar
then the bar will
will pull
pull back with aa force
back with force
of 195pA
of 195pA gigaNewtons.
gigaNewtons. Equivalently,
Equivalently, this
this is
is the force that
the force that must
must be applied to
be applied to
the end
the end ofof the
the bar to stretch
bar to stretch the
the bar to aa length
bar to (1 +
of (1
length of +p)i.
p)£.
(b) 196/195
(b) 196/195 m, m, oror approximately
approximately 1.005 1.005 m.
m.
(c) The
(c) BVP is
The BVP is
2
-195 . 10 9 d u2 = 0 0 < x < 1,
dx '
u(O) = 0,
195. 10 9 du (1) = 109 .
dx
It is
It is easy
easy to
to show
show by
by direct integration that
direct integration that the solution is
the solution u(x] = o;/195,
is u(x) x/195,
and therefore
and = 1/195.
u(l) =
therefore u(l) 1/195. Since
Since u is
is the
the displacement
displacement (in
(in meters),
meters), the
the final
final
position
position ofof the
the end
end of
of the
the bar
bar is + 1/195
is 11 + 1/195 m,
m, that is, the
that is, stretched bar
the stretched bar is
is
196/195 m.
196/195 m.
5. The
5. The wave
wave equation
equation is
is
2
(7.9 . 103) a
8tu2 -
( a2 = !(x, t),
1.95· 10 11) axu2 0<x < 1.
bib
518 Appendix C.
C. Solutions to odd-numbered exercises

The
The units
units of / are
of 1 N/m33 (force
are N/m (force per
per unit
unit volume).
volume). The
The units of the
units of the first
first term
term on the
on the
left are
left are
kg m kgm/s2 N
m 3 S2 m 3 - m3 '
and
and the
the units of the
units of second term
the second term on
on the
the left are
left are
N 1 N
m2 m = m3 ·
7.
7. (a)
(a) We
We have
have
a{)t22 u (x, t) = -c2 () 2 u(x, t),
while
while
aax2
2
u 2
(x, t) = -f} u(x, t).
Therefore,
Therefore,
a{)t22 u - C
2 aax2 u = -c2 f} 2 u + c2 () 2 u = o.
2

(b) Regardless
(b) Regardless of of the
the value
value of
of 0, = 00 holds
u(Q, t) =
f}, u(O, holds for
for all The only
all t. The only way
way that
that
u(l,
u(l, t) = 00 can
t) — can hold
hold for all tt is
for all is if
if

sin «(}l) = 0,
so f}9 must
so must be one of
be one of the
the values
values

() = ~7r, n = 0, ±1, ±2, ....

Section 2.3
Section 2.3
1. Units
1. Units of acceleration (length
of acceleration (length per
per time squared).
time squared).
3. Units
3. Units of
of velocity (length per
velocity (length time).
per time).
5. The
5. The internal
internal force
force acting on the
acting on end of
the end the string
of the string at,
at, say, = Il,, isis
say, xx =
au
T ax (l, t). (C.1)

If this
If end can
this end can move
move freely
freely in the vertical
in the vertical direction,
direction, force
force balance
balance implies
implies that (C.I)
that (C.1)
must be
must be zero.
zero.

Section 3.1
Section 3.1
1. A
1. A function
function of
of the
the form
form f(x) ax +
= ax
I(x) = + b is
is linear if and
linear if and only
only if = 0.
if b = O. Indeed,
Indeed, if
if
/I:: R —» R
R -t R is linear, then
is linear, then f(x) = ax,
I(x) — ax, where
where aa== 1(1).
/(I).
3. (a)
3. (a) Vector space (subspace
Vector space (subspace of
of C[0,1]).
e[O, 1)).
(b) Not
(b) Not aa vector space; does
vector space; does not contain the
not contain the zero
zero function.
function. (Subset
(Subset of
of e[O,
C[0,1], but
1], but
not
not aa subspace.)
subspace.)
(c)
(c) Vector space (subspace
Vector space (subspace of
of e[O,
C[Q, 1]).
(d) Vector
(d) space.
Vector space.
(e)
(e) Not
Not aa vector
vector space;
space; does
does not
not contain the zero
contain the zero polynomial. (Subsei of
polynomial. (Subset of P but
P nn,, but
not
not aa sub space.)
subspace.)
Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered exercises
odd-numbered exercises 519
519

€ Cl1[a,b]
5. Suppose u E [a, b] is any nonzero
nonzero function. Then

L(2u) = 2 du 3 du 3
dx + (2u) = 2 dx + 8u ,
while
du 3
2Lu = 2 dx + 2u .
Since L(1u) 2Lu, L is not linear.
^ 2Lu,
L(2u) =1=
7. (a) The proof is a direct calculation:

A(ax + ,Bz) =

= [:~~ :~~] [ ~:~! ~~~ ]


all (axl + ,BZl) + a12(ax2 + ,BZ2) ]
[ a21(axl + ,Bzl) + a22(ax2 + ,Bz2)

a(allxl + a12x2) + ,B(allzl + a12z2) ]


[ a(a21xl + a22x2) + ,B(a21z1 + a22z2)

=a [ allXl + a12X2 ] +,B [ allZl + a12Z2 ]


a21Xl + a22X2 a21Z1 + a22Z2
= aAx+,BAz.
This shows that the operator defined by A is linear.
(b) We have
n

(A(ax+,BY))i = La;j(axj +,BYj)


j=l
and
n

(aAx + ,BAY)i =a L aijXj +,B L a;jYj·


j=l j=l
Now,
Now,
n
(A(ax+,By)); = Laij(aXj +,BYj)
j=l
n

=L (aaijXj + ,BaijYj)
j=l
n n
= Laaijxj + L,BaijYj
j=l j=l
n n
=a L aijXj + ,B L aijYj
j=l j=l
= (a Ax + ,BAy);,
as desired. The third equality follows from the
the commutative and associative
properties of addition, while
while the
the fourth equality follows from the
the distributive
property of multiplication
multiplication over addition.
520 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises

Section 3.2
1. The
1. range of
The range of A
A is
is
{a(l,-l) : O:ER},
{o:(l,-l) a€R},
which is aa line
which is line in
in the
the plane. See Figure
plane. See Figure C.I.
C.l.

3~--~----~----r---~~--~----~-----r--~

)(N 0

-1

-2

-3~--~----~----~--~~--~----~----~--~
-3 -2 -1 0 2 3
Xl

Figure C.I. The


Figure C.l. The range of A
range of A (Exercise
(Exercise 3.2.1).
3.2.1).

3.
3. (a) A
(a) is nonsingular.
A is nonsingular.
(b) A
(b) is nonsingular.
A is nonsingular.
(c) A
(c) A is singular. Every
is singular. Every vector
vector in
in the range is
the range is of
of the
the form
form

Ax = [~ ~] [ :: ]

= [ ~~!~: ].
That is, every
That is, every y €R
y E R22 whose first and
whose first and second
second components
components are
are equal
equal lies
lies in
in the
the
range of A.
range of A. Thus, for example,
Thus, for Ax =
example, Ax = bb is solvable for
is solvable for

b=[~],
but not for
but not for
b=[;].
5. The
5. The solution
solution set
set is
is not
not aa subspace,
subspace, since
since it
it cannot contain the
cannot contain the zero
zero vector
vector (AO =
(AO =
oOi=^ bb).
).
Appendix
Appendix C.
C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises 521

7. The
The null space of L
L is the
the set of all first-degree polynomials:

N(L) = {u: [a,b]-+ R : u(x) = mx + c for some m,c E R}.

9. (a) The
The only functions C2[a, 6]
functions in CZ[a, b] that satisfy
dZu
--=
z 0
dx
are functions
are functions of
of the
the form u(x) = C1x
form u(x) Cix + CC?.z . The
The Neumann
Neumann boundary condition
boundary condition
at the left
left endpoint implies that C\ = 0,
Cl = 0, and the Dirichlet boundary condition
at the right endpoint implies that €2
C2 == O.0. Therefore, only the zero function is
a solution to Lin
L^u u = 0,
0, and so
so the null space of Lin
Z/m is trivial.
(b) Suppose /f G C[a,6]
E C[a, b] is given and u € C~ [a, b]
E C^[a, b] satisfies
d2 u
- dx 2 (x) = f(x), a < x < b.

Integrating
Integrating once yields, by the
the fundamental theorem of calculus,

- iar dx~ (s) ds = iar f(s) ds


d2

du du (X
=> - dx (x) + dx (a) = ia f(s) ds

d
=> d:(x) = - iar f(s)ds.

The
The last
last step follows from
from the
the Neumann
Neumann condition at x = a.
condition at a. We
We now integrate
now integrate
again:

d
d: (x) =- iar f(s) ds
bd Ibx iar f(s)dsdz
=>
lX d:(z)dz =-
=> u(b) - u(x) = -lb 1 z
f(s) ds dz

=> u(x) = i1 a Z

f(s)dsdz.

This shows
This shows that
that L/mU = f has
Linu = has aa unique solution for
unique solution for each
each /f €
E C[a, b].
11. By the
the fundamental theorem of calculus,

u(x) = IX f(s)ds
Du == ff.. However,
satisfies Du However, this solution is not unique; for any constant
unique; for constant (7,
C,

u(x) = IX f(s) ds + C
is
is another
another solution.
solution.
522 Appendix
Appendix C.
C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises

Section 3.3
1.
1. (a)
(a) Both equal (14,4,
Both equal -5).
(14,4, -5).
(b) Both
(b) equal
Both equal 2:7=1 (Vj)iXj.
3.
3. The
The given set is
given set is not
not aa basis. If A
basis. If is the
A is the matrix
matrix whose
whose columns are the
columns are the given
given vectors,
vectors,
then A/"(A) is
then N(A) is not trivial.
not trivial.
5. We
5. know that
We know P2 has
that P% has dimension
dimension 3, and therefore
3, and therefore itit suffices
suffices to
to show
show either
either that the
that the
given
given set of three
set of three vectors spans Ti
vectors spans P2 or
or that it is
that it is linearly independent. If
linearly independent. If pp e
E Pz, then
P2, then
we
we write
write
Cl = p(Xl), C3 = P(X3), C3 = p(X3)

and
and define
define the
the polynomial
polynomial

Then
Then

and,
and, similarly, q(X2) = pp(X2),
similarly, q(x-z) q(X3) = p(%s)-
( x z ) , q(xz) p(X3)' But then p and
But then and q are
are second-
second-
degree
degree polynomials
polynomials that agree at
that agree at three
three distinct
distinct points, and three
points, and three points determine
points determine
aa quadratic
quadratic (just
(just as
as two
two points
points determine
determine aa line).
line). Therefore,
Therefore,

and we
and have shown
we have shown that
that every
every pp €
E Pi can be
P2 can written as
be written as aa linear
linear combination
combination of
of
LI,
L 1 , 1/2,£3. This completes
L 2 , L 3 • This completes the
the proof.
proof.

Section 3.4
1.
1. (a) The verification
(a) The verification is
is aa direct calculation of
direct calculation of Vi
Vi •• Vj
Vj for the 66 combinations
for the of i,
combinations of i, j.j.
For
For example,
example,
1 1 1 1 1 1
Vl'Vl=--+--+--
V3 V3 V3 V3 V3 V3
111
= 3" + 3" + 3" = 1,

Vl'V2 = ~ ~ ~O ~ + + ( - ~)
1 1
= v'6 - v'6 = 0,

and so
and so forth.
forth,
(b)
x = (VI' X)Vl + (V2 . X)V2 + (V3 . X)V3

= ~ VI + OV2 + ( - ~) V3.
Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 523

3. We have
have
Ilx+yl12 = (x+y,x+y)
= (x, x + y) + (y, x + y)
= (x,x) + (x,y) + (y,x) + (y,y)
= (x,x) + 2(x,y) + (y,y)
= IIxll 2 + 2(x,y) + Ilyll2.
Therefore,
Therefore,

if and
if and only
only if (x, y) =
if (x,y) = 0.
O.
5. First of
5. First of all,
all, if
if
(y, z) = 0 for all z E W,
then
then since e W for
vn E
since Wi for each i, we
each i, we have,
have, in particular,
in particular,

(y, Wi) = 0, i = 1,2, ... , n.


Suppose, on
Suppose, on the other hand,
the other hand, that
that

(y, Wi) = 0, i = 1,2, ... ,n.


If
If zz is
is any
any vector
vector in W, then,
in W, then, since {wi, W2,
since {Wi, W 2 ,...
. . . ,, w
wnn }} is
is aa basis
basis for there exist
W', there
for W, exist
scalars ai, 0:2,
scalars • • • ,,an
a2, ... otn such
such that
that
n

Z = Laiwi.
i=l

We
We then have
then have

= Lai (y,Wi)
i=l

i=l
=0.

This completes
This completes the
the proof.
proof.
7. The
7. The best
best approximation
approximation to
to the
the given data is
given data is y = 2.0111x —
— 2.0111x 0.0018984. See
- 0.0018984. See Figure
Figure
C.2.
9. The projection
9. The projection of
of g9 onto
onto 7*2 is
P2 is

2 2V5(7r 2 - 12)
-Ql(X)
7r
+ OQ2(X) + 7r
3 Q3(X)
or
or

See Figure
See Figure C.3.
C.3.
524
524 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

Figure C.2.
Figure C.2. The
The data
data from
from Exercise 3-4-7 and
Exercise 3.4.7 and the
the best
best linear
linear approximation.
approximation.

Figure C.3.
Figure C.3. The
The function
function g(x]
g(x) = sin (1fx)
= sin (TTX) and
and its
its best
best quadratic
quadratic approxi-
approxi-
mation over the
mation over the interval
interval [0,1].
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 525

Section 3.5
1. The
1. The eigenvalues of A
eigenvalues of A are
are AI
>'1 = 200 and
= 200 and >'2
A2 = 100, and
= 100, and the corresponding (normalized)
the corresponding (normalized)
eigenvectors are
eigenvectors are
-0.8 ] [ 0.6 ]
U1 = [ 0.6' U2 = 0.8 '
respectively. The
respectively. The solution
solution is
is

b . U1 b . U2 [ 1 ]
X=~U1+~U2= 1 .

3. The
3. The eigenvalues and eigenvectors
eigenvalues and eigenvectors of
of A
A are
are AI
>'1 =
= 2,
2, A2
>'2 = 1, >'3
= 1, AS == —1 and
-1 and

The
The solution of the
solution of Ax = b
the Ax b is
is

-3/2]
1/2 .
[
5/2

5.
5. The
The computation
computation ofof u^
Ui .• b/Aj
b/>.; costs
costs 2n operations, so
2n operations, computing all
so computing all nn of
of these ra-
these ra-
tios costs 2n22 operations.
costs 2n operations. Computing
Computing the linear
linear combination is
is then equivalent
equivalent to
to
another
another n dot
dot products,
products, soso the
the total
total cost
cost is
is

2n 2 + n * (2n -1) = 4n 2 - n = O(4n 2 ).


7.
7. (a)
(a) For = 22,3,
For k = , 3 ,...
. . . ,,n
n— 1, we
-1, we have
have

(Ls(j)) k = ;2 (- +
sin ((k - l)j7rh) 2 sin (kj7rh) - sin ((k + l)j7rh))
= ;2 (- sin (kj7rh) cos (j7rh) + cos (kj7rh) sin (j7rh) + 2 sin (kj7rh)
- sin (kj7rh) cos (j7rh) - cos (kj7rh) sin (j7rh))
= ;2 (2 - 2 cos (j7rh)) sin (kj7rh)

= ;2 (2-2cos(j7rh))s~).
Thus
Thus
(Ls(j)) k = ;2 (2 - 2 cos (j7rh)) s~), k = 2,3, ... , n - l.

Similar calculations show


Similar show that this formula holds
holds for
for kk = and k =
= 1I and = nn also.
also.
s^' is an eigenvector of L with eigenvalue
Therefore, s(j)

\. _ 2 - 2 cos (j7rh)
AJ - h2 •

(b) The eigenvalues \j


>.j are all positive and are increasing with the frequency j.
j.
526 Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises

(c) The
(c) The right-hand
right-hand side
side bb can
can be
be expressed
expressed as
as

b = (8{1) . b) 8(1) + (8(2). b) 8(2) + ... + (8(n). b) 8(n),


while the
while the solution
solution xx of Lx =
of Lx =bb is
is
8(1) . x (1)
X = ---8 + -8(2)- -. x8 (2) + ... + -
8(n) . X (n)
--8
Al A2 An
Since Aj
Since increases with
Xj increases with j, this shows
j, this shows that,
that, in
in producing
producing x,
x, the
the higher
higher frequency
frequency
components of
components of b are dampened
b are dampened more
more than
than are
are the
the lower
lower frequency
frequency components
components
of b.
of Thus x
b. Thus is smoother
x is smoother than
than b.
b.

4.1
Section 4.1
1. Define
1. Define
du
Xl = U, X2 = dt'
Then
Then
dXl
dt =X2,

dX2 1
dt = -2" X l.
Define
3. Define

Then
Then
dXl
dt =X2,

dX2
--a.:;:=X3,

dX3
--a.:;:=X4,

dX4
Tt = 2X3 - Xl
.
+ sm t.

5. Define
5. Define
dp dq
Xl = p, X2 = dt' X3 = q, X4 = dt'
Then the
Then the first-order
first-order system
system is
is

dXl
Tt =X2,
dX2
mITt = /!(Xl,X3,X2,X4),
dX3
dt =X4,

dX4
m2Tt = h(Xl,X3,X2,X4).
Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises 527

Section 4.2
1.
1. (a) We
(a) first note
We first note that
that thethe zero function is
zero function is aa solution
solution of
of (4.4),
(4.4), so S is nonempty.
so Sis nonempty. If
If
u, and a,
€ S and
u, v E a, /3fJ E
G R, then w = au + /3v
R, then satisfies
fJv satisfies
d2w dw d2 d
a dt 2 + bdt + cw = a dt 2 [au + fJv] + b dt [au + fJv] + c(au + fJv)

=a ( a ~:: + fJ ~:~) + b ( a ~~ + fJ ~:) + c( au + fJv)

=a (a ~:: + b~~ + cu) + fJ (a ~:~ + b ~: + cv)


=a . 0 + fJ . 0 = O.
Thus w
Thus w is also aa solution
is also solution of
of (4.4), which shows
(4.4), which shows that
that S is aa subspace.
S is subspace.
(b) As
(b) As explained
explained in the text,
in the text, nono matter
matter what
what the values of
the values a, 6,
of a, b, c (a ^ 0),
(a ::j:. 0), the
the
solution space
solution space isis spanned
spanned by by two functions. Thus
two functions. Thus S is finite-dimensional
S is finite-dimensional and and
it has
it dimension at
has dimension most 2.
at most Moreover, it
2. Moreover, is easy
it is easy to see that
to see that each
each of of the sets
the sets
{e rit ,e r2 *} (rl::j:.
{eTlt,eT2t} (n / rr2), 2 ), {el£t
{e"* cos (A*), eM* sin (At)}, and
cos (At),el£tsin(At)}, {er\tertrt}
and {eTt,te } isislinearly
linearly in-
in-
dependent, since
dependent, since aa setset of
of two functions is
two functions linearly dependent
is linearly dependent if if and only if
and only if one
one
of the
of the functions
functions is is aa multiple
multiple of of the other. Thus,
the other. in every
Thus, in every case,
case, S S has
has aa basis
basis
with
with twotwo functions,
functions, and and soso S is
is two-dimensional.
two-dimensional.
3. Suppose
3. Suppose that
that the characteristic polynomial
the characteristic of (4.4)
polynomial of (4.4) has
has aa single,
single, repeated root rr =
repeated root =
—6/(2a)
-b/(2a) (so = 0).
(so b62 -— 4ac = 0). Then,
Then, as shown in
as shown in the
the text,
text,
u(t) = Clert + c2te Tt
is aa solution
is solution of
of (4.4) for each
(4.4) for each choice
choice of
of Cl,
ci, C2. We wish
02- We wish to show that,
to show given fci,
that, given ki €
kl, k2 R,
E R,
there is
there is aa unique choice of
unique choice of CI,
ci, ci such that
C2 such -u(O) =
that u(O) = ki, du/dt(0) = k^.
kl, du/dt(O) We have
k2. We have
du
dt (t ) = rCle Tt + C2e Tt + rC2te Tt .
Therefore, the
Therefore, equations •u(O)
the equations u(O) == ki,
kl' du/dt(0)
du/dt(O) —
= k<2 simplify to
k2 simplify to

[; ~] C = k.
Since the
Since the coefficient
coefficient matrix
matrix is obviously nonsingular
is obviously (regardless of
nonsingular (regardless of the value of
the value r),
of r),
there is
there is aa unique solution Ci,C2
unique solution for each
CI, C2 for each kl,
ki,kz.
k2•
5.
5. (a) The
(a) only solution
The only solution is u(x) = 0.
is u(x) O.
(b) The
(b) The only
only solution
solution is
is u( = 0.O.
x) =
u(x)
(c) The
(c) The function
function u( x) = sin
u(x) sin (-KX) is aa nonzero
(7rx) is solution. It
nonzero solution. It is
is not
not unique,
unique, since any
since any
multiple of it
multiple of it is another solution.
is another solution.
7.
7. By
By the
the product
product rule and the
rule and fundamental theorem
the fundamental of calculus,
theorem of calculus,

:t [1: ea(t-S)f(S)dS] = :t [eat 1: e-asf(S)dS]

= it
ae at e -as f(s) ds + eate- at f(t)
to

= it
a ea(t-s) f(s) ds + J(t).
to
528 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

Therefore, with
u(t) = uoeu(t-t o) + [t
to
eu(t-.) f(s) ds,

we have

du (t) = auoeu(t-to) + a [t eu(t-.) f(s) ds + f(t)


dt to
= au(t) + /(*)•
= au(t) f(t).
Thus uu satisfies the differential
differential equation. We also have
to
u(to) = uoeu(to-t o) + [ eu(t-s) f(s) ds
to
=Uo +0
=uo,
so the
the initial condition holds as well.
9. u(t) = ~ sin 2 (t)
11. u(t) = ~ (e- t + cos (t) + sin (t))

Section 4.3
1. The
1. solution is
The solution is

X (t ) = -1U l - 1 -t
- e U2 + -1e -2t ll.3
v'3 V2 v'6

3. The general solution is

5.
5. XQ
Xo must
must be
be aa multiple
multiple of the vector
of the vector (1, —1).
(1, -1).
7.
7.

x(t) = 60
2t
2t
t
1 [ 55 - 3e- - 45e- + 20t - 7 cos (t) - 11 sin (t)
10 + 6e- + 20t - 16 cos (t) - 8 sin (t)
1
-5 - 3e- 2t + 45e- t + 20t - 37 cos (t) + 19 sin (t)

9. (a) The solution is


3 -t 1 M 3 -t 1 M
x(t) ="2 e +"2 e , y(t) ="2 e -"2e.

The population of thethe first species (x (t)) increases exponentially, while the
(x(t))
population of the
the second species (y( t)) goes to zero in finite time (y(
(y(t)) t) = 0 at
(y(t)
t = In
ln(3)/4).
(3)/4). Thus the second species becomes extinct, whilewhile the first
first species
species
increases without bound.
C. Solutions to
Appendix C. odd-numbered exercises
to odd-numbered exercises 529

(b) If
(b) If the
the initial
initial populations
populations are x(0) = r,
are x(O) y(0) = s,
r, yeO) s, then the solution
then the solution to
to the
the IVP
IVP
is
is

x(t) = ~ (r + s)e- t + (r - s)e 3t ) , yet) = ~ ((r + s)e- t + (s - r)e 3t ) .

Therefore, if
Therefore, if rr =
= s,
s, both populations decay
both populations decay to
to zero
zero exponentially;
exponentially; that
that is,
is, both
both
species die
species die out.
out.

Section 4.4
Section 4.4
1.
1. (a) Four
(a) Four steps
steps of
of Euler's
Euler's method yield an
method yield an estimate of 0.71969.
estimate of 0.71969.
(b) Two
(b) Two steps
steps of
of the
the improved
improved Euler
Euler method yield an
method yield estimate of
an estimate 0.80687.
of 0.80687.
(c) One
(c) One step
step of
of the
the RK4 method yields
RK4 method yields an
an estimate
estimate of
of 0.82380.
0.82380.
Euler's method
Euler's gives no
method gives correct digits,
no correct digits, the
the improved Euler method
improved Euler method gives
gives one
one correct
correct
digit, and
digit, and RK4
RK4 gives
gives three correct digits.
three correct Each of
digits. Each of the
the methods
methods evaluated
evaluated ff(t,
( t , u) four
u) four
times.
times.
3. (a) Let Ul = X, U2 = dx/dt, U3 = y, U4 = dy/dt. Then the system is

dUl
dt =U2,
duz _ Ul + 2U4 _ 1-'2(Ul + I-'d _ 1-'1(Ul - 1-'2)
dt - rl (Ul, U3)3 r2( Ul, U3)3 '
dU3
dt =U4,
dU4 I-'zU3
-
dt
= - 2U2 + U3 - ----:'-------'----::-::-
rl(Ul,U3)3

(b) The
(b) The routine ode45 from
routine ode45 from MATLAB
MATLAB (version
(version 5.3)
5.3) required
required 421 steps to
421 steps to produce
produce
aa graph
graph with with the
the ending
ending point
point apparently
apparently coinciding
coinciding with
with the
the initial
initial value.
value.
The graph
The graph of of y(t) versus x(t)
yet) versus is given
x(t) is given inin Figure C.4. The
Figure C.4. The graphs
graphs ofof x(t)
x(t)
and yet),
and together with
y ( t ) , together with the times steps,
the times steps, are
are given
given in
in Figure
Figure C.5.
C.5. They
They show,
show,
not surprisingly, that
not surprisingly, that the time step
the time step is
is forced
forced to
to be small precisely
be small when the
precisely when the
coordinates
coordinates are are changing
changing rapidly.
rapidly.
(c) The
(c) The minimum step size
minimum step size taken
taken by ode45 was
by ode45 3.28 • 10~44,, and
was 3.28.10- and using
using this
this step
step
length
length over the entire
over the entire interval of [0,
interval of [0,T] would
would require almost 19000
require almost 19000 steps.
steps. This
This
is
is to be compared
to be compared toto the 421 steps
the 421 steps taken
taken by
by the adaptive algorithm.
the adaptive algorithm. (Note:
(Note: The
The
exact
exact results for minimum
results for step size,
minimum step size, etc.,
etc., will
will differ
differ according
according to the algorithm
to the algorithm
and tolerances
and used.)
tolerances used.)
5.
5. (a) We
(a) first note
We first that a+(tl-tO)
note that a+(ti— to) <S tt < b+(ti —
S b+(lI -to) if and
to) if and only
only if a < t-(lI
if as t—(t\ — to) S
-to) <b,
b,
so the
so function vv is
the function is well-defined.
well-defined. In
In fact,
fact,

{vet) : t E [a + (lI - to), b + (tl - to)]}


={u(t-(lI-to)): tE[a+(h-to),b+(lI-to)]}
= {u(t) : t E [a,b]}

(just replace
Gust replace tt — to) by
(ti -— to)
- (tl in the
by tt in last step).
the last step).
530
530 exercises
Appendix C. Solutions to odd-numbered exercises

0.8

0.6

0.4

0.2
>. 0

-0.2

-0.4

-0.6

-0.8

=t5 -1 -0.5 0 0.5 1.5


x

Figure C.4.
Figure C.4. The
The orbit
orbit of
of the
the satellite in Exercise
satellite in Exercise 4.4.3.
4-4-3-

~JS;;:~ 1o 1 2 3 4 5 6 7

~_:~l o 1 2 3 4 5 6 7

f:~~:;; 1o 1 2 3 4
Step index
5 6 7

Figure C.5.
Figure C.5. The
The coordinates
coordinates of
of the
the satellite
satellite in
in Exercise
Exercise 4.4.3
4-4-3 (top
(top two
two
graphs) with the
graphs) with the step
step lengths
lengths taken
taken (bottom
(bottom graph).
graph).
C. Solutions
Appendix C. Solutions to odd-numbered exercises 531

We have
We have
dv
-(t)
dt
= -dtd [u(t - (fI - to))]
du
= -(t
dt
- (h - to))
=f(u(t - (t1 - to)))
= f(v(t)),
so vv satisfies
so satisfies the ODE. Finally,
the ODE. Finally,

V(t1) = u(h - (t1 - to)) = u(to) = Uo.


Therefore v
Therefore v is
is aa solution
solution to
to the
the given IVP.
given IVP.
(b) Consider the
(b) the IVP
IVP

du =t
dt '
u(O) = 1,
which has solution
which has u(t) = e
solution u(t) t2/2
/2 + 1. The IVP
l. The IVP

dv =t
dt '
v(1) =1
has solution v(t) = tt 22 /2 +
has solution + 1/2,
1/2, which
which is not equal
is not to
equal to

1 2
u(t - (1 - 0)) = u(t - 1) = -(t -1) + 1.
2

7. The
7. The exact
exact solution
solution is
is

x(t) ={ 2- 2~-:' 0<t < In 2,


2e, t > In 2.

(a) The
(a) The following
following errors
errors were
were obtained
obtained at = 0.5:
at t =

At
6.t Error
1/4
1/4 2.4332e-05
1/8
1/8 1.3697e-06
1/16
1/16 8.1251e-08
1/32
1/32 4.9475e-09
1/64
1/64 3.0522e-10
1/128
1/128 1.8952e-ll

By inspection,
By inspection, we
we see
see that
that as At is
as 6.t is cut
cut in
in half, the error
half, the is reduced
error is reduced by
by aa factor
factor
of approximately
of approximately 16, as expected O(At 4 ) convergence.
expected for 0(6.t4)
(b) The following
(b) The following errors were obtained
errors were obtained at
at tt = 2.0:
2.0:
532 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises

At
I:l.t Error
1/4
1/4 5.0774e-03
1/8
1/8 3.2345e-03
1/16
1/16 3.1896e-04
3.1896e-04
1/32
1/32 1.0063e-04
1.0063e-04
1/64
1/64 8.9026e-06
1/128
1/128 3.4808e-06

The error
The error definitely
definitely does
does not not exhibit O(At 4 ) convergence
exhibit O(l:l.t4) convergence toto zero.
zero. The
The reason
reason
is the
is the lack
lack of
of smoothness
smoothness of of the function 11 +
the function + Ix — 1|; the rate
\x -11; rate of
of convergence
given in
given in the
the text
text only
only applies
applies toto ODEs
ODEs defined
defined by
by smooth
smooth functions.
functions. When
When
integrating from t =
integrating from = 00 ttoo t =
= 0.5,
0.5, the
the nonsmoothness
nonsmoothness of of the
the right-hand
right-hand side
side is
not encountered
not encountered since
since x(t)
x(t) < 11 onon this
this interval.
interval. This
This explains
explains why we observed
why we observed
good convergence
good convergence in in the
the first
first part
part of
of this
this problem.
problem.

Section 4.5
1.
1. (a) The
(a) The exact
exact solution
solution is
is

(b) The
(b) The norm of the
norm of the error
error is
is approximately
approximately 0.089103.
0.089103.
(c) The
(c) The norm of the
norm of error is
the error is approximately
approximately 0.10658.
0.10658.
3. The
3. The largest
largest value
value is
is I:l.t
At == 0.04.
0.04.
5.
5. (a) Applying
Ca) Applying the methods of
the methods of Section
Section 4.3,
4.3, we find the
we find the solution
solution
t lOOt
1 [ 3e- _ e- ]
xCt) = 2" 3e- t + e- lOOt .

(b) By
(b) By trial
trial and
and error,
error, we find that
we find that I:l.t
At $< 0.02
0.02 is
is necessary
necessary for
for stability.
stability. Specifically,
Specifically,
integrating from tt =
integrating from = 00 ttoo tt =
= 1,
l,n n= = 49
49 (i.e. At =
(i.e. I:l.t = 1/49)
1/49) yields
yields

while n :::::
while > 50 50 yields
yields

l)
(c) With
(c) Xi+l =
With Xj+i Xi +
= Xi + I:l.tAXi
AtAxi and yii) = Ul
and y[ ui .• Xi,
Xj, we
we have
have

Ul . Xi+l =
Ul . Xi + I:l.tUl . AXi
1
=> yii+ ) = yii) + I:l.t(Aut) . Xi
1
=> yii+ ) = yii) + I:l.tAIUl . Xi
=> 1
yii+ ) = yii) + I:l.tAlyii)
=> yii+ 1) = (1 + I:l.tAt)yii).
A similar
A similar calculation
calculation shows
shows that
that
Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 533

For stability,
For stability, we
we need
need

11+~t'\11::; 1,
11+~t'\21::; 1.

Since the
Since the eigenvalues
eigenvalues ofof A
A are
are -1,
—1, -100,
—100, it
it is
is not hard to
not hard to see
see that
that the
the upper
upper
bound for
for ~t
At is ~t
At ::;
< 0.02,
0.02, just as was
was determined
determined by experiment.
(d) For the backward Euler method, a similar calculation
calculation shows that

y~i+l) = (1- ~t,\l)-ly~i),


y~i+l) = (1 _ ~t,\2)-ly~i).
Stability is
Stability is guaranteed for any
guaranteed for any ~t,
At, since
since

for every
for every ~t
At > 0.
O.

Section 4.6
Section 4.6
1. G(t; s) = e- 2 (t-s).
3. The IVP is
dm
- + km
dt
= 0.1, m(O) = 10.
k s
The Green's function is G(t; s) = e ^ \ and
— e-k(t-s), and the
the solution
solutionisis

( ) -_ (10 -T
mt
0.1) -kt
e
0.1
+T·
The mass converges, as tt -t
The oo, to
—>• 00,

0~1 ~ 0.289 g.

5. The solution is

u(t) .2(t)
= 3"2 (1 + 2 cos (t)) sm "2 = 3"1 (cos (t) - cos (2t» .

Section 5.1
Section 5.1
1.
1. (a) Since
(a) Since Mn
MD isis linear,
linear, it
it suffices
suffices to
to show
show that
that the null space
the null space of
of Mn
MD isis trivial.
trivial. If
If
MDU =
Mnu 0, then,
= 0, du/dx =
then, du/dx 0, that
— 0, that is,
is, u is
is aa constant
constant function:
function: u(x)
u(x) =— c. But
c. But
then the
then the condition u(0) = 00 implies
condition u(O) that cc = 0,
implies that 0, and
and so
so u is
is the
the zero
zero function.
function.
Thus M(MD] = {O}.
Thus N(Mn) {0}.
(b) If
(b) € c1[o,
If uu E CofO, f] MDU =
and Mnu
f] and — f,
/, then
then we
we have
have
du
dx(x)=f(x), O<x<fand u(O) =0,

which imply
which imply that
that
u(x) = 1" f(s)ds.
534
534 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

But
But we
we also
also must
must have u(f) =
have u(i) — 0,
0, which
which implies
implies that
that

it I(s) ds = o.
If 1
If / €E C[O,
C[Q, f] does not
I] does satisfy this
not satisfy condition, then
this condition, then it is impossible
it is MDU = 1
for MDU
impossible for f =
to have aa solution.
to have solution.
3.
3. (a) If v,w
(a) If v, w GE S are both
S are solutions of
both solutions Lu = /,
of Lu I, then Lv = Lw,
then Lv Lw, oror (by linearity)
(by linearity)
L(v
L(v -— w)
w) == 0. Therefore vv —
O. Therefore - w
wE € A/"(Z>). But, since
N(L). But, since S isis aa subspace,
subspace, vv — w is
- w is
also in
also in S. If the
S. If only function
the only function in
in both
both Af(L) and SS is
N (L) and is the
the zero
zero function, then
function, then
v -— w must be
w must the zero
be the zero function,
function, that
that is,
is, v and
and w must be
w must be the
the same
same function.
function.
Therefore, if
Therefore, if J\f(L)
N(L) n n S = {O},
{0}, then
then Lu
Lu = = 1f can
can have at most
have at one solution
most one solution for
for
any/.
any f.
(b) We have
(b) We have already
already seen
seen that Lu = 1
that Lu has aa solution
f has solution for
for any
any 1/ € C[0, f]
E C[O, f\ (see the
(see the
discussion immediately
discussion immediately preceding
preceding Example
Example 5.2). We will
5.2). We will use
use the
the result from
result from
the first part of
the of this
this exercise
exercise to show
show that the the solution
solution is unique.
unique.
The null space of
The of L
L is the space of
the space of all first
first degree
degree polynomials:

N(L)={u:[O,f]--tR: u(x)=ax+bforsomea,bER}.

i. Suppose
i. Suppose u
u€E Af(L) S. Then
N(L) n S. Then u(x) — ax
u(x) = ax + b for some
b for some a,
a, b
bE€R and
R and

du (~) = 0 =} a = o.
dx 2
Then u(x)
Then 6, and
= b,
u(x) = and

it u(x) dx = 0 =} bf = 0 =} b = o.
Therefore uu is
Therefore the zero
is the zero function, and so
function, and so A/"(L)
N(L) n H SS = {O}.
{0}. The uniqueness
The uniqueness
property
property then
then follows
follows from
from the
the first
first part
part of this exercise.
of this exercise,
ii. Suppose uu E
ii. Suppose € A/"(L)
N(L) n S. S. Then ax + b
u(x) = ax
Then u(x) for some
b for some a,
o, b
bEeRR and
and

u(O) = 0 =} b = O.
Then u(x)
Then — ax,
u(x) = and
ax, and
du
dx (f) = 0 =} a = O.
Therefore uu is
Therefore is the
the zero function, and
zero function, and so
so N(L}
N(L) n C\S = {O}.
S = {0}. The uniqueness
The uniqueness
property
property then
then follows
follows from
from the
the first
first part
part of this exercise.
of this exercise.
5. The
5. condition
The condition
(C.2)

implies
implies that
that du/dx is zero,
du/dx is zero, and
and hence
hence that u is
that u is constant. The boundary
constant. The conditions
boundary conditions
on u would
on u would then imply that
then imply is the
that uu is zero function.
the zero function. But,
But, by assumption, uu is
by assumption, is nonzero
nonzero
(we assumed
(we assumed that 1). Therefore,
(u, u) = 1).
that (u,u) Therefore, (C.2) cannot
cannot hold.
hold.
7.
7. (a)
(a) If Lihu =
If LmU — 0,
0, then
then u u has the form
has the u(x) =
form u(x) = ax
ax + b.
b. The
The first
first boundary condition,
boundary condition,
du/dx(Q) = 0,
du/dx(O) implies that
0, implies — 0,
that aa = and then
0, and then the second boundary
the second condition,
boundary condition,
u(i] =
u(£) 0, yields b6 =
= 0, = 0.
O. Therefore,
Therefore, uu is the zero function and
and M(Lm] is trivial.
N(Lih) is trivial.
Appendix C. Solutions
Appendix C. Solutions to odd-numbered exercises
to odd-numbered exercises 535
535

(b) For
(b) any f/ E
For any <E C[O,
C[Q,£\, the function
.e], the function

u(x) = 1£ l' f(s)dsdz

belongs to c~
belongs to C%, [0, i] and
[O,.e] satisfies
and satisfies

d2 u
- dx 2 (x) = f(x), 0 < x < .e.
This shows
This shows that
that L mu = f has
Lmu has aa solution
solution for
for any
any /f €
E C7[0,^], and therefore
C[O, .e], and therefore
K(Lto) =
R(Lm) = C[O,.e].
C[0,f\.
(c) Suppose
(c) € C~[O,.e].
Suppose u,v E Then
Cft[Q,£\. Then
t d2
(Lmu,v) =-
I
0 dx~(x)v(x)dx
du ]1
=- [dx(X)V(X) 0 +
Ii
0
du dv
dx(X)dx(x)dx

i du dv .
=
I0 dx (x) dx (x) dx (SInce v(.e) = 0, du/dx(O) = 0)

= [U(X):~(X)]: -lot U(X)::~(X)dX


t d2
=-
=
I 0

(u, Lmv).
u(x) dx~ (x) dx (since u(.e) = 0, dv/dx(O) = 0)

Thus Lm is
Thus is symmetric.
symmetric.
(d) Suppose
(d) Suppose A is an
A is an eigenvalue
eigenvalue of
of Lm with
with corresponding eigenfunction u,
corresponding eigenfunction and
u, and
assume that
assume has been
that u has been normalized
normalized so
so that
that (u, u) =
(u,u) — 1. Then
I. Then
A = A(U,u) = (AU,U) = (Lmu,u)
i d2
=- I dx~(x)u(x)dx
0

=- [::(x)u(x)]: + li (::(x)f dx

1c:
i d 2
= 0 (x)) dx (since u(.e) = 0, du/dx(O) = 0)
> O.
The last
The last step
step follows
follows because
because every
every nonzero
nonzero function
function in
in CjjO, •£] has
C~[O,.e] has aa nonzero
nonzero
derivative.
derivative.
9.
9. Define u(x) =
Define u(x) x(l — x), v(x)
= x(l- = x22(l
v(x) = (1- Then aa direct
— x). Then calculation shows
direct calculation shows that
that
7
(Mu,v) = 30'
but
but
4
(u,Mv) = 15'
536
536 Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises

11.
11. (a)
(a) Suppose C~[O, fl. Then
u, v €E C|[0,^].
Suppose u,v Then

Applying
Applying the
the boundary conditions on
boundary conditions on u, v, we
u, v, obtain
we obtain

du du dv dv
-K dx (f)v(f) + Kdx (O)v(O) + U(f)K dx (f) - U(O)K dx (0)
= au(f)v(f) + au(O)v(O) - au(f)v(f) - au(O)v(O) = 0,
so (LRU,V) = (U,LRV), as desired.
If LRU
(b) If LRU = 0, then u must be a first
= 0, first degree polynomial: u(x) =
polynomial: u(x) = ax ++ b.b. The
boundary conditions imply that a and b must satisfy
satisfy the following equations:

-Ka +ab = 0,
(af + K)a + ab = O.
The
The determinant
determinant is computed as
is computed follows:
as follows:

n- K a I = -a(2K + af.) < O.


I a<- + K a

The only solution is a = b = 0, that is,


= 0, = 0, so
is, u = N(LR) is trivial.
so N(LR)

Section 5.2
Section 5.2
1. If n =I- m, then

= !li{
2 cos
((n-m)1rx)
f
_cos ((n+m)1rx)}
f
dx
o
=! [ f sin ((n-m)1rx) _ f sin ((n+m}7rx)]i.
2 (n - m)1r f (n + m)1r f 0

This last expression simplifies


simplifies to four terms, each including the sine function evalu-
ated at an integer multiple of 1r,
TT, and hence each equal to zero.
zero. Thus (Un, m) = 0
(un,uUrn)
for n 7^
for TO.
=I- m.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 537

3. The eigenpairs are

2n -l)1['X)
cos ( 2f ' n = 1,2,3, ....

5. The characteristic polynomial is rr22 —


The characteristic - rr + (X - 5), so the
(A — the characteristic
characteristic roots are

1 - -/21 - 4A 1 + -/21 - 4A
rl = 2 ' r2 = 2 (C.3)

Case 1:
Case 1: AA== 21/4.
21/4. InIn this
this case,
case, the
the characteristic
characteristic roots
roots are
are rr = 1/2,1/2 and
= 1/2,1/2 the
and the
general solution
general solution of
of the ODE is
the ODE is

u(x) = cle X
/
2 + c2xe X / 2.

The boundary
The condition u(O)
boundary condition u(Q) =— 00 yields
yields c\ 0, and
= 0,
CI = and then
then the
the boundary condition
boundary condition
u(l) =
u(l) = 1 implies that c<i
C2 = 0. Thus there is no nonzero solution to the BVP, and
= O.
A
A== 21/4
21/4 is
is not an eigenvalue.
not an eigenvalue.
Case 2: A
Case 2: A<< 21/4.
21/4. In this case,
In this case, the characteristic roots,
the characteristic roots, given
given by (C.3), are
by (C.3), are real and
real and
distinct. The general
general solution of thethe ODE is

The boundary conditions lead to the system


system

CI + C2 = 0,
clne
r
! + c2r2e r2 = O.

This system has the unique solution C1c\ =


= ci = 0,
C2 = 0, so there is no nonzero solution for
for
< 21/4.
AA < 21/4. Hence
Hence no A<
no A < 21/4 is an
21/4 is an eigenvalue.
eigenvalue.
Case 3:
3: A
A>> 21/4. In this case, the roots are complex conjugate:

r1 = "21 - 8'
t, r2 = "21 + 8'z, 8= -/4A-21
2'

The general solution of the ODE is


u(x) = (Clcos(8x) +C2 sin (8x)) eX / 2.
The boundary
The condition u(0)
boundary condition = 0
u(O) = 0 yields
yields c\
C1 = 0, so
= 0, so any
any eigenfunction
eigenfunction is
is of
of the form
the form

u(x) = sin (8x )e x / 2.


The
The Neumann
Neumann condition at x =
condition at = 11 is
is equivalent
equivalent to
to the equation
the equation

tan (8) = -28, 8 > O.

Although this equation


equation cannot be solved explicitly, a simple graph shows that there
are infinitely many solutions 0 <
are 81 < 8622 <
< 6\ < ...
• • •,, with
2k -12k + 1 )
8k E ( -2-1[', -2-1[' , k = 1,2, ....

Define
Define A& by
Ak by
8 _ -/4A k - 21
k - 2 '
538
538 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

that
that is,
is,
2 21
Ak = 8k + 4' k = 1,2, ....
Then A*,,
Ak, A;
k== 1,2,
1, 2 , ...
. . . , are eigenvalues, and
and the
the corresponding eigenfunctions
eigenfunctions are

Using
Using Newton's
Newton's method,
method, we find that
we find that

81 == 1.8366, 82 == 4.8158,

which
which yields
yields
Al == 8.6231, A2 == 28.4423.
The eigenfunctions are
The eigenfunctions are VI,
vi,vz, as given
V2, as given by
by the
the above formula.
above formula.
A direct
direct calculation
calculation shows
shows that
that

so and V2
vi and
so VI are not
v? are orthogonal.
not orthogonal.
,",00 2( _l)n+l . ( )
7. (a) L....n=1 mr sm n7rX
,",00 4sin(Vf) . ( )
(b) L....n=1 n2".2 SIn n7rX
,",00 12(_I)n+l . ( )
( c) L....n=l n3".3 sIn n7rX
720( _I)n+l . ( )
(d) ,",00
L....n=l n5".o SIn n7rX
The errors in approximating the the original functions using 10
10 terms of the
the Fourier sine
series are graphed
graphed in Figure C.6.
9. sin (37rx)
(STTX) (That
(That is, all of the
the Fourier sine coefficients
coefficients are zero, except the
the third, which
which
is one.)
11. The series have the
the form

~
L...Ja n cos
((2n -1)7rX)
2 '
n=l

where
where

32cos «2n-I)"./4) sin 2 «2n-I)"./8).


(b) an -- ".2(2n_l)2 ,

8 5760+2880( _l)n (2n-I)".+240(2n-l)2".2+ 7 (2n_l)4".4


(d) an =- (2n-l) ".
The errors in approximating
approximating thethe original functions using 10
10 terms of the Fourier
Fourier
quarter-wave cosine series are graphed in Figure C.7.
Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises 539
539

1~------------------~ 0 . 0 3 , . . . . - - - - - - - - -.....

0.02
0.5
0.01

-0.5 -0.01
0 0.5 1 0 0.5
x x
-3 -5
1.5 x 10 X1O
5

-1~----------------~ -5~----------------~
o 0.5 1 o 0.5 1
x x

Figure
Figure C.6.
C.6. Errors in approximating
Errors in approximating four
four functions
/unctions by 10
10 terms
terms of their
of their
Fourier sine
sine series (see
(see Exercise 5.2.7).
5.2.7). Top
Top left: g(x) =
left: g(x) = x; Top
Top right: h(x) =
right: h(x) =
~
| - Ix - I;
—x ~ — Bottom
| ; Bottom left:= m(x]
left: m(x) x - x=3
;x — x3; Bottom
Bottom right:
right: k{x) lOx 3 +
k(x)- =7x
= 7x 10x
—3x 5 •3

Section 5.3
Section 5.3
~oo 2(1_~_1)n) . ( )
1. (a) L..-n=l n .".3 Sln n7rX

(b) x + ~oo
L..-n=l
2(1-C-l)n) . (
n3.".3 sm n7rX
)

3 (a) ~oo 32(_1)n+l sin (2n-l).".X)


. L..-n=l (2n_l)4.".4 2

~oo 16(-1)n.".+2(-1)n+l n .".-2)


(b) 1 + L..-n=l (2n-l)411'4
cos (2n-l)"X)
2
(c) L OO
2(1-(-1)n)
n=l nn-(2+n27r2)
sin (n7rx)

5. We have
d2 u
dX2 (x) = -x, 0 < x < 1,
so
so
540 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

0.04,....----------"

0.5

-0.02

-0.5'----------~ -0.04
o 0.5 1 0 0.5 1
x x

0.01 , . . . . - - - - - - - - - - " 0.05

o 0

-0.01 -0.05

-0.02 -0.1

-0.03'----------~ -0.15
o 0.5 1 0 0.5
x x

Figure C.7.
Figure C.7. Errors in approximating
Errors in approximating four
four functions
junctions by by 10
10 terms
terms ofof their
their
Fourier quarter-wave
Fourier quarter-wave cosine
cosine series
series (see
(see Exercise 5.2.11). Top
Exercise 5.2.11). Top left: g(x) =
left: g(x) = x;
X; Top
Top
right: h(x)
right: ! I;
h(x) == !\- —Ixx- —\ ;Bottom
Bottomleft: m(x) ==x x- —x x3 3; ;Bottom
left: m(x) Bottomright: k(x] ==
right: k(x)
7x - lOx33 +
7x-Wx +3x 5
3xt. .

= -(0)
du
dx
- 1'"
0
sdx

= ~:(O) _ x22.

Write C
Write for du/dx(O);
C for then another
du/dx(Q); then another integration
integration yields
yields

u(x)=u(O)+
l 0
"'d
d;(s)ds

=0 + 1'" {c - s; } ds

x3
=Cx-

Finally, we
Finally, we choose
choose C so that
C so that u(l)
u(l) = 0, which
= 0, which yields C=
yields C 1/6. This
= 1/6. This yields
yields

u(x) = ~ (x-x 3 ).
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numberedexercises
exercises 541
541

7. The
7. The Fourier
Fourier quarter-wave
quarter-wave sine
sine coefficients
coefficients of —Td2u/dx
of -Td u/dx22 are
are

bn = _ 2T
£
1i 2
d u( ) . ((2n -l)'JrX) d
0 dx2 x sm 2£ x,

while those
while those of
of u are
are

an =£
2
10i
.
u(x)sm (
(2n - l)7rx
2£ ) dx.

Using integration
Using integration by
by parts twice, almost
parts twice, almost exactly
exactly as
as in
in (5.23),
(5.23), we
we can
can express
express b&„n in
in
terms of
terms of a n:
an:

_ 2T
£
1t0
2
d u( ). ((2n-1)7rx) d
dx 2 x sm 2£ x

= _ 2T { [dU (x) sin ((2n - l)7rX)] i


£ dx 2f x=O

_ (2n -1)7r
n
2"
ii ddu()
X cos
((2n -l)7rX) d }
n X
2"
1i
0 X

= 2T(2n -1)7r du() ((2n -l)7rX) d


2£2 odxxCOS 2f x
(since sin (0) = du/dx(£) = 0)
= 2T(2n2£2-1)7r {[u ()
X cos
((2n -l)7rX)] i

,,=0

+ (2n -1)7r
2f
1t ().
o
ux sm
((2n -l)7rX) d }
2£ x

- 4£2
2
_ T(2n _1)27r ~
£
1i ().
o
uxsm
((2n - l)7rX) d
2£ x
(since u(O) = cos ((2n - 1)7r/2) = 0)

This gives
This gives the desired result.
the desired result. (Actually,
(Actually, since
since it
it is
is known
known that
that the
the negative
negative second
second
derivative operator
derivative operator is
is symmetric
symmetric under the mixed
under the mixed boundary conditions, we
boundary conditions, can just
we can just
appeal to
appeal to (5.29),
(5.29), which is the
which is the above
above calculation
calculation written
written abstractly.)
abstractly.)
9. Let
9. ai, a2,
Let aI, a3, . .. be
0,2,as,... be the Fourier quarter-wave
the Fourier quarter-wave sine
sine coefficients
coefficients of
of U; then
u; then

2
_ d u( ) = ~ ,..(2n _1)27r 2 in ((2n -l)7rX)
,.. dX2 x ~ 2002 an s 200 '
n=l

where K = 3/2.
where,.. 3/2. We also have
We also have

0.001 =~ 0.004 sin ((2n-1)7rX).


~ (2n - 1)7r 200
n=l
542 Appendix C. Solutions
Appendix C. Solutions to odd-numbered exercises
to odd-numbered exercises

Setting the
Setting the two
two series equal and
series equal and solving for an,
solving for a n , we
we find
find

~ 3.2.10 2 . (2n-1)7rx)
u(x) = ~ 3(2n _ 1)37r3 sm 200 .

The temperature
The temperature distribution
distribution is graphed in
is graphed in Figure
Figure C.8.
C.S.

3.5r-----r-----r-----~---...__--__,

2.5
Q)
:s 2
~
Q)
c.
~ 1.5

0.5

20 40 60 80 100
x

Figure C.8. The


Figure C.S. The temperature
temperature distribution (in degrees
distribution (in Celsius) in
degrees Celsius) in Exercise 5.3.9.
Exercise 5.3.9.

Section 5.4
1. Suppose
1. Suppose fI,, g9 E
<E C1[0,
Cr>[0,<], so that
€J, so that
1(0) = f(€) = g(O) = g(€) = O.
Then
Then

(-! (k(X):~) ,g)


=-li d~ (k(x):~(x))9(X)dX
df
=-k(x)dx(x)g(x)
Ii + 1i k(x)dx(x)d;(x)dx
0 0
df d
(integration by parts)

=
1 0
i dl d
k(x) dx(x) d~(x)dx (using g(O) = g(€) = 0)

= k(x)/(x)~;(x)l: -It f(x)! (k(X)~;(X)) dx (integration by parts)


Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 543
543

= -11 I(x)! (k(x) ~~ (x)) dx (using 1(0) = I(t) = 0)


= (/,- d~ (k(x)~~)).
3. Take
3. Take p(x) = (x —
p(x) = - c)3
c)3(d x)33 and
(d -— x) as suggested
V[c>d] as
and V[c,d] suggested in
in the hint.
the hint.
5. Repeating
5. Repeating the
the calculation
calculation beginning
beginning on
on page 173, we
page 173, obtain
we obtain

! [~lt Ap(x) (~f dx+ ~ 1t Ak(x) (~;f dX]


au
1
£ 2
= - 0 c( at) dx, t > O.
This shows that derivative with respect to time of the
the total energy is always negative,
and hence
and hence that
that the
the total energy is
total energy always decreasing.
is always decreasing.

Section 5.5
Section 5.5
1.
1. (a) Yes.
(b) No,
(b) o(/,f)/) ==00for
No, a(f, /(x)==1,1,but
forI(x) butI / i=/O.0.
(c) No,
(c) o(/,f)/) ==00for
No, a(f, f ( x ) ==1,1,but
forI(x) butI / i=/O.0.
3.
3. (a) The
(a) set S is
The set is the
the span of {x,
span of x 22 }} and
{x, x and therefore
therefore is
is aa subspace.
subspace.
(b) As
(b) discussed in
As discussed in the
the text,
text, a(-,-) automatically satisfies
a(·,·) automatically satisfies two
two of
of the properties
the properties
of
of an inner product.
an inner product. Every
Every function
function p in satisfies p(Q)
in S satisfies = 0,0, so
p(O) = so a(·,·)
a(-, •) also
also
satisfies
satisfies the
the third
third property (a(u, u) = 0
property (a(u,u) 0 implies
implies that
that u = = 0)
0) for
for exactly
exactly thethe
same reason as given in in the text for the subspace V (see page 181).181).
(c) The
The best approximation is p(x) = (9 —
p(x) = 3e)x22 +
- 3e)x + (4e —
- 10)x.
(d) The
(d) The bilinear
bilinear form
form isis not an inner
not an inner product
product onon 7>2,
P2, since
since a(l, = 00 but
1) =
a(l, 1) but 11i=
/ 00
(a constant
(a constant isis "invisible"
"invisible" to
to the
the energy
energy inner
inner product
product and
and norm).
norm). Therefore,
Therefore,
every polynomial
polynomial of the the form (9 — 3e)x22 +
- 3e)o; + (4e -— 10)x ++ C E€ S is equidistant
equidistant
x
from fI(x)
from ( x ) = eX
e in the
the energy
energy norm.
5. Write
5. Write p(x] = x(l
p(x) — x(l -— x) and q(x)
x) and = x(l/2
q(x) — x(1/2 — - x)(l x). The
x)(l -— x). approximation will
The approximation be
will be
= U1P(X)
v(x) =
vex) mp(x) + U2q(X),
u-2q(x), where
where Ku
Ku == f.f. The
The stiffness
stiffness matrix
matrix K
K is
is

K = [ 1:(1 +x)*(x)*(x)dx 1:(1 +x)~(x)*(x)dx 1


101(1 + x)*(x)~(x) dx 101(1 + x)~(x)~(x) dx
= [-~ -t],
and
and the load vector
the load vector ff is
is

f= [f~XP(X)dX] = [ 12
1 ]
10 xq(x)dx 1
-120
.

Therefore,
0.16412 ]
-0.038168 .
544
544 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

The exact solution


The exact solution is
is

1 2 1 1
u(x) = --x
4
+ -x
2
- - - I n (1
4ln2
+ x) .
The exact
The and approximate
exact and approximate solutions
solutions are graphed in
are graphed in Figure
Figure C.9.
C.g.

0.045r-----r-----r-----r-----r----~

0.04

0.035

0.03

0.025

0.02

0.015
exact
0.01 approximate

0.2 0.4 0.6 0.8

Figure C.9. The


Figure C.9. The exact
exact and
and approximate
approximate solutions
solutions from
from Exercise 5.5.5.
Exercise 5.5.5.

7. (a) It will take about


about 101033 times as long, or 1000
long, or 1000 seconds (almost
(almost 17
17 minutes), to
to
solve aa 1000
solve 1000 xx 1000
1000 system,
system, and 10033 times
and 100 times as
as long,
long, or 1066 seconds
or 10 seconds (about 11.5
(about 11.5
days)
days) to solve aa 10000
to solve 10000 xx 10000
10000 system.
system.
(b) Gaussian
(b) Gaussian elimination consists of
elimination consists of aa forward
forward phase, in which
phase, in the diagonal
which the entries
diagonal entries
are used
are used toto eliminate
eliminate nonzero
nonzero entries
entries below and in
below and in the
the same
same column,
column, andand aa
backward
backward phase,
phase, in
in which
which the diagonal entries
the diagonal are used
entries are used to eliminate nonzero
to eliminate nonzero
entries above
entries above andand in
in the same column.
the same column. During
During the forward phase,
the forward phase, at
at aa typical
typical
step, there
step, there isis only
only 11 nonzero entry below
nonzero entry below the
the diagonal,
diagonal, and
and only
only 5 arithmetic
5 arithmetic
operations are
operations are required
required toto eliminate
eliminate it it (1
(1 division
division to
to compute
compute thethe multiplier,
multiplier,
and 22 multiplications and 2 additions to add add a multiple of of the
the current rowrow
to the next). Thus the forward phase requires O(5n) O(5n) operations. A typical
step of
step of the
the backward
backward phase
phase requires
requires 3 3 arithmetic
arithmetic operations
operations (a
(a multiplication
multiplication
and an
and an addition
addition to adjust the
to adjust the right-hand
right-hand sideside and
and aa division
division to
to solve
solve for the
for the
unknown).
unknown). Thus Thus the
the backward
backward phase
phase requires O(3n) operations.
requires O(3n) operations. The grand
The grand
total is
total O(8n) operations.
is O(Sn) operations.
(c) It
(c) It will
will take
take about 10 times
about 10 times asas long, or 0.1
long, or 0.1 seconds,
seconds, to solve aa 1000
to solve 1000 xx 1000
1000
tridiagonal system, and
tridiagonal system, 100 times
and 100 as long,
times as long, or
or 11 second,
second, to solve aa 10000
to solve 10000 xx 10000
10000
tridiagonal system.
tridiagonal system.
Appendix
Appendix C.
C. Solutions to odd-numberedexercises
to odd-numbered exercises 545

Section 5.6
Section 5.6
1.
1. (b) Here are the
the errors for = 10,20,40,80:
for n = 10, 20,40, 80:

n maximum error
10
10 10~-0>3
1.6586 . 10
20 10~4
4.3226 . 10 -q

40 io--'l4
1.1036 . 10
80
80 2.7881
2.7881.1010~-05
We see that, when n is doubled, the error decreases
decreases by a factor of approximately
four. Thus
error = 0 (~2 ) .
3. The exact
exact solution is u(x) = x(l
u(x) — x(l- the errors for n = 10,20,40,80:
— x 3 )/12. Here are the 10, 20,40,80:

n
n maximum error
10
10 10~3
1.1286 .• 10 -;j

20 10~-'l4
2.9710 .• 10
40
40 10~-0&
7.6186 .• 10
80
80 10~-0&
1.9288 .• 10

We see that, when n is doubled, the error descreases


descreases by a factor of approximately
approximately
four. Thus
error = 0 (~2 ) .
The weak form is
5. The

find u G
E V such that
1o
£{ du dv
k(x) dx (x) dx (x) + p(x)u(x)v(x) } dx

= 1£ f(x)v(x)dx for all v E V.

The
The bilinear form is

a(u,v)=
1
0
£{ du dv }
k(X)dx(X)dx(X)+P(X)U(X)V(X) dx.

Section 5.7
1. u(x) = xe- x .
3. (a) This BVP models a bar whose top end (originally at x = = 0) is free and whose
bottom
bottom end is fixed £. If we
fixed at x = i. we apply a unit force to the cross-section
cross-section
at x = s, then the part of the bar originally between x = s and x = £ t will
compress, and the part of the bar originally above x = s will just move rigidly
with u(x)
u(x) —= u(s)
u(s) for 0 ::;
< x < s. The compression of the bottom
bottom part of thethe
bar
bar will satisfy Hooke's law:

u(x)
k- () =£-
- = 1 ~ux -- x
i-x k
546
546 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

(the uncompressed
(the uncompressed length of the
length of the part of the
part of the bar
bar between
between xx = and xx =
= ss and =£t is
is
£i -—x). Therefore we
x). Therefore we obtain
obtain
i-s
k' 0< x < s,
u(x) = { i-x
-k-' s<x<£.
The Green's
The Green's function
function is
is
i-s
-k-' 0< x < s,
G(XjS) ={ i-x
-k-' S < x < e.
(b) The Green's
(b) The Green's function
function is
is

dz

1
£
G(Xj s) = k(z)'
max{x,s}

(c) If
(c) If kA; is
is constant,
constant, then
then
l-s
0< x < s,
G(XjS) = e-ma;{x,s} ={ k'
i-x
-k-' S < x < e.
(d)
(d)

u(X) = In2 _! _ X2 + ~ _In(l+x)


2 4 4 2 2'

5. By
5. By direct
direct integration,
integration, we
we obtain
obtain the following solution
the following solution to
to (5.67):
(5.67):

u(x) =p 10
r k(s)' ds

Since xx = min{x,
Since min{x, i} for xx E
i\ for [0,il,
€ [0, wecan
£.], we can write
write
_ {minix,s} ds
U(X) - p 10 k(s)'

that
that is,
is,
u(X) = g(Xje)p.
7. The
7. The Green's function is
Green's function is

. (n7rs) . (n7rx)
g(Xj s) =~
L.J kn2l
27r 2 sm -e- sm -e- .
n=l

6.1
Section 6.1
1.
1. The steady-state solution
The steady-state solution of
of Example
Example 6.2 satisfies the
6.2 satisfies BVP
the BVP

-D::~ = 10-
7
, 0 < X < 100,
u(O) = 0,
u(lOO) = O.
Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numberedexercises
exercises 547

Either by
Either by solving
solving this
this BVP
BVP oror by
by taking
taking the limit (as
the limit (as t ---+
—> 00)
oo) of
of the
the solution
solution of
of
Example 6.2,
Example 6.2, we
we find
find that
that the
the steady-state
steady-state solution
solution is
is

. (n7rx)
Us X
( ) _~2.1O-3(1-(-1)n)
- ~ Dn 7r SIll 100 .
3 3
n=l

3. The
3. The solution
solution is
is
00 2(_1)n+l n 2 2
u(x,t) = '"'
~ n7r
e- 7r tsin(n7rx).
n=l

A graph of
A graph of u(·, 0.1) is
u(-, 0.1) is given
given in
in Figure
Figure C.lO.
C.10.

1~====~~--~------~----~----~
u(·,O)
0.9 u(·,O.1 )

0.8

0.7

0.6

0.5

0.4

0.3
~.~ ~.~
_.-.-,-,-,-,- -'~,~
0.2
"' .
0.1 ... ... ,

0.2 0.4 0.6 0.8


x

C.10. The
Figure C.1O. The snapshot w(-,0.1),
snapshot u(·, together with the initial temperature
0.1), together temperature
distribution, for Exercise
distribution, 6.1.3.
Exercise 6.1.3.

5. With
5. With
x
p(x, t) = g(t) + C(h(t) - g(t))
and v(x, t) = u(x, t) - p(x, t), we have

pcov _",02 V =pcou _",02 U _ (pc OP _",02 p )


ot ox 2 at ox 2 ot ox 2
= f(x t) - pc (d9 (t) +~ (dh (t) _ dg (t))) .
, dt "dt dt
We also
We also have
have
x
v(x, to) = u(x, to) - p(x, to) = 1j;(x) - g(to) - C(h(to) - g(to))
548 Appendix C. Solutions
Appendix C. to odd-numbered
Solutions to odd-numbered exercises
exercises

and
and
v(O, t) = u(O, t) - p(O, t) = get) - get) = 0,
vel, t) = u(l, t) - pel, t) = h(t) - h(t) = o.
We define
We define
g(x, t) = I(x, t) - pc 7
(~! (t) + (~~ (t) - ~! (t)) )
and
and
x
ifJ(x) = 1j;(x) - g(to) - l(h(to) - g(to)).
Then v satisfies
Then satisfies
{)v {)2V
pc {)t - K {)x 2 = g(x, t), 0 < x < l, t > 0,
v(x,to) = ifJ(x), 0 < x < l,
v(O, t) = 0, t > to,
vel, t) = 0, t > to.
7. Define
7. Define v(x, = u(x, t) -— xcos
vex, t) = Then v satisfies
(t). Then
x cos (t). satisfies the
the following
following IBVP
IBVP (with
(with homo-
homo-
geneous boundary
geneous conditions, but
boundary conditions, but with
with aa nonzero source term):
nonzero source term):
{)v {)2V .
at - {)x2 = x sm (t), 0 < x < 1, t > 0,
v(x,O) = 0, 0 < x < 1,
v(O, t) = 0, t > 0,
v(l,t) = 0, t > O.
This IBVP
This IBVP has solution
00

v(x,t) = Lan(t) sin (mrx),


n=l

where
where
2( _l)n ( () _n 2 ,..2 t 2 2 • ( )
an (t) = mr (n4 7r 4 + 1) cos t - e - n 7r sm t) .
The solution
The solution to the original
to the original IBVP
IBVP is is then
then u(x, v(x,t)t) + xcos(t).
u(x,t)t) = vex, A graph
x cos (t). A graph of
of
«(•, 1.0) is
u(·,1.0) is given
given in
in Figure C.ll.
Figure C.11.
9. The
9. The temperature satisfies the
temperature u(x, t) satisfies the IBVP
IBVP
{)u {)2U
pc at - K {)x 2 = 0, 0 < x < 100, t > 0,
u(x,O) = 5, 0 < x < 100,
u(O, t) = 0, t > 0,
u(100, t) = 0, t > O.
The solution
The solution is
is

u(x t) \:""'" 10(1-(-1)n)


= '~ 00 _"n ,,2 t
e 1002
(n7rx) .
sin -
2
pc
, n7r 100
n=l

The temperature
The temperature at
at the midpoint after
the midpoint after 20
20 minutes
minutes is
is
ti(50,1200)
u(50, = 1.58
1200) == 1.58 degrees
degrees Celsius.
Celsius.
Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered exercises
odd-numbered exercises 549

Figure C.ll. The snapshot u(-, 1.0), together with the initial
snapshot u(·, temperature
initial temperature
distribution, for Exercise 6.1.7.
distribution,

11.
11. (a) The steady-state
(a) The steady-state temperature
temperature is is u = re/20,
s (x) =
u.(x) x/20.
(b)
(b) The
The temperature u( x, t) satisfies
temperature u(x,t) satisfies the
the IBVP
IBVP

AU 02U
pc at - K, = 0,
ox 2 0 < x < 100, t > 0,
u(x,O) = 5, 0 < x < 100,
u(O, t) = 0, t > 0,
u(lOO, t) = 5, t > o.
The
The solution
solution is
is

= -20X + L -nlr
00 2 2
u(x t) 10e - ''''' " t sin (nlrx)
-- .
l002pc
, 100
n=l

Considering
Considering the
the results of Exercise
results of 9, it
Exercise 9, it is
is obvious
obvious that at least
that at several thousand
least several thousand
seconds will
seconds elapse before
will elapse before the
the temperature
temperature is is within 1% of
within 1% steady state,
of steady state, so
so we
we
can accurately
can estimate u(x,
accurately estimate u(x,t)t) using
using aa single
single term
term of
of the
the Fourier series:
Fourier series:

u(x t) == -
x 10 -
+ -e ",,2
lO02pc
t (
sin -
lrX )
, 20 11' 100 .

We
We want
want to
to find large enough
find tt large enough that
that

lu(x, t) - u.(x)1 < 0.01


lu.(x)1 -
550
550 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

for
for all e [0,100].
all x E [0,100]. Using
Using our
our approximation
approximation for
for u,
u, this is equivalent
this is equivalent to
to

200 sin ( ffo-)


7rX

A graph shows
A shows that
200 sin (;o~)
~2
7rX

for all x, so
for so we need
we need

This yields
-100 pcln 0.005 ~ 4520.
2
t >
- K.7r 2

About 75 minutes and 20


75 minutes seconds are
20 seconds are required.
required.

Section 6.2
1. The
1. solution is
The solution is
00

u(x, t) = do + L dne-n21r2t cos (n7rx),


n=1

where

do =
1
o
1 1
x(1-x)dx=-6' d n =2
110
x(l-x)cos(n7rx)dx=
2 ((-It+
22
n 7r
1
-1)

The graphs are


The graphs are given
given in
in Figure C.I2. /I
Figure C.12.
3.
3. (a) Ifu,v£
(a) C^[0,4 then
Ifu,v E C1[0,f], then

10t
2
d
(LNU,V)=- dx~(x)v(x)dx
du
= - dx(x)v(x)
Ii0+ 10t du dv
dx(x)dx(x)dx

l
i du dv .
= -(x)-(x)dx (smcedU(O)=du(£)=O)
odx dx do; do;

dv
= u(x)dx(x)
Ii0- 10t 2
d v
u(x)dx 2 (x)dx

= - 10t
2
d
u(x) dx~ (x) dx (since ~~ (0) = ~~ (£) = 0)
= (u, LNV).

This shows that LN is symmetric.


Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises 551

0.25,....----"T""""----r-~-~__r---~---___,

----.,
..,-. ..... - -'-'- -'- ............ ... "
...
0.2
"
'!:-:::: ............................... ,:.':"'... ~~
0.15. __ , ....

"--
0.1

- u(x,O)
- - - u(x,0.02)
,-, - u(x,0.04
u(x,0.06)
- u(x,oo)

0.2 0.4 0.6 0.8


x

Figure C.12. The


Figure C.12. The solution w(x,t)
solution u(x, t) from
from Exercise 6.2.1 at
Exercise 6.2.1 times 0,
at times 0, 0.02,
0.02,
0.04, and
0.04, and 0.06,
0.06, along
along with the steady-state
with the solution. These
steady-state solution. These solutions were estimated
solutions were estimated
using 10
using 10 terms
terms in
in the
the Fourier
Fourier series.
series.

(b) Suppose
(b) Suppose AA is
is an eigenvalue of
an eigenvalue of LN and U
LN and it is
is aa corresponding
corresponding eigenvector, nor-
eigenvector, nor-
malized so that (u,
(u. u) = 1.
1. Then
A = A(U, u) = (AU, u)
= (LNU,U)
= -it ::~ (x)u(x) dx

= - ~:(x)u(x)l: + 1£ (::(X))2 dx
£ d
1
2
= 0 C:(x)) dx (since ~~(O) = ~~(f) = 0)
~ O.
cannot have any negative eigenvalues.
Thus LN cannot
5.
5. (a) Suppose
(a) Suppose u
U is
is aa solution
solution to
to the
the BVP.
BVP. Then
Then

if I(x)dx = -t> it ::~(X)dX = t> (::(0) - ::(f)) = t>(a - b).

This
This is
is the compatibility condition:
the compatibility condition:

1£ I(x) dx = t>(a - b).


552 Appendix C.
C. Solutions to
to odd-numbered
odd-numbered exercises

(b) The operator K : c1


The operator C^[0,£\ ->• C[Q,t\
[0, f] -t C[O, f] defined
defined by

has
has eigenpairs
eigenpairs

~n2~2 (n~x)
>'0 = 1, 'Yo(x) = 1, and >'n = 1 + -;y-, 'Yn(x) = cos -f- , n = 1,2,3, ....

The method of Fourier series can be applied to show that a unique solution
exists
exists for
for each
each /f E C[O, fl. (The
G C[0,^]. (The key
key is
is that
that 0 is
is not
not an
an eigenvalue
eigenvalue of
of K, as
as it
it
is
is of LN.)
of LN.)
7. As shown in this section,
section, the solution
solution to the IBVP is

u(x, t) ~ dne- n 1T
= do + L...J 2 2
t
/l2 cos (n~x)
-f- ,
n=l

where do, di,


dl, c?2, • • • are
d2, ... are the
the Fourier cosine coefficients
coefficients of if). We
of"p. We have

L dne-n21T2t/l2 cos (n;x) ~ L JdnJ e-n21T2t/l2Icos (n;x) I


00 00

n=l n=l

n=l

L JdnJ e-(n 2-1)1T 2t/l 2.


00

~ e-1T2t/l2
n=l

This
This last
last series
series certainly
certainly converges
converges (as can be
(as can be proved,
proved, for example, using
for example, using the
the cora-
com-
narisrm
parison t.pst^ anr\
test), and

This shows that


00

do +L dne-n21T2t/£2 cos (n;x) -t do as t -t 00.

n=l

The limit do
The limit do is
is
~ 1£ "p(x) dx,

the
the average of the initial temperature
temperature distribution.
9. The steady-state temperature is about 0.992 degrees Celsius.
0.992 degrees Celsius.
11.
11. (a) Suppose that the u(x, t) on (0,^)
the Fourier sine series of u(x,t) (0, f) is

u(x, t) = L an(t) sin (n;x),


00

n=l
an (t) =~ it
0
u(x, t) sin (n;x) dx

and
and u satisfies
satisfies
au
ax (0, t) = au
ax (f, t) = 0 for all t > o.
Appendix C
AnnpnHiv C. Solutions to
Solutions r»HH-nu inhered exercises
to odd-numbered exerr.ises 553

The
The nth
nth Fourier
Fourier sine
sine coefficient of —d
coefficient of 2
u/dx22 is
-02U/OX is computed
computed as follows:
as follows:

2 r 02U
-"llo ox 2 (x, t) sm -e- dx
. (n1l"x)

i
= --2 [ou . (n1l"x)ll
-(x,t)sm - - -n1l"1 -(x,t)cos
ou (n1l"x)]
- dx
e Ox e 0 e 0 ox e
2n1l" r ou
=£2 10 ox(x,t)cos -e- dx
(n1l"x)

2n1l"
= £2 [ u(x, t) cos (n1l"x)
-e- Ii + f 10r
0
n1l" .
u(x, t) sm (n1l"x)
-e- dx ]

2n1l" n n 211"2
= £2 ((-1) u(e, t) - u(O,t)) + f2an(t).
Since
Since the
the values
values w(0, and u(l,
u(O, t) and u(e, t) are
are unknown,
unknown, we we see
see that
that it is not
it is not possible
possible
to express
to express the
the Fourier sine coefficients
Fourier sine coefficients of
of —d 2
u/dx22 in
-02U/OX in terms
terms of
of oi(t),a2(t), —
al (t), a2(t), ....
(b) The
(b) The Fourier sine series
Fourier sine series of = t isis
of u(x, t) =

00 2 (1 - (_1)n) t
'"' sin (1mx),
~ n1l"
n=l

2
and
and the
the formal calculation of
formal calculation of the
the sine series of
sine series of —d u/dx22 yields
-02U/OX yields
00

L 2 (1 - (-1t) n1l"tsin (n1l"x).


n=l

However,
However,
02U
- ox 2 (x, t) = 0,
2
and so all
and so all of
of the
the Fourier
Fourier sine
sine coefficients
coefficients of
of —d u/dx22 should
-02U/OX should be zero. Thus
be zero. Thus
the
the formal calculation is
formal calculation is wrong.
wrong.

Section 6.3
Section 6.3
1. The
1. The formula
formula for
for the
the solution is exactly
u is
solution u exactly the same as
the same as in
in Example 6.6, with
Example 6.6, with aa different
different
value
value for (4.29 instead
for Kfl, (4.29 instead ofof 3.17).
3.17). This implies that
This implies that the
the amplitude
amplitude of
of the solution
the solution
is
is reduced
reduced by by about
about 26%. Therefore, there
26%. Therefore, there is
is less
less variation
variation in
in the temperature
the temperature
distribution in
distribution in the silver ring
the silver as opposed
ring as opposed to
to the
the gold
gold ring.
ring.
3.
3. fa) The
(a) IBVP is
The IBVP is

ou 02U
pc at - fl, < X < 511", t > 0,
ox 2 = 0, -511"
u(x,O) = "p(x), -511" < X < 511",
u( -511", t) = u(511", t), t > 0,
ou ou
ox (-511", t) = ox (511", t), t > O.
554
554 Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises

(b) The
(b) solution is
The solution is

u(x, t) = Co +L 00 "n2
ene-25P""C cos
t (nx)
""5 '
n=l
where
where
71"4
Co = 25 + 9'
10( _l)n+l
en = n4 ' n = 1, 2,3, ....
4
(c)
(c) The
The steady-state
steady-state temperature is the
temperature is the constant
constant u = 25
Uss = + 7T
25 + /9 degrees
71"4/9 Celsius.
degrees Celsius.
(d) We
(d) We must
must choose so that
choose t so that

Ius - u(x, t)1 < 0.01


lusl -
holds for every
holds for every xx E
€ [-571",571"].
[—STT, STT]. By
By trial
trial and error, we
and error, find that
we find that about
about 360
360
seconds (6
seconds (6 minutes)
minutes) are required.
are required.
5.
5. (a)
(a) To
To show
show that Lp is
that Lp is symmetric,
symmetric, we we perform
perform the
the now
now familiar
familiar calculation:
calculation: we
we
form
form the integral (Lpu,
the integral v) and
(Lpu, v) and integrate
integrate by
by parts
parts twice
twice to
to obtain (u, Lpv).
obtain (u, The
Lpv). The
boundary
boundary term
term from
from the
the first
first integration
integration by
by parts
parts is
is

du
- [ dx (x )v(x)
]l
-t
du
= dx (-f)v( -f) -
du
dx (f)v(f).

Since both
Since both u and satisfy periodic
and v satisfy periodic boundary
boundary conditions,
conditions, we
we have
have
du du
v( -f) = v(f), dx (-f) = dx (f),
so the
so the boundary
boundary term
term vanishes.
vanishes. The
The boundary
boundary term
term from
from the second integra-
the second integra-
tion
tion by
by parts
parts vanishes
vanishes for
for exactly
exactly the
the same reason.
same reason.
(b) Suppose
(b) Suppose L AU, where
pu = \u,
Lpu where u has
has been
been normalized: 1. Then
(u, u) = 1.
normalized: (u, Then
d2U
1
£
A = A(U, u) = (Au, u) = (Lpu, u) = - _£ dx 2 (x)u(x) dx

=- [~:(x)u(x)rl + I: (~:(x)f dx

=
~
I: (~:(x)f
O.
dx

The
The boundary
boundary terms
terms vanishes
vanishes because
because of
of the
the periodic
periodic boundary conditions:
boundary conditions:
du du
dx (-f)u( -f) = dx (f)u(f).
7.
7. (a) Since
(a) Since the
the ring
ring is completely
completely insulated,
insulated, aa steady-state
steady-state temperature distribution
temperature distribution
cannot exist unless
cannot exist unless the
the net
net amount of heat
amount of heat being added to
being added to the
the ring
ring is
is zero.
zero.
This
This is
is exactly
exactly the same situation
the same as aa straight
situation as straight bar
bar with
with the
the ends,
ends, as
as well as
well as
the
the sides, insulated.
sides, insulated.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 555

(b) Suppose
(b) Suppose Uu is
is aa solution
solution to
to (6.21).
(6.21). Then
Then

I t
f(x) dx = -K,
1£ 02
ax~ (x, t) dx
-i -i

= aU ]l
-K,
[-(x,t)
ax -l

aU aU)
=K, ( ax(-l,t)- ax(l,t)
=0.

The last
The last step
step follows from the
follows from the periodic boundary conditions.
periodic boundary conditions.
(c) The negative
(c) The negative second
second derivative
derivative operator,
operator, subject
subject to
to boundary
boundary conditions,
conditions, has
has aa
nontrivial null
nontrivial space, namely,
null space, namely, the
the space
space of
of all
all constant
constant functions
functions onon (-l, l). In
(—i,i). In
analogy to
analogy the Predholm
to the alternative for
Fredholm alternative symmetric matrices,
for symmetric matrices, we
we would expect
would expect
aa solution
solution to
to the
the boundary
boundary value
value problem
problem toto exist
exist if
if and
and only
only if
if the
the right-hand-
right-hand-
side function
side function is orthogonal to this null space. This condition is

I: cf(x) dx = 0 for all c E R,


or
or simply
simply
t
J- l
f(x)dx = o.

Section 6.4
1. We
1. We give
give the proof for
the proof for the general case
the general case of
of aa Gram matrix G. Suppose
Gram matrix Suppose Gx
Gx = 0,
0, where
where =
€ R n . Then
x ERn. (x, Gx) = 00 must
Then (x, must hold,
hold, and
and
n n n
(x, Gx) = Z)GX)iXi = L L GijXjXi
i=1 i=1 j=1
n n

i=1 j=1

=~ (tXjUj,Ui) Ui
(t XjUj, ~ XiUi)
n
2

= LXjUj
j=1

Thus = 00 implies
Thus Gx = implies that
that the vector
the vector
n
LXjUj
j=1
556 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises

is the
is zero vector.
the zero vector. But,
But, since
since {U1,
{wi, U2,
W 2 ,...
. . . ,,u is linearly
n} is
Un} linearly independent,
independent, this in turn
this in turn
implies that x\
implies that =
Xl = X2 = ...
xi ••• == x
Xnn = 0,
0, that
that is,
is, that
that x
x =
= 0.
0. Since
Since the
the only
only vector
vector
x
x E €R Rnn satisfying
satisfying Gx
Gx = °
= 0 is
is the
the zero
zero vector,
vector, G G isis nonsingular.
nonsingular.
3. (a)
3. (a)

M-
_ [ 2/9
1/18
1/18] K =[ 6 -3] f __1_ [ 11 cos (t) ]
6 ' (t) - 162 11 cos (t) .
2/9' -3

(b) The
(b) system of
The system of ODEs
ODEs is
is
do:
M dt = -Ko: + f(t),
that is,
that is,
2 d0: 1 1 d0:2 11 cos (t)
9" d.t + 18 d.t = -60:1 + 30:2 + 162 '
.!.. d0:1 ~ d0:2 _ 3 _ 6 11 cos (t)
18 dt +9 dt - 0:1 0:2 + 162 .

5.
5. (a) Write
(a) pi = 8.97,
Write P1 8.97, P2 = 7.88,
p2 = 7.88,

p(x) = {
°50<< x<<50,100,
X

and similarly
and similarly for and K(X).
c(x) and
for c(x) ,.(x). Then the IBVP
Then the IBVP is
is

aU
p(x)c(x) at
a (
- ax aU)
,.(x) ax = 0, °< x < 100, t > 0,
u(x,O) = 5, °<
x < 100,
u(O,t) = 0, t > 0,
u(100, t) = 0, t > 0.
(b)
(b) The
The mass
mass matrix
matrix M
M is
is tridiagonal
tridiagonal and
and symmetric,
symmetric, and
and its
its nonzero
nonzero entries
entries are
are

{
~ i = 1,2, ... , ~ - 1,
6 '
Mi,i+1= ~
6 '
i = ~,~ + 1, ... , n - 1,

and
~
3 '
i = 1,2, ... , ~ - 1,
. n
M;; ={ (Pi C1 +P2C2 )h
3 2 = 2'
~
3' '-n+1n+2
2 - 2 '2 , ... 1
,n-.
The stiffness matrix
The stiffness matrix K K is tridiagonal and
is tridiagonal and symmetric,
symmetric, andand its nonzero entries
its nonzero entries
are
are
-~ i = 1,2, ... , ~ - 1,
K"+l
1.,1. = {
h'
~2
-h' i = ~, ~ + 1, ... , n -1,
and
~ i = 1,2, ... , ~ - 1,
h '

={ i =~,
1<1+1<2
K;; h '
~ i = ~ + 1, %+ 2, ... , n - 1.
h '
Appendix C.
C. Solutions
Solutions to odd-numbered exercises 557

7. The solution is
00

u(x,t) = I>n(t) sin C~;),


n=l

where
an (t) __ 400(2+(-1)n)
2 7 7
( 10 pc e -~
"n ,,2t -1 ) 4 ( 2

+ Kn 27r 2)
t .
K 7r n

The errors in Examples 6.8 6.9 are graphed in Figure C.13.


6.8 and 6.9

0.05,.----..-----.....----....----...,......----,

°l~ ____~ .. .
, ..
. .. .
-0.05 ,
, ,,
,
-0.1 ,,
,,
\ '
-0.15 \\ , "
\
\ ,,
\
\ ,,
-0.2 "" . "'
_-_
l- I
" .... .... " Euler
- _. Backward Euler

20 40 60 80 100
x

Figure C.I3.
C.13. The errors in Examples
Examples 6.8 and 6.9 (see Exercise 6.4-V-
Exercise 6.4.7).

9.
9. (a) ThelBVPis
The IBVP is

p(x)c(x) au
at - a ( K(X) aU)
ax ax = 0, 0 < x < t', t > 0,
u(x,O) = 5, 0 < x < t',
u(O, t) = 0, t > 0,
u(t', t) = 0, t > O.

(b) The weak form is to find u satisfying

l l{
o p(x)c(x)
&
at (x, t)v(x) + K(X) & ~ }
ax (x, t) dx (x) dx = 0, t > 0, \Iv E V.

(c) The temperature distribution after


after 120
120 seconds is shown in Figure C.14.
558 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises

t = 120 (seconds)
5r-----~----~====~~~----~----__,

4.5

3.5

~ 3
::::I
T!!Q)2.5
c..
E
2 2

20 40 60 80 100
x

Figure C.14. The temperature


temperature distribution after
after 120 seconds in Exercise 6.4-9.
Exercise 6.4.9.

Section 6.5
1. The
1. BVP to
The BVP to be solved is
be solved is
d2 u
-k dx 2 = f(x), 0 < x < 100,
~:(O) = 0,
du (100) = 0,
dx
with kk = 1.5
with 1.5andandf(x) 10~x7x(25
f(x) ==1O-7 - z)(100 - z)+1/240.
(25-x)(100-x) +1/240.The Thesteady-state
steady-statetemper-
temper-
ature is not
ature is not unique;
unique; the
the solution
solution with ii(100) =
with u(100) = 00 isis shown
shown in in Figure
Figure C.15.
C.15.
3. (a)
3. (a) The
The total amount of
total amount of heat energy being
heat energy being added
added to to the
the bar is 0.51A
bar is 0.51A W, where AA
W, where
is the
is the cross-sectional
cross-sectional area
area (0.01 AW
(O.OlA through the
W through the left
left end
end andand 0.5A
0.5AW W inin the
the
interior). Therefore,
interior). Therefore, 0.51A
0.51 AW must be
W must be removed
removed through
through thethe right
right end;
end; that
that is,
is,
heat energy must
heat energy must be removed at
be removed at aa rate of 0.51
rate of W jcm22 through
0.51 W/cm through the
the right end.
right end.
(b) The
(b) BVP is
The BVP is
d2 u
-I>, dx 2 = 0.005, 0 < x < 100,
du
k dx (0) = -0.01,
du
k dx (100) = -0.51.
The steady-state
The steady-state temperature is not
temperature is not unique; the temperature
unique; the temperature with w(100) =
with u(100) = 00
is graphed
is graphed in Figure C.16.
in Figure C.16.
Appendix
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 559
559

6r-------~------_r------~--------r_------~

Q)
::; 3

Q)
a.
E 2
2

-1~------~------~------~--------~----~
o 20 40 60 80 100
x

Figure
Figure C.I5. The computed
C.15. The computed steady-state
steady-state temperature
temperature distribution fron
distribution from
J^.fOTfnoo fi6.5.1.
Exercise t\ 1

7~------~------~--------~------~-------,

°o~------~------~------~------~----~
20 40 60 80 100
x

Figure
Figure C.I6. The computed
C.16. The computed steady-state
steady-state temperature
temperature distribution from
distribution from
Exercise 6.5.3.
Exercise 6.5.3.
560 Appendix C. Solutions
Appendix C. Solutions to odd-numbered
odd-numberedexercises
exercises

5. (a) We have
n n

u·Ku= LLK;jUjU;
i=O j=O
n n

=L La (4)j, 4>i) UjU;


i=O j=O

~ t,a (t, .;f;,f}


~a (t, .;~;, t, .;~;)
=a(v,v).
Therefore,

Ku = 0 ~ U· Ku = 0
~ a(v,v) = o.
G iT
(b) Suppose v E V and a( v, v) == 0.
and a(v, O. By definition of a(-, .),
•), this is equivalent to

Since the integrand


integrand is nonnegative, this implies that the integrand
integrand is in fact
zero, and, since K(X)
K(X) is positive, we conclude that

dv(X)
dx
is the zero function. Therefore, v is a constant function.
function,
(c) Thus, if Ku = 0,
0, it follows that
n

v(X) = L U;4>i(X)
;=0

is a constant function, where Uo,


MO, U2,
1*2, •. ..
• • ,, Un are the
un are the components of u. But But then
there is a constant v(xi) =
constant C such that V(Xi) — C, ii = 0,1, 2 , ...
0,1,2, . . . , n. These nodal
values of v are precisely the numbers Uo, MI, ...
UQ, Ul, ...,u we see
n , so we
Un, = CUe,
see that uu = Cuc,
which is what we wanted to prove.
we wanted
7.
7. (a) Define
v(O) = O}.
Then the
the weak form of the
the BVP is

find U E V such that a(u, v) = (I, v) for all v E V. (CA)

(b) The fact that a solution of the strong form is also a solution of the weak
form is proved by the
the usual argument: multiply the differential
differential equation by an
E V,
arbitrary test function v € V", and then integrate
integrate by parts.
Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered exercises
odd-numbered exercises 561

The
The proof
proof that
that aa solution
solution of
of the
the weak
weak form
form is
is also
also aa solution
solution of
of the
the strong form
strong form
is similar to
is similar to the argument given
the argument given on
on page
page 268.
268. Assuming
Assuming that satisfies the
that Uu satisfies the
weak
weak form (C.4), an
form (C.4), integration by
an integration by parts
parts and some simplification
and some simplification shows
shows that
that

k(£) ~: (£)v(£) -1£ {:x [k(X) ~: (x)] + f(x)} v(x) dx = 0 for all v E V.
Since C V, this
Since V C this implies
implies that
that the
the differential
differential equation
equation

d [k(x)dx(x)
dx du ] +f(x)=O, O<x<£

holds, and we
holds, and we then have
then have
du
k(£) dx (£)v(£) = 0 for all v E V.•
Choosing any v €
Choosing any E V with
with v(i} f::. 00 shows
v(£) ^ shows that
that the
the Neumann condition holds
Neumann condition holds
at = t.
at xx — £.
9. The
9. The temperature
temperature distribution
distribution after
after 300 seconds is
300 seconds is shown
shown in
in Figure C.I7.
Figure C.17.

t=300 (seconds)
8r-----------==~~-----r------~------,

20 40 60 80 100
x

Figure C.I7. The


Figure C.17. The temperature
temperature distribution
distribution from
from Exercise
Exercise 6.5.9 (after
{after 300
300
seconds).
seconds}.

11. Here
11. Here is
is aa sketch
sketch of
of the
the proof: = 0,0, then
If Ku =
proof: If then
u· Ku = 0 => a(v, v) = 0,
where
where
n-l

V = LUi¢>i.
;=0
562 Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises

But
But then,
then, by the usual
by the usual reasoning,
reasoning, vv must must be
be aa constant
constant function, and V(Xn)
function, and v(xn) == 00
(since (j)i(xnn) ) = 0
(since CPi(X for ii = 0,1,2,
0 for 0,1, 2 , ...
. . . ,, n-l).
n — 1). Thus is the
Thus v is zero function,
the zero function, which
which implies
implies
that the nodal values of vv are all zero. zero. Therefore uu = = 0, so K is nonsingular.
0, and so

Section 6.6
1. For
1. 6060, only
= 6060,
For t = only 2
2 terms
terms are
are required
required for
for an accurate graph,
an accurate while for
graph, while for t =
= 61,
61,
about 150
about 150 terms are required.
terms are required.
3.
3. The Green's function
The Green's function G(x,
G(a;,t;r/,s) is given
t; y, s) is by
given by

2 ~ -K(2n-l)2,,2(t-8)/(4pcl 2 ) . ((2n -1)1rY ) . ((2n -1)1rX)


~~e ~ U ~ U
n=l

for to < s < t, while


for while G(x, t; y, 0 for
y, s) = 0 for s > t. Selected
Selected snapshots
snapshots of
of G(x, t; 75,60)
t] 75, 60)
are shown
are shown in
in Figure
Figure C.I8.
C.18.

Graph of G(x,t;75,60)
Graph G(x,t;75,60) for
for various values
values of
of t

- t=120
- _. t=240
0.02 ._,- t=360
'"'' t=480
- t=600

~ 0.015
:::l
"@
<D
Cl.
E 0.01
$

0.005

20 40 60 80 100
x

Figure C.18.
Figure Snapshots of
C.IS. Snapshots the Green's
of the Green's function in Exercise
function in 6.6.3 at
Exercise 6.6.3 at tt =
=
120,240,360,480,600
120, seconds. Twenty
240, 360, 480, 600 seconds. Twenty terms
terms of
of the
the Fourier
Fourier series
series were
were used
used toto
create these
create graphs.
these graphs.

Section 7.1
Section 7.1
1. Some
1. Some snapshots
snapshots of
of the solution are
the solution are shown
shown in
in Figure C.19.
C.19.
3.
3. The two waves
The two waves join
join and add constructively,
and add and then
constructively, and then separate
separate again. See Figure
again. See Figure
C.19.
Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises 563

1.5.--.-----r--.....---.....--.----.-r========i1
t=o
t=2.5
t=5

,
1\
"
"
,," ,,
"
,,
I I

, ,
I I

0.5 , ~
... 1& I I ." . 1\
, I _,

,~"-
,.' I I ~ ..
,ii , I I

," ' -f ,- I I -I "


, I

• -,
I;~ ~~, ~!~ I I I

I I i ~ r' I l~! I.
~
~i ~ ~" .. ~ I.

I I -
I),
, __~____~
OL-____~__6_~~/~\~~-~J_'\~/_~,-~I_\~_'~~~~~~
j\ '\ /'j' '\. .,•
-20 -15 -10 -5 0 5 10 15 20
x
-3
1.5 x 10
t=O
t=0.02
t=0.04

0.5 ! I I
,-i
,"
i'
" 'I
" ,--I

""I
• I
, I
I
,!
,• ,• I
I
,
I
, I
i I
i !
I
,, I
I
,i !
I
I
I

-~O -30 -20 -10 0 10 20 30 40


x

Figure C.19. (Top)


Figure C.19. (Top) Some
Some snapshots
snapshots of the solution
of the solution toto Exercise 7.1.1.
Exercise 7.1.1.
(Bottom) Constructive interference
(Bottom) Constructive interference in
in Exercise 7.1.3. The
Exercise 7.1.3. The "blip"
"blip" in
in the
the center
center is
is
the result
the result of two waves
of two waves combining
combining temporarily.
temporarily. (The
(The velocity
velocity in
in this example is
this example is
cc = 1.)
l.)

Section 7.2
Section
1. The
1. The solution
solution is
is found
found by
by setting enn = 0
setting c 0 in
in Example
Example 7.4:
7.4:

u(x,t) = ~
~bncos (cn7rt)
~ sm . (n7rx)
25 .
n=l
564 Appendix
Appendix C. Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises

A graph analogous to Figure 7.6


7.6 is given in Figure C.20.

o 5 10 15 20 25
x

Figure
Figure C.20.
C.20. Fifty
Fifty snapshots
snapshots of
of the
the vibrating
vibrating string
string from
from Example 7-4,
Example 7.4,
with
with no external force.
no external force.

3. The
The solution is

u(X,t) = Lan(t)sm (2n-1)1I'X)


00 •
50 '
n=l

where

and
and
8 (v'2sin (n1l'/2) - v'2cos (n1l'/2) + (_1)n) 400
bn = 5(2n - 1)211'2
,en= (2n - 1)11' .
The fundamental frequency
The fundamental frequency isis now
now c/100 instead
instead of
of c/50. Fifty snapshots are
Fifty snapshots are shown
shown
in Figure C.21.
C.2l.
5. The
The solution is

1 +50t
u(x,t) = ( 20 2) + ~
~bncos (cn1l't)
25 cos (n1l'X)
25 '
n=l

where
bn = 2(2cos(n1l"2~ ~ 1- (-It), n = 1,2,3, ....
n1l'
Fifty
Fifty snapshots of the
the solution are shown in Figure C.22. The solution gradually
moves
moves up;
up; this
this is
is possible
possible because
because both
both ends are free
ends are free to
to move
move vertically.
vertically.
Appendix C. Solutions to odd-numbered exercises 565
565

0.2

c
CD
E
CD
~
'i5..
In
'i5

- 0.2

o 5 10 15 20 25
x

Figure C.21. Fifty


Figure C.21. snapshots of
Fifty snapshots of the
the vibrating
vibrating string
string from
from Example
Example 7.4,
7.4,
with the
with the right end free.
right end free.

'E
CD
E
CD
<..>
<II
a.
0.2

5 10 15 20 25
x

Figure C.22.
Figure C.22. Fifty
Fifty snapshots
snapshots of
of the
the vibrating string from
vibrating string from Example
Example 7.4,
7.4,
with both
with ends free.
both ends free.
566 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

7. The
7. The solution
solution is
is
(2n-1)1rX)
u(x, t) = ~ an(t) sm
00 •
2 '

where
where

an(t) = (bn- C2(2n4~1)21r2)cos(C(2n;1)1rt) + c2(2n4~1)21r2'


2(_1)n+l
bn = 125(2n - 1)21r 2 '
4g
en = -,-----"--:--
(2n - 1)1r

Snapshots of
Snapshots of the solution are
the solution are graphed in Figure
graphed in C.23, which
Figure C.23, which should
should be
be compared to
compared to
Figure 7.9.
Figure 7.9.

;
;
,- - ;
-,
;
-,_._,- - _._,-,-,- -,

"" ,,' ........................................ .


.... .;.,.;:~:~ .. -;~ .... - t=O
- _. t=5e-05
..
0° ,.

' ;

. . .>;>'
; ;
t=0.0001
t=0.00015
.-:>;"
.0,'.,, ;

.--';'
;{'-
°o~------~------~------~------~------~
0.2 0.4 0.6 0.8
x

C.23. Snapshots
Figure C.23. Snapshots of the displacement
displacement of the bar in Example
Example 7.6,
taking into account the effect of gravity.
effect of gravity.

Section 7.3
Section 7.3
1. The
1. The fundamental
fundamental period
period is 2l/c = 0.2.
is li/c 0.2. Using h = 100/20
Using h 100/20 =
= 5,
5, Dt = T/60,
Dt = and the
T/60, and the
RK4
RK4 method, we obtain
method, we obtain the solution shown
the solution shown in
in Figure C.24.
Figure C.24.
3.
3. (a) Since
(a) Since the
the initial disturbance is
initial disturbance is 24cm from the
24cm from the boundary
boundary and
and the wave speed
the wave speed
is 400cm/s,
is it will
400 cm/s, it will take 24/400 =
take 24/400 = 0.06
0.06ss for
for the
the wave
wave to reach the
to reach the boundary.
boundary.
Appendix C. Solutions
Appendix C. Solutions to odd-numbered exercises
to odd-numbered exercises 567

O . 2 r-------~-------,--------~------~------~

'E
Q)
E
g
Ci
<IJ
'6

-0 . 2 ~------~--------~------~--------~------~
o 0 .2 0.4 0.6 0.8
x

Figure C.24. The computed


computed solution of the wave equation Exercise
equation in Exercise
7.3.1. Shown
7.3.1. Shown are 30 snapshots,
snapshots, plus the initial displacement. Twenty subintervals
displacement. Twenty subintervals
in space
space and 60 time steps were used.
used.

(b) The IBVP is


aatu
2
2 a u = 0,
c ax 2
2
< x < 50,
0 t > 0,
2 -

u(x,O) = 0, 0 < x < 50,


au
at (x,O) = ,(x), 0 < x < 50,
u(O, t) = 0, t > 0,
u(50, t) = 0, t > 0,
with c = 400
400 and ,7 given in the statement
statement of the exercise.
(c) Using piecewise linear finite elements and the RK4 method (with h = = 50/80
At =
and .6.t 10~44 ),
= 6 .• 10- we computed the solution over the interval 0 <
), we ~ t <
~ 0.06.
0.06.
Four snapshots
snapshots are shown in Figure C.25,
C.25, which
which shows that it does take 0.06
0.06
seconds for
for the wave
wave to reach the boundary. (The reader should notice the
"wiggles" in the computed solution;
spurious "wiggles" solution; these are due to the fact that the
true solution is not smooth.)
5. It is not possible to obtain a reasonable numerical solution using finite elements. In
C.26, we
Figure C.26, we display the result obtained
obtained using h — 2.5-10~33 and .6.t
= 2.5.10- At = 3.75.10- 44 .•
= 3.75-10~
Three snapshots are shown.
shown.
7. (a) TheThe weak form is

{a 2
au dV} It f(x, t)v(x) dx

o p(x)
u
(x, t)v(x) + k(x) ax (x, t) dx (x) dx =
(Jt2 0
568 Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises

0.1r-----~------~------~------~----__,

'E
Q)
E
Q)
u
CIl
a.
rn
'0

10 20 30 40 50
x

Figure C.25.
Figure C.25. The computed solution
solution of
of the wave equation in Exercise 7.3.3.
7.3.3.

1.2~------~------~------~------~------~

0.8
'E
Q)
E
Q)
u
CIl
a.
rn
'0

0.2 0.4 0.6 0.8


x

Figure C.26. The computed solution


Figure C.26. solution of
of the wave equation in Exercise 7.3.5.
7.3.5.

for > to
for t 2: and vv E
to and € V, where
where
v = {v E C 2
[O, £] v(O) = O} .
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 569

(b) The system of ODEs has the same form as in the case of a homogeneous
homogeneous bar:
_ d2 u _ _
M dt 2 + Ku = f(t),
except that the entries in the mass matrix are now
now

Mij =1t p(x)cPi(x)(/Ji(x)dx, i,j = 1,2, ... , n,

and the entries in the stiffness


stiffness matrix are now
now

Kij = 1t k(x) d:: (x) ~!i (x) dx, i,j = 1,2, ... , n.
The components of
The components of the vector f are
the vector are unchanged (see Section
unchanged (see Section 7.3.2).
7.3.2).

Section 7.4
1.
1. (a)
(a) The
The fundamental frequency
frequency is c/(2i) =
c/80. Therefore
el(2Ji.) = e180.
e
80 = 500 '*
c = 40000 cm/s
(or 400m/s).
(b)
(b) We
We have T/p, where
have ec2 = T/p, T is the tension. The
whereTisthetension. The density
density p is 10/40 =
pis = 0.25g/cm,
0.25 g/cm,
so T is 4 • 1088 dynes (gcm/s 22 ).
4.10 ).

(c) The other resonant frequencies are the integer multiples of the fundamental
fundamental
1000,1500,
frequency: 1000, 1500, 2000,...
2000, ... Hz.
3. Snapshots of the solution are shown in Figure C.27. C.27. The reason that resonance
does not occur is that the point source is placed at a point of the string that does
not move under the fourth standing wave (a fixed point). point). (In the formula (7.28),
sin = sin
(rmra) —
sin (m7ra) sin (27r") = 0.)
(2vr) = 0.)

Section 8.1
Section 8.1
1.
1. The heat equation
equation for a heterogeneous
heterogeneous medium is

p(x)e(x)
au
at - V· (K(X)VU) = 0, x E n, t > to·
3. For this example,
[V.F= [ F·n=1.
10 180
5. Using
5. Using the
the product
product rule for scalar
rule for scalar functions,
functions, we obtain
we obtain
3 a a
v· (vVu) = L aXi [v o:J
i=1

ov OU 02U
3
= '""
L...J ox; -
i=1
- ox; '""-2
3
+ v L...J ox'
i=1'
= Vv· VU+ v~U.
570 Appendix C.
Appendix Solutions to
C. Solutions to odd-numbered
odd-numbered exercises
exercises

-7 co = 1044
2.5 x 10

1.5

0.5

Oli;;:::------:::::I.

-0.5

-1

-1.5

-2
-2.5 ' - - - - - 0......- 2 - - - - 0..... 4 - - - - 0.....6 - - - - 0....8 - - - - - '
0
x

Figure
Figure C.27. Solution to
C.27. Solution to (7.26)
(7.26) with an oscillatory
with an oscillatory forcing term (see
forcing term (see Exer-
Exer-
cise 7.4.3). The
cise 7.4.3). The frequency of the
frequency of the forcing
forcing term
term is 1044, the
is 1044, the fourth
fourth natural frequency.
natural frequency.
However,
However, thethe solution
solution does
does not
not exhibit
exhibit resonance
resonance since
since the
the point
point source
source is
is placed
placed at
at
aa fixed
fixed point of the
point of the fourth standing wave.
fourth standing wave.

7. Suppose
7. Suppose u,
u,vv G
E C™(O). Then
C~ (n). Then

(Lmu,v) =- In v.6.u
= { Vu· Vv
in
-1an v : (Green's first identity)

= In Vu·Vv
av
={ u - { u.6.v (Green's first identity)
ian an in
=- In u.6.v
— (u,Lmv).
= (u,Lmv).

The boundary
The boundary terms
terms vanish
vanish because
because the
the product
product that forms the
that forms the integrand
integrand is
is zero
zero
over
over the entire boundary.
the entire boundary. For example,
For example,

au
{ v =0
ian an
since v = 00 on
since on FI
fl and au/an = 00 on
and du/dn on F2.
f z.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 571
571

Section 8.2
1.
1. (a)

(b) The
(b) The graphs
graphs of
of the error are
the error given in
are given in Figure C.28.
Figure C.28.

X10-3

o 0 0.2

Figure C.28.
Figure C.28. The error in approximating
approximating ff(x,y)
( x , y ) by thefirst4
the first 4 terms (top)
and the
and the first
first 25 terms
terms (bottom)
(bottom) of
of the
the double
double Fourier
Fourier sine sine series. (See Exercise
series. (See Exercise
8.2.1.)
8.2.1')

3. The solution
3. The solution is
is given
given by
by
00 00

u(x) =L L ~mn sin (m7rXl) sin (n7rX2),


I\mn
m=l n=l

where the Cmn


cmn are the coefficients
coefficients from Exercise 1 and
572 Appendix C.
C. Solutions
Solutions to odd-numbered
odd-numbered exercises

5. ThelBVPis
(a) The IBVP is

pc
au
at - KC!..U = 0.02, x E n, t > 0,
u(x,O) = 5, x E n,
u(x, t) = 0, x E an, t > O.
The domain n
$1 is the rectangle
the rectangle

{x E R2 : 0 < Xl < 50, 0 < X2 < 50} .

(b) The solution is

u(x, t)
~ L...J
= L...J ~ amn(t) sm -w sm. (n7rX2)
. (m7rXl) 50 '
m=l n=l
where

a mn (t)
= (b mn _ Cmn
\
)
e -t<Arnnt/(pc) + Cmn
\ ,
KAmn K~mn

b = 20 (-1 + (_I)m) (-1 + (_I)n) ,


mn
mn7r 2
2 (-1 + (_1)m) (-1 + (-It)
Cmn = 25mn7r 2 '

(m 2 + n 2 )7r2
Amn = 2500

(c) The steady-state temperature


temperature Us
us (x) satisfies the BVP

-KC!..U = 0.02, x E n,
u(x) = 0, x E an.
The solution is

~~ Cmn . (m7rXl) . (n7rX2)


Us (X) = L...J L...J KAmn sm -w sm 50 .
m=l n=l

between the
(d) The maximum difference between the temperature
temperature after
after 10
10minutes
minutes and
and the
th
steady-state temperature
steady-state temperature isisabout
about 11degree.
degree. The
Thedifference
differenceisisgraphed
graphedininFigure
Figur
C.29.
C.29.
temperature in the plate reaches 4 degrees Celsius after 825
7. The minimum temperature 825 seconds
seconds.
9. The leading edge of of the
the wave
wave isis initially
initially 2/5
2/5 units
units from
from the
the boundary,
boundary, and
and the
th
wave travels at a speed ofof 261..;2
261-\/2 units
units per
per second.
second. Therefore,
Therefore,the
the wave
wavereaches
reaches the
th
boundary after V^/1305 ~= 0.00108
after ..;2/1305 0.00108 seconds.
seconds. Figure
Figure 8.6
8.6shows
showsthe
thewave
waveabout
abouttot<
reach the boundary after 10-10~33 seconds.
seconds.
is to compute
11. The difficult task is compute the
the Fourier
Fourier coefficients
coefficients of
of the
the initial
initial displacement
displacemen
?jJ. If we write
ill. If write
00 00

?jJ(x) = 2: 2: bmn sin (m7rX l) sin (n7rX2),


m=l n=l
Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 573

60

o 0
x,

Figure C.29.
Figure C.29. The difference
difference between the temperature
temperature in the plate after
after 10
temperature. (See
minutes and the steady-state temperature. (See Exercise 8.2.5.)

then we
then find that
we find that
0, m=/=-n,
ain 2 (mrr/Z)
lZ50m 2 rr2 , m=n.
We then have that
00 00

u(x,t) =L L amn(t)sin(mll'x )sin(mrxz),


1

m=l n=l

where amn(t)
where a m n (t) satisfies
satisfies
dZa
mn 2
dt2 + Amn C = 0,
amn
amn(O) = bmn ,
damn (0) = o.
dt
The result is
m=/=-n,
amn(t) ={ °b'mm cos (n--- )
Cy Ammt , m=n.

Thus the solution is


00

u(x, t) = L bmm cos (CVAmmt) sin (mll'Xl) sin (mll'xz).


m=l

Four snapshots of uu are shown in Figure C.30.


574 Appendix
Appendix C.
C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises

X10-4

-1 -1
1 1

X10-4

-1 -1
1 1

Figure C.30. Four snapshots of the solution to Exercise 8.2.11: t =


Figure C.30. = 00
(top left), t = T/8
(top left), T/8 (top right), tt = T/2
(top right), T/1 (bottom left), t = 5T/8
(bottom left), 5T/8 (bottom
(bottom right).
right). The
The
solution is periodic with period T.T.

13. The
13. The solution
solution is
is

=L L 4sin(m7r/2)sin(mr/2)
00 00 . .
u(x) + 7r
(m 2 n 2) sm (m7rxI) sm
2 (n7rX2).
m =l n=l

The graph
The graph of
of uu is
is shown
shown in
in Figure
Figure C.3l.
C.31.
15.
15. (a) The
(a) ThelBVPis
IBVP is

pc
au
at - K~U = 0.02, x E 0, t > 0,
u(x, 0) = 5, x E 0,
u(x,t) =0, xEr}Ur 4 , t>O,
au (x, t) =
an 0, x E r2 U r3, t > O.
The domain
The °
domain O is
is the
the rectangle
rectangle
{x E R2 : 0 < Xl < 50, 0 < X2 < 50} .
Appendix C. Solutions
Appendix C. Solutions to odd-numbered exercises
to odd-numbered exercises 575

0.5

-0.5
1

o 0 Xl

Figure C.31.
C.31. The solution to Exercise 8.2.13.
8.2.13.

(b) The
(b) solution is
The solution is

=~ -1) JrX l) . (2n -1) JrX 2)


~ (t)·sm (2m 100
u (x, t) ~ ~amn sm 100 '
m=l n=l
where
amn(t) = (b mn _ C~n ) e-I<A",nt/(pC) + C~n ,
~Amn KAmn
80
bmn = .,......----0-.,......----,-_o_
(2m - 1)(2n - 1)Jr 2
8
Cmn = .,----,.,.----:-.,...,.....---;---;:-
2
25(2m - 1)(2n - 1)Jr
A _ «2m - 1)2 + (2n - 1)2)Jr 2
mn - 10000 .

(c) The
(c) The steady-state
steady-state temperature
temperature us(x) satisfies the
us(x) satisfies the BVP
BVP
-,,~u = 0.02, x E n,
u(x) = 0, x E fl U f4,
au
an (x) = 0, x E f2 U fa.

The solution
The solution is
is

_ ~~ Cmn • (2m-l)JrXl) . (2n-l)JrX2)


Us
(
x) - ~ ~ "Amn sm 100 sm 100 .
m=l n=l
576
576 Appendix
Appendix C. Solutions
Solutions to
to odd-numbered exercises
odd-numbered exercises

(d)
(d) After
After 10
10 minutes,
minutes, the
the temperature
temperature uu isis not
not very
very close
close to
to the
the steady-state tem-
steady-state tem-
perature; the
the difference u(x, y, 600)
difference u(x, 600) —u (x,
-u.(x,
s y)
y) is graphed
graphed in Figure C.32. (Note:
(Note:
The
The temperature
temperature variation
variation in
in this
this problem
problem maymay bebe outside
outside the
the range
range in
in which
which
the
the linear
linear model
model isis valid,
valid, so
so these
these results
results may
may bebe regarded
regarded with
with some
some skepti-
skepti-
cism.)
cism.)

o
-2

-4

-6

-8

-10
60
60

o 0

Figure
Figure C.32.
C.32. The
The difference
difference between
between the
the temperature
temperature in
in the
the plate
plate after
after 10
10
minutes
minutes and
and the
the steady-state
steady-state temperature.
temperature. (See
(See Exercise
Exercise 8.2.15.)
8.2.15.)

Section
Section 8.3
1.
1. The
The next
next three
three coefficients
coefficients in
in the
the series
series for are
for g9 are

C40 ~ -0.0209908, C50 ~ 0.0116362, C60 ~ -0.00722147.

3.
3. The
The solution
solution is
is
00

u(r, B) = L amoJO(SOm r ),
m=l

where
where
Cmo
amo = -2-'
sOm
Appendix C.
Appendix C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 577

the Cmo
cmo are the coefficients
coefficients of /(r, 0) = 1 -— r, and the SOm
f(r, 9) som are the positive roots of
of
Jo.
Jo. A direct calculation shows that

alO == 0.226324,
a20 == -0.0157747,
a30 == 0.00386078,
a40 == -0.00148156,
a50 == 0.000716858,
a60 == -0.000399554.
by six terms of the series) is graphed in Figure C.33.
The solution (approximated by C.33.

0.25

0.2

0.15

0.1

0.05

o
1

- 1 -1
Xl

C.33. The
Figure C.33. The approximation
approximation to solution u,u, computed
computed with six terms
of the (genemlized)
of (generalized) Fourier
Fourier series (see Exercise
Exercise 8.3.3).
8.3.3).

5. The
5. The solution
solution is
is
00

u(r,9) =L amoJO(SOm r ),
m=l

where
Cmo
amo = -2-'
sOm

the CmO
the are the
Cmo are the coefficients
coefficients of
of /(r, 0) = r, and
f(r, 9) and the
the 80m are the positive
som are positive roots
roots of
of JQ.
Jo.
shows that
A direct calculation shows

alO == 0.141350,
a20 == -0.0371986,
578 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

a30 == 0.0106599,
a40 == -0.00537260,
a50 == 0.00283289,
a60 == -0.00182923.
The
The solution
solution (approximated
(approximated by
by six
six terms of the
terms of the series) is graphed
series) is in Figure
graphed in C.fr
Figure C.34.

0.15

0.1

0.05

o
1

- 1 -1
x,

Figure
Figure C.34. The approximation
C.34. The approximation to
to solution
solution u,
u, computed
computed with
with six terms
six terms
of the
of the (generalized)
(generalized) Fourier
Fourier series (see Exercise
series (see 8.3.5).
Exercise 8.3.5).

If we write
7. If
00

¢(r,8) = L cmoJO(OmOr )
m=l
00 00

+L L (Cmn cos (n8) + dmn sin (n8)) In(Omn r ),


m=l n=l

where the c mn and d


Cmn d mn are known, and
00

u(r, 8, t) =L amo(t)JO(OmO r )
m=l
00 00

+L L (amn(t) cos (n8) + bmn(t) sin (n8)) In(Omn r ),


m=l n=l

then
then
a mn (t) -- Cmne -t<Arnnt/(pC) , m -- 1, 2, 3, ... , n -- 0 , 1 , 2, ... ,
bmn(t) = dmne-t<Arnnt/(PC), m, n = 1,2,3, ....
Appendix C.
C. Solutions
Solutions to odd-numbered
odd-numberedexercises
exercises 579

However, since
However, since </J(r, 9} =
0(r, 0) r(l -— r)
— r(l cos (0)/5
r) cos (#)/5 (a
(a function
function of
of rr times cos (0)),
times cos all of
(6)), all of the
the
coefficients of </J
coefficients are zero except for
<f) are

Cml, m = 1,2,3, ....


Therefore,
00

u(r, 0, t) =L aml(t) cos (O)Jl(amlr),


m=l

with a m i(£) given


with aml(t) given above.
above. After
After 30
30 seconds,
seconds, the temperature distribution
the temperature distribution can
can be
be
approximated accurately
approximated accurately using a single eigenfunction
eigenfunction (corresponding to the largest
largest
An), so we need only
eigenvalue, AU),

Cll ~ 9.04433.

temperature distribution
The temperature distribution after
after 30
30 seconds is graphed
graphed in Figure C.35.

10

-10 -10

Figure C.35.
Figure C.35. The
The approximation
approximation to
to solution
solution uu at 30, computed
at tt = 30, computed with
with
(generalized) Fourier series (see
one term of the (generalized) (see Exercise 8.3.7).
8.3.7).

nA2, the same area as a square drum of side


9. A circular drum of radius A has area 7l'A2,
length "fir
length ^/TrA. The fundamental
A. The fundamental frequency
frequency of
of such
such aa square
square drum
drum is
is

we see
Comparing to Example 8.9, we see that the circular drum sounds a lower frequency
frequency
than a square drum of equal area.
580 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

Section 8.4
1. The
1. The mesh
mesh for
for this problem is
this problem is shown
shown in
in Figure
Figure C.36,
C.36, in
in which the free
which the free nodes are
nodes are
labeled.
labeled. The stiffness matrix
The stiffness matrix is
is

4.4815 -1.1759 -1.1759 0.0000 ]


K ~ -1.1759 4.9259 0.0000 -1.3426
[ -1.1759 0.00000 4.9259 -1.3426 '
0.0000 -1.3426 -1.3426 5.8148

while
while the
the load
load vector
vector is
is
0.11111 ]
F ~ 0.11111
0.11111 .
[
0.11111
The resulting
The weights for
resulting weights for the
the finite element approximation
finite element approximation are
are given
given by
by

0.048398]
= K-1F ~ 0.044979
u 0.044979 .
[
0.039879

Figure C.36. The


Figure C.36. The mesh
mesh for
for Exercise 8.4-1-
Exercise 8.4.1.

3.
3. The
The mesh for this
mesh for this problem is shown
problem is shown in Figure C.37,
in Figure C.37, in
in which
which the free nodes
the free are
nodes are
labeled.
labeled. The stiffness matrix
The stiffness is 16
matrix is 16 x 16 and
x 16 and neither it nor
neither it the load
nor the load vector
vector will be
will be
reproduced here. The
reproduced here. The matrix
matrix isis singular, as is
singular, as is expected for aa Neumann
expected for problem.
Neumann problem.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 581
581

KU =
The unique solution to KU = F with its last component equal to zero is
-0.071138
-0.047315
-0.012656
0.001458
-0.067934
-0.047349
-0.014145
0.001566
u=
-0.065432
-0.046198
-0.015160
-0.000329
-0.062914
-0.046391
-0.016065
0.000000

16

12

4
o 0.2 0.4 0.6 0.8
Xl

Figure C.37.
Figure C.37. The
The mesh
mesh for Exercise 8.4.3.
for Exercise 8-4-3.

5. calculation shows that the


(a) A direct calculation the inhomogeneous Dirichlet problem
-V'. (k(x)V'u) = f(x), x E n,
u(x) = g(x), x EOn,

has weak form


u E G + V, a(u,v) = (f,v) for all v E V = eben),
582 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

where
where G is
is any
any function
function satisfying
satisfying the condition G(x) = p(x)
the condition g(x) for
for xx E an, and
€ dQ, and

G+V = {G + v : v E V} .

Substituting u =
Substituting — G + w,
w, where G V, into
where w E into the
the weak
weak form yields
form yields

wE V, a(w,v) = (f, v) - a(G,v) for all v E V.

In
In the
the Galerkin
Galerkin method,
method, we
we replace
replace V by
by aa finite-dimensional subspace Vn
finite-dimensional subspace and
Vn and
solve
solve
wE Vn , a(w,v) = (f,v) -a(G,v) for all v E Vn .
When using
When using piecewise
piecewise linear finite elements,
linear finite elements, wewe can satisfy the
can satisfy the boundary
boundary con-
con-
ditions
ditions approximately
approximately byby taking
taking G toto be
be aa continuous
continuous piecewise linear function
piecewise linear function
whose
whose values
values at
at the
the boundary
boundary nodes
nodes agree
agree with
with the
the given
given boundary function
boundary function
g. For simplicity, we
g. we take G to be zero at at the interior nodes. The resulting
load
load vector
vector is
is then
then given
given by
by

Ii = (f, CPi) - a(G, cp;), i = 1,2,3, ... , n.


Since
Since G is
is zero
zero on interior nodes,
on interior nodes, the
the quantity &) is
quantity a(G, CPi) is nonzero
nonzero only
only if (free)
if (free)
node ii belongs to a triangle adjacent to the boundary.
boundary.
(b) The regular triangulation
triangulation of the
the unit square having 18 18 triangles has only four
interior (free) nodes,
interior (free) and each
nodes, and one belongs
each one belongs to
to triangles
triangles adjacent
adjacent to
to the
the bound-
bound-
ary.
ary. This
This means
means that
that every
every entry
entry in
in the
the load
load vector is modified
vector is modified (which
(which is
is not
the
the typical case). Since
typical case). = 0,
Since I/ = 0, the
the load
load vector
vector ff is
is defined
defined by
by

f; = -a(G,CPi), i = 1,2,3,4.
The load vector is
0.22222222222222]
f == 1.55555555555556
[ 0.22222222222222 '
1.55555555555556
while the solution Ku =
solution to Ku = ff is

0.27777777777778]
...:... 0.61111111111111
u - 0.27777777777778 .
[
0.61111111111111

7.
7. (a) Consider the
(a) Consider BVP
the BVP

-V· (k(x)Vu) = I(x), in 0" (C.5)


au
an (x) = h(x), x Eon.
Multiplying the PDE by a test function E V = C 22(O)
function vv € (TI) and applying Green's
Green's
first identity
first identity yields
yields

1n kVu . Vv = r + ionr
in
Iv kvh for all v E V.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 583

We will apply Galerkin's method with Vm Vm equal to the space of all continuous
piecewise linear function relative to a given triangulation T. We We label the
standard basis
standard of Vm
basis of as </>i,
Vm as 02, ...
CPl, CPz, - - - ,, CPn, and the
<f>n, and the nodes
nodes asas zi,
Zl, Z2,Z 2 ,...
. . . ,, z n . (Every
Zn. (Every
the mesh is now
node in the now free.) Thus Vn Vn = span{0i,^2,
— span • - - ,, CPn}.
{CPl, CP2, ... (j>n}-
We then define the Galerkin
Galerkin approximation Wn wn by

Wn E Vn , a( Wn, CPi) = (f, CPi) + r


Jon
khcpi, i = 1,2, ... ,m.
Writing
Writing
m

Wn =L (JjcPj
j=l

and
and

mXm
we obtain
we obtain the
the system Kw =
system Kw = F. The
The stiffness matrix K
stiffness matrix K E
GRR mxm js given
is given by
by

Kij = a(cpj,CPi), i,j = 1,2, ... ,n,


F e Rmm by
and the load vector FER by

Fi = (f, cp;) + r
Jon
khcpi, i = 1,2, ... , n.

the expression for Fi is zero unless Zi


The boundary integral in the z» is a boundary
node.
(b) The compatibility condition for (C.5) is determined by the
the following calcula-
tion:
tion:

In f = - In V· (kVu)

__ r k OU
- Jon an
= - r kh.
Jon
(c) Now consider (C.5)
(C.5) with

3 3xi
k(x) = 1, f(x) = XlXZ + 4' hex) = -5'
where nO is the unit square. We will produce the finite element solution using
16x16
the regular grid with 18
18 triangles (16 stiffness matrix K E
(16 nodes). The stiffness eRRl6Xl6
is singular, as should be expected, and there are infinitely many solutions. The
584 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numberedexercises
exercises

unique solution uu with


unique solution with last
last component
component equal
equal to
to zero
zero is
is
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
0.0000

9.1
Section 9.1
1. The
1. The complex
complex Fourier
Fourier series of f/ is
series of is
00

n=-oo

where CQ =
where Co 2/3 and
= 2/3 and
2(-1t
Cn =- n 2 7r 2 ' n = ±1, ±2, ....
approximating f/ by
The errors in approximating partial Fourier series are shown in Figure C.38.
by a partial C.38.

3. The
3. The complex
complex Fourier
Fourier coefficients
coefficients of
of f/ are
are
(-It+ 1 sin (1)
Cn = n7r -1 .

The magnitudes approximating f/ by a partial


magnitudes of the error in approximating partial Fourier series are shown
C.39.
in Figure C.39.
5. Let
5. Let 00

g(x) = ao + L (an cos (n;x) + b sin (n;x)) ,


n
n=l
where

ao = ;£ Ii g(x)dx,
an =l g(x) !: -i

cos (n;x) dx, n= 1,2,3, ... ,


b = l Ii g(x)
n
-l
sin (n;x) dx, n= 1,2,3, ... ,
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 585
585

0.04r-------r-----r------r------,

-0.02
-0.04'-----..........
-1 -0.5
----.&....----.
0
. .0.5. . .-------1
0.04r-----""T'"--------Il(~----..,..----.....,

0.02
Orvr-~--------------------------~~~vJ~
-0.02
-0. 04 '--_ _ _........._ _ _- - L_ _ _ _.........._ _ _....J
-1 -0.5 0 0.5
x_
0.04,......-----.r-------l.t-------,.-----..,
0.02

o~------------------------------------~
-0.02
-0.04'-------·.....----...I·~---- ·-----~
-1 -0.5 o 0.5
..
x

Figure C.38. The error in approximating


approximating ff(x)
(x) = - x22 by
= 1— by its partial
complex Fourier series with N = 10
complex 10 (top), N = 20
20 (middle),
(middle), and N = 40 (bottom).
40 (bottom).
(See Exercise 9.1.1.)

(see (6.25)), and


(see (6.25)), and similarly
similarly let
let

hex) = Po + f: (Pn cos (n;x) + qn sin (n;x)) .


n=l

The
The complex
complex Fourier
Fourier coefficient of / is
coefficient of! is given
given by
by

Cn =~
U
Ii !(x)e-
-i
i1rn
;r;/i dx.
For
For n > 0,
n > 0, we
we have
have

Cn = 2~ J: (g(x) + ih(x)) (n;x) - isin (n;x)) dx


(cos

1(1 Ii
="2 £ _£ g(x) cos (n7rx)
-g- dx - l£ Ii .
.1 g(x)sm (n7rx)
-g- dx
-i
586 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

0.5

o """-
-1 -0.5 o 0.5
y

0.5

o~
-1 -0.5 o 0.5
x

0.5

0-
-1 -0.5 o 0.5
-
x

lx
Figure C.39.
Figure C.39. The
The magnitude
magnitude ofof the
the error
error in approximating f(x]
in approximating =e
f(x) = eix by
by
its
its partial
partial complex
complex Fourier
Fourier series
series with
with N = 10
N = 10 (top), N = 20
(top), N 20 (middle),
(middle), and
and N = 40
N = 40
(bottom). (See
(bottom). (See Exercise
Exercise 9.1.3.)
9.1.3.)

+i I: h(x)
E cos I:
(n;x) dx + E h(x) sin (n;x) dX)
= ~ (an + qn + i(pn - bn )).

Similarly, if n > 0,
Similarly, if 0, then
then

Finally,
Finally,
co = ao + ipo·
7.
7. We
We have
have

n=O n=O
e 21rij _ 1
- e 21ri j/N - l'
C. Solutions
Appendix C. Solutions to odd-numbered exercises 587

using the formula for the


the sum of a finite geometric series:

l6
Moreover, since ei8 is a 27r-periodic function of 8, 27ry
see that ee27rij
we see
9, we =
= 1 and hence
that
that
N-l
L (e7rijn/N)2 = O.
n=O
On the other hand, by Euler's formula,

~
L...J (;7rjn/N)2
e =~
L...J ( cos (jn7r)
N + ~..
sm (jn7r))2
N
n=O n=O
N-l

=L (cos
2
(j~7r) _ sin
2
(j~7r) + 2icos (j~7r) sin (j;))
n=O

= y:
n=O
cos
2
e~7r) - y:
n=O
sin
2
e~7r)
N-l

+2i L cos (j~7r) sin (j~7r).


n=O

Since this expression equals zero, we


we must have

y:n=O
cos
2
e~7r) - y:
n=O
sin
2
e~7r) = 0,
N-l

L cos (j~7r) sin (j~7r) = O.


n=O

The second equation is one of the results we


we set out to prove.
prove. The first equation
can be
can be written, using the
written, using the trigonometric sin22 (8)
identity sin
trigonometric identity (9) = cos22 (8),
= 1I -— cos (0), as

y:
n=O
cos
2
e~7r) - £ (1 -
n=O
cos
2
e~7r)) = 0,
which simplifies to
N-l

2 L cos
2
e~7r) = N,
n=O
or
or

~COS2 e~7r) -"2'


N

n=O
which is the desired result. The result

~ sin e~7r) = ~
2

n=O

then follows.
588 Appendix C. Solutions
Appendix C. Solutions to odd-numbered exercises
to odd-numbered exercises

Section 9.2
1. The
1. graph of
The graph of {|Fn|} is
{IFnI} shown in
is shown in Figure C.40.
Figure C.4D.

0.5.------......------r-------r--......- -.. . .

0.4

0.3
c::
LL

0.2

0.1

~O
5 10 15 20
n

Figure C.40. The magnitude


magnitude of
of the sequence {Fn}
{Fn} from
from Exercise
Exercise 9.2.1.
9.2.1.

3. As
3. shown in
As shown in the text,
the text,
en == Fn, n = -16, -15, ... ,15,
5
where
where {Fn}* =_16
{Fn}~~-16 is the
is the DFT
DFT of {/j}jl_
of {Ii 16,
}J~-16'

fj = f(xj), Xj = -1 + :6' j = -16, -15, ... ,15


(note that /(—I) = /(!))•
f( -1) = f(l)). Therefore, we {f(xj}} by
we can estimate {f(Xj)} by taking the inverse
DFT (using the
DFT (using inverse FFT)
the inverse FFT) of {cn}. The
of {en}. The results
results are
are shown
shown in
in Figure C.41.
Figure C.41.
5. We have

"A
N-l

~ n
e2rrijn/N _
-
N-l N-l
..!. " "
N ~ ~ame
-2rrimn/N 2rrijn/N
e
n=O n=O m=O
N-l N-l
_ 1 "" 2rri(j-m)n/N
- N~~ame
n=O m=O

_ ..!.
- N~am
"
N-l {N-l
"2rri(j-m)n/N
~e
}
.
m=O n=O
If = m,
If jj — ra, then
then
N-l N-l
L e 2rri (j-m)n/N = 2: 1 = N,
n=O n=O
Appendix C. Solutions to odd-numbered exercises
Appendix 589

0.5.....-----~----"""T""----~-------.

-0.5~----~----~~----~----~
-1 -0.5 o 0.5
x

Figure C.41. The


Figure C.4l. The function
function f(x)
f(x) = x(l -— xx22)) (the
= x(l (the curve)
curve) and
and the
the esti-
esti-
mates of
mates of f(xj) (the circles)
f(xj) (the circles) computed
computed from the complex
from the complex Fourier
Fourier coefficients
coefficients of
of ff
(see Exercise
(see 9.2.3).
Exercise 9.2.3).

while if
while ^ m,
if jj =/= m, then
then this
this sum is aa finite
sum is geometric series:
finite geometric series:
N-l N-l
Le 21ri (j-m)n/N = L (e 2rri (j-m)/N)n
n=O n=O

(e 21l"iu-m)/N)N _ 1
e21l"i(j-m)/N - 1
e 27Ti (j-m) - 1
e 2rri (j-m)/N - 1
=0.
Therefore,
Therefore,
N-l { m=j,
~ 2rri(j-m)n/N_
am L.J e -
m =/=j,
n=O

and so
and so we obtain
we obtain
N-l
~ A e 21rijn/N _
L.J n
~ ..!. N-l
- N L.J am
{N-l
~
L.J e
27Ti(j-m)n/N
}

n=O m=O n=O


1
= -Naj
N
=aj,
as desired.
590 Appendix C.
Appendix C. Solutions
Solutions to odd-numberedexercises
to odd-numbered exercises

7. Below
7. Below we show the
we show the exact
exact Fourier sine coefficients
Fourier sine coefficients of I, the
of /, the coefficients estimated by
coefficients estimated by
the DST, and
the DST, and the
the relative error. Since
relative error. Since both
both aann and
and the
the estimated
estimated a
ann are
are zero
zero for
for n
even, we
even, show only
we show only an for nn odd.
an for odd.

n an estimated an relative error


1 1
1 2.5801.10- 2.5801 .10- 6.2121 . 10- 6
3 9.5560 . 10- 3 9.5511 . 10- 3 5.1571 . 10- 4
5 2.0641 . 10- 3 2.0555 . 10- 3 4.1824 . 10- 3
4 4
7 7.5222 . 10- 7.3918 . 10- 1.7340 . 10- 2
9 3.5393 . 10- 4 3.3531 . 10- 4 5.2608 . 10- 2
11 1.9385 . 10- 4 1.6778 . 10- 4 1.3448.10- 1
4
13 1.1744.10- 8.0874.10- 5 3.1135.10- 1
15 7.6448 . 10- 5 2.4279 . 10- 5 6.8241.10- 1

9.
9. We have
We have

N = 4"" f
N-1 N-1 N-1

2 "~ Fn sm
. (imr) ~~ m sm (mn7r) . (in7r)
. -;;;- sm N
n=l n=l m=l
N-1 N-1

= 4 Lim L sin (m;7r) sin e~7r).


m=l n=l

By the
By the hint,
hint,
~ . (mn7r) . (in7r)
~ sm -;;;- sm N
n=l

is either N
is either N/2 or 0,
/2 or 0, depending on whether
depending on ra =
whether m = ij or not. It
or not. It then
then follows immediately
follows immediately
that
that
~
2 ~ Fn sm
. (in7r) N
N = 4"2fJ = 2NfJ,
n=l

which
which is
is what
what we wanted to
we wanted to prove.
prove.

Section 9.3
1. The
1. The partial
partial Fourier sine series,
Fourier sine series, with 50 terms,
with 50 is shown
terms, is shown in
in Figure C.42. It
Figure C.42. It appears
appears
that the series
that the series converges
converges to
to the function F
the function F satisfying
satisfying

F(x) = x - 2k, -2k - 1 < x < 2k + 1, k = 0, ±1, ±2, ....

The period
The of this
period of this function is 2.
function is 2.
3.
3. (a) The
(a) The odd extension fIOdd
odd extension 0dd is continuous on
is continuous on [-£,
[—I, £] only if
t] only I(a) =
if /(O) = 0. Otherwise
a. Otherwise,
fodd has aa jump
IOdd has discontinuity at
jump discontinuity at xx = o.
= 0.
(b) The
(b) The even extension lev
even extension fevenen is
is continuous on [-£,
continuous on [—•£,•£]
£] for continuous I/
every continuous
for every :
[0, f\ -t
[a,£] R.
-»- R.
Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises 591
591

1.5r-----.----....-----.----....----.........-----,

-1.5~---~------~------~----~-----~----~
-3 -2 -1 0 2 3
x

Figure C.42.
Figure C.42. The
The partial
partial Fourier
Fourier sine
sine series (50 terms)
series (50 terms) of
of ff(x)
(x) =
= x.
x.

5. The quarter-wave sine series of f/ : [0,[0, f]i] -+


—>• RR isis the
the full
full Fourier
Fourier series
series of
ofthe
the function
function
1:
/ : [—2i, -» R
2i] -+
[-2£,2f] R obtained by first
obtained by first reflecting
reflecting the the graph of f/ across the line x = =£t (to
(to
obtain a function defined on [0,[0, 2£])
21]) and
and then taking the the odd extension of the the result.
That is, 1
is, /isis defined by
by

f(x) =
f(x),
f(2£ - x),
°:-: x:-:::
f<
x:-::: £,
2£,
{ -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
coefficients are zero), and because of the other symmetry, the the even sine terms also
drop out.

Section 9.4
1. The Fourier series of f/ converges pointwise to the function F defined by
1.

x = ±(2k - 1)71", k = 1,2,3, ... ,


(2k - 1)71" < X < (2k + 1)71", k = 0, ±1, ±2, ....

3. There are many such functions f,


/, but they all have one or more discontinuities. An
example is
x, 0:-::: x:-::: ~,
f(x) = {
x+ 1, ~<x:-:::l.
592 Appendix C. Solutions
Appendix C. Solutions to odd-numberedexercises
to odd-numbered exercises

5. If
5. If {fN}
{/N} converges
converges uniformly
uniformly toto /f on [a, b],
on [a, 6], then
then it
it obviously
obviously converges
converges pointwise (after
pointwise (after
all,
all, the
the maximum
maximum difference,
difference, over
over x E (E [a, 6], between
[a,b], fN(X) and
between /N(X) ( x ) converges
and ff(x) to
converges to
zero, so each
zero, so each individual
individual difference
difference must converge to
must converge to zero).
zero). To
To prove
prove that uniform
that uniform
convergence implies mean-square
mean-square convergence, define define

MN = max{lf(x) - fN(X)1 : a:::; x :::; b}.

Then
Then

lb If(x) - fN(X)12 dx :::; Jlb M'j. dx

= MNVb-a.
By hypothesis, MN —>
--+ 00 as N --+ oo,
N —> 00, which gives the
the desired result.
7. Suppose /f : [0,
[0,^]
£] —>•
--+ R is continuous. Then
Then ffeven,
even, the even,
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,
Obviously, then, even is
then, ffeven continuous on
is continuous every interval
on every interval (2k£, (Ik + 1)£)
(2ki, (2k and ((2k
1)1) and ((2k —
-
2k£), that
1)1,2k£.),
1)£, that is, except possibly
is, except possibly at
at the
the points
points Ikt
2k£ and — l)i, k =
and (2k -1)£, 0, ±1,
— 0, ±1, ±2,
±2, ....
1H7_
We have1

lim
x~2W-
feven(x) = lim
x~2W-
f(-x+2k£)
= lim f(x)
x~o+

= f(O)
and
and

lim feven(x} = lim f(x - 2k£)


x~2kl+ x~2kl+

= lim f(x)
x~o+

= f(O).
Since
Since ffeven(2k£)
even(2kf) = /(O)
f(O) by
by definition,
definition, this
this shows
shows that
that ffeven is continuous
even is continuous at
at xx = 2n£.
2/';,£.
A similar calculation
A similar shows that
calculation shows that

lim feven(x) = lim feven(x) = feven((2k - 1)£) = feR),


x~(2k-l)l- x~(2k-l)l+

and hence that feven is continuous at x = (2k - I)£,


9. Given
9. Given f/ : [0,
[0,£]f\ --+
-»• R,
R, define!
define /: -»RR by
[-21,21] --+
: [-2£,2£] by

f(x), 0:::; x:::; £,


lex) = /(2£ - x), £ < x:::; 2£,
{ -fe-x), -£:::; x < 0,
-f(x + 2£), -2£:::; x < -f.
Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises 593

Then define
Then define FF :: R
R —>•
--+ R
R to be the
to be the periodic
periodic extension of f/ to
extension of R. Assuming
to R. Assuming I/
is
is piecewise smooth, the
piecewise smooth, quarter-wave sine
the quarter-wave sine series
series of
of I/ converges
converges to
to F(x) if F
F(x) if F is
is
continuous
continuous atat x,
x, and
and to
to
1
"2 [F(x-) + F(x+)]
if F
if F has
has aa jump discontinuity at
jump discontinuity at x.
x. If I/ is
is continuous,
continuous, thenthen its
its quarter-wave
quarter-wave sine
sine
series converges
series to I/ except
converges to except possibly at xx = O.
possibly at If I/ is
0. If is continuous
continuous and /(O) =
and 1(0) = 0,
0, then
then
the quarter-wave sine
the quarter-wave sine series
series of
of f/ converges
converges toto f/ at
at every € [0,
every xx E [0,.e].
i}.

Section 9.5
1. The
1. The function hex) fails
function h(x) to satisfy
fails to h(-l) =
satisfy h(—1) = h(l),
h(l), soso its
its Fourier coefficients decay
Fourier coefficients decay
like l/n
like 1/n and
and its
its Fourier
Fourier series
series isis the slowest to
the slowest to converge.
converge. TheThe function
function I/ satisfies
satisfies
f( -1) =
/(—I) = /(I),
f(l), but df/dx has
but dl/dx has aa discontinuity
discontinuity at = a
at rex = 0 (and
(and the
the derivative of fIper
derivative of also
per also
has discontinuities
has discontinuities at at xx = ±1).
±1). Therefore,
Therefore, thethe Fourier
Fourier coefficients
coefficients of
of f/ decay
decay like
like
1/n2. Finally,
1/n2. per and
Finally, ggper its first
and its first derivative
derivative are continuous, but
are continuous, its second
but its second derivative
derivative
has aa jump
has jump discontinuity
discontinuity at at xx = ±1,
±1, so
so its
its Fourier coefficients decay
Fourier coefficients 1/n33.. The
like 1/n
decay like The
Fourier series of g is the fastest to converge.
Fourier series of 9 is the fastest to converge.

3. Figure
3. Figure C.43 shows the
C.43 shows I, its
the /, its partial
partial Fourier series with
Fourier series with 21,
21, 41,
41, 81,
81, and
and 161
161 terms,
terms,
and the
and line yy =
the line 1.09. Zooming
= 1.09. Zooming inin near =a
near xx = 0 shows
shows that
that the
the overshoot
overshoot is indeed
is indeed
about 9%;
about 9%; see
see Figure
Figure C.44.
C.44.

1.5~--------~---------r--------~--------~

>- 0.5

- 21 terms
- _. 41 terms
81 terms
161 terms
-0.5 o 0.5
x

Figure C.43.
Figure C.43. The
The function
function f from
from Exercise
Exercise 9.5.3, its partial
9.5.3, its partial Fourier series
Fourier series
with 21,
with 21, 41,
41, 81,
81, and 161 terms,
and 161 and the
terms, and the line = 1.09.
line yy = 1.09.
594 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numberedexercises
exercises

1.1051--..-----r----...----~====::::c:::===;_,
21 terms
41 terms
1.1 81 terms
161 terms

1.095

>. 1 .09 - - - - - - - - - - - - - I,-:- - - - - - - -I ...\ - - - - - - - - - - - - -


ii' ,
I
I
,
i
,,
1.085 I i

1.08
I
I
i
o 0.02 0.04 0.06 0.08 0.1
x

Figure C.44. Zooming in on the overshoot in Figure C.43.


Figure C.44. C.43.

Section 9.6
1.
1. (a) The
(a) The infinite
infinite series
series
00 1
Ln
n=l
2

87 2
value.87
converges to a finite value. {1/n} E
Therefore, {lin} G f£2 and so, by
by Theorem 9.36,
2
the sine
the sine series
series converges
converges to aa function
function in
in L (0,1).
L2(0, 1).
(b) Figure C.45 shows the sum of the first 100100 terms of the sine series. The graph
suggests that
suggests that the
the limit
limit /f is
is of
of the
the form ( x ) = m(l
form ff(x) m(l -— x). The
The Fourier
Fourier sine
sine
series of
series of such an f/ are
such an are

Cn =2
10t m(l - x) sin (mTx) = 2m, n = 1,2,3, ....
n~
Therefore, in order
Therefore, in order that cn =
that en 1/n, we
= lin, must have
we must have m = Tr/2.
m = Therefore,
~/2. Therefore,
~
f(x) = 2(1 - x).
87
87A
A standard result
standard result in
in the theory of
the theory of infinite
infinite series
series is
is that
that
00

L:k
n=l

converges if
converges if kA; is
is greater
greater than 1.
1. This
This can
can be proved,
proved, for
for example,
example, by comparison
comparison with
with the
the improper
improper
integral
integral
oo dx

f 1 X
k'
Appendix
Appendix C.
C. Solutions
Solutions to
to odd-numbered
odd-numbered exercises
exercises 595

2.-------~------_,--------T_------_r------_.

- 0 . 5 L . . - - - - - - - -.......- - -........----'----~
o 0.2 0.4 0.6 0.8
x

Figure C.45.
C.45. The partial sine series, with 100 terms,
terms, from
from Exercise
Exercise 9.6.1.
9.6.1.

3. The
The infinite series
1)2 1
~ =~~
00 ( 00

fo
is the harmonic series,
series, a standard example of a divergent series. Therefore, {1/ fo} 0(j.
{l/^/n}
2
tp2, so the series does not converge to an
, and so L 2 (0,1)
an L2(0, function.
1) function.
2
5. (a) The function ff(x) == xxkk belongs to L
(x) = (0,1)
L2(0, 1) if and only if the integral

is finite.
finite. Provided k #-
^ —1/2,
-1/2, we
we have

1 o
1 X2k dx == lim
r-+O+
11 r
x 2k dx

1 - r 2k + 1
lim
r-+O+ 1 + 2k
1
1+2k'
=={ 00,

For kA; =
For -1/2,
== -1/2,

{1
10
x 2k dx ==
10
t dx == lim
x r-+O+ r
dx
X
11
== lim -In (r)
r-+O+
== 00.
596 Appendix C.
Appendix C. Solutions
Solutions to odd-numbered exercises
to odd-numbered exercises

2
Thus we see that f/ e
we see EL 1) if and only if k > -1/2.
(0,1)
L2(0, -1/2.
(b) The first few
few Fourier sine coefficients (x) =
coefficients of ff(x) = a:"11 4
4
X- // ,, as computed by the
DST, are approximately

1.5816, 0.25353, 0.63033,


0.63033, 0.17859, 0.41060, 0.14157,....
0.17859, 0.41060, 0.14157, ....

(c) The
(c) The graphs
graphs of
of /,j, the
the partial
partial Fourier sine
sine series,
series, with
with 63
63 terms,
terms, and the differ-
differ-
ence
ence between
between the
the two,
two, are
are shown in Figure
shown in Figure C.46.
C.46.

6
- y=x- 1/4

4
-- sine series (63 terms)

2 ~

0.2 0.4 0.6 0.8 1
x
0.1n-------~~------~~------~~-------,---------n

-0.1U.------~--------~------~--------~------~
o 0.2 0.4 0.6 0.8 1
x

Figure C.46.
C.46. The ( x ) = xX-1//4
The function ff(x) 1 4
/ ,, together
together with
with its
its partial Fourier
partial Fourier
sine series (first
(first 63 terms) (top), and the difference (bottom). See
difference between the two (bottom).
Exercise
Exercise 9.6.3.
9.6.3.

vn —>•
7. Since Vn ~ v, there exists a positive integer N such that

10
n? N ~ Ilv - vnll < 2'
Then, if
Then, if n, m
m?> N,
TV, we
we have
have
10 10
IIvn - vmll ::; IIvn - vII + IIv - vmll < 2 + 2 = 10.
Therefore, {v
Therefore, {vnn}
} is Cauchy.
Cauchy.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises 597

Section 9.7
1. The proof is a direct calculation, using integration
1. integration by parts (Green's identity): Sup-
pose
pose u, £ eben).
u, vv E Cf)(fi). Then
Then

(KDU, v) = -10 V'. (k(x)V'u) v

= 1 n
k(x)V'u . V'v - { k(x)v ~u
Jon vn

= 10 k(x)V'u· V'v (since v = 0 on an)


= -
Jn
r V'. (k(x)V'v) u + Jon
r k(x)u vn
~v

= -10 V'. (k(x)V'v) u (since u = 0 on an)


= (U,KDV).

3. If
3. If t is
is very
very large, then we
large, then can approximate
we can approximate u(x,
-u(x, t)
t] by the first
by the term in
first term in its
its gener-
gener-
alized Fourier
alized Fourier series.
series. Using
Using the same notation
the same notation as
as before for the
before for the eigenvalues
eigenvalues and
and
the negative Laplacian on n,
eigenfunctions of the fi, we have

constant C1
The constant c\ is the first generalized Fourier coefficient temperature
coefficient of the initial temperature
5:
5:
In 5'1f;1
C1 = In'1f;i·
The approximation is
The approximation is valid provided >'
valid provided AI1 is
is aa simple
simple eigenvalue;
eigenvalue; that is, there
that is, there is
is only
only
one linearly independent
independent eigenvector corresponding to >'1. AI. Then
Then all of the other
terms in the generalized Fourier series decay to zero much more rapidly than does
the
the first term.
first term.

Section 10.1
Section 10.1
1. We must check that the one-point rule gives the exact values for the integral
1.

when /(x)
when = 1,
I(x) = 1, /(x) = xi,
I(x) = or /(x)
Xl, or = x<z-
I(x) = X2. With
With /(x) = 1,1, we
I(x) = we have
have

and
and
598 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises

With
With /(x) = #i,
f(x) = Xl, we
we have
have

111-"'1
1 TR
f =
1 0 0
Xl dx 2 dx1

On the other hand,


=
1 o
1
(Xl - xI)
2
dX1
1 1
= -2 - -3 = -.
6
1

~f G, D= ~. ~ =~,
so the rule is exact in this case as well. By symmetry, the rule must hold for
/(x)
f(x) == X2, which shows that the rule has degree of precision at least 1. 1. To show
that the degree
degree of precision is not greater than 1,
1, we
we note that, for
for /(x) = xi,
f(x) = xl,

while

3. We have

TR to T is
On the other hand, the mapping from TR
1
Xl = 1 + Zl + 2"Z2,
X2 = Z2·
The Jacobian is
The Jacobian is
J=[~ t],
and
and its determinant is 1.
1. Therefore,
Therefore, with

we have
11l-z1 ( +
1 1 1
1
f = 9 = 1 Zl + 2" Z2 ) z~ dZ2 dz 1.
T TR 0 0
This
This last
last integral
integral also
also equals 1/8.
equals 1/8.
5. (The
5. (The reader should consult
reader should Exercise 8.4.5
consult Exercise 8.4.5 (and
(and its
its solution)
solution) for
for an explanation of
an explanation of
how an inhomogeneous
inhomogeneous Dirichlet condition is handled.) Let G be the piecewise linear
function whose everywhere except at those boundary nodes lying
whose nodal value is zero everywhere
on
on the
the boundary
boundary which
which are
are not
not free.
free. At
At the
the nonfree
nonfree boundary
boundary nodes,
nodes, the
the value
value of
of
C. Solutions
Appendix C. Solutions to odd-numbered exercises 599
599

is the assigned Dirichlet


G is Dirichlet data.
data. To
To solve
solve the inhomogeneous
inhomogeneous Dirichlet
Dirichlet problem,
problem, we
merely need to modify the load vector by replacing

by
by
Fi = l JrPi - a(G,CPi).

nonzero only if the free node nfi


fa) is nonzero
The quantity a(G, CPi) r\fi belongs to a triangle that
also contains a (nonfree) boundary node. The point here is simply that this can
easily be determined from the information in the data structure. As we we loop over
we can determine, for
the triangles, we for each, whether it contains both a free node
node and
node. If it does, we
a nonfree node. we modify the load vector accordingly.
accordingly.

Section 10.2
Section 10.2
1. Computing
1. A =
Computing A = L
LUU requires n -— 1 steps, and step ii uses

(n - i)(l + 2(n - i)) = 2(n - i)2 + (n - i)

the
arithmetic operations (this is determined by simply counting the operations in the
pseudo-code on page 473). The total number of operations required
pseudo-code required is

n-1 n-1 n-1

i=l j=l j=l


2n 3 n2 n
-- - --
3 2 6

This agrees with the O(2n O(2n33/3) operation count given in the text.
-1
The computation of L L-lb b requires n -— 1 steps, with 2(n -— i) arithmetic operations
nfir stfvn. Thfi tnta.l
per step. The total is is

n-l n-l

2 ~)n -1) = 2"Lj = n 2 - n.


i=l j=l

The final step of back substitution requires n steps, with 2(


2(nn -— i) +
+ 1 operations per
step, for a total of
of
n n-l
L {2(n - i) + 1} = 2 L j + n = n 2

i=l j=l

2n2 -— n,
The total for the two triangular solves is 2n2 n, which also agrees with the
the count
given in
given in the
the text.
text.
3. With
3. With
1
cp(x) = -x·
2
Ax - b . x,
600 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

we
we have
have
1
<fJ(x + y) = "2 (x + y). A(x + y) - h· (x + y)
1 1
= "2x . Ax + y . Ax + "2 Y . Ay - b . x - b . Y
1
= <fJ(x) + (Ax - b) . y + "2 Y . Ay.
The fact that
The fact that A is symmetric
A is symmetric allows
allows the
the simplification
simplification
1 1
"2x . Ay + "2 Y . Ax = y. Ax,
which was used above.
above. We thus see
see that
that
<fJ(x + y) = <fJ(x) + V'<fJ(x) . y +0 (1IyI\2) ,
with
with
V'<fJ(x) = Ax - h.
5. An
5. An inner
inner product has three
product has properties:
three properties:
(a)
(a) (x, x) ~
>00 for all x, and
for all and (x, x) = 0
0 if
if and if x =
only if
and only = 0.
O.
(b) (x, y) == (y,x)
(b) (x,y) (y, x) for
for all x, y.
all x,y.
(c)
(c) (ax
(ax + /3y, z)
+ ,8y, = a(x,
z) = a(x, z) + /?(y,
z) + ,8(y, z) for all
z) for x, y,
all x, y, zz and
and all
all a, ft.
a,,8.
These properties
These properties hold
hold for
for
(X,y)A = X· Ay.
The third
The third property would be
property would be true for any
true for any matrix
matrix A,
A, the
the second
second property
property obviously
obviously
requires that
requires that A
A be symmetric, and
be symmetric, and the
the first property requires
first property requires that
that A
A be
be positive
positive
definite.
definite.
(0) (0)
7.
7. (a) With
(a) With x
xeD) = (4,2),
= (4,2), the
the negative
negative gradient
gradient is
is -V'<fJ
-V0 (x (X(D))) = (-2,
(-2, -1),
-1), and
and so
so we
we
must
must minimize
minimize

The minimizer
The minimizer is
is a 5/14, and
= 5/14,
a = and so
so

X(l) = (23, 23) .


7 14
(b) At
(b) x(1) = (23/7,23/14),
At x(1) the negative
(23/7,23/14), the negative gradient
gradient is
is (-3/14,3/7),
(-3/14,3/7), so
so we
we must
must
minimize
minimize
,/, (X(l) _ r7,/, ( (1))) =.E...- a 2_ ~ a _ 529.
'/' av,/, x 196 196 28
The
The minimizer is aa = 5/6,
minimizer is 5/6, and
and so
so

x
(2) = (87
28"
2)
The desired
The desired solution
solution is
is (3,2).
(3, 2).
(c) With
With xeD) = 0,0, the
x(0) = the CG
CG algorithm
algorithm produces
produces
(1)
x = (2.67456,2.34024),
X(l) == (2.67456, 2.34024),
x^ = (3,2),
with X(2) (3, 2), the exact
exact solution.
Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered exercises
odd-numbered exercises 601
601

9. If yy =
=x x (0) , then x
x - x(O), =y
x = y + x(O)
x (0) and
and so
so
Ax = b => Ay + Ax(O) = b => Ay = b - Ax(O).

Ax^ 0) , apply the CG algorithm to estimate y,


We can therefore replace b by b -— Ax(O),
x^ to get
and add x(O) get the estimate
estimate of x.
x.

Section
Section 10.3
10.3
1. F(x) =
1. Let the vector-valued function F be defined by F(x) = (f(x),
(/(x),0).
0). Then

'\7. (¢F) = cf/fVl. F + '\7¢. F = ¢ !f + !¢ f,


vXl VXl

so, by the divergence theorem,

inr¢~f + inr ~¢ f= inr'\7'(¢F)=lan ¢F.n=lan ¢fnl.


VXl VXl

If 0
¢E C'o0(fi), then the boundary integral vanishes, and we
G C8"([2), we obtain

r ¢~ - _ inr o¢ f
in OXI - OXI •

The derivation for 0/ OX2 is exactly analogous.


d/dx-2
3. A direct computation shows that

Ilf - 911L2 = ~ for all integers m,n,

while
IIf - 911Hl = ~Jl + m 2 Jr2 + n 2 Jr2 for all m,n.
L2 error is independent of m, n,
Thus the L2 Hl error becomes arbitrarily
while the HI
n, while
large as m, n —> oo.
-+ 00.

Section 10.4
Section 10.4
1.
1. (a) Let u, v € Rn contain the nodal values of piecewise linear functions 'Uh,
u, vERn Uh,Vh,
Vh,
respectively, so that
n n

'Uh = L 'Ui¢i, Vh = L Vi¢i.


i=1 i=1

It follows that

n n

i=1 j=1

=u·Mv.
602 Appendix C. Solutions
Appendix C. Solutions to
to odd-numbered
odd-numbered exercises
exercises

(b)
(b) As
As shown in the
shown in the text,
text, if
if u
u and
and vv are
are generalized eigenvectors for
generalized eigenvectors for the problem
the problem
Ku
Ku = AMu, then LTTu
then L and L
u and T
LTv v are
are orthogonal
orthogonal in
in the
the Euclidean
Euclidean norm.
norm. But
But
then
then
o = L T U • LTV = U . LLTV = U . M v = (Uh' Vh).
2
Thus Uh
Thus UH and are orthogonal
VH are
and Vh orthogonal in
in the L2 norm.
the L norm.
3.
3. (a)
(a) Using
Using the same method
the same method asas in
in Example 10.5, we
Example 10.5, find that
we find that the smallest eigen-
the smallest eigen-
value on the
value on the pentagon
pentagon isis approximately 18.9. (The
approximately 18.9. (The estimates
estimates obtained
obtained on
on five
five
successively finer
successively finer meshes
meshes were
were 21.2794, 19.5574, 19.0818,
21.2794, 19.5574, 19.0818, 18.9601,
18.9601, 18.9294.
18.9294. The
The
coarsest mesh
coarsest mesh is shown in
is shown in Figure
Figure C.47.)
C.47.)
(b) It would
(b) It would be
be reasonable
reasonable to
to hypothesize
hypothesize that
that

A(n)
I
-t Al ,

where
where Ai
Al = 18.2 is
~ 18.2 is the smallest eigenvalue
the smallest eigenvalue on
on the disk of
the disk of area 1. (The
area 1. (The value
value of
of
Ai
Al was found near
was found near the
the end of Section
end of Section 8.3.)
8.3.)
(c) Repeating
(c) Repeating the calculation again
the calculation again for
for aa regular
regular decagon of area
decagon of area 1,
1, we find that
we find that
the
the smallest
smallest eigevalue
eigevalue is
is approximately 18.3. (The
approximately 18.3. (The values
values obtained on four
obtained on four
successively finer
successively finer meshes
meshes were 19.0328, 18.5055,
were 19.0328, 18.5055, 18.3268,
18.3268, 18.2755.)
18.2755.)

0.8.------..----.......-----..-----,

0.6

0.4

0.2

xN 0

-0.2

-0.4

-0.6

_0.8l...-----L------'-----"-----~
-0.5 0 0.5
x
1

Figure
Figure C.47. The coarsest
C.4T. The coarsest mesh
mesh from
from Exercise
Exercise 10-4-3.
10.4.3.
Bibliography
Bibliography

[1] Stuart
[1] Stuart S.
S. Antman.
Antman. The equations for
The equations large vibrations
for large of strings.
vibrations of strings. American
American
Mathematical Monthly, 87:359-370, 1980.
Mathematical 1980.
[2] Kendall E. Atkinson. An
An Introduction to Numerical Analysis. John Wiley &
Sons, New
Sons, New York,
York, 2nd edition, 1989.
2nd edition, 1989.
[3] Eric
[3] Eric B. Becker, Graham
B. Becker, Graham F. Carey, and
F. Carey, and J. Tinsley Oden.
J. Tinsley Oden. Finite Elements.
Finite Elements.
Prentice-Hall,
Prentice-Hall, Englewood Cliffs, 1981.
Englewood Cliffs, 1981.

[4] T. A. Bick. Elementary


[4] Elementary Boundary Problems. Marcel Dekker, New York,
Boundary Value Problems.
1993.
1993.

[5] William
[5] William E. Boyce and
E. Boyce and Richard
Richard C. DiPrima. Elementary
C. DiPrima. Elementary Differential Equations
Differential Equations
and
and Boundary Problems. John
Value Problems.
Boundary Value John Wiley
Wiley & Sons,
Sons, New
New York,
York, 7th7th edition,
edition,
2000.
[6] Susanne
[6] C. Brenner
Susanne C. Brenner and
and L. Ridgway Scott.
L. Ridgway Scott. The
The Mathematical Theory of
Mathematical Theory of Finite
Finite
Element Methods. Springer-Verlag, New York, 1994.
Element
[7] W.
[7] L. Briggs
W. L. Briggs and
and V. E. Henson.
V. E. The DFT:
Henson. The DFT: An
An Owner's
Owner's Manual
Manual for
for the
the Discrete
Discrete
Fourier Transform. Society
Fourier Transform. for Industrial
Society for and Applied
Industrial and Applied Mathematics,
Mathematics, Philadel-
Philadel-
phia, 1995.
phia,1995.

[8] E.
[8] O. Brigham.
E. O. Brigham. The
The Fast
Fast Fourier Transform and
Fourier Transform and Its
Its Applications. Prentice-
Applications. Prentice-
Hall, Englewood Cliffs, 1988.
1988.
[9] Michael
[9] Michael A. Celia and
A. Celia William G.
and William G. Gray.
Gray. Numerical
Numerical Methods
Methods for Differential
for Differential
Equations: Fundamental Concepts
Concepts for
for Scientific
Scientific and Engineering Applications.
Prentice-Hall,
Prentice-Hall, Englewood Cliffs, 1992.

[10] Ruel
[10] Ruel V. Churchill and
V. Churchill and James Ward Brown.
James Ward Brown. Fourier
Fourier Series
Series and
and Boundary Value
Boundary Value
Problems. McGraw-Hill,
Problems. McGraw-Hill, New York, 5th edition, 1993.
1993.

[11] Philippe
[11] G. Ciarlet.
Philippe G. Ciarlet. The
The Finite Element
Element Method
Method for Elliptic Problems. North
Problems. North
Holland,
Holland, Amsterdam, 1978.
Amsterdam, 1978.

[12] J. W. Cooley and J. W. Tukey. An algorithm


algorithm for the machine computation
computation of
of
complex Fourier 19:297-301, 1965.
Fourier series. Mathematics of Computation, 19:297-301,1965.

603
604 Bibliography

[13] James W.
[13] W. Demmel.
Demmel. Applied
Applied Numerical Linear Society for
Linear Algebra. Society for Industrial
Industrial
and
and Applied Mathematics, Philadelphia,
Applied Mathematics, 1997.
Philadelphia, 1997.

[14] G.
[14] G. B.
B. Folland.
Folland. Introduction
Introduction to
to Partial
Partial Differential
Differential Equations. Princeton Uni-
Equations. Princeton Uni-
versity Press, Princeton, 2nd edition, 1995.
versity Press, Princeton, 2nd edition, 1995.

[15] Gerald
[15] Gerald B. Folland. Fourier
B. Folland. Fourier Analysis
Analysis and
and Its Applications. Brooks/Cole,
Its Applications. Pacific
Brooks/Cole, Pacific
Grove, 1992.
Grove, 1992.

[16] George
[16] George E. Forsythe,
Forsythe, Michael
Michael A.
A. Malcolm, and Cleve
Malcolm, and Cleve B.
B. Moler.
Moler. Computer Meth-
for Mathematical Computations. Prentice-Hall,
ods for Prentice-Hall, Englewood Cliffs, 1977.
Englewood Cliffs, 1977.
[17] Philip
[17] Gillett. Calculus
Philip Gillett. Calculus and Analytic Geometry. D.
Analytic Geometry. C. Heath,
D. C. Lexington, 1984.
Heath, Lexington, 1984.
[18] Jack
[18] Jack L. Goldberg and
L. Goldberg and Merle Potter. Differential
Merle Potter. Differential Equations:
Equations: A
A Systems Ap-
Systems Ap-
proach. Prentice-Hall, Upper
proach. Prentice-Hall, Upper Saddle
Saddle River, 1997.
River, 1997.

[19] Gene
[19] Gene H.
H. Golub and Charles
Golub and Charles F.
F. Van
Van Loan.
Loan. Matrix Computations. Johns
Matrix Computations. Hopkins
Johns Hopkins
University
University Press, Baltimore, 3rd
Press, Baltimore, 3rd edition,
edition, 1996.
1996.
[20] Michael Greenberg.
[20] Greenberg. Advanced Prentice-Hall, Upper
Advanced Engineering Mathematics. Prentice-Hall, Upper
Saddle River, 2nd edition,
Saddle edition, 1998.
1998.
[21] M.
[21] E. Gurtin.
M. E. Gurtin. An
An Introduction
Introduction to Mechanics. Academic
Continuum Mechanics.
to Continuum Academic Press,
Press,
New
New York, 1981.
York, 1981.

[22] Richard
[22] Richard Haberman.
Haberman. Elementary
Elementary Applied
Applied Partial Differential
Differential Equations: With
Fourier Series and Boundary Problems. Prentice-Hall,
Boundary Value Problems. Upper Saddle
Prentice-Hall, Upper Saddle
River, 1998.
River, 1998.

[23] William
[23] W. Hager.
William W. Applied Numerical Linear Algebra. Prentice-Hall,
Hager. Applied Engle-
Prentice-Hall, Engle-
wood
wood Cliffs, 1988.
Cliffs, 1988.

[24] J.
[24] Ray Hanna
J. Ray Hanna and
and John
John H.
H. Rowland.
Rowland. Fourier Series, Transforms,
Transforms, and Bound-
Problems. John
ary Value Problems. Wiley &
John Wiley & Sons,
Sons, New York, 2nd
New York, 2nd edition, 1990.
edition, 1990.

[25] M.
[25] M. T.
T. Heideman,
Heideman, D.D. H. Johnson, and
H. Johnson, C. S.
and C. S. Burrus.
Burrus. Gauss
Gauss and
and the history of
the history of
the
the fast
fast Fourier
Fourier transform.
transform. Archive for History of 34:265-277,
of Exact Science, 34:265-277,
1985.
1985.

[26] Morris
[26] Morris Hirsch
Hirsch and Stephen Smale.
and Stephen Smale. Differential
Differential Equations, Dynamical Systems,
Systems,
and Academic Press,
and Linear Algebra. Academic Press, New York, 1974.
New York, 1974.
[27] Claes
[27] Claes Johnson.
Johnson. Numerical Solution of
of Partial Differential
Differential Equations by the
the
Finite
Finite Element
Element Method. Cambridge University
Method. Cambridge Press, Cambridge,
University Press, 1987.
Cambridge, 1987.

[28] David
[28] David W.
W. Kammler.
Kammler. AA First Course in
First Course in Fourier Analysis. Prentice-Hall,
Fourier Analysis. Upper
Prentice-Hall, Upper
Saddle River,
Saddle River, 2000.
2000.

[29] Wilfred
[29] Wilfred Kaplan.
Kaplan. Advanced Calculus. Addison-Wesley,
Advanced Calculus. Addison-Wesley, Reading,
Reading, 4th edition,
4th edition,
1994.
1994.
Bibliography 605

[30] David
[30] David Kincaid
Kincaid and
and Ward
Ward Cheney.
Cheney. Numerical
Numerical Analysis. Brooks/Cole, Pacific
Analysis. Brooks/Cole, Pacific
Grove, 2nd
Grove, 2nd edition,
edition, 1996.
1996.
[31] Patrick
[31] Patrick M.
M. Knupp
Knupp and
and Stanly
Stanly Steinberg.
Steinberg. The
The Fundamentals of Grid
Fundamentals of Grid Genera-
Genera-
CRC Press,
tion. CRC
tion. Press, Boca
Boca Raton,
Raton, 1993.
1993.
[32] Young
[32] Young W.
W. Kwon
Kwon and
and Hyochoong
Hyochoong Bang. The Finite
Bang. The Finite Element
Element Method Using
Method Using
MATLAB. CRC Press,
MATLAB. CRC Press, Boca
Boca Raton,
Raton, 1997.
1997.
[33] J.
[33] J. D. Lambert. Numerical
D. Lambert. Numerical Methods
Methods for Ordinary Differential
for Ordinary John
Systems. John
Differential Systems.
Wiley &
Wiley & Sons,
Sons, Chichester,
Chichester, 1991.
1991.
[34] David
[34] David C.
C. Lay.
Lay. Linear
Linear Algebra and Its
Algebra and Its Applications. Addison Wesley
Applications. Addison Wesley Longman,
Longman,
Reading, 2nd
Reading, (updated) edition,
2nd (updated) edition, 2000.
2000.
[35] David
[35] David R.
R. Lide, editor. CRC
Lide, editor. CRC Handbook of Chemistry
Handbook of Chemistry and
and Physics. CRC Press,
Physics. CRC Press,
Boca Raton,
Boca Raton, 1998.
1998.
[36] C.
[36] C. C.
C. Lin
Lin and
and L. A. Segel.
L. A. Segel. Mathematics
Mathematics Applied to Deterministic
Applied to Deterministic Problems in
Problems in
the Natural
the Society for
Sciences. Society
Natural Sciences. for Industrial
Industrial and
and Applied
Applied Mathematics,
Mathematics, Philadel-
Philadel-
1988.
phia, 1988.
[37] Jerrold
[37] Jerrold E. Marsden and
E. Marsden and Anthony J. Tromba.
Anthony J. Tromba. Vector Calculus. W.
Vector Calculus. H. Freeman,
W. H. Freeman,
New York, 4th
New York, edition, 1996.
4th edition, 1996.
[38] R. M. M. Mattheij and J. Molenaar. Ordinary Differential
Differential Equations in Theory
Theory
and Practice.
and John Wiley
Practice. John & Sons
Wiley & Sons Ltd.,
Ltd., Chichester,
Chichester, 1996.
1996. Reprinted
Reprinted by
by the
the
Society for
Society for Industrial and Applied
Industrial and Applied Mathematics,
Mathematics, Philadelphia,
Philadelphia, 2002.
2002.
[39] Robert
[39] Robert C.
C. McOwen.
McOwen. Partial
Partial Differential
Differential Equations: Methods and
Equations: Methods and Applications.
Applications.
Prentice-Hall, Upper Saddle River, 1996.
Prentice-Hall, Upper Saddle River, 1996.
[40] Carl
[40] Carl D.
D. Meyer.
Meyer. Matrix
Matrix Analysis and Applied
Analysis and Linear Algebra.
Applied Linear Society for
Algebra. Society for In-
In-
dustrial and
dustrial and Applied
Applied Mathematics,
Mathematics, Philadelphia,
Philadelphia, 2000.
2000.
[41] Jeffrey
[41] Jeffrey Rauch.
Rauch. Partial Differential Equations.
Partial Differential Springer-Verlag, New
Equations. Springer-Verlag, New York,
York,
1991.
1991.
[42] L.
[42] L. F. Shampine and
F. Shampine and M.
M. W.
W. Reichelt.
Reichelt. The MATLAB ODE
The MATLAB suite. SIAM
ODE suite. Journal
SIAM Journal
on Scientific
on 18:1-22, 1997.
Computing, 18:1-22,
Scientific Computing, 1997.
[43] Lawrence
[43] Lawrence E.
E. Shampine.
Shampine. Numerical
Numerical Solutions
Solutions of
of Ordinary
Ordinary Differential
Differential Equa-
Equa-
Chapman &
tions. Chapman
tions. & Hall,
Hall, New
New York, 1994.
York, 1994.
[44] Gilbert
[44] Gilbert Strang.
Strang. Linear
Linear Algebra and Its
Algebra and Its Applications. Harcourt, Brace,
Applications. Harcourt, Brace, Jo-
Jo-
vanovich, San
vanovich, San Diego,
Diego, 3rd
3rd edition,
edition, 1988.
1988.
[45] Gilbert
[45] Gilbert Strang
Strang and
and George
George J.
J. Fix.
Fix. An
An Analysis of the
Analysis of the Finite
Finite Element Method.
Element Method.
Wellesley-Cambridge Press,
Wellesley-Cambridge Wellesley, 1988.
Press, Wellesley, 1988.
[46] Walter
[46] Walter A. Strauss. Partial
A. Strauss. Partial Differential
Differential Equations:
Equations: An
An Introduction. John Wiley
Introduction. John Wiley
Sons, New
& Sons, New York,
York, 1992.
1992.
606 Bibliography

[47] John
[47] John C. Strikwerda. Finite
C. Strikwerda. Finite Difference
Difference Schemes and Partial
Schemes and Partial Differential
Differential Equa-
Equa-
Chapman &
tions. Chapman
tions. & Hall,
Hall, New
New York, 1989.
York, 1989.
[48] Paul
[48] Paul N. Swarztrauber. Fftpack,
N. Swarztrauber. 1985.
Fftpack, 1985.
[49] Lloyd
[49] Lloyd N.
N. Trefethen
Trefethen and
and David
David Bau.
Bau. Numerical
Numerical Linear Algebra. Society
Linear Algebra. Society for
for
Industrial and Applied Mathematics,
Mathematics, Philadelphia, 1997.
1997.
[50] Charles
[50] Charles Van
Van Loan. Computational Frameworks
Loan. Computational Frameworks for the Fast Fourier Transform.
Transform.
Society for Industrial and Applied Mathematics,
Society Mathematics, Philadelphia, 1992.
[51] J. S. Walker. Fast Fourier Transform.
[51] CRC Press, Boca
Transform. CRC Boca Raton, 2nd edition,
edition,
1996.
1996.
[52] H.
[52] H. F.
F. Weinberger.
Weinberger. A First Course
Course in Partial Differential
Differential Equations with Com-
plex Variables and
plex Variables Methods. Blaisdell,
Transform Methods.
and Transform Blaisdell, New
New York, 1965.
York, 1965.
[53]
[53] Antoni
Antoni Zygmund. Series. Cambridge
Trigonometric Series.
Zygmund. Trigonometric Cambridge University
University Press, Cam-
Press, Cam-
bridge, 2nd edition, 1959.
Index
Index

aluminum, 15, 26, 163,


aluminum, 15,26, 163, 217,
217, 276
276 boundary conditions, 134
boundary conditions, 134
angle between two
angle between two vectors,
vectors, 55
55 Dirichlet, 13,
Dirichlet, 13, 34,
34, 144,
144, 168,
168, 169,
169,
area integral,
area integral, 329
329 197, 211,
197, 211, 280, 292, 332, 335,
automatic step control,
automatic step control, 111
111 339
essential, 266,
essential, 313, 388
266, 313, 388
back substitution, 474
back substitution, 474 for aa vibrating
for vibrating string,
string, 30
30
backward Euler method,
backward Euler 118, 263, 310
method, 118,263,310 for the
for diffusion equation,
the diffusion equation, 2020
banded
banded matrix, 386, 475
matrix, 386, 475 for the
for hanging bar,
the hanging bar, 24
24
bar
bar for the heat
for the heat equation,
equation, 1313
aluminum, 217,
aluminum, 217, 276
276 homogeneous, 14,
homogeneous, 14, 168
168
chromium, 278
chromium, 278 inhomogeneous, 14,
inhomogeneous, 14,164,169,197,
164, 169, 197,
circular, 245
circular, 245 222, 243,
222, 243, 273, 298, 391
273, 298, 391
copper, 228, 243, 244, 264, 265, inhomogeneous Dirichlet,
inhomogeneous Dirichlet, 321
321
278 mixed, 13,
mixed, 13,150,161,
150, 161, 283, 301, 313,
283, 301, 313,
elastic, 21,
elastic, 21, 173
173 333, 348, 388
333,348,388
heat equation and,
heat equation and, 333
333 natural, 266,
natural, 266, 313,
313, 388
388
heat
heat flow
flow in,
in, 99 Neumann,
Neumann, 13, 13, 27, 34, 152,
27, 34, 152, 231,
231,
heterogeneous,
heterogeneous, 276 276 273, 275, 282, 332, 335, 349,
273,275,282,332,335,349,
iron, 214,
214, 217, 222, 228, 230, 236, 388
244, 264, 281,281, 323 periodic, 153,
periodic, 153, 246
246
steel, 302
steel, 302 Robin, 143
Robin, 143
basis,
basis, 50
50 time dependent,
time dependent, 223223
orthogonal, 55,
orthogonal, 55, 57
57 boundary
boundary value
value problem,
problem, 14,14, 144
144
orthonormal, 57,
orthonormal, 57, 65
65 on aa rectangular
on rectangular domain,
domain, 345345
Bessel function
Bessel function BVP,
BVP, 14
14
of order
of order n,n, 366
366
properties,
properties, 366 366 b], 33,
C[a,_b],
C[a, 58
33, 58
Bessel's equation
Bessel's equation eC 22(ft), 336
(n),336
of order
of order n,n, 364
364 Ck[a,b],
ek[a, 33
b], 33
00
Bessel's inequality, 428 Co (ft), 489
e~(n), 489
best approximation, 61,
best approximation, 61, 147,156,181,
147,156,181, eben),
C£(n), 336,336, 377
377
182, 343
182, 343 e1
C&(fi),
(n) , 338
338
in the
in energy norm,
the energy norm, 491
491 carbon monoxide,
carbon monoxide, 220
220
bilinear form, 180,
bilinear form, 180, 270
270 Cauchy sequence,
Cauchy sequence, 451
451
symmetric, 181
symmetric, 181 Celsius,
Celsius, 1919
body force, 23
body force, 23 chain rule,
chain rule, 360
360

607
608 Index

change of
change of variables
variables delta function,
delta function, 126,
126, 205,
205, 318
318
in aa multiple
in integral, 471
multiple integral, 471 sifting property, 126
sifting property, 126
characteristic polynomial
characteristic polynomial delta sequence,
delta sequence, 126 126
of aa second-order
of second-order ODE, ODE, 82 82 dense matrix,
dense matrix, 186
186
of aa square
of square matrix,
matrix, 69 69 density, 10,
density, 10, 330
330
characteristic root
characteristic root descent direction,
descent direction, 479 479
of aa second-order
of second-order ODE, ODE, 82 82 determinant, 69
determinant, 69
Cholesky factorization,
Cholesky factorization, 474,474, 496
496 DFT, 404
DFT, 404
chromium, 278
chromium, 278 differential equation,
differential equation, 1 1
co-domain, 32
co-domain, 32 autonomous, 109
autonomous, 109
coefficients
coefficients constant coefficient,
constant coefficient, 4, 4, 82,
82, 91
91
discontinuous, 264
discontinuous, 264 converting to
converting to aa first-order system,
first-order system,
compatibility condition,
compatibility condition, 240,
240, 243,
243, 250,
250, 79
79
276, 350
276,350 first-order linear,
first-order linear, 87 87
for aa singular
for singular linear
linear system,
system, 4545 homogeneous, 3,
homogeneous, 3, 202
202
complete
complete inhomogeneous, 3, 96
inhomogeneous, 96
normed vector
normed vector space,
space, 452
452 linear, 2,
linear, 2, 91
91
complete orthogonal
complete orthogonal sequence,
sequence, 449 449 linear system,
linear system, 260 260
completeness
completeness nonconstant coefficient,
nonconstant coefficient, 44
^,490
of HI, 490 nonlinear, 33
nonlinear,
2
of LL2, , 453 order, 22
order,
complex numbers,
complex numbers, 394 394 ordinary, 1,
ordinary, 1, 79,
79, 82,
82, 213,
213, 260
260
concentration
concentration partial, 1
partial, 1
time evolution
time evolution of, of, 221
221 right-hand side,
right-hand side, 44
concentration gradient,
concentration gradient, 1717 scalar, 55
scalar,
conditioning
conditioning system, 5,
system, 5, 91,
91, 108
108
of aa matrix,
of matrix, 481,481, 486
486 differential operator
differential operator
conjugate directions,
conjugate directions, 485485 symmetric, 137
symmetric, 137
conjugate gradients
conjugate gradients differentiating an
differentiating an integral,
integral, 1111
algorithm, 485
algorithm, 485 diffusion, 16
diffusion, 16
convergence, 486
convergence, 486 diffusion coefficient,
diffusion coefficient, 18 18
conservation of
conservation of energy,
energy, 173173 diffusion equation,
diffusion equation, 18 18
continuously differentiable
continuously differentiable function,
function, 33
33 inhomogeneous, 220
inhomogeneous, 220
convergence
convergence dimension, 50
dimension, 50
mean-square,
mean-square, 149, 149, 419
419 Dirac delta
Dirac delta function,
function, 126, 126, 205,
205, 318
318
pointwise,
pointwise, 419 419 Dirichlet condition,
Dirichlet condition, 13 13
uniform,
uniform, 420 420 Dirichlet kernel,
Dirichlet kernel, 423423
convolution, 424
convolution, 424 discrete cosine
discrete cosine transform,
transform, 414 414
periodic,
periodic, 425 425 discrete Fourier
discrete Fourier transform,
transform, 404 404
copper, 228,
copper, 228, 243,
243, 244,
244, 265,
265, 278
278 discrete sine
discrete sine transform,
transform, 410 410
and the
and FFT, 411
the FFT, 411
d'Alembert's solution
d'Alembert's solution to the wave
to the equa-
wave equa- disk
disk
tion, 288
tion, 288 Fourier series
Fourier series on on a,
a, 359,
359, 372
372
data structure
data structure displacement function,
displacement function, 21 21
for describing
for describing aa triangulation,
triangulation, 467
467 divergence
divergence
DCT, 414
DCT, 414 operator, 329
operator, 329
Index
Index 609

theorem, 330330 extension


extension
domain
domain even,
even, 418
418
of
of aa function,
function, 31
31 odd,
odd, 417
417
domain
domain of dependence, 289 periodic,
periodic, 425
425
domain
domain ofof influence,
influence, 290
290
dot
dot product, 45, 55, 71 fast
fast Fourier
Fourier transform,
transform, 393,393, 407
407
DST, 410
DST,410 FFT,
FFT, 393,393, 407
407
Fick's
Fick's law,
law, 17
17
eigenfunction,
eigenfunction, 68, 68, 145,
145, 494
494 fill-in, 477
fill-in, 477
complex-valued, 394 finite
finite element
element method,
method, 77, 77, 167,
167, 173
173
of
of aa differential
differential operator,
operator, 139
139 for
for eigenvalue
eigenvalue problems,
problems, 495
495
eigenpairs for
for the
the heat
heat equation,
equation, 256
256
on
on aa disk,
disk, 369
369 for
for the
the wave
wave equation,
equation, 306306
under Dirichlet conditions, 145 145 Fourier
Fourier coefficients,
coefficients, 149149
under
under mixed
mixed boundary
boundary conditions,
conditions, complex,
complex, 397 397
151,
151, 153
153 rate
rate of
of decay,
decay, 436436
under
under Neumann
Neumann conditions,
conditions, 233
233 sine,
sine, 149
149
under
under periodic
periodic boundary
boundary condi-
condi- Fourier
Fourier series,
series, 77,
77, 149,
149, 155
155
tions,
tions, 247
247 method
method of, of, 166
166
eigenspace,
eigenspace, 70 complex,
complex, 397, 397, 401
401
eigenvalue, 68, 116, 116, 494 double
double sine
sine series,
series, 343
343
of
of aa differential
differential operator,
operator, 139
139 for
for the
the wave
wave equation,
equation, 291291
of a symmetric matrix, 139 139 full,
full, 249,
249, 252,
252, 398
398
eigenvalue problem in
in three
three dimensions,
dimensions, 355 355
general, 455 on aa rectangular
on rectangular domain,
domain, 339
339
generalized, 495 pointwise convergence, 429
pointwise convergence, 429
eigenvector, 68
eigenvector, 68 sine, 149,
sine, 149, 211
211
of a symmetric matrix,
of a symmetric matrix, 139
139 Fourier's
Fourier's law,law, 331
331
elastic Fourier's
Fourier's law law ofof heat
heat conduction,
conduction, 12 12
bar,
bar, 21 21 Fredholm
Fredholm alternative,
alternative, 45,45, 241
241
elliptic regularity, 492
elliptic free
free nodes,
nodes, 379 379
energy inner
energy inner product,
product, 182,379
182, 379 function,
function, 31, 31, 35
35
energy norm,
energy norm, 182182 function space, 33
function space, 33
Euclidean n-space
Euclidean fundamental frequency, 497
fundamental frequency, 497
complex, 395 of aa circular
of circular drum,
drum, 375375
Euler's formula,
Euler's formula, 83,83, 394 of aa vibrating
of vibrating string,
string, 294
294
Euler's method,
Euler's method, 117,117, 261,
261, 310 fundamental theorem
fundamental theorem of of calculus,
calculus, 11,
11,
backward, 118,
backward, 118, 263,
263, 310
310 23, 101, 327,
23, 101, 327, 330,
330, 338
338
improved, 104
even extension,
even extension, 418 418 Galerkin method,
Galerkin method, 173,
173, 180,
180, 193,
193, 258,
258,
even function,
even function, 415415 269, 275, 307, 378
269,275,307,378
and the
and the full
full Fourier
Fourier series,
series, 417
417 Gaussian elimination,
Gaussian elimination, 43,
43, 77,
77, 196
196
existence, 238
existence, 238 for aa banded
for banded matrix,
matrix, 476
476
of solutions
of solutions to to aa linear
linear system,
system, 3838 operation count,
operation count, 53,474,486
53, 474, 486
explicit method, 118 pseudo-code, 474
pseudo-code, 474
610
610 Index
Index

general solution
general solution inner product,
inner product, 56,56, 59,
59, 181
181
of the
of the wave
wave equation,
equation, 286
286 complex, 395
complex, 395
2
generalized eigenvalue
generalized eigenvalue problem,
problem, 495
495 complex L
complex L2, , 396
generalized function,
generalized function, 126,
126, 205
205 energy, 182
energy, 182
Gibbs's phenomenon,
Gibbs's phenomenon, 148, 148, 344,
344, 435,
435, inner product
inner space, 56
product space, 56
443 integral
integral
gold, 250
gold,250 area, 329
area, 329
Gram-Schmidt procedure,
Gram-Schmidt 74,183,
procedure, 74, 457
183,457 iterated, 329
iterated, 329
gravitational constant,
gravitational constant, 27
27 line, 329
line, 329
gravity, 27
gravity, 27 surface, 329
surface, 329
Green's first
Green's first identity,
identity, 337,
337, 339,
339, 377
377 volume, 328
volume, 328
Green's function,
Green's function, 77,
77, 123
123 integrating an
integrating an ODE, ODE, 102 102
causal, 124
causal,124 integrating factor,
integrating factor, 87 87
for BVP, 203
for aa BVP, 203 integration by
integration parts, 138,
by parts, 138, 178,
178, 307,
307,
for PDE, 127
for aa PDE, 127 336, 489
336,489
for the
for heat equation,
the heat equation, 279
279 interpolant
interpolant
grid, 101,
grid, 101, 188
188 piecewise linear,
piecewise linear, 492
492
irregular, 111
irregular, 111 inverse
inverse
guitar, 296, 318
guitar, 296, 318 of aa differential
of differential operator,
operator, 207
207
inverse discrete
inverse discrete Fourier
Fourier transform,
transform, 404
404
Hl,m
HI, 490 iron, 19,
iron, 19, 214, 217, 222,
214, 217, 222, 228,
228, 230,
230, 236,
236,
#<J,490
HJ,490 244, 260,
244, 260, 264,
264, 281,
281, 323,
323, 459
459
heat capacity,
heat capacity, 10,10, 19
19 iterated integral, 329
iterated integral, 329
heat equation,
heat equation, 9, 9, 12,
12, 245,
245, 275
275 iterative method
iterative method
and finite
and elements, 257
finite elements, 257 for solving
for solving aa linear
linear system,
system, 478
478
in bar, 333
in aa bar, 333
in three
in three dimensions,
dimensions, 332
332
Jacobian matrix,
Jacobian matrix, 471
471
in two
in two dimensions,
dimensions, 334
334
jump discontinuity, 427
jump discontinuity, 427
inhomogeneous, 13
inhomogeneous, 13
weak form, 257
weak form, 257
heat flow,
heat flow, 99 Kelvin, 19
Kelvin, 19
steady-state, 14
steady-state, 14 kinetic energy, 174
kinetic energy, 174
heat flux, 11,
heat flux, 11, 12,
12, 330
330
homogeneous
homogeneous L22 ,,445
L 445
versus heterogeneous,
versus heterogeneous, 13 13 L22 inner
L inner product,
product, 59,
59, 60
60
Hooke's law,
Hooke's law, 22
22 Laplace's equation, 336,
Laplace's equation, 336, 352
352
Hookean, 22
Hookean,22 Laplacian, 332
Laplacian, 332
in polar
in coordinates, 362
polar coordinates, 362
IBVP, 14
IBVP, 14 lead, 255
lead,255
implicit method,
implicit method, 118
118 Lebesgue
Lebesgue
initial condition,
initial condition, 14,
14, 80,
80, 246,
246, 258
258 integral, 446
integral, 446
for the
for the wave equation, 24
wave equation, 24 measure, 446
measure, 446
initial value
initial value problem
problem line integral,
line integral, 329
329
for the
for the wave
wave equation,
equation, 285
285 line search,
line search, 480
480
initial-boundary value
initial-boundary value problem,
problem, 14,274
14, 274 linear combination,
linear combination, 5050
for the
for the wave equation, 291
wave equation, 291 linear interpolant,
linear interpolant, 309
309
Index 611
611

linear operator, 31,


linear operator, 31, 132
132 multiplicity
definition,
definition, 35
35 of eigenvalues,
of eigenvalues, 69
69
linear operator
linear equation, 31,
operator equation, 31, 36
36
linear system
linear system natural frequency
natural frequency
algebraic, 31,
algebraic, 31, 131
131 of
of aa string,
string, 293,
293, 318
318
linearly independent,
linearly independent, 52 52 Neumann
Neumann condition,
condition, 13
13
load vector,
load vector, 183
183 Newton,
Newton, 26 26
computation
computation of, of, 467
467 Newton's
Newton's law of cooling
law of cooling
for
for aa two-dimensional
two-dimensional problem,
problem, 378
378 and boundary conditions, 20
and boundary conditions, 20
Lotka-Volterra
Lotka-Volterra predator-prey
predator-prey model,
model, and
and the
the heat equation, 20
heat equation, 20
108
108 Newton's second law
Newton's second law of
of motion, 23, 29
motion, 23, 29
LU
LU factorization,
factorization, 474
474 nodal values,
nodal values, 190
190
nodes, 188
nodes, 188
Maple, 147
Maple, 147 nondimensionalization, 217
nondimensionalization, 217
mapping,
mapping, 3131 norm, 59
norm, 59
mass
mass matrix,
matrix, 258,
258, 265,
265, 275,
275, 308,
308, 495
495 energy,
energy, 182
182
Mathematica, 147
Mathematica, 147 normal derivative,
derivative, 332
MATLAB,
MATLAB, 147 147 normal equations,
equations, 62
matrix,
matrix, 31
31 normal modes
normal modes
banded, 386,
386,475475 of
of aa vibrating string, 293
vibrating string, 293
dense, 186
dense, 186 null space,
null space, 134
134
Gram, 62
Gram, 62 of
of aa matrix,
matrix, 42
42
identity, 46
identity, 46 trivial,
trivial, 42
42
inverse, 46
inverse, 46
invertible, 46
invertible, 46 odd extension,
odd extension, 417
417
mass, 308, 495
mass, 308, 495 odd function,
odd function, 415415
nonsingular,
nonsingular, 46, 46, 53
53 and the
and the full
full Fourier series, 417
Fourier series, 417
singular, 270
singular, 270 ODE,
ODE, 1
sparse, 173,
sparse, 173, 186,
186, 189,
189, 386, 473
473 operator, 31,
operator, 31, 35
35
stiffness, 308,
stiffness, 308, 495
495 derivative, 36
symmetric, 71,
symmetric, 71, 72, 139, 272
72, 139, 272 differential, 36, 132
differential, 36, 132
tridiagonal, 188,
tridiagonal, 188, 192,
192, 272
272 linear, 132
linear, 132
mean
mean value
value theorem,
theorem, 431431 matrix, 35,
matrix, 35, 131
131
mean-square,
mean-square, 60 60 nonlinear, 35,
nonlinear, 35, 49
49
mean-square convergence, 149,
mean-square convergence, 149, 419 wave, 285
wave, 285
of Fourier
of series, 448
Fourier series, 448 order
order
measurable
measurable of aa differential
of differential equation,
equation, 22
function, 446
function, of aa numerical
of method, 103
numerical method, 103
set, 446
set, 446 orthogonal
orthogonal basis,
basis, 183
183
mesh,
mesh, 188
188 orthogonality
orthogonality
method
method ofof lines
lines of functions,
of functions, 6060
for the
for the heat equation, 260
heat equation, 260 of vectors,
of vectors, 56
56
middle C, 295,
middle C, 295, 305
305
modulus
modulus partial derivative
partial derivative
of elasticity,
of elasticity, 22
22 weak,
weak, 490
490
Young's, 22 partial pivoting, 473
612 Index

Pascal,
Pascal, 2626 over an
over an arbitrary
arbitrary triangle,
triangle, 471
471
PDE,
PDE, 11 three-point
three-point rule for aa triangle,
rule for triangle, 470
470
periodic convolution, 425 quarter-wave cosine series,
series, 153
periodic
periodic extension,
extension, 425425 quarter-wave sine functions,
quarter-wave sine functions, 162162
periodic
periodic function,
function, 415
415 quarter-wave sine series,
quarter-wave sine series, 151
151
piano, 298
piece wise continuous,
piecewise continuous, 427 range
range
piecewise linear of aa function,
of function, 31
31
approximation, 492
approximation, 492 of aa linear
of linear operator,
operator, 38
38
basis function, 190,
basis function, 190, 257,
257, 269
269 resonance,
resonance, 295,
295, 305,
305, 318,
318, 319
319
function, 188,
188, 189 Riemann
Riemann integral,
integral, 446
446
interpolant, 259
interpolant, Riesz
Riesz representation
representation theorem,
theorem, 490
490
piecewise polynomials, 173 RK4,
RK4, 107
107
piecewise smooth,
smooth, 427 Runge-Kutta method, 106
plate Runge-Kutta-Fehlberg
Runge-Kutta-Fehlberg method,
method, 111
111
iron,
iron, 459
459
pointwise convergence, 419 scalar, 32, 395
scalar, 32, 395
of
of aa complex
complex Fourier series, 429
Fourier series, 429 semidiscretization
semidiscretization in in space,
space, 260
260
of
of aa Fourier
Fourier cosine
cosine series,
series, 433
433 separation
separation of of variables, 225, 340,
variables, 225, 340, 348
348
of
of aa Fourier sine series,
Fourier sine series, 433
433 in polar
in coordinates, 362
polar coordinates, 362
of
of aa full
full Fourier
Fourier series,
series, 432
432 shifting
shifting the
the data, 164, 197,
data, 164, 197, 222,
222, 299,
299,
Poisson's equation, 335
Poisson's equation, 335 321
321
on
on aa disk,
disk, 373
373 sifting
sifting property,
property, 205
205
polar coordinates, 360 silver,
silver, 255
255
potential energy, 173
potential energy, 173 Simpson's rule,
Simpson's rule, 106
106
elastic, 173,
elastic, 173, 174
174 sink
sink
external, 175
external, 175 heat,
heat, 1212
gravitational, 175 snapshot
snapshot
minimal, 177 temperature,
temperature, 215
power series solution
power series solution Sobolev space, 490
of
of Bessel's equation, 364
Bessel's equation, 364 source
preconditioned
preconditioned conjugate
conjugate gradients,
gradients, 486
486 heat, 12
pressure, 25 span,
span, 5252
prime factorization sparse matrix,
sparse 186, 386,
matrix, 186, 386, 473
473
and the FFT,
and the FFT, 407
407 sparsity
sparsity pattern,
pattern, 386,
386, 477
477
principle of virtual work, 177 specific heat, 10, 330
product rule, 337 and temperature,
temperature, 19
programming finitefinite elements, 386 spectral
spectral method, 156 156
projection theorem, 182, 397 for aa BVP,
for BVP, 144
144
Pythagorean
Pythagorean theorem,
theorem, 55, 55, 428
428 for aa system
for system ofof ODEs,
ODEs, 96 96
for solving
for solving aa linear system, 167
linear system, 167
quadrature, 102
quadrature, 102 speed
choosing
choosing aa rule,
rule, 470
470 of a wave,
wave, 288
general formula,
formula, 469 square wave,
wave, 433
one-point Gauss rule, 469 stability,
stability, 118
one-point
one-point rule on aa triangle, 470
470 of aa time-stepping scheme, 310
of
Index 613
613

stability region,
stability region, 116
116 transient behavior, 117, 118
transient
stainless steel, 26 transpose
standing wave,
standing wave, 294 and the
and the dot
dot product,
product, 7171
steady-state
steady-state of aa matrix,
of matrix, 45
45
and Neumann conditions, 237 trapezoidal rule,
trapezoidal rule, 402
temperature, 225
temperature, 225 triangulation, 379,
triangulation, 379, 382
382
steel, 302
steel, 302 data structure
data structure for,
for, 467
467
steepest descent
steepest description of,
description of, 462
462
algorithm, 481
algorithm, 481 tridiagonal matrix,
tridiagonal matrix, 188,
188, 192
192
direction, 481
direction, 481 interpolation, 406
trigonometric interpolation,
stiff differential
stiff differential equation,
equation, 117,
117, 260
260
stiff system of ODEs, 117
stiff convergence, 420
uniform convergence,
stiffness
stiffness of a complex Fourier series, 439
of aa bar,
of bar, 22
22 of aa Fourier
of Fourier cosine
cosine series,
series, 441
441
stiffness matrix, 183, 191, 258, 265,
stiffness of aa Fourier
of Fourier sine
sine series,
series, 441
441
275, 308,
275, 308, 495
495 of aa full
of full Fourier
Fourier series,
series, 441
441
algorithm for
algorithm for computing,
computing, 466
466 of continuous
of continuous functions,
functions, 443
443
computation of,
computation of, 465
465 of cosine
of cosine series,
series, 441
441
for a two-dimensional problem, 378 uniqueness, 238
null space,
null space, 271
271 of solutions
of solutions toto aa linear
linear system,
system, 42
42
singular, 270,
singular, 270, 275
275 impulse, 126
unit impulse,
strain, 22
strain, 22 unit normal
unit vector, 328
normal vector, 328
string
string unit point source, 126
131, 160
elastic, 27, 131,
sagging,
sagging, 3030 variation of parameters,
variation of parameters, 98
98
strong form
strong form variational form
of a BVP, 177, 267 of a BVP, 173
of
subspace, 34 vector, 31, 32
R n , 39
of Rn, function as,
function as, 132
132
superposition, 287
superposition, 287 vector field, 329
principle of, 47, 85 vector space,
vector space, 132
132
support
support complex, 395
of aa function,
of function, 192,
192, 382
382 definition, 32
definition, 32
surface integral, 329 vibrating string, 292
vibrating string, 292
symmetry virtual work, 177
and eigenvalues, 72 volume integral, 328
of aa differential
of differential operator,
operator, 137
137
of aa matrix, 71
of 71 wave
wave
of the
of the Laplacian,
Laplacian, 337337 left-moving, 288
left-moving, 288
right-moving, 288
right-moving, 288
temperature gradient,
temperature gradient, 12 wave equation,
wave equation, 23,
23, 173
173
test
test function, 178, 267,
function, 178, 267, 306
306 acoustic, 334
acoustic, 334
thermal conductivity, 12,
thermal conductivity, 12, 19,
19, 330
330 d'Alembert's solution, 288
time step, 101
101 general solution,
general solution, 286
286
time-stepping,
time-stepping, 101
101 homogeneous, 293
trace theorem, 490 in an
in an infinite
infinite domain,
domain, 285
285
614
614 Index

in three dimensions, 334


in two
in two dimensions,
dimensions, 334
334
inhomogeneous, 296
on aa disk,
on disk, 374
374
on a square, 346
with a point source, 318318
wave operator,
wave operator, 285285
wave speed,
wave speed, 288,
288, 296
296
weak derivative,
weak derivative, 490
490
weak form
weak form
ofaBVP,
of a BVP, 173, 177,177,266,
266, 267
of aa BVP in
of in two
two or
or three dimen-
dimen-
sions, 378
sions,
the wave equation, 307
of the

Young's modulus, 22
APPLICATION FOR
APPLICATION FOR COMPLIMENTARY
COMPLIMENTARY STUDENT
STUDENT MEMBERSHIP
MEMBERSHIP
For buyers
For buyers of
of Gockenbach's PDEs book
Gockenbach's PDEs book IMIsIGldol21
siaiTL,

5'am... SOCIETY for
SOCIETY for INDUSTRIAL
INDUSTRIAL and
and APPLIED
APPLIED MATHEMATICS
MATHEMATICS

(Please print
(Please print or
or type)
type)
First Initial

Name
Name

Mailing
Mailing
Address
Address

City // State
City State // Zip/postal
Zip/postal code
code
Country // E-mail
Country E-mail Address
Address I

Phone
Phone

University/College
University/College
Name and
Name and Address
Address

Phone and
Phone and E-mail
E-mail Listing
Listing in
in II hereby
hereby authorize
authorize my
my telephone
telephone number
number and
and e-mail
e-mail address
address to
to be
be listed
listed in
in the
the Combined
Combined Membership
Membership
Combined Membership
Combined Membership List
List List of
List of AMS,
AMS, AMATYC,
AMATYC, A AWM, MAA, and
WM, MAA, and SIAM.
SIAM. Yes
Yes _ _ No No _ _ InitialInitial _ _ _ __

Type of
Type of School
School Type of
Type of Work
Work Desired
Desired upon
upon Graduation
Graduation Salutation
Salutation
check one
check one check
check one
one
oQ University
University oQ Research
Research a Mr
OMr
oQ College
College (4-year)
(4-year) oQ Adm.lMgmt.
Adm./Mgmt. a MS.
OMs.
oa College
College (2-year)
(2-year) oQ Teaching
Teaching oa Other
Other_ __
oQ Consulting
Consulting
oa Other
Other
Gender
Gender
oa Male
Male 0Q Female
Female

Education
Education Institution
Institution Major I/ Degree
Major Degree I/ Year
Year
(Highest degree
(Highest degree attained)
attained)

Primary
Primary 0Q I.1. Linear
Linear algebra
algebra and
and matrix
matrix theory.
theory. oQ 11. Control
II. Control and
and systems
systems theory
theory oQ 21. Chemical
21. Chemical kinetics,
kinetics, combustion
combustion
Professional Interests
Professional Interests 0Q 2.2. Real
Real and
andcomplex
complex analysis
analysis including optimal
including optimal control.
control. theory, thermodynamics,
theory, thermodynamics, and
and heat
heat
transfer.
(Check no
(Check no more
more than
than 3)
3) including approx;mation
incIud;ng approximation theory.
theory, Q 12.
D 12. Optimization
Optimization theory
theory and
and transfer.
integral transforms
integral transforms (including
(including mathematical programming
mathematical programming oQ 22. Biological
22. Biological sciences
sciences including
including
Fourier series
Fourier series and
and wavelets),
wavelets), including discrete
including discrete and
and numerical
numerical biophysics, biomedical
biophysics, biomedical engineering,
engineering,
integral equations,
integral equations, asymptotic
asymptotic optimization and
optimization and linear
linear and
and and biomathematics.
and biomathematics.
methods, and
methods, and special
special functions.
functions. nonlinear programming.
nonlinear programming. oQ 23. Environmental
23. Environmental sciences.
sciences.
oQ 3. Ordinary
3. Ordinary differential
differential equations
equations oQ Communication theory
13. Communication
13. theory including
including oQ 24. Economics.
24. Economics.
including dynamical
including dynamical systems.
systems. information theory
information theory and
and coding
coding
oQ 25. Social
25. Social sciences.
sciences.
oQ 4. Partial
4. Partial differential
differential equations
equations theory.
theory.
including inverse
including inverse problems.
problems. oQ 14. Applied
14. Applied geometry
geometry including
including
oQ 26. Functional
26. Functional analysis
analysis and
and operator
operator
equations, and
equations, and integral
integral and
and
oQ 5. Discrete
5. Discrete mathematics
mathematics and
and graph
graph computer-aided design
computer-aided design and
and related
related
functional equations.
functional equations.
theory including
theory includingcombinatorics,
combinatorics, robotics.
robotics.
oQ 27.
27. Management
Management sciences
sciences including
including
combinatorial optimization,
combinatorial optimization, and
and oQ 15. Image
15. Image processing
processing including
including
operations research.
operations research.
networks.
networks. computer graphics,
computer graphics, computer
computer vision,
vision,
related robotics,
robotics, and
and tomography.
tomography.
oQ 28. Applied
28. Applied mathematics
mathematics education
education
oQ 6. Numerical
6. Numericalanalysis
analysis (theory).
(theory). related
(K-12, undergraduate
(K-12, undergraduate curriculum,
curriculum,
oQ 7. Computational
7. Computational mathematics
mathematics o'-' Classical mechanics
'6- Classical
16. mechanics of of solids
solids
graduate study
graduate study and
and modeling
modeling
including scientific
including scientific computing.
computing, including elasticity,
including elasticity, structures
structures and
and
courses).
courses).
parallel computing,
parallel computing, andand algorithm
algorithm vibrations, and
vibrations, and constitutive
constitutivemodels.
models.
development.
development. oQ 17. Fluid
17. Fluid mechanics
mechanics including
including
oQ 29. Astronomy,
29. Astronomy, planetary
planetary sciences,
sciences,
and optics.
and optics.
oQ 8. Computer
8. Computerscience
science including
including turbulence, aeronautics,
turbulence, aeronautics, and
and
computer architecture,
computer architecture, computer
computer multiphase flow.
multiphase flow. oQ 30. Simulation
30. Simulation and
and modeling.
modeling.
hardware, computational
hardware, computational oQ 18. Quantum
18. Quantum physics.
physics, statistical
statistical oQ 31. Materials
31. Materials science,
science, polymer
polymer physics,
physics,
complexity, applied
complexity. applied logic,
logic, database,
database, mechanics, and
mechanics, and relativity.
relativity. and structure
and structure of
of matter.
matter.
symbolic computation.
symbolic computation. oQ 19 Geophysical
19. Geophysical sciences
sciences including
including oQ 32. Electromagnetic
32. Electromagnetic theory,
theory,
oQ 9.9. Applied
Applied probability
probability including
including reservoir modeling,
reservoir modeling, seismic
seismic semiconductors, and
semiconductors, and circuit
circuit
stochastic processes,
stochastic processes, queueing
queueing exploration, and
exploration, and petroleum
petroleum analysis.
analysis.
theory, and
theory, and signal
signal processing.
processing. engineering.
engineering. oa Other
Other _ _ _ _ _ _ _ _ __
oQ 10.Statistics
10. Statistics including
includingdata
data analysis
analysis oQ 20. Atmospheric
20. Atmospheric and
and oceanographic
oceanographic
and time
and time series
series analysis.
analysis. sciences.
sciences.

Please Complete
Please Complete Reverse
Reverse
SIAM Complimentary Student Membership Benefits: This This is
is aa I5-month
15-month membership
membership beginning October
beginning October
of
of the
the current
current year.
year. Complimentary
Complimentary student
student members
members will
will receive
receive all
all issues
issues ofof SIAM News (available
SIAM News (available in
in print
print only)
only) and
and
SIAM Review (electronic
SIAM Review access only).
(electronic access only). Student are entitled
Student are entitled to
to 30%
30% off list price
off list price on
on all SIAM books.
all SIAM books.
SIAM Activity Groups: Students
Students may
may receive
receive one
one Activity
Activity Group
Group membership free; additional
membership free; additional Activity
Activity Group
Group
memberships
memberships are
are $10.00
$10.00 each.
each.
Computational
Computational Science & Engineering
Science & Engineering _ _ Control
Control and Systems Theory
and Systems Theory _ _
Discrete
Discrete Mathematics
Mathematics Dynamical Systems _ _ Geosciences
Geosciences
Geometric Design _ _ Imaging Science
Science _ _ Life Sciences
Life Sciences
Linear Algebra _ _ Optimization _ _ Supercomputing _ _
Supercomputing
Orthogonal
Orthogonal Polynomials
Polynomials and Special Functions
and Special Functions _ _

Total
Total paid
paid for
for additional
additional Activity
Activity Groups:
Groups: $
$,_ _ __

SIAM Journal Subscriptions: Student Student members


members may
may purchase one each
purchase one each of
of not
not more
more than
than four SIAM journals
four SIAM journals in in
print,
print, for
for their
their personal
personal use only, at
use only, at member
member discount
discount prices.
prices. A A package
package ofof the
the complete library of
complete library of SIAM
SIAM journals,
journals,
via electronic access
via electronic access only,
only, is also available.
is also available. A A list
list of current SIAM
of current SIAM journals
journals cancan be found at
be found at
http://epubs.siam.orgl. Please
http://epubs.siam.org/. Please contact
contact Customer Service for
Customer Service for the current discounted
the current discounted prices.
prices. Contact
Contact information i s listed
information is listed
below.
below. Please
Please list
list name
name of
of journal
journal and
and amount paid.
amount paid.

$_--

$_--

$_--

$_--

Total paid for additional


additional subscriptions: $,$_
_ _ __

Total payment
payment to SIAM:
SIAM: $_
$_ _ __

All Students are


All Students are required
required to
to complete
complete the Student Status
the Student Status Certification
Certification information:
information:

CERTIFICATION
CERTIFICATION

Name of College or University _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __


NameofCollegeorUniversity

Name of Department Chair _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __


NameofDepartmentChair

APPLICATION
APPLICATION FOR MEMBERSHIP
FOR MEMBERSHIP

IIapplyformembershipinSIAM:
apply for membership in SIAM: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Signature
Signature Date
Date

Please
Please mail
mail this completed form
this completed form (original
(original only;
only; photocopies
photocopies will
will not
not be
be accepted)
accepted) and
and your
your payment for additional
payment for additional
Activity
Activity Groups
Groups or
or journal
journal subscriptions
subscriptions to:
to:

SIAM
SIAM
Customer Service
Customer Service
3600
3600 University City Science
University City Science Center,
Center, Philadelphia,
Philadelphia, PA 19104-2688
PA 19104-2688
For
For further
further information,
information, please
please contact
contact SIAM
SIAM Customer Service:
Customer Service:
Toll free
Toll free in
in USA
USA and Canada: 800-447-SIAM
and Canada: 800-447-SIAM'• Worldwide: 215-382-9800 • Fax:
Worldwide: 215-382-9800· 215-386-7999
Fax: 215-386-7999
service@siam.org
service@siam.org·• www.siam.org

You might also like