Partial Differential Equations Analytical and Numerical Methods
Partial Differential Equations Analytical and Numerical Methods
com
Partial Differential
Equations
www.unifreebooks.com
Partial Differential
Equations
Analytical and Numerical Methods
Mark S. Gockenbach
Michigan Technological University
Houghton, Michigan
siam
Society for Industrial and Applied Mathematics
Philadelphia
www.unifreebooks.com
1098765432 1
All rights reserved. Printed in the United States of America. No part of this book may
be reproduced, stored, or transmitted in any manner without the written permission of
the publisher. For information, write to the Society for Industrial and Applied
Mathematics, 3600 University City Science Center, Philadelphia, PA 19104-2688.
0-89871-518-0
Contents
Foreword xiii
Preface xvii
VII
www.unifreebooks.com
viii Contents
Contents ix
7 Waves 285
7.1 The homogeneous wave equation without boundaries 285
7.2 Fourier series methods for the wave equation 291
7.2.1 Fourier series solutions of the homogeneous wave
equation 293
www.unifreebooks.com
x Contents
Contents xi
xii Contents
10.3 An outline of the convergence theory for finite element methods 488
10.3.1 The Sobolev H1( space 489
10.3.2 Best approximation in the energy norm 491
10.3.3 Approximation by piecewise polynomials 491
10.3.4 Elliptic regularity and L2 estimates 492
10.4 Finite element methods for eigenvalue problems 494
10.5 Suggestions for further reading 499
Bibliography 603
Index 607
www.unifreebooks.com
Foreword
xiii
www.unifreebooks.com
xiv Foreword
Until recently this sea change in theory and practice has enjoyed little reflec-
tion in the teaching of differential equations in undergraduate classes at universities.
While mention of computer techniques began showing up in textbooks published or
revised in the 1970s, the view of the subject propounded by most textbooks would
have seemed conventional in the 1920s. The book you hold in your hands, along
with a few others published in recent years, notably Gil Strang's Introduction to
Applied Mathematics, represents a new approach to differential equations at the
undergraduate level. It presents computation as an integral part of the study of
differential equations. It is not so much that computational exercises must be part
of the syllabus—this text can be used entirely without any student involvement in
computation at all, though a class taught that way would miss a great deal of the
possible impact. Rather, the concepts underlying the analysis and implementation
of numerical methods assume an importance equal to that of solutions in terms of
series and elementary functions. In fact, many of these concepts are equally effec-
tive in explaining the workings of the series expansion methods as well. This book
devotes considerable effort to these "classical" methods, side by side with mod-
ern numerical approaches (particularly the finite element method). The "classical"
series expansions provide both a means to understand the essential nature of the
physical phenomena modeled by the equations, and effective numerical methods for
those special problems to which they apply.
Perhaps surprisingly, some of the most important concepts in the modern
viewpoint on differential equations are algebraic: the ideas of vector, vector space,
and other components of linear algebra are central, even in the development of
more conventional parts of the subject such as series solutions. The present book
uses linear algebra as a unifying principle in both theory and computation, just as
working scientists, engineers, and mathematicians do.
This book, along with a number of others like it published in recent years, dif-
fers from earlier undergraduate textbooks on differential equations in yet another
respect. Especially in the middle years of the last century, mathematical instruc-
tion in American universities tended to relegate the physical context for differential
equations and other topics to the background. The "big three" differential equa-
tions of science and engineering—the Laplace, wave, and heat equations, to which
the bulk of this book is devoted—have appeared in many texts with at most a cur-
sory nod to their physical origins and meaning in applications. In part, this trend
reflected the development of the theory of differential equations as a self-contained
arena of mathematical research. This development has been extremely fruitful, and
indeed is the source of many of the new ideas which underlie the effectiveness of
modern numerical methods. However, it has also led to generations of textbooks
which present differential equations as a self-contained subject, at most distantly
related to the other intellectual disciplines in which differential equations play a
crucial role. The present text, in contrast, includes physically and mathematically
substantial derivations of each differential equation, often in several contexts, along
with examples and homework problems which illustrate how differential equations
really arise in science and engineering.
With the exception of a part of the chapter on ordinary differential equations
which begins the book, this text concerns itself exclusively with linear problems—
www.unifreebooks.com
Foreword xv
that is, problems for which sums and scalar multiples of solutions are also solutions,
if not of the same problem then of a closely related problem. It might be argued
that such a conventional choice is odd in a book which otherwise breaks with recent
tradition in several important respects. Many if not most of the important problems
which concern contemporary scientists and engineers are nonlinear. For example, al-
most all problems involving fluid flow and chemical reaction are nonlinear, and these
phenomena and their simulation and analysis are of central concern to many mod-
ern engineering disciplines. While series solutions are restricted to linear problems,
numerical methods are in principle just as applicable to nonlinear as to linear prob-
lems (though many technical challenges arise in making them work well). However,
it is also true that not only are the classic linear differential equations—Laplace,
wave, and heat—models for generic classes of physical phenomena (potentials, wave
motion, and diffusion) to which many nonlinear processes belong, but also their so-
lutions are the building blocks of methods for solving complex, nonlinear problems.
Therefore the choice to concentrate on these linear problems seems very natural for
a first course in differential equations.
The computational viewpoint in the theory and application of differential
equations is very important to a large segment of SIAM membership, and indeed
SIAM members have been in the forefront of its development. It is therefore gratify-
ing that SIAM should play a leading role in bringing this important part of modern
applied mathematics into the classroom by making the present volume available.
William W. Symes
Rice University
www.unifreebooks.com
Preface
Linear algebra
Both linear and nonlinear differential equations occur as models of physical phenom-
ena of great importance in science and engineering. However, most introductory
xvii
www.unifreebooks.com
xviii Preface
texts focus on linear equations, and mine is no exception. There are several reasons
why this should be so. The study of PDEs is difficult, and it makes sense to begin
with the simpler linear equations before moving on to the more difficult nonlinear
equations. Moreover, linear equations are much better understood. Finally, much
of what is known about nonlinear differential equations depends on the analysis
of linear differential equations, so this material is prerequisite for moving on to
nonlinear equations.
Because we focus on linear equations, linear algebra is extremely useful. In-
deed, no discussion of Fourier series or finite element methods can be complete
unless it puts the results in the proper linear algebraic framework. For example,
both methods produce the best approximate solution from certain finite-dimensional
subspaces, and the projection theorem is therefore central to both techniques. Sym-
metry is another key feature exploited by both methods.
While many texts de-emphasize the linear algebraic nature of the concepts
and solution techniques, I have chosen to make it explicit. This decision, I believe,
leads to a more cohesive course and a better preparation for future study. However,
it presents certain challenges. Linear algebra does not seem to receive the attention
it deserves in many engineering and science programs, and so many students will
take a course based on this text without the "prerequisites." Therefore, I present
a fairly complete overview of the necessary material in Chapter 3, Essential Linear
Algebra.
Both faculty previewing this text and students taking a course from it will
soon realize that there is too much material in Chapter 3 to cover thoroughly in the
couple of weeks it can reasonably occupy in a semester course. From experience I
know that conscientious students dislike moving so quickly through material that
they cannot master it. However, one of the keys to using this text is to avoid getting
bogged down in Chapter 3. Students should try to get from it the "big picture"
and two essential ideas:
• How to solve a matrix-vector equation when the matrix is symmetric and its
eigenvalues and eigenvectors are known (Section 3.5).
Having at least begun to grasp these ideas, students should move on to Chapter 4
even if some details are not clear. The concepts from linear algebra will become
much clearer as they are used throughout the remainder of the text.1
I have taught this course several times using this approach, and, although
students often find it frustrating at the beginning, the results seem to be good.
Realistic problems
The subject of PDEs is easier to grasp if one keeps in mind certain standard phys-
ical experiments modeled by the equations under consideration. I have used these
1
Also, Chapter 4 is much easier going than Chapter 3, a welcome contrast!
www.unifreebooks.com
Preface xix
models to introduce the equations and to aid in understanding their solutions. The
models also show, of course, that the subject of PDEs is worth studying!
To make the applications as meaningful as possible, I have included many
examples and exercises posed in terms of meaningful experiments with realistic
physical parameters.
Software
There exists powerful mathematical software that can be used to illuminate the
material presented in this book. Computer software is useful for at least three
reasons:
• It removes the need to do tedious computations that are necessary to compute
solutions. Just as a calculator eliminates the need to use a table and inter-
polation to compute a logarithm, a computer algebra system can eliminate
the need to perform integration by parts several times in order to evaluate an
integral. With the more mechanical obstacles removed, there is more time to
focus on concepts.
• Problems that simply cannot be solved (in a reasonable time) by hand can of-
ten be done with the assistance of a computer. This allows for more interesting
assignments.
Outline
The core material in this text is found in Chapters 5-7, which present Fourier series
and finite element techniques for the three most important differential equations of
mathematical physics: Laplace's equation, the heat equation, and the wave equa-
tion. Since the concepts themselves are hard enough, these chapters are restricted
to problems in a single spatial dimension.
Several introductory chapters set the stage for this core. Chapter 1 briefly
defines the basic terminology and notation that will be used in the text. Chapter
www.unifreebooks.com
xx Preface
2 then derives the standard differential equations in one spatial dimension, in the
process explaining the meaning of various physical parameters that appear in the
equations and introducing the associated boundary conditions and initial conditions.
Chapter 3, which has already been discussed above, presents the concepts and
techniques from linear algebra that will be used in subsequent chapters. I want
to reiterate that perhaps the most important key to using this text effectively is
to move through Chapter 3 expeditiously. The rudimentary understanding that
students obtain in going through Chapter 3 will grow as the concepts are used in
the rest of the book.
Chapter 4 presents the background material on ordinary differential equations
that is needed in later chapters. This chapter is much easier than the previous
one, because much of the material is review for many students. Only the last two
sections, on numerical methods and stiff systems, are likely to be new. Although
the chapter is entitled Essential Ordinary Differential Equations, Section 4.3 is not
formally prerequisite for the rest of the book. I included this material to give
students a foundation for understanding stiff systems of ODEs (particularly, the
stiff system arising from the heat equation). Similarly, Runge-Kutta schemes and
automatic step control are not strictly needed. However, understanding a little
about variable step size methods is useful if one tries to apply an "off-the-shelf"
routine to a stiff system.
Chapter 8 extends the models and techniques developed in the first part of the
book to two spatial dimensions (with some brief discussions of three dimensions).
The last two chapters provide a more in-depth treatment of Fourier series
(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
compute Fourier series solutions of the PDEs, explains the relationships among the
various types of Fourier series, and discusses the extent to which the Fourier series
method can be extended to complicated geometries and equations with noncon-
stant coefficients. Sections 9.4-9.6 present a careful mathematical treatment of the
convergence of Fourier series, and have a different flavor from the remainder of the
book. In particular, they are less suited for an audience of science and engineering
students, and have been included as a reference for the curious student.
Chapter 10 gives some advice on implementing finite element computations,
discusses the solution of the resulting sparse linear systems, and briefly outlines
the convergence theory for finite element methods. It also shows how to use finite
elements to solve general eigenvalue problems. The tutorials on the accompany-
ing CD include programs implementing two-dimensional finite element methods, as
described in Section 10.1, in each of the supported software packages (MATLAB,
Mathematica, and Maple). The sections on sparse systems and the convergence the-
ory are both little more than outlines, pointing the students toward more advanced
concepts. Both of these topics, of course, could easily justify a dedicated semester-
long course, and I had no intention of going into detail. I hope that the material
on implementation of finite elements (in Section 10.1) will encourage some students
to experiment with two-dimensional calculations, which are already too tedious to
carry out by hand. This sort of information seems to be lacking from most books
accessible to students at this level.
www.unifreebooks.com
Preface xxi
Acknowledgments
This book began when I was visiting Rice University in 1998-1999 and taught a
course using the lecture notes of Professor William W. Symes. To satisfy my per-
sonal predilections, I rewrote the notes significantly, and for the convenience of
myself and my students, I typeset them in the form of a book, which was the first
version of this text. Although the final result bears, in some ways, little resem-
blance to Symes's original notes, I am indebted to him for the idea of recasting the
undergraduate PDE course in more modern terms. His example was the inspiration
for this project, and I benefited from his advice throughout the writing process.
I am also indebted to the students who have suffered through courses taught
from early version of this text. Many of them found errors, typographical and
otherwise, that might otherwise have found their way into print.
I would like to thank Professors Gino Biondini, Yuji Kodoma, Robert Krasny,
Yuan Lou, Fadil Santosa, and Paul Uhlig, all of whom read part or all of the text
and offered helpful suggestions.
The various physical parameters used in the examples and exercises were de-
rived (sometimes by interpolation) from tables in the CRC Handbook of Chemistry
and Physics [35].
The graphs in this book were generated with MATLAB. For MATLAB product
information, please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098 USA
Tel: 508-647-7000
Fax: 508-647-7101
E-mail: [email protected]
Web: www.mathworks.com
As mentioned above, the CD also supports the use of Mathematica and Maple. For
Mathematica product information, contact:
www.unifreebooks.com
xxii Preface
Chapter 1
classification of
differential equations
1
www.unifreebooks.com
Examples (1.3) and (1.4) are of this form (although the independent
variables are called x and t in (1.4), not x and y). Not all of an, a12,
and a22 can be zero in order for this equation to be second order.
A linear differential equation is homogeneous if the zero function is a
solution. For example, u(t) = 0 satisfies (1.1), u(x,y) = 0 satisfies (1.3),
2
In Section 3.1, we will give a more precise definition of linearity.
www.unifreebooks.com
"Equivalent to" in this context means that (1.5) and (1.6) have exactly
the same solutions: if u(t) solves one of these two equations, it solves
the other as well. When the equation is written this way, with all of
the terms involving the unknown on the left and those not involving the
unknown on the right, homogeneity is easy to recognize: the equation is
homogeneous if and only if the right-hand side is identically zero.
(b) Differential equations which are not linear are termed nonlinear. For
example,
function is a solution. However, suppose that u(t) and v(t} are nonzero
solutions, so that
Thus w does not satisfy the equation, so the equation must be nonlinear.
Both linear and nonlinear differential equations occur as models of physi-
cal phenomena of great importance in science and engineering. However,
linear differential equations are much better understood, and most of
what is known about nonlinear differential equations depends on the
analysis of linear differential equations. This book will focus almost ex-
clusively on the solution of linear differential equations.
have constant coefficients if the coefficients ra, c, and k are constants rather
than (nonconstant) functions of the independent variable. The right-hand side
f ( t ) may depend on the independent variable; it is only the quantities which
multiply the unknown function and its derivatives which must be constant,
in order for the equation to have constant coefficients. Some techniques that
are effective for constant-coefficient problems are very difficult to apply to
problems with nonconstant coefficients.
As a convention, we will explicitly write the independent variable when a coef-
ficient is a function rather than a constant. The only function in a differential
equation for which we will omit the independent variable is the unknown
function. Thus
To say that (1.8) is an identity is to say that it is satisfied for all values of the
independent variable t. Similarly, u(t) — e3t is a solution of (1.1) because this
function u satisfies
Exercises
1. Classify each of the following differential equations according to the categories
described in this chapter (ODE or PDE, linear or nonlinear, etc.):
www.unifreebooks.com
Chapter 2
In this chapter, we present several different and interesting physical processes that
can be modeled by ODEs or PDEs. For now we restrict ourselves to phenomena that
can be described (at least approximately) as occurring in a single spatial dimension:
heat flow or mechanical vibration in a long, thin bar, vibration of a string, diffusion
of chemicals in a pipe, and so forth. In Chapters 5-7, we will learn methods for
solving the resulting differential equations.
In Chapter 8, we consider similar experiments occurring in multiple spatial
dimensions.
9
www.unifreebooks.com
The fact that we do not know EQ causes no difficulty, because we are going to model
the change in the energy (and hence temperature).
Specifically, we examine the rate of change, with respect to time, of the heat
energy in the part of the bar between x and x + Ax. The total heat in [x, x + Ax]
is given by (2.2), so its rate of change is
(the constant EQ differentiates to zero). To work with this expression, we need the
following result, which allows us to move the derivative past the integral sign:
Theorem 2.1. Let F : (a,b) x [c, d\ —>• R and dF/dx be continuous, and define
(f>: (a, 6) ->• R by
That is,
If we assume that there are no internal sources or sinks of heat, the heat
contained in [x, x + Ax] can change only because heat flows through the cross-
sections at x and x + Ax. The rate at which heat flows through the cross-section
at x is called the heat flux, and is denoted q(x,t). It has units of energy per unit
area per unit time, and is a signed quantity: if heat energy is flowing in the positive
x-direction, then q is positive.
The net heat entering [x, x + Ax] at time t, through the two cross-sections, is
the last equation follows from the fundamental theorem of calculus. (See Figure
2.2.) Equating (2.3) and (2.4) yields
www.unifreebooks.com
or
Since this holds for all x and Ax, it follows that the integrand must be zero:
(The key point here is that the integral above equals zero over every small interval.
This is only possible if the integrand is itself zero. If the integrand were positive,
say, at some point in [0,^], and were continuous, then the integral over a small
interval around that point would be positive.)
Figure 2.2. The heat flux into and out of a part of the bar.
(the units of K can be determined from the units of the heat flux and those of the
temperature gradient; see Exercise 2.1.1). The negative sign is necessary so that
heat flows from hot regions to cold. Substituting Fourier's law into the differential
equation (2.5), we can eliminate q and find a PDE for u:
(We have canceled a common factor of A) Here we have assumed that K is constant,
which would be true if the bar were homogeneous. It is possible that K depends on
x (in which case p and c probably do as well); then we obtain
/(x,t) (in units of heat energy per unit time per unit volume). Then the total heat
added to [x, x + Ax] during the time interval [t, t + At] is
The time rate of change of this contribution to the total heat energy (at time t) is
The rate of change of total heat in [#, x + Ax] is now given by the sum of (2.4) and
(2.8), so we obtain, by the above reasoning, the inhomogeneous3 heat equation
(no heat flows into the left end or out of the right end). On the other hand, if
the ends of the bar are kept fixed at temperature zero4 (through perfect thermal
contact with an ice bath, for instance), we obtain
Either of these boundary conditions can be inhomogeneous (that is, have a nonzero
right-hand side), and we could, of course, have mixed conditions (one end insulated,
the other held at fixed temperature).
A boundary condition that specifies the value of the solution is called a Dirich-
let condition, while a condition that specifies the value of the derivative is called a
Neumann condition. A problem with a Dirichlet condition at one end and a Neu-
mann condition at the other is said to have mixed boundary conditions. As noted
3
The term homogeneous is used in two completely different ways in this section and throughout
the book. A material can be (physically) homogeneous, which implies that the coefficients in the
differential equations will be constants. On the other hand, a linear differential equation can be
(mathematically) homogeneous, which means that the right-hand side is zero. These two uses of
the word homogeneous are unrelated and potentially confusing, but the usage is standard and so
the reader must understand from context the sense in which the word is used.
4
Since changing u by an additive constant does not affect the differential equation, we can as
well use Celsius as the temperature scale rather than Kelvin. (See Exercise 6.)
www.unifreebooks.com
above, we will also use the terms homogeneous and inhomogeneous to refer to the
boundary conditions. The condition u(i] = 10 is called an inhomogeneous Dirichlet
condition, for example.
To completely determine the temperature as a function of time and space, we
must know the temperature distribution at some initial time to. This is an initial
rnnAH-.i.nn.'
Putting together the PDE, the boundary conditions, and the initial condition,
we obtain an initial-boundary value problem (IBVP) for the heat equation. For
example, with both ends of the bar held at fixed temperatures, we have the IBVP
In the steady-state case, any source term / must be independent of time (otherwise,
the equation could not possibly be satisfied by a function u that is independent of
time). Boundary conditions have the same meaning as in the time-dependent case,
although in the case of inhomogeneous boundary conditions, the boundary data
must be constant. On the other hand, it obviously does not make sense to impose
an initial condition on a steady-state temperature distribution.
Collecting these observations, we see that a steady-state heat flow problem
takes the form of a boundary value problem (BVP). For example, if the temperature
is fixed at the two endpoints of the bar, we have the following Dirichlet problem:
We remark that, when only one spatial dimension is taken into account, a steady-
state (or equilibrium] problem results in an ODE rather than a PDE. Moreover,
these problems, at least in their simplest form, can be solved directly by two inte-
grations. Nevertheless, we will (in Chapter 5) devote a significant amount of effort
www.unifreebooks.com
toward developing methods for solving these ODEs, since the techniques can be gen-
eralized to multiple spatial dimensions, and also form the foundation for techniques
for solving time-dependent problems.
(We changed the units of the length of the bar to centimeters, so as to be consistent
with the units of the thermal conductivity.) The differential equation implies that
d?u/dx2 is zero, so, integrating once, du/dx is constant, say
The boundary condition w(0) = 20 implies that C? = 20, and the second boundary
condition then yields
Thus
The reader should notice that the thermal conductivity of the bar does not
affect the solution in the previous example. This is because the bar is homogeneous
(that is, the thermal conductivity of the bar is constant throughout). This should
be contrasted with the next example.
Example 2.3. A metal bar of length 100 cm is manufactured so that its thermal
conductivity is given by the formula
(the units of K(X] are W/(cmK)). We will find the steady-state temperature of the
bar under the same conditions as in the previous example. That is, we will solve
www.unifreebooks.com
the BVP
The steady-state temperatures from the two previous examples are shown in
Figure 2.3, which shows that the heterogeneity of the second bar makes a small but
discernible difference in the temperature distribution. In both cases, heat energy is
flowing from the right end of the bar to the left, and the heterogeneous bar has a
higher thermal conductivity at the right end. This leads to a higher temperature
in the middle of the bar.
2.1.3 Diffusion
One of the facts that makes mathematics so useful is that different physical phe-
nomena can lead to essentially the same mathematical model. In this section we
introduce another experiment that is modeled by the heat equation. Of course, the
www.unifreebooks.com
Figure 2.3. The steady-state temperature from Example 2.2 (solid line)
and Example 2.3 (dashed curve).
meaning of the quantities appearing in the equation will be different than in the
case of heat flow.
We suppose that a certain chemical is in solution in a straight pipe having a
uniform cross-section. We assume that the pipe has length t, and we establish a
coordinate system as in the preceding section, with one end of the pipe at x = 0
and the other at x = 1. Assuming the concentration varies only in the ^-direction,
we can define u(x, t) to be the concentration, in units of mass per volume, of the
chemical at time t in the cross-section located at x. Then the total mass of the
chemical in the part of the bar between x and x + Aar (at time t) is
where A is the cross-sectional area of the pipe. The chemical will tend to diffuse
from regions of high concentration to regions of low concentration (just as heat
energy flows from hot regions to cooler regions). We will assume5 that the rate of
diffusion is proportional to the concentration gradient
5
This assumption, which is analogous to Fourier's law of heat conduction, is called Pick's law
in the diffusion setting.
www.unifreebooks.com
the meaning of this assumption is that there exists a constant6 D > 0 such that, at
time t, the chemical moves across the cross-section at x at a rate of
The units of this mass flux are mass per area per time (for example, g/cm2s). Since
the units of du/dx are mass/length4, the diffusion coefficient D must have unit of
area per time (for example, cm2/s).
With this assumption, the equation modeling diffusion is derived exactly as
was the heat equation, with a similar result. The total amount of the chemical
contained in the part of the pipe between x and x + Ax is given by (2.12), so the
rate at which this total mass is changing is
This same quantity can be computed from the fluxes at the two cross-sections at x
and x + Ax. At the left, mass is entering at a rate of
We therefore have
If the chemical is added to the interior of the pipe, this can be accounted for by a
function /(x, t), where mass is added to the part of the pipe between x and x + Ax
at a rate of
(mass per unit time—/ has units of mass per volume per time). We then obtain
the inhomogeneous diffusion equation:
6
This constant varies with temperature and pressure; see the CRC Handbook of Chemistry and
°hysics [35], page 6-179.
www.unifreebooks.com
Just as in the case of heat flow, we can consider steady-state diffusion. The
result is the ODE
with appropriate boundary conditions. Boundary conditions for the diffusion equa-
tion are explored in the exercises.
Exercises
1. Determine the units of the thermal conductivity K from (2.6).
2. In the CRC Handbook of Chemistry and Physics [35], there is a table labeled
"Heat Capacity of Selected Solids," which "gives the molar heat capacity at
constant pressure of representative metals ... as a function of temperature in
the range 200 to 600 K" ([35], page 12-190). For example, the entry for iron
is as follows:
Assume that no heat energy is added to or removed from the interior of the
bar.
(a) What is the (steady-state) temperature distribution in the bar?
(b) At what rate is heat energy flowing through the bar?
8. (a) Show that the function
(b) What values of 0 will cause u to also satisfy homogeneous Dirichlet con-
ditions at x = 0 and x = tl
9. In this exercise, we consider a boundary condition for a bar that may be more
realistic than a simple Dirichlet condition. Assume that, as usual, the side of a
bar is completely insulated and that the ends are placed in a bath maintained
at constant temperature. Assume that the heat flows out of or into the ends
in accordance with Newton's law of cooling: the heat flux is proportional to
the difference in temperature between the end of the bar and the surrounding
medium. What are the resulting boundary conditions?
10. Derive the heat equation from Newton's law of cooling (cf. the previous exer-
cise) as follows: Divide the bar into a large number n of equal pieces, each of
length Ax. Approximate the temperature in the «th piece as a function Ui(t)
(thus assuming that the temperature in each piece is constant at each point
in time). Write down a coupled system of ODEs for ui(t), u^t], • • • ,un(t)
by applying Newton's law of cooling to each piece and its nearest neighbors.
Assume that the bar is homogeneous, so that the material properties p, c, and
K are constant. Take the limit as Aa; —> 0, and show that the result is the
heat equation.
11. Suppose a chemical is diffusing in a pipe, and both ends of the pipe are sealed.
What are the appropriate boundary conditions for the diffusion equation?
What initial conditions are required? Write down a complete IBVP for the
diffusion equation under these conditions.
12. Suppose that a chemical contained in a pipe of length I has an initial concen-
tration distribution of w(or,0) = ip(x}. At time zero, the ends of the pipe are
sealed, and no mass is added to or removed from the interior of the pipe.
(a) Write down the IBVP describing the diffusion of the chemical.
(b) Show mathematically that the total mass of the chemical in the pipe is
constant. (Derive this fact from the equations rather than from common
sense.)
www.unifreebooks.com
Since the original length is Ax, the change in length of this part is
This explains the definition of the strain, the local relative change in length, as the
dimensionless quantity
As we noted above, to say that the bar is elastic is to say that the internal
restoring force of the deformed bar depends only on the strain. We now make the
further assumption that the deformations are small, and therefore that the internal
forces are, to good approximation, proportional to the strain. This is equivalent to
assuming that the bar is linearly elastic, or Hookean.
Under the assumption that the bar is Hookean, we can write an expression for
the total internal force acting on P, the part of the bar between x and x + Ax. We
denote by k(x) the stiffness of the bar at x, that is, the constant of proportionality
in Hooke's law, with units of force per unit area. (In the engineering literature, k is
called the Young's modulus or the modulus of elasticity. Values for various materials
can be found in reference books, such as [35].) Then the total internal force is
The first term in this expression is the force exerted by the part of the bar below
x + Ax on P, and the second term is the force exerted by the part of the bar above
x on P. The signs are correct; if the strains are positive, then the bar has been
stretched, and the internal restoring force is pulling down (the positive direction)
at x + Ax and up at x.
www.unifreebooks.com
We now assume that all external forces are lumped into a body force given by a force
density / (which has units of force per unit volume). Then the total external force
on P (at time t] is
Newton's second law states that the total force acting on P must equal the
mass of P times its acceleration. This law takes the form
where p(x) is the density of the bar at x (in units of mass per volume). We can
rewrite this as
(note how the factor of A cancels). This integral must be zero for every x e [0,£)
and every Ax > 0. It follows (by the reasoning introduced on page 12) that the
integrand must be identically zero; this gives the equation
This is the same equation that governs steady-state heat flow! Just as in the case
of steady-state heat flow, the resulting BVPs can be solved with two integrations
(see Examples 2.2 and 2.3).
www.unifreebooks.com
If the bar is homogeneous, so that p and k are constants, these last two
differential equations can be written as
and
respectively.
on the surface at x = t. Since there is nothing to balance this force, we must have
or simply
Since the wave equation involves the second time derivative of u, we need two
initial conditions to uniquely determine the motion of the bar: the initial displace-
ment and the initial velocity. We thus arrive at the following IBVP for the wave
equation:
www.unifreebooks.com
There are several other sets of boundary conditions that might be of interest
in connection with the differential equations (2.14) or (2.15). For example, if both
ends of the bar are fixed (not allowed to move), we have the boundary conditions
(recall that u is the displacement, so the condition u(i] = 0 indicates that the cross-
section at the end of the bar corresponding to x = t does not move from its original
position). If both ends of the bar are free, the corresponding boundary conditions
are
and the quantity F/A has units of pressure (force per unit area). For mathematical
purposes, it is simplest to write an inhomogeneous boundary condition of this type
as
Exercises
1. Consider the following experiment: A bar is hanging with the top end fixed
at x = 0, and the bar is stretched by a pressure (force per unit area) p
applied uniformly to the free (bottom) end. What are the boundary conditions
describing this situation?
2. Suppose that a homogeneous bar (that is, a bar with constant stiffness A;) of
length i has its top end fixed at x = 0, and the bar is stretched to a length
1+A£. by a pressure p applied to the bottom end. Take down to be the positive
x-direction.
(a) Explain why p and A^ have the same sign.
(b) Explain why p and \t cannot both be chosen arbitrarily (even subject
to the requirement that they have the same sign). Give both physical
and mathematical reasons.
(c) Suppose p is specified. Find A^ (in terms of p, k, and i).
(d) Suppose Al is specified. Find p (in terms of A£, fc, and t}.
3. A certain type of stainless steel has a stiffness of 195 GPa. (A Pascal (Pa) is
the standard unit of pressure, or force per unit area. The Pascal is a derived
unit: one Pascal equals one Newton per square meter. The Newton is the
standard unit of force: one Newton equals one kilogram meter per second-
squared. Finally, GPa is short for gigaPascal, or 109 Pascals.)
(a) Explain in words (including units) what a stiffness of 195 GPa means.
(b) Suppose a pressure of 1 GPa is applied to the end of a homogeneous,
circular cylindrical bar of this stainless steel, and that the other end is
fixed. If the original length of the bar is 1 m and its radius is 1 cm, what
will its length be, in the equilibrium state, after the pressure has been
applied?
(c) Verify the result of 3b by formulating and solving the boundary value
problem representing this experiment.
4. Consider a circular cylindrical bar, of length 1 m and radius 1 cm, made from
an aluminum alloy with stiffness 70 GPa. If the top end of the bar (x = 0)
is fixed, what total force must be applied to the other end (x = 1) to stretch
the bar to a length of 1.01 m?
5. Write the wave equation for the bar of Exercise 3, given that the density of
the stainless steel is 7.9 g/cm3. (Warning: Use consistent units!) What must
the units of the forcing function / be? Verify that the two terms on the left
side of the differential equation have the same units as /.
6. Suppose that a i m bar of the stainless steel described in Exercise 3, with
density 7.9g/cm3, is supported at the bottom but free at the top. Let the
cross-sectional area of the bar be O.lm 2 . A weight of 1000 kg is placed on
www.unifreebooks.com
top of the bar, exerting pressure on it via gravity (the gravitational constant
is 9.8m/s 2 ).
The purpose of this problem is to compute and compare the effects on the bar
of the mass 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 means that
gravity induces a body force), but ignore the mass on the top (so the
top end of the bar is free—the boundary condition is a homogeneous
Neumann condition).
ii. Next, take into account the mass on the top, but ignore the effect of
the weight of the bar (so there is no body force).
iii. Last, take both effects into account.
(b) Explain why the third BVP can be solved by solving the first two and
adding the results.
(c) Solve the first two BVPs by direct integration. Compare the two dis-
placements. Which is more significant, the weight of the bar or the mass
on top?
(d) How would the situation change if the cross-sectional area of the bar were
changed to 0.2m 2 ?
7. (a) Show that the function
(b) What values of 9 will cause u to also satisfy homogeneous Dirichlet con-
ditions at x = 0 and x = tl
reference configuration moves to (x, u(x, t)) at time t. We are thus postulating that
the motion of the string is entirely in the transverse direction (this is one of the
severe assumptions that we mentioned in the previous paragraph). Granted this
assumption, we now derive the differential equation satisfied by the displacement u.
Since, by assumption, a string does not resist bending, the internal restoring
force of the string under tension is tangent to the string itself at every point. We
will denote the magnitude of this restoring force by T(x, t). In Figure 2.5, we display
a part of the deformed string, corresponding to the part of the string between x
and x + Ax in the reference configuration, together with the internal forces at 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 must decompose the internal force
into its horizontal and vertical components.
We write n = n(x, t) for the force at the left endpoint and 9 for the angle this
force vector makes with the horizontal. We then have
with
a reasonable approximation is
www.unifreebooks.com
We then obtain
Similarly, the force at the right end of the part of the string under consideration is
is (an approximation to) the horizontal component of the total force on the part of
the string, and
thus the tension is constant throughout the string at each point in time. We will
assume that the length of the string never changes much from its length in the
reference configuration (which is £), and therefore that it makes sense to assume
that T is independent of t as well, that is, that T is a constant. Applying Newton's
second law to the vertical component yields
where p is the density of the string (in units of mass per length). Since this holds
for all x and Ax sufficiently small, we obtain the differential equation
where c2 = T/p. The significance of the parameter c will become clear in Chapter
7.
In the case that an external body force is applied to the string (in the vertical
direction), the equation becomes
www.unifreebooks.com
One can also imagine that one or both ends of the string are allowed to move freely
in the vertical direction (perhaps an end of the string slides along a frictionless
pole). In this case, the appropriate boundary condition is a homogeneous Neumann
condition (see Exercise 5).
Exercises
1. What units must f ( x , t ) have in (2.19)?
2. What are the units of the tension T in the derivation of the wave equation for
the string?
3. What are the units of the parameter c in (2.18)?
4. Suppose the only external force applied to the string is the force due to gravity.
What form does (2.19) take in this case? (Let g be the acceleration due to
gravity, and take g to be constant.)
5. Explain why a homogeneous Neumann condition models an end of the string
that is allowed to move freely in the vertical direction.
6. Suppose that an elastic string is fixed at both ends, as in this section, and it
sags under the influence of an external force f ( x ) (f is constant with respect
to time). What differential equation and side conditions does the equilibrium
displacement of the string satisfy? Assume that / is given in units of force
per length.
Chapter 3
Before we discuss methods for solving differential equations, we review the funda-
mental facts about systems of linear (algebraic) equations.
31
www.unifreebooks.com
We write f : X -> Y ("f maps X into Y") to indicate that f is a function from X
toY.
The reader should recognize the difference between the range of a function
/ : X —)• Y and the set Y (which is sometimes called the co-domain of /). The set
Y merely identifies the type of the output values /(#); for example, if Y = R, then
every /(#) is a real number. On the other hand, the range of / is the set of elements
of Y that are actually attained by /. As a simple example, consider / : R —> R
defined by f ( x ) = x2. The co-domain of / is R, but the range of / consists of the
set of nonnegative numbers:
In many cases, it is quite difficult to determine the range of a function. The co-
domain, on the other hand, must be specified as part of the definition of the function.
A set is just a collection of objects (elements); most useful sets have operations
defined on their elements. The most important sets used in this book sue vector
spaces.
Definition 3.2. A vector space V is a set on which two operations are defined,
addition (if u, v 6 V, then u + v e V) and scalar multiplication (if u € V and a
is a scalar, then cm € V). The elements of the vector space are called vectors. (In
this book, the scalars are usually real numbers, and we assume this unless otherwise
stated. Occasionally we use the set of complex numbers as the scalars. Vectors will
always be denoted by lower case boldface letters.)
The two operations must satisfy the following algebraic properties:
For every vector space considered in this book, the verification of these vector
space properties is straightforward and will be taken for granted.
Example 3.3. The most common example of a vector space is (real) Euclidean
n-space:
www.unifreebooks.com
Example 3.4. Apart from Euclidean n-space, the most common vector spaces are
function spaces —vector spaces in which the vectors are functions. Functions (with
common domains) can be added together and multiplied by scalars, and the algebraic
properties of a vector space are easily verified. Therefore, when defining a function
space, one must only check that any desired properties of the functions are preserved
by addition and scalar multiplication. Here are some important examples:
1. C[a, b] is defined to be the set of all continuous, real-valued functions defined
on the interval [a, b]. The sum of two continuous functions is also continuous,
as is any scalar multiple of a continuous function. Therefore, C[a, b] is a
vector space.
2. Cl [a, b] is defined to be the set of all real-valued, continuously differentiate
functions defined on the interval [a,b]. (A function is continuously differen-
tiate if its derivative exists and is continuous.) The sum of two continuously
differentiate functions is also continuously differentiate, and the same is
true for a scalar multiple of a continuously differentiate function. Therefore,
Cl [a, b] is a vector space.
3. For any positive integer k, Ck[a, b] is the space of real-valued functions defined
on [a, b] that have k continuous derivatives.
Many vector spaces that are encountered in practice are subspaces of othe
vector spaces.
Definition 3.5. Let V be a vector space, and suppose W is a subset ofV with the
following properties:
1. The zero vector belongs to W.
2. Every linear combination of vectors in W is also in W. That is, if x, y G W
and a, /? G R, then
www.unifreebooks.com
A subspace of a vector space is a vector space in its own right, as the reader
can verify by checking that all the properties of a vector space are satisfied for a
subspace.
The set C^ja, b] is a subset of C2[a,b], and this subset contains the zero function
(hopefully this is obvious to the reader). Also, if u,v e 6%[a, b], a,j3 G R, and
w = au + f3v, then
w e C2[a, b] (since C2[a,b] is a vector space); and
w(a) — au(a) + /3v(a) = a-Q + 0-Q = Q, and similarly w(b) = 0.
Therefore, w € Cp[a,b], which shows that C^a,b] is a subspace of C2[a,b].
The set C^[a,b] is also a subset of C2[a,b], and it can be shown to be a subspace.
Clearly the zero function belongs to Cj^[a,b]. If u,v € C^[a,b], a,/? £ R, and
w = au + fiv, then
Similarly,
The previous two examples will be used throughout this book. The letters
"D" and "N" stand for Dirichlet and Neumann, respectively (see Section 2.1, for
example).
The following provides an important nonexample of a subspace.
where 7 and 8 are nonzero real numbers. Then, although W is a subset of C2[a,b],
it is not a subspace. For example, the zero function does not belong to W, since
it does not satisfy the boundary conditions. Also, if u, v e W and a, J3 € R, then,
with w = au + flv, we have
www.unifreebooks.com
Thus w(a) does not equal 7, except in the special case that a + (3 = I. Similarly,
w(b) does not satisfy the boundary condition at the right endpoint.
Definition 3.9. Suppose X and Y are vector spaces, and f : X —>• Y is an operator
(or function,7 or mapping) with domain X and range Y. Then f is linear if and
only if
This condition can be expressed as the following two conditions, which together are
equivalent to (3.1):
Example 3.11. To show that the sine function is not linear, we observe that
while
7
The word "operator" is preferred over "function" in this context, because the vector spaces
themselves are often spaces of functions.
www.unifreebooks.com
since
In general, the kth derivative operator defines a linear operator mapping Ck[a, b
into C[a,b]. This is why linearity is so important in the study of differential equa-
tions.
(the reader should notice how the Dirichlet boundary conditions are enforced by
the definition of the domain of LD). This and similar examples will be discussed
throughout this chapter and in detail in Section 5.1.
Exercises
1. In elementary algebra and calculus courses, it is often said that / : R ->• R
is linear if and only if it has the form f(x) — ax + &, where a and b are
constants. Does this agree with Definition 3.9? If not, what is the form of a
linear function / : R —^ R?
2. Show explicitly that / : R -> R defined by f(x) = ^/x is not linear.
3. For each of the following sets of functions, determine whether or not it is a
vector space. (Define addition and scalar multiplication in the obvious way.)
If it is not, state what property of a vector space fails to hold.
www.unifreebooks.com
is a linear operator.
(Write
3.2.1 Existence
The existence of a solution to Ax = b is equivalent to the condition that b lie in
72-(A), the range of A. This begs the question: What sort of a set is 7£(A)?
If y, w 6 72.(A), say y = Ax, w = Az, then
This shows that ay + /3w € 72-(A). Moreover, the zero vector lies in 7£(A), since
AO = 0. It follows that 7£(A) is a subspace of Rn (possibly the entire space R n —
every vector space is a subspace of itself). Every linear operator has this property;
if f : X -» Y is a linear operator, then 72-(f) is a subspace of the vector space Y.
(The same need not be true for a nonlinear operator.)
www.unifreebooks.com
This calculation shows that every vector b in the range of A is a multiple of the
vector
Therefore, the subspace 'R-(A) is a line in the plane R2 (see Figure 3.1). Since this
line is a very small part of R 2 , the system Ax = b fails to have a solution for
almost every b e R 2 .
Example 3.14. We define the linear differential operator LN '• C^[Q,f\ -» (7[0,£j
by
www.unifreebooks.com
where
(as defined in the previous section). If f e 7£(Ljv), then there exists u € C^[0,l]
such that LNU = f. It follows that
This shows that f e C[0,^] cannot belong to the range of LN unless it satisfies the
special condition
In fact, 7£(Ljv) i-s the set of all such f , as the reader is asked to show in Exercise
12.
Because the space C[0,^] is infinite-dimensional, we cannot visualize this situ-
ation (as we could in the previous example). However, the reader should appreciate
that most functions f e C[0, £] do not satisfy the condition (3.3). (For example,
www.unifreebooks.com
the reader is invited to write down a quadratic polynomial at random and call it
/(#). Chances are that this quadratic will not satisfy (3.3).) Therefore, the range
of LN is only a small part of C[0,i], and for most choices of f G C[0, £], there is
no solution to L^u = f .
where
The reader should recall from the previous section that the BVP
can be written as the linear operator equation Lj^u — f . We will show that 'R-(A) is
all of C[Q,(] by showing that we can solve Lpu = f for every f £ C[0,£]. The idea
is to integrate twice and use the boundary conditions to determine the constants of
intearation. We have
so
We write
where
The reader should notice the use of the dummy variables of integration s and z.
The first boundary condition, w(0) = 0, implies that Ci = 0. We then have
and so
The reader can verify directly (by differentiating twice) that this formula defines a
solution of the BVP represented by LDU = f . This shows that we can solve LDU = f
for any f e C[0,4 and so K(LD) = C[Q,l}.
3.2.2 Uniqueness
The linearity of a matrix operator A implies that nonuniqueness of solutions to
Ax = b, if it occurs, has a special structure. Suppose x and z in Rn are both
solutions to Ax = b (i.e. Ax = b and Az = b both hold). Then
and so
Since x + aw is different for each different choice of the real number a, this shows
that the equation has infinitely many solutions. Moreover, it easily follows that the
set of all solutions to Ax = b is, in this case,
Once again, the same properties hold for any linear operator equation.
where x% and x± can take on any value. Setting #3 = s and #4 = t, every vector of
the form
8
We assume that the reader is familiar with Gaussian elimination, the standard row reduction
algorithm for solving Ax = b. For a review, see any introductory text on linear algebra, such as
the text by Lay [34].
www.unifreebooks.com
Example 3.17. We compute the null space of the operator LN defined in Example
3.14- If LNU = 0, then u satisfies the BVP
The differential equation implies that u(x] = C\x + C% for some constants C\
and C^- The two boundary conditions each lead to the conclusion that C\ = 0;
however, the constant C% can have any value and both the differential equation
and the two boundary conditions will be satisfied. This shows that every constant
function u(x) = C<z satisfies LNU = 0. That is, the null space of LN is the space of
constant functions.
Since the null space of LTV is not trivial, we know from the above discussion
that the operator equation L^u = f cannot have a unique solution—if there is one
solution, there must in fact be infinitely many. However, since the null space is the
set of constant functions, all solutions to L^u = f differ by a constant.
Example 3.18. The null space of the operator Lp defined in Example 3.15 is
trivial. To see this, the reader should note that the differential equation
again implies that u(x] = C\x + C%; however, now the boundary conditions w(0) =
u(l) — 0 force C\ = C^ = 0. Therefore, the only solution of LDU = 0 is the zero
function.
Since the null space of LD is trivial, we see that LDU = f has at most one
solution for any right-hand side /.
www.unifreebooks.com
or, equivalently,
We will discuss the dot product and its significance in Section 3.4.
We will have more to say later about the condition (3.6). For now it is sufficient
to understand that, if -A/"(A) is not trivial, then Ax = b has a solution only if the
right-hand side vector b satisfies a certain compatibility condition.
Example 3.20. In Example 3.16, J\f(A) is nontrivial, and we saw directly that
Ax = b has a solution if and only ifb satisfies conditions (3.5). These conditions
can be written as
www.unifreebooks.com
where
Example 3.21. In Examples 3.14 and 3.17, we showed that A/"(L/v) is nontrivial
and that L^u = f has a solution if and only if the compatibility condition (3.3) is
satisfied. Although the Fredholm alternative, as stated in Theorem 3.19, does not
apply to this situation, an analogous statement can in fact be made. We will see
how close the analogy is when we define a "dot product" for functions (see Sections
3.4.1 and 6.2.3).
The matrix I is the n x n identity matrix; it has the property that Ix = x for all
xeRn.
If we know A"1, and we wish to solve Ax = b, we need only compute a
matrix-vector product, as the following calculation shows:
Thus, the linearity of f implies that the solution operator is also necessarily linear.
To put it another way, the solution to a linear operator equation depends linearly
on the right-hand side of the equation. In the context of differential equations, this
property is usually called the principle of superposition.
For many linear differential equations, we cannot find an explicit formula for
the solution that makes this linear dependence obvious. Even in those cases, we
know from the above argument that the solution depends linearly on the right-hand
side.
Exercises
1. Let
6. Let D : Cl[a,b] —»• C[a, b] be the derivative operator. What is the null space
of Dl
7. Let L : C2[a, b] —» C[a, b] be the second derivative operator. What is the null
space of L?
and
(a) Show that f (x) = b has exactly two solutions. (Hint: A graph is useful.)
(b) Show that the only solution to f(x) = 0 is x = 0. (Yet, as Part lOa
shows, the solution to f (x) = b is not unique.)
This example illustrates that the properties of linear systems do not necessar-
ily carry over to nonlinear systems.
11. Let D : Cl[a, b] -> C[a,b] be the differentiation operator:
The reader should write out a specific example if this is not clear (see Exercise
1). The quantities £i,#2, • • • ixn are scalars and YI, V2,...., vn are vectors; an ex-
pression such as XiVi + #2V2 + cldots + xnvn is called a linear combination of the
vectors YI , v 2 , . . . , vn because the vectors are combined using the linear operations
of addition and scalar multiplication.
When A £ R n x n is nonsingular, each b £ Rn can be written in a unique way
as a linear combination of the columns of A (that is, the equation Ax = b has a
unique solution). The following definition is related.
Definition 3.23. Let V be a vector space, and suppose v i , V 2 , . . .,v n are vectors
in V with the property that each v 6 V can be written in a unique way as a lin-
ear combination of (YI, v 2 , . . . , vn}. Then {vi, V 2 , . . . , v n ) is called a basis of V.
Moreover, we say that n is the dimension of V.
A vector space can have many different bases, but it can be shown that each
contains the same number of vectors, so the concept of dimension is well-defined.
We now present several examples of bases.
Example 3.24. The standard basis for Rn is (ei,e2,... ,en}; where every entry
of GJ is zero except the jth, which is one. Then we obviously have, for any x 6 R n ,
and it is not hard to see that this representation is unique. For example, for x £ R3;
It may not be obvious to the reader why one would want to use this basis instead of
the much simpler basis {61,62,63}. However, it is easy to check that
www.unifreebooks.com
and this property makes the basis {vi,V2,vs} almost as easy to use as {61,62,63}.
We explore this topic in the next section.
Example 3.26. The set Pn is the vector space of all polynomials of degree n or
less (see Exercise 3.1.3). The standard basis is {l,x,x2,... ,x n }. To see that this
is indeed a basis, we first note that every polynomial p € Pn can be written as a
linear combination of 1, x, x 2 , . . . , xn:
(this is just the definition of polynomial of degree n). Showing that this representa-
tion is unique is a little subtle. If we also had
for every x. However, a nonzero polynomial of degree n can have at most n roots,
so it must be the case that (CQ — do) 4- (GI — di)x + • • • + (cn — dn)xn is the zero
polynomial. That is, CQ — do, ci = d i , . . . , cn = dn must hold.
(the advantage of this basis will be discussed in Example 3.39 in the next section). To
show that this is indeed a basis, we must show that, given any p(x] — CQ+cix+C2X2,
there is a unique choice of the scalars ao,ai,fl2 such that
The reader can easily verify that this system has a unique solution, regardless of the
values 0/co,ci,C2.
holds. From this property, the properties of a basis can be verified (see Exercise 5).
There are two essential properties of a basis {vi, v 2 ,...,v n } of a vector space
V. First, every vector in V can be represented as a linear combination of the basis
vectors. Second, this representation is unique. The following two definitions provide
concise ways to express these two properties.
Definition 3.29. Let V be a vector space, and suppose {YI, v 2 , . . . , vn} is a col-
lection of vectors in V. The span of {YI, v 2 , . . . , vn} is the set of all linear combi-
nations of these vectors:
It can be shown that the uniqueness part of the definition of a basis is equiva-
lent to the linear independence of the basis vectors. Therefore, a basis for a vector
space is a linearly independent spanning set.
A third quality of a basis is the number of vectors in it—the dimension of the
vector space. It can be shown that any two of these properties imply the third.
That is, if V has dimension n, then any two of the following statements about
{vi, v 2 , . . . , v fc } imply the third:
www.unifreebooks.com
Thus if {vi, v 2 , . . . , Vfc} is known to satisfy two of the above properties, then it is a
basis for V.
Before leaving the topic of basis, we wish to remind the reader of the fact
indicated in the opening paragraphs of this section, which is so fundamental that
we express it formally as a theorem.
Thus, when A is nonsingular, its columns form a basis for R n , and solving
Ax = b is equivalent to finding the weights that express b as a linear combination
of this basis. This fact answers the following important question.9 Suppose we
have a basis YI, v 2 , . . . , vn for Rn and a vector b G Rn. Then, of course, b is a
linear combination of the basis vectors. How do we find the weights in this linear
combination? How expensive is it to do so (that is, how much work is required)?
To find the scalars #1, #2, • • • , xn in the equation
we define10
and solve
(the lower-order terms are not very significant when n is large). We usually express
this saying that the operation count is
Exercises
so that the (i, j)-entry of A is (vj)j. Compute both (Ax)j and (#iVi +
x2V2 + 1- xnvn)i, and verify that they are equal.
2. Is
a basis for R3? (Hint: As explained in the last paragraphs of this section, the
three given vectors form a basis for Rn if and only if Ax = b has a unique
solution for every b 6 R n , where A is the 3 x 3 matrix whose columns are the
three given vectors.)
3. Is
a basis for R3? (See the hint for the previous exercise.)
4. Show that
is a basis for P%, the space of polynomials of degree 2 or less. (Hint: Verify
directly that the definition holds.)
5. Show that {L1? L 2 , L3}, defined in Example 3.28, is a basis for P2- (Hint: Use
(3.9) to show that
www.unifreebooks.com
where 9 is the angle between the two vectors (see Figure 3.2).
From elementary Euclidean geometry, we know that, if x and y are perpen-
dicular, then
(the Pythagorean theorem). Using the dot product, we can give a purely algebraic
proof of the Pythagorean theorem. By definition,
www.unifreebooks.com
It should be easy to check that these properties hold for the ordinary dot
product on Euclidean n-space.
Given an inner product space (a vector space with an inner product), we define
orthogonality just as in Euclidean space: two vectors are orthogonal if and only if
their dot product is zero. It can then be shown that the Pythagorean theorem holds
(see Exercise 3).
www.unifreebooks.com
An orthogonal basis for an inner product space V is a basis {vi, v 2 ,..., vn}
with the property that
(that is, every vector in the basis is orthogonal to every other vector in the basis).
We now demonstrate the first special property of an orthogonal basis. Suppose
{vi, v 2 , . . . , vn} is an orthogonal basis for an inner product space V and x is any
vector in V. Then there exist scalars ai, 0:2, • • • , an such that
To deduce the value of Q:J, we take the inner product of both sides of (3.10) with
Vi:
The last step follows from the fact that every inner product (v^, YJ) vanishes except
(vj,Vj). We then obtain
and so
If n is large, this is much less costly than the O(2n 3 /3) operations required for a
nonorthogonal basis. We also remark that if the basis is orthonormal—each basis
vector is normalized to have length one—then (3.11) simplifies to
does not converge to any value as N —>• oo, but a simple modification induces
convergence. We replace the ordinary dot product by the following scaled dot
product, for which we introduce a new notation:
www.unifreebooks.com
Just as the dot product defines a norm on Euclidean n-space (\\x\\ = ^/x • x], so the
inner product (3.13) defines a norm for functions:
For completeness, we give the definition of norm. Norms measure the size or magni-
tude of vectors, and the definition is intended to describe abstractly the properties
that any reasonable notion of size ought to have.
For Euclidean vectors in the plane, the triangle inequality expresses the fact
that one side of a triangle cannot be longer than the sum of the other two sides.
The inner product defined by (3.13) is the so-called L2 inner product.11 Two
functions in C[a, b] are said to be orthogonal if (/,#) = 0. This condition does
not have a direct geometric meaning, as the analogous condition does for Euclidean
vectors in R2 or R3, but, as we argued above, orthogonality is still important
algebraically.
When we measure norm in the L2 sense, we say that functions / and g are
close (for example, that g is a good approximation to /) if
is small. This does not mean that (/(#) - g(x})2 is small for every x € [a, b]
((f(x) —g(x))2 can be large in places, as long as this difference is large only over very
small intervals), but rather it implies that (f(x) — g(x)}2 is small on the average over
the interval [a, 6]. For this reason, we often -use the term "mean-square" in referring
to the L2 norm (for example, we might say "# is close to / in the mean-square
sense"}.
we have
These two functions differ by less than 4% in the mean-square sense (cf. Figure
3.4).
11
The "L" refers to the French mathematician Lebesgue, and the "2" to the exponent in the
formula for the L2 norm of a function. The symbol L2 is read "L-two."
www.unifreebooks.com
Theorem 3.36. Let V be a vector space with inner product (-,-), let W be a
finite-dimensional subspace o f V , and letv^V.
where
Proof. We will prove the second conclusion first. Suppose that u e W, and z is any
other vector in W. Then, since W is closed under addition and scalar multiplication,
we have that u + tz € W for all real numbers t. On the other hand, every other
vector w in W can be written as u + tz for some z £ W and some t € R (just take
z — w — u and t = 1). Therefore, u € W is closest to v if and only if
or to
which simplifies to
It can be shown that G is nonsingular (see Exercise 6), so the unique best approx-
imation to v from W is given by (3.22), where x solves Gx = b.
If the basis is orthogonal, then (wj, w;) = 0 unless j = i. In this case, G is
the diagonal matrix with diagonal entries
that is, to
(xi,yi) = (0.10,1.7805),
(z 2 ,!fe) = (0.30,2.2285),
(z 3 ,2/ 3 ) = (0.40,2.3941),
(0:4,2/4) = (0.75,3.2226),
(a*,2/5) -(0.90,3.5697)
have been collected in the laboratory, and there is a theoretical reason to believe
that yi = axi + b ought to hold for some choices of a, b 6 R. Of course, due to
measurement error, this relationship is unlikely to hold exactly for any choice of a
and b, but we would like to find a and b that come as close as possible to satisfying
it. If we define
then one way to pose this problem is to choose a and b so that ax + be is as close
as possible to y in the Euclidean norm. That is, we find the best approximation to
y from W = span{x, e).
The Gram matrix is
The resulting linear model is displayed, together with the original data, in Figure
3.5.
Figure 3.5. The data from Example 3.37 and the approximate linear re-
lationship.
It is easy to verify that the normal equations for the problem of finding the best
approximation to f from p2 are (in matrix-vector form)
Ga = b,
where
Since
The exponential function and the quadratic approximation are graphed in Figure
3.6.
Example 3.39. An orthonormal basis for p2 (on the interval [0,1]J is {^1,^25^3};
where
www.unifreebooks.com
Figure 3.6. The function f(x) — ex and the best quadratic approximation
y — Pi(x) (see Example 3.38).
The best approximation p^ to ex (which was calculated in the previous exercise) can
be computed by the formula
The concept of best approximation is central in this book, since the two main
solution techniques we discuss, Fourier series and finite elements, both produce a
best approximation to the true solution of a BVP.
Exercises
1. (a) Show that the basis {vi,v 2 ,V3} from Example 3.33 is an orthonormal
basis for R3.
(b) Express the vector
4. Use the results of this section to show that any orthonormal set containing
n vectors in Rn is a basis for R n . (Hint: Since the dimension of Rn is n, it
suffices to show either that the orthogonal set spans Rn or that it is linearly
independent. Linear independence is probably easier.)
5. Let W be a subspace of an inner product space V and let {wi, w 2 , . . . , w n }
be a basis for W. Show that, for y e V,
holds.
6. Let {w1; w 2 , . . . , w n } be a linearly independent set in an inner product space
y, and define G e R n x n by
X y
1.0000 2.0087
1.2500 2.4907
1.4000 2.8363
1.5000 2.9706
1.9000 3.9092
2.1000 4.1932
2.2500 4.5057
2.6000 5.2533
2.9000 5.8030
www.unifreebooks.com
Find the relationship y = mx + c that best fits these data. Plot the data and
the best fit line.
X y
1.0000 1.2475
1.2500 1.6366
1.4000 1.9823
1.5000 2.2243
1.9000 3.4766
2.1000 4.2301
2.2500 4.8478
2.6000 6.5129
2.9000 8.2331
Find the relationship y = c^x2 +C\X + CQ that best fits these data. If possible,
plot the data and the best fit parabola.
9. Using the orthonormal basis {^1,^2,^3} for P% given in Example 3.39, find
the quadratic polynomial p(x] that best approximates g(x) — sin (TTX), in the
mean-square sense, over the interval [0,1]. Produce a graph of g and the
quadratic approximation.
10. (a) Verify that (<7i, #2) #3}, defined in Example 3.39, is an orthonormal basis
for P2 on the interval [0,1].
(b) Using this orthonormal basis, find the best approximation to f ( x ) = ex
(on the interval [0,1]) in the mean-square sense, and verify that the same
result is obtained as in Example 3.38.
As we discuss below, the scalar A may be complex even if A has only real entries;
if A is complex, then x must have complex entries.
www.unifreebooks.com
This last condition is possible if and only if AI — A is a singular matrix; that is, if
and only if
Then
12
We assume that the reader is familiar with the elementary properties of determinants (such as
the computation of determinants of small matrices). The most important of these is that a matrix
is singular if and only if its determinant is zero. Any introductory text on linear algebra, such as
[34], can be consulted for details.
www.unifreebooks.com
Then
where i = ^f—^..
Then
and a straightforward calculation shows that the solution space (the eigenspace) is
Thus, in spite of the fact that the eigenvalue has multiplicity 3, there is only one
linearly independent eigenvector corresponding to the eigenvalue.
The fact that the matrix in the previous example has only one eigenvector for
an eigenvalue of multiplicity 3 is significant. It means that there is not a basis of
R3 consisting of eigenvectors of A.
www.unifreebooks.com
When we allow for complex scalars and vectors with complex entries, we must
modify the dot product. If x, y 6 C n , then we define
The second vector in a dot product must thus be conjugated; this is necessary so
that x-x will be real, allowing the norm to be defined. We will use the same notation
for the dot product whether the vectors are in Rn or C n . The complex dot product
has the following properties, which form the definition of an inner product on a
complex vector space:
1. x • x > 0 for all x 6 C n , and x • x = 0 if and only if x = 0.
2. x • y = y • x for all x, y 6 C n .
www.unifreebooks.com
Proof. Suppose Ax = Ax, x / 0, where for the moment we do not exclude the
possibility that A and x might be complex. Then
and
Prom this point on, we will only discuss eigenvalues and eigenvectors for real
symmetric matrices. According to the last theorem, then, we will not need to use
complex numbers or vectors.
Proof. We have
But
and
Therefore
We can verify by observation that the eigenvectors for X = 0 are orthogonal to the
eigenvector for A = 1.
The proof of this theorem is rather involved and does not generalize to differ-
ential operators (as do the proofs given above). We therefore relegate it to Appendix
A.
If n is an eigenvalue of multiplicity k, as in the previous theorem, then we can
choose the k linearly independent eigenvectors corresponding to // to be orthonor-
mal.13 We thus obtain the following corollary.
Since b can have only one expansion in terms of the basis {ui,... ,un}, we must
have
that is,
13
It is always possible to replace any linearly independent set with an orthonormal set spanning
the same subspace. The technique for doing this is called the Gram-Schmidt procedure; it is
explained in elementary linear algebra texts such as [34].
14
This method is not normally taught in elementary linear algebra courses or books, because it
is more difficult to find the eigenvalues and eigenvectors of A than to just solve Ax = b by other
means.
www.unifreebooks.com
We see that all of the eigenvalues of A must be nonzero in order to apply this
method, which is only sensible: if 0 is an eigenvalue of A, then A is singular and
Ax = b either has no solution or has infinitely many solutions.
If we already have the eigenvalues and eigenvectors of A, then this method for
solving Ax = b is simpler and less expensive than the usual method of Gaussian
elimination.
Exercises
1. Let
Use the spectral theorem to show that A is positive definite if and only if all
of the eigenvalues of A are positive.
(a) For each j = 1,2,..., n, define the discrete sine wave s^ of frequency j
by
(c) The discrete sine waves are orthogonal (since they are the eigenvectors
of a symmetric matrix corresponding to distinct eigenvalues) and thus
form an orthogonal basis for R n . Moreover, it can be shown that every
s(^ has the same norm:
Chapter 4
Jsseiitial ordinary
differential equations
We define
79
www.unifreebooks.com
Then we have
The same technique will convert any scalar equation to a first-order system.
If the unknown is u and the equation is order m, we define
and the last equation will be the original ODE (expressed in the new variables). If
the original scalar equation is linear, then the resulting system will also be linear,
and it can be written in matrix-vector form if desired.
An mth-order ODE typically has infinitely many solutions; in fact, an mth-
order linear ODE has an m-dimensional subspace of solutions. To narrow down
a unique solution, m auxiliary conditions are required. When the independent
variable is time, the auxiliary conditions are initial conditions:
These initial conditions translate immediately into initial conditions for the new
unknowns x\, x%,..., xm:
We define
We then have
Exercises
1. Write the ODE
Here mi and m^ are constants, and j\ and /2 are real-valued functions of four
variables.
so we will present a simple method for computing its general solution. The method
is based on the following idea: When faced with a differential equation, one can
sometimes guess the general form of the solution and, by substituting this general
form into the equation, determine the specific form.
In this case, we assume that the solution of (4.4) is of the form
since the exponential is never zero, this equation holds if and only if
This quadratic is called the characteristic polynomial of the ODE (4.4), and its roots
are called the characteristic roots of the ODE.
The characteristic roots are given by the quadratic formula:
1. The characteristic roots are real and unequal (i.e. 62 — 4ac > 0). In
this case, since the equation is linear, any linear combination of erit and er2t
is also a solution of (4.4). In fact, as we now show, every solution of (4.4) can
be written as
www.unifreebooks.com
for some choice of ci, C2- In fact, we will show that, for any &i, £2, the initial
value problem (IVP)
that is,
and so
are also solutions of (4.4) in this case. We will write the general solution in
the form
As in the previous case, we can show that every solution of (4.4) can be written
in this form (see Exercise 2).
3. The characteristic polynomial has a single (repeated) real root (i.e.
b2 — 4ac = 0). In this case the root is r — —b/(2a). We cannot write the
general solution with the single solution ert; by an inspired guess, we try tert
as the second solution. Indeed, with u(t) — tert, we have
and so
This shows that tert is also a solution of (4.4), and we write the general
solution in this case as
where r = —b/(2a). Once again, it is not hard to show that every solution of
(4.4) can be written in this form (see Exercise 3).
Therefore this example falls in case 2 above, and the general solution of the ODE is
ri = r2 = 1,
and
and add the solutions to get the solution to (4.7). It is straightforward to apply the
techniques of Section 4.2.1 to derive the solution of (4.8):
The derivation of this formula is outlined in Exercise 4.3.10 of the next section.
For now, we will content ourselves with verifying that (4.11) really solves (4.9).
To verify the solution, we must differentiate W2(i), which is a bit tricky since the
independent variable appears both in the integrand and as an integration limit. To
make the computation of the derivative clear, we write
Therefore,
We then have
www.unifreebooks.com
i<t
to
(the integral can be computed using the subtraction formula for sine and simplified
using other trigonometric identities).
(We could treat the case of a nonconstant coefficient similarly; however, we have n
need to.)
The solution is based on the idea of an integrating factor: we multiply th
equation by a special function that allows us to solve by direct integration. We not
that
Therefore, we have
has solution
Exercises
1. Let 5 be the solution set of (4.4).
(a) Show that S is a subspace of C2 (R), the set of twice-continuously differ-
entiable function defined on R.
(b) Use the results of this section to show S is two-dimensional for any values
of a, 6, and c, provided only that a ^ 0.
2. Suppose (4.4) has characteristic roots /z± \i, where /i, A e R and A / 0. Show
that, for any ki, £2, there is a unique choice of ci, C2 such that the solution oi
(4.6) is
3. Suppose (4.4) has the single characteristic root r = -b/(2a). Show that, for
any fei, fo, there is a unique choice of ci,C2 such that the solution of (4.6) is
4. For each of the following IVPs, find the general solution of the ODE and use
it to solve the IVP:
www.unifreebooks.com
solves
12. Use the techniques of Section 4.2.1 to derive the solution to (4.8), and verify
that you obtain (4.10). (Hint: One way to do this is to write the general
solution of the ODE as u(t) = c\ cos (9t] + 02 sin (Ot) and then solve for c\
and C2- If you do this, you will then have to apply trigonometric 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) = ci cos (0(t - t0}) + c2 sin (0(t - t 0 ) ) . )
where
www.unifreebooks.com
This last equation states that two vectors are equal, which means that Au must
be a multiple of u (otherwise, the two vectors would point in different directions,
which is not possible if they are equal). Therefore, u must be an eigenvector of A:
We then obtain
is a solution of (4.17).
Then the eigenvalues of A are \i = 0, A2 = —1, and AS = —2, and the corresponding
eigenvectors are
15
See Section 3.5.3.
www.unifreebooks.com
namely,
Since {ui, 112,..., un} is a basis for R n , there exists a vector c G Rn such that
We also have
by construction.
It is
{ui,u 2 ,...,u n }
We have derived the solution to (4.18) in the case that A has n linearly in-
dependent eigenvectors. We remark that formula (4.19) might involve complex
numbers if A is not symmetric. However, we have a complete and satisfactory
solution in the case that A is symmetric—there are n linearly independent eigen-
vectors, the eigenvalues are guaranteed to be real, and the basis of eigenvectors can
be chosen to be orthonormal.
We now discuss the significance of solution (4.19). The interpretation is very
simple: The solution to (4.18) is the sum of n components, one in each eigendirec-
tion, and component i is
exponentioally increasing (if yi > 0);
exponentioally decreasing (if yi < 0); or
constant (if yi = 0).
www.unifreebooks.com
3. If any of the eigenvalues of A is positive, then, for most initial values XQ, the
solution x of (4.18) satisfies
The only statement which requires justification is the third. Suppose an eigenvalue
\j of A is positive, and suppose A has k linearly independent eigenvectors corre-
sponding to \j. Then, unless XQ lies in the (n — k)-dimensional subspace of Rn
spanned by the other n — k eigenvectors, the solution x of (4.18) will contain a
factor of e Aj (*~*°), guaranteeing the
Then the eigenvalues of A are AI = 1, A2 = —1, and \s = —2, and the corresponding
eigenvectors are
where
www.unifreebooks.com
The only initial values that lead to a solution x that does not grow without bound
are
But S is a plane, which is a very small part of Euclidean 3-space. Thus almost
every initial value leads to a solution that grows exponentially.
Another conclusion that we can draw is somewhat more subtle than those
given above, but it will be important in Chapter 6.
4. If A has eigenvalues of very different magnitudes, then solutions of (4.18) have
components whose magnitudes change at very different rates. Such solutions
can be difficult to compute efficiently using numerical methods.
We will discuss this point in more detail in Section 4.5.
again only considering the case in which there is a basis of Rn consisting of eigen-
vectors of A. The method is a spectral method, and the reader may wish to review
Section 3.5.3.
If {ui, u 2 ,..., un} is a basis for R n , then every vector in Rn can be written
uniquely as a linear combination of these vectors. In particular, for each £, we can
write f(t) as a linear combination of ui, 112,..., un:
Of course, since the vector f (t) depends on £, so do the weights c\ (£), C2(t),..., cn(t).
These weights can be computed explicitly from f, which of course is considered to
be known.
We can also write the solution of (4.20) in terms of the basis vectors:
Since x(£) is unknown, so are the weights ai(i),«2(*), • • • ,a,n(t). However, when
these basis vectors are eigenvectors of A, it is easy to solve for the unknown weights.
Indeed, substituting (4.21) in place of x yields
www.unifreebooks.com
The ODE
or
When the basis is orthonormal, the coefficients & i , & 2 j - - - > & n can be computed in
the usual way:
16
This is just what happened in the spectral method for solving Ax = b—the system of n
simultaneous equations was reduced to n independent equations.
www.unifreebooks.com
where
The matrix A is symmetric, and an orthonormal basis for R2 consists of the vectors
The solution is
where
We obtain
and
Finally,
The technique for solving (4.20) presented in this section, which we have
described as a spectral method, is usually referred to as the method of variation of
parameters.
www.unifreebooks.com
Exercises
1. Consider the IVP (4.18), where A is the matrix in Example 4.5. Find the
solution for
(a) Explain why, no matter what the value of x0, the solution x(£) converges
to a constant vector as t —> oo.
(b) Find all values of x0 such that the solution x is equal to a constant vector
for all values of t.
where
where
5. Let A be the matrix in Exercise 3. Find all values of XQ such that the solution
to (4.18) decays exponentially to zero.
6. Let A be the matrix in Exercise 4. Find all values of XQ such that the solution
to (4.18) decays exponentially to zero.
where
www.unifreebooks.com
8. Let
where
9. The following system has been proposed as a model of the population dynam-
ics of two species of animals that compete for the same resource:
Here o, 6, c, d are positive constants, x(t] is the population of the first species
at time £, and y(t] is the corresponding population of the second species
(x and y are measured in some convenient units, say thousands or millions
of animals). The equations are easy to understand: either species increases
(exponentially) if the other is not present, but, since the two species compete
for the same resources, the presence of one species contributes negatively to
the growth rate of the other.
(a) Solve the IVP with 6 = c = 2, o = d = l , x(0) = 2, and j/(0) = 1, and
explain (in words) what happens to the populations of the two species
in the long term.
(b) With the values of a, 6, c, d given in part 9a, is there an initial condition
which will lead to a different (qualitative) outcome?
10. The purpose of this exercise is to derive the solution (4.11) of the IVP
The solution
can be found using the techniques of this section, although the computations
are more difficult than any of the examples we have presented.
www.unifreebooks.com
Since the eigenvectors ui and u2 are not orthogonal, this will require
solving a (2 x 2) system of equations to find c\ (t} and c2 (t).
(d) Write the solution in the form
then
Now, we cannot (in general) hope to evaluate the integral in (4.25) analytically;
however, any numerical method for approximating the value of a definite integral
(such methods are often referred to as quadrature rules) can be adapted to form the
basis of a numerical method of IVPs. By the way, equation (4.25) explains why the
process of solving an IVP numerically is often referred to as integrating the ODE.
Of course, this is not a computable formula, because, except possibly on the first
step (i = 0), we do not know u(ti) exactly. Instead, we have an approximation,
Ui = u(ti). Formula (4.26) suggests how to obtain an approximation m+\ to u(ti+i):
The reader should notice that (except for i = 0) there are two sources of error in
the estimate MJ+I. First of all, there is the error inherent in using formula (4.26) to
advance the integration by one time step. Second, there is the accumulated error
due to the fact that we do not know u(ti] in (4.26), but rather only an approximation
to it.
The method (4.27) is referred to as Euler's method.
and we can use this formula to determine the errors in the computed approximation
to u(t). Applying Euler's method with the regular grid t{ = iAt, Ai = 10/n, we
have
www.unifreebooks.com
In Figure 4-1, we graph the exact solution and the approximations computed using
Euler's method for n = 10,20,40. As we should expect, the approximation produced
by Euler's method gets better as At (the time step) decreases. In fact, Table 4-1,
where we collect the errors in the approximations to w(10), suggests that the global
error (which comprises the total error after a number of steps) is O(At). The symbol
0(At) ("big-oh of At") denotes a quantity that is proportional to or smaller than
At as At ->• 0.
Proving that the order of Euler's method is really O(At) is beyond the scope
of this book, but we can easily sketch the essential ideas of the proof. It can be
proved that the left-endpoint rule, applied to an interval of integration of length
At, has an error that is O(At 2 ). In integrating an IVP, we apply the left-endpoint
rule repeatedly, in fact, n = 0(l/At) times. Adding up I/At errors of order At2
gives a total error of 0(At). (Proving that this heuristic reasoning is correct takes
some rather involved but elementary analysis that can be found in most numerical
analysis textbooks.)
www.unifreebooks.com
Putting this approximation together with the midpoint rule, and using the approx-
imation Ui = u(ti), we obtain the improved Euler method:
www.unifreebooks.com
Table 4.2. Global error in the improved Euler method for (4-28).
Figure 4.2 shows the results of the improved Euler method, applied to (4.28) with
n — 10, n = 20, and n = 40. The improvement in accuracy can be easily seen by
comparing to Figure 4.1. We can see the O(At2) convergence in Table 4.2—when
At is divided by two (i.e. n is doubled), the error is divided by approximately four.
with certain restrictions on the values of the parameters ctj, PM, and 7^ (e.g. a\ +
h am — !)• Although (4.29) looks complicated, it is not hard to understand the
idea. A general form for a quadrature rule is
where wi,W2,.--, wm are the quadrature weights and xi, x%,..., xm G [a, b] axe the
quadrature nodes. In the formula for Ui+i in (4.29), the weights are
and values fci, £2, • • • ,km are estimates of f ( t , u ( t ) ) at ra nodes in the interval
[ti,ti+i]. We will not use the general formula (4.29), but the reader should ap-
preciate the following point: there are many RK methods, obtained by choosing
various values for the parameters in (4.29). This fact is used in designing algo-
rithms that attempt to automatically control the error. We discuss this further in
Section 4.4.4 below.
The most popular RK method is analogous to Simpson's rule for quadrature:
Simpson's rule has an error of O(A£ 5 ) (At = b — a), and the following related
method for integrating an IVP has global error of O(A£ 4 ):
www.unifreebooks.com
We call this the RK4 method. Figure 4.3 and Table 4.3 demonstrate the accuracy
of RK4; dividing A£ by two decreases the error by (approximately) a factor of 16.
This is typical for O(At 4 ) convergence.
Example 4.10. Consider two species of animals that share a habitat, and suppose
one species is prey to the other. Let x\ (t) be the population of the predator species
at time t, and let X2(t) be the population of the prey at the same time. The Lotka-
Volterra predator-prey model for these two populations is
where ei, 62, #, r are positive constants. The parameters have the following interpre-
tations:
BI describes the attack rate of the predators (the rate at which the prey are
killed bv the vredators is e^ x-\ x? );
62 describes the growth rate of the predator population based on the number of
prey killed (the efficiency of predators at converting predators to prey);
q is the rate at which the predators die;
r is the intrinsic growth rate of the prey population.
The equations describe the rate of population growth (or decline) of each species.
The rate of change of the predator population is the difference between the rate of
growth due to feeding on the prey and the rate of death. The rate of change of
the prey population is the difference between the natural growth rate (which would
govern in the absence of predators) and the death rate due to predation.
Define f : R x R2 -» R2 by
values #1,0 and #2,0 of the predator and prey populations, respectively, the IVP of
interest is
where
Suppose
usmg the RK4 method described above, we estimated the solution of (4-31) on the
time interval [0,50]. The implementation is exactly as described in (4-30), except
that now the various quantities (lcj,Uj,f(tj,Ui)J are vectors. The time step used was
At = 0.05 (for a total of 1000 steps). In Figure 4-4> w& plot the two populations
versus time; this graph suggests that both populations vary periodically.
Figure 4.4. The variation of the two populations with time (Example 4-10).
Another way to visualize the results is to graph x^ versus x\; such a graph
is meaningful because, for an autonomous ODE (one in which t does not appear
explicitly), the curve (xi(t)jX^(t}} is determined entirely be the initial value XQ (see
Exercise 5 for a precise formulation of this property). In Figure 4-5, we graph x%
versus x\. This curve is traversed in the clockwise direction (as can be determined
www.unifreebooks.com
by comparing with Figure 4-4)- F°r example, when the prey population is large
and the predator population is small (the upper left part of the curve), the predator
population will begin to grow. As it does, the prey population begins to decrease
(since more prey are eaten). Eventually, the prey population gets small enough that
it cannot support a large number of predators (far right part of the curve), and the
predator population decreases rapidly. When the predator population gets small, the
prey population begins to grow, and the whole cycle begins again.
the O(At fe+1 ) method) as the exact value, and compares it with the estimate from
the lower-order method. If the difference is sufficiently small, then it is assumed
that the step size is sufficiently small, and the step is accepted. (Moreover, if the
difference is too small, then it is assumed that the step size is smaller than it needs
to be, and it may be increased on the next step.) On the other hand, if the difference
is too large, then it is assumed that the step is inaccurate. The step is rejected, and
At, the step size, is reduced. This is called automatic step control, and it leads to
an approximate solution computed on an irregular grid, since At can vary from one
step to the next. This technique is not guaranteed to produce a global error below
the desired level, since the method only controls the local error (the error resulting
from a single step of the method). However, the relationship between the local and
global error is understood in principle, and this understanding leads to methods
that usually achieve the desired accuracy.
A popular class of methods for automatic step control consists of the Runge-
Kutta-Fehlberg (RKF) methods, which use two RK methods together to control
the local error as described in the previous paragraph. The general form of RK
methods, given in (4.29), shows that there are many possible RK formulas; indeed,
for a given order At fc , there are many different RK methods that can be derived.
This fact is used in the RKF methodology to choose pairs of formulas that evaluate
/, the function defining the ODE, as few times as possible. For example, it can be
proved that every RK method of order At5 requires at least six evaluations of /.
It is possible to choose six points (i.e. the values ti,ti + 72/1,... , t j + ^h in (4.29))
so that five of the points can be used in an O(At 4 ) formula, and the six points
together define an O(At 5 ) formula. (One such pair of formulas is the basis of the
popular RKF45 method.) This allows a very efficient implementation of automatic
step control.
Exercises
1. The purpose of this exercise is to estimate the value of u(0.5), where u(t) is
the solution of the IVP
Which estimate is more accurate? How many times did each evaluate f ( t , u) =
u + ete?
17
3. The system of ODEs
where
models the orbit of a satellite about two heavenly bodies, which we will assume
to be the earth and the moon.
In these equations, (x(t),y(t)) are the coordinates of the satellite at time t.
The origin of the coordinate system is the center of mass of the earth-moon
system, and the ar-axis is the line through the centers of the earth and the
moon. The center of the moon is at the point (1 — /^i,0) and the center of
the earth is at (—//i, 0), where IJL\ = 1/82.45 is the ratio of mass of the moon
to the mass of the earth. The unit of length is the distance from the center
of the earth to the center of the moon. We write ^2 = 1 — A*i •
If the satellite satisfies the following initial conditions, then its orbit is known
to be periodic with period T = 6.19216933:
4. Let
The problem is to produce a graph, on the interval [0,20], of the two compo-
nents of the solution to
where
(a) Use the RK4 method with a step size of At = 0.1 to compute the solution.
Graph both components on the interval [0,20].
(b) Use the techniques of the previous section to compute the exact solution.
Graph both components on the interval [0,20].
(c) Explain the difference.
satisfies
and
Use both Euler's method and the improved Euler method to estimate #(10),
using step sizes 1,1/2,1/4,1/8, and 1/16. Verify that the error in Euler's
method is O(A£), while the error in the improved Euler method is O(Ai 2 ).
(a) Use the RK4 method with step sizes 1/4,1/8,1/16,1/32,1/64, and 1/128
to estimate x(l/2) and verify that the error is O(Af 4 ).
(b) Use the RK4 method with step sizes 1/4,1/8,1/16,1/32,1/64, and 1/128
to estimate x(2). Is the error O(A£ 4 ) in this case as well? If not, speculate
as to why it is not.
8. Let
(a) Solve the problem using the RK4 method (in floating point arithmetic)
and graph the results.
(b) What is the exact solution?
(c) Why is there a discrepancy between the computed solution and the exact
solution?
(d) Can this discrepancy be eliminated by decreasing the step size in the
RK4 method?
www.unifreebooks.com
We will describe the matrices AI and A2 by their spectral decompositions. The two
matrices are symmetric, with the same eigenvectors but different eigenvalues. The
eigenvectors are
We solved both systems using the MATLAB command ode45, which implements a
state-of-the-art automatic step-control algorithm based on a fourth-fifth-order scheme.20
The results are graphed in Figure 4-6, where, as expected, we see that the two com-
puted solutions are the same (or at least very similar).
However, examining the results of the computations performed by ode45 re-
veals a surprise: the algorithm used only 52 steps for IVP (4-35) but 1124 steps for
(4-36)1
20
The routine ode45 was implemented by Shampine and Reichelt. See [42] for details.
www.unifreebooks.com
Figure 4.6. The computed solutions to IVP (4.35) (top) and IVP (4-36)
(bottom). (Each graph shows all three components of the solution; however, the
exact solution, which is the same for the two IVPs, satisfies xi(t] = £ 2 (£) = xs(t)•)
A detailed explanation of these results is beyond the scope of this book, but
we briefly describe the reason for this behavior. These comments are illustrated
by an example below. Explicit time-stepping methods for ODEs, such as those
that form the basis of ode45, have an associated stability region for the time step.
This means that the expected O(At fc ) behavior of the global error is not observed
unless A£ is small enough to lie in the stability region. For larger values of At,
the method is unstable and produces computed solutions that "blow up" as the
integration proceeds. Moreover, this stability region is problem dependent and gets
smaller as the eigenvalues of the matrix A get large and negative.21
If A has large negative eigenvalues, then the system being modeled has some
transient behavior that quickly dies out. It is the presence of the transient behavior
21
If the system of ODEs under consideration is nonlinear, say
then it is the eigenvalues of the Jacobian matrix df/dx that determine the behavior.
www.unifreebooks.com
that requires a small time step—initially, the solution is changing over a very small
time scale, and the time step must be small to model this behavior accurately.
If, at the same time, there are small negative eigenvalues, then the system also
models components that die out more slowly. Once the transients have died out,
one ought to be able to increase the time step to model the more slowly varying
components of the solution. However, this is the weakness of explicit methods like
Euler's method, RK4, and others: the transient behavior inherent in the system
haunts the numerical method even when the transient components of the solution
have died out. A time step that ought to be small enough to accurately follow the
slowly varying components produces instability in the numerical method and ruins
the computed solution.
A system with negative eigenvalues of widely different magnitudes (that is, a
system that models components that decay at greatly different rates) is sometimes
called stiff.22 Stiff problems require special numerical methods; we give examples
below in Section 4.5.2. First, however, we discuss a simple example for which the
ideas presented above can be easily understood.
has solution
and the system qualifies as stiff according to the description given above. We will
apply Euler's method, since it is simple enough that we can completely understand
its behavior. However, similar results would be obtained with RK4 or another
explicit method.
To understand the behavior of Euler's method on (4.37), we write it out ex-
plicitly. We have
with
that is,
22
Stiffness is a surprisingly subtle concept. The definition we follow here does not capture all of
this subtlety; moreover, there is not a single, well-accepted definition of a stiff system. See [33],
Section 6.2, for a discussion of the various definitions of stiffness.
www.unifreebooks.com
It follows that
and, similarly,
If one of these quantities is larger than 1, the corresponding component will grow
exponentially as the iteration progresses. At the very least, for stability (that is, to
avoid spurious exponential growth), we need
The first inequality determines the restriction on At, and a little algebra shows that
we must have
Thus a very small time step is required for stability, and this restriction on Af is
imposed by the transient behavior in the system.
As we show below, it is possible to avoid the need for overly small time steps
in a stiff system; however, we must use implicit methods. Euler's method and the
RK methods discussed in Section 4.4 are explicit, meaning that the value w(n+1) is
defined by a formula involving only known quantities. In particular, only u^ ap-
pears in the formula; in some explicit methods (multistep methods), u^n~l\ u^n~2\
... may appear in the formula, but w(n+1) itself does not.
On the other hand, an implicit method defines u^n+l^ by a formula that in-
volves w(n+1) itself (as well as u^ and possibly earlier computed values of u). This
means that, at each step of the iteration, an algebraic equation (possibly nonlinear)
must be solved to find the value of u( n+1 ). In spite of this additional computational
expense, implicit methods are useful because of their improved stability properties.
The result is
(see Section 4.4.1). To obtain the backward Euler method, we apply the right-hand
rule,
This method is indeed implicit. It is necessary to solve the equation (4.38) for
un+i. In the case of a nonlinear ODE (or a system of nonlinear ODEs), this may be
difficult (requiring a numerical root-finding algorithm such as Newton's method).
However, it is not difficult to implement the backward Euler method for a linear
system. We illustrate this for the linear, constant-coefficient system:
Example 4.12. Applying the backward Euler method to the simple example (4-37)
gives some insight into the difference between the implicit and explicit methods. We
obtain the following iteration for the first component:
www.unifreebooks.com
and so no instability can arise. The step size A£ will still have to be small enough
for the solution to be accurate, but we do not need to take Ai excessively small to
avoid spurious exponential growth.
Example 4.13. We will apply both Euler's method and the backward Euler method
to the IVP
We integrate over the interval [0,2] with a time step of At — 0.05 (40 steps) in both
algorithms. The results are shown in Figure 4-7- Euler's method "blows up" with
this time step, while the backward Euler method produces a reasonable approximation
to the true solution.
Remark There are higher-order methods designed for use with stiff ODEs, no-
tably the trapezoidal method. It is also possible to develop automatic step-control
methods for stiff systems.23
Exercises
1. Let
Figure 4.7. The computed solutions to IVP (4-40) using Euler's method
(top) and the backward Euler method (bottom). (Each graph shows all three com-
ponents of the solution.)
(b) Estimate x(l) using 10 steps of Euler's method and compute the norm
of the error.
(c) Estimate x(l) using 10 steps of the backward Euler method and compute
the norm of the error.
2. Repeat Exercise 1 for
3. Let
Find the largest value of At such that Euler's method is stable. (Use numerical
experimentation.)
www.unifreebooks.com
has solution
(b) Determine experimentally (that is, by trial and error) how small At must
be in order that Euler's method behaves in a stable manner on this IVP.
(c) Euler's method takes the form
Let the eigenpairs of A be AI, ui and A2, 112. Show that Euler's method
is equivalent to
where
Find explicit formulas for y^', y% , and derive an upper bound on At that
guarantees stability of Euler's method. Compare with the experimental
rpsiilt.
www.unifreebooks.com
(d) Repeat with the backward Euler method in place of Euler's method.
6. Let A € R n x n be symmetric with negative eigenvalues AI, A 2 , . . . , A n .
(a) Consider Euler's method and the backward Euler method applied to the
homogeneous linear system
We define
The function G is called the (causal) Green's function for (4.41), and formula (4.43)
already hints at the significance of G. The effect of the initial datum UQ on the
solution u at time t is G(t] to)uo, while the effect of the datum f ( s ) on the solution
u at time t is G(t] s)/(s)ds. 24
As a concrete example, the IVP (4.41) models the growth of a population (of a
country, say), where a is the natural growth rate and f ( t ) is the rate of immigration
at time t.25 For the sake of definiteness, suppose the population is measured in
millions of people and t is measured in years. Then UQ is the population at time to
(in millions) and f ( t ) is the rate, in millions of people per year, of immigration at
time t. We can see that u(t) = G(t;to) is the solution to the following IVP:
That is, u(t) = G(t;to) is the population function resulting from an initial popula-
tion of 1 (million) and no immigration (here consider only times t after to). We can
also recognize u(t) = G(t; s) as the population function corresponding to a certain
pattern of immigration, namely, when 1 million people immigrate at the instant
t = si Of course, this is an idealization, but there are many situations when we
wish to model a phenomenon that takes place at an instant in time or at a sin-
gle point in space (such as a point force in mechanics). We now explore this idea
further.
We consider a country whose population is modeled by the differential equation
We assume that initially there are no people in the country (u(to) = 0), and 1 million
people immigrate over the time interval [s,s + At] (at a constant rate, during that
24
The data represented by the function / has different units than that represented by UQ. Indeed,
an examination of the differential equation shows that the units of / are the units of UQ divided
by time. Therefore, / is a rate, and it must be multiplied by the time "interval" ds prior to being
multiplied by G(t; s).
25
This model of population growth is not a particularly good one, since it assumes that the
growth rate remains constant over time. In reality, the growth rate changes due to changing birth
rates, life spans, etc.
www.unifreebooks.com
interval, of I/At people per year). We assume that s > to. The resulting population
satisfies the IVP
where
The solution is
This last expression is the average of G(t; r] over the interval [s, s + At]. As we take
At smaller and smaller, we obtain
(see Exercise 6). Moreover, 6 is formally an even function, 6(—t) = 6(t] for all t, so
viro a1cr» Vicnro
This is called the sifting property of the Dirac delta function. Incidentally, a se-
quence of functions such as {di/n}, which converges to the delta function, is called
a delta-sequence.
Our analysis now suggests that the IVP
Since G(t',s) is zero for t < s anyway, we obtain simply u(t) = G(t]s). This
again emphasizes the meaning of G(t;s): it is the response (of the system under
consideration) at time t to a (unit) point source at time s > to-
is
Exercises
1. Find the Green's function for the following IVP:
what will the population be at the beginning of 2000 (t = 10)? Use the
Green's function to find P(t) and then P(10).
3. A certain radioactive isotope decays exponentially according to the law
where k = In (2)/2. Here m(t) is the mass of the isotope at time t (seconds),
and the differential equation indicates that a constant fraction of the atoms are
disintegrating at each point in time. The above differential equation holds, of
course, when none of the isotope is being added or taken away by other means.
Suppose that initially 10 g of the isotope are present, and mass is added from
an external source at the constant rate of 0.1 g/s. Solve the IVP modeling this
situation, using the Green's function, and determine the long-time behavior
of m(t).
4. Find the Green's function for the IVP
For more information on numerical methods for ODEs, the reader is referred to
Shampine [43] or Lambert [33]. Most books on numerical analysis, such as Atkinson
[2] and Kincaid and Cheney [30], also cover numerical methods for ODEs, as well
as the background material on quadrature and interpolation.
The text by Mattheij and Molenaar [38] gives an integrated presentation of the
theory and numerical analysis of ODEs, as well as their use for modeling physical
systems.
www.unifreebooks.com
Chapter 5
Boundary
In statice
Our first examples of partial differential equations (PDEs) will arise in the study of
static (equilibrium) phenomena in mechanics and heat flow. To make our introduc-
tion to the subject as simple as possible, we begin with one-dimensional examples;
that is, all of the variation is assumed to occur in one spatial direction. Since the
phenomena are static, time is not involved, and the single spatial variable is the only
independent variable. Therefore, the "PDEs" are actually ODEs! Nevertheless, the
techniques we develop for the one-dimensional problems generalize to real PDEs.
where T is the tension in the string and / is an external force density (in units of
force per length).
If A e R m x n , then A defines an operator mapping Rn into R m , and given
b e R m , we can ask the following questions:
131
www.unifreebooks.com
If so, is x unique?
How can such an x be computed?
In much the same way,
Underlying this calculation is the fact that a space of functions can be viewed as
a vector space—with functions as the vectors. The operator L is naturally defined
on the space (72[0,£| introduced in Section 3.1. Thus L takes as input a twice-
continuously differentiable function u and produces as output a continuous function
Tjii..
The function u is continuous on [0,1] (we need only check that the two cubic pieces
have the same value at x — 1/2, which they do). We have
and it is easy to see that both quadratic pieces defining du/dx have value 1/8 at
x — 1/2. Therefore, du/dx is continuous on [0,1]. Finally,
www.unifreebooks.com
5.1. The analogy between BVPs and linear algebraic systems 133
that is,
Figure 5.1 shows the graphs of u and its first three derivatives.
Figure 5.1. A function in (72[0,1] (see Example 5.1): y = u(x) (top left),
the first derivative of u (top right), the second derivative of u (bottom left), and the
third derivative of u (bottom right).
The reader should notice that the function u defined in Example 5.1 is the
solution of Lu = f for a certain / 6 C[0,1], namely,
www.unifreebooks.com
and / must be equal at each x e [0,£J. Here, though, we see a major difference:
Lu = f represents an infinite number of equations, since there is an infinite number
of points x e [0,£j. Also, there are infinitely many unknowns, namely, the values
u(x),xe [0,4
The role of the boundary conditions is not difficult to explain in this context.
Just as a matrix A 6 R m x n can have a nontrivial null space, in which case Ax =
b cannot have a unique solution, so a differential operator can have a nontrivial
null space. It is easy to verify that the null space of L consists of all first-degree
polynomial functions:
The fact that the null space of L is two-dimensional suggests that the operator
equation Lu = f is closely analogous to a linear algebraic equation Ax = b, where
A is an (n — 2) x n matrix and H(A) = R n ~ 2 (that is, the columns of A span R n ~ 2 ).
www.unifreebooks.com
5.1. The analogy between BVPs and linear algebraic systems 135
Such a matrix A has the property that Ax = b has a solution for every b € Rn 2 ,
but the solution cannot be unique. Indeed, in this case, M(A) is two-dimensional,
and therefore so is the solution set of Ax = b for every b e R n . In order to obtain
a unique solution, we must restrict the allowable vectors x by adding two equations.
(It is also easy to see that "^-(A) = R2; since the first two columns of A are linearly
independent.) Thus, «/x e R4 satisfies Ax = 0, then there exist s,t € R such that
where w,z are two vectors in R4. There are many vectors w and z that will work;
indeed, as long as w; z, and the two rows of A form a linearly independent set,
then these additional equations will result in a unique solution.
For example, let w = ei = (1,0,0,0) and z = 64 = (0,0,0,1). Then (5.3) and
(5-4) together imply
and the only solution to this system is s = t = 0. Therefore, the only vector x G R
satisfying (5.3) and (5.4) is x = 0.
The matrix A e R 2 x 4 defines an operator mapping
(Kx. — Ax). One way to understand the role of the additional equations ei • x = 0
and 64 -x = 0 is that they allow us to define a matrix B e R 4x4 and a vector c 6 R4
www.unifreebooks.com
However, this way of looking at the situation does not generalize in a natural way to
differential equations. Therefore, we interpret the two side equations as restricting
the domain of the operator.
The equations
The matrix revresentinq K$ is therefore 2 x 2 , and the reader can show26 that this
matrix is
26
The reader should recall from Exercise 3.1.8 that there is a canonical method for computing
the matrix representing a linear operator on finite-dimensional spaces: The columns of the matrix
are the images under the operator of the standard basis vectors. If u = (1,0), then K$u = (2, —1),
and so the first column of C must be
The second column of C is determined by computing the image of (0,1) under KS-
www.unifreebooks.com
5.1. The analogy between BVPs and linear algebraic systems 137
We now show that the role of the boundary conditions in (5.1) is exactly
analogous to the role of the extra equations ei • x = 0, 62 • x = 0 in the above
example. We view the boundary conditions
where
by
This new operator LD has a trivial null space. Indeed, if u e C2[0,l] satisfies
We can make the analogous definition for a differential operator, using the L2 inner
product in place of the dot product.
Definition 5.4. Let S be a subspace of Ck[a, b], and let K : S —>• C[a, b] be a linear
operator. We say that K is symmetric if
where (-,-) represents the L2 inner product on the interval [a,b]. That is, K is
symmetric if, whenever u,v € S, and w = Ku, z = Kv, then
www.unifreebooks.com
Example 5.5. Let LD be the operator defined above. Then, if u,v € Cf^O,^], we
have
Then
www.unifreebooks.com
5.1. The analogy between BVPs and linear algebraic systems 139
Just as in the case of matrices, we cannot assume a priori that A is real, or that the
eigenfunction u is real-valued. When working with complex-valued functions, the
L2 inner product on [a, 6] is defined by
The properties
Then, since (Ku,u) = (u,Ku) holds for complex-valued functions as well as real-
valued functions (see Exercise 4), we have
Since AI ^ A2, this is only possible if (^1,^2) = 0, that is, if u\ and u^ are orthog-
onal. Therefore, a symmetric differential operator has orthogonal eigenfunctions.
The symmetric differential operator LD has a special property not shared by
every symmetric operator. Suppose A is an eigenvalue of LD and u is a corresponding
eigenfunction, normalized so that (u,u) — 1. Then
and therefore that A > 0. How can we conclude that, in fact, the inequality must
be strict? See Exercise 5.)
Summary
We have now seen that the differential operator
5.1. The analogy between BVPs and linear algebraic systems 141
Exercises
1. Let MD be the operator defined in Example 5.6.
(a) Show that if / e C[0,£] is such that Mpu = f has a solution, then that
solution is unique.
(b) Show that Mpu — f has a solution only if / e C[0,^] satisfies a certain
constraint. What is that constraint?
2. Define C}[Q,t] = {u € Cl[Q,i] : u(0) = 0} and M7 : C)[0,£] ->• C[0,£] by
(a) Show that M/w = / has a unique solution for each / 6 C[0,^]. (Hint:
Use the fundamental theorem of calculus.) This is equivalent to showing
that JV(M/) is trivial and ft(M/) = C[Q,f\.
(b) Show that M/ is not symmetric.
3. Consider again the differential operator equation Lu — f discussed in Section
5.1. Suppose an equation LSU = / is produced by restricting the domain of
L to a subspace S of C2[0,£] (that is, by defining LSU = Lu for all u € 5).
(a) Show that LSU = / has at most one solution for each / e (7[0, t] provided
N(L)nS = {Q}.
www.unifreebooks.com
(b) Show that L$u — j has a unique solution for each / e C[0,1] for either
of the following choices of S:
5. Explain why, in the last step of the calculation (5.8), the integral
6. Define
5.1. The analogy between BVPs and linear algebraic systems 143
Define
www.unifreebooks.com
(As usual, we define the operator in terms of the homogeneous version of the
boundary conditions.)
(a) Prove that LR is symmetric.
(b) Find the null space of LR.
This BVP can be written simply as Lpu = /, where LD is the symmetric linear
differential operator defined in the last section.
The spectral method for a symmetric linear system Ax = b is based on
the fact that a symmetric matrix A e R n x n has n orthonormal eigenvectors, and
therefore any vector in Rn (including the right-hand side b and the solution x) can
be written, in a simple way, as a linear combination of those eigenvectors. (The
reader may wish to review Section 3.5 at this time.) We have seen, at the end of
the last section, that any eigenvalues of LD must be real and positive and that
eigenfunctions of LD corresponding to distinct eigenvalues must be orthogonal. We
now find the eigenvalue-eigenfunction pairs (eigenpairs for short) of LD and explore
the following question: Can we represent the right-hand side f(x) and the solution
u(x) in terms of the eigenfunctions?
"Solving" this problem means identifying those special values of A such that the
BVP (5.11) has a nonzero solution u, and then determining u. (For any value of
A, the zero function is a solution of (5.11), just as x = 0 is a solution of Ax = Ax
for any A. In both cases, the eigenvalues are the scalars which lead to a nonzero
solution.) Since we know, from the previous section, that all such A are positive,
we write A = O2. We can use the results of Section 4.2 to write the general solution
of the ODE
Therefore,
and the first boundary condition implies c\ — 0. We then have u(x] — C2sin(0x),
and the second boundarv condition becomes
(we discard the case that A = 0, for then u is the zero function). It turns out
that the value of c^ is immaterial; these values of A, and no others, produce
eigenfunctions with the correct boundary conditions.
We thus see that the operator LD has infinitely many eigenpairs:
We already know that, since the eigenvalues of LD are distinct, the eigenfunc-
tions listed above must be orthogonal. This can also be verified directly using the
trigonometric identity
www.unifreebooks.com
that is,
Thus the eigenfunctions are orthogonal, and they can be normalized by multiplying
each by ^/2/l.
The first four eigenfunctions V>i, V>2, V's, V>4 a^6 graphed in Figure 5.2.
Let us take any function / e <7[0,^]. We know, from Section 3.5, how to find
the best approximation to / from afinite-dimensionalsubspace. We define
Then
Figure 5.3 shows the errors in approximating /(#) by /N(X] for N = 10,20,40,80.
(The approximations are so good that, if we were to plot both f and /AT on the same
graph, the two curves would be virtually indistinguishable. Therefore, we plot the
difference f(x) — /N(X) instead.) In this example, the approximation error is small
and gets increasingly small as N increases. It is easy to believe that
Then
Figure 5.4 shows f(x) together with the approximations /jv(ar) for N = 10,20,40,80
28
Many specific integrals must be computed to compute these approximations. It is beyond the
scope of this book to discuss methods of integration; moreover, modern technology often allows us
to avoid this mechanical step. Computer algebra software, such as Mathematica, MATLAB, Maple,
etc., as well as the more powerful handheld calculators, will compute many integrals symbolically.
www.unifreebooks.com
The fact that the approximation is worst near x = 0 is due to the fact that
f does not satisfy the Dirichlet condition there. Indeed, this example shows that
/AT need not converge to f at every x e [0,€j; here /(O) = 1, but /Ar(0) = 0 for
every N. However, it seems clear from the graphs that fw approximates f in some
meaningful sense, and that this approximation gets better as N increases.
The oscillation near x = 0 is known as Gibbs's phenomenon.
to indicate this fact. As we saw in Example 5.8, this does not necessarily imply
the /N(X) ->• f ( x ) for all x e [0,^]. It does imply, however, that /N gets arbitrarily
www.unifreebooks.com
close to /, over the entire interval, in an average sense. This type of convergence
(in the L2 norm) is sometimes referred to as mean-square convergence.
The resulting representation,
is referred to as the Fourier sine series of /, and the scalars c i , C 2 , . . . are called the
Fourier sine coefficients of /.
In the next section, we will show how to use the Fourier sine series to solve the
BVP (5.10). First, however, we discuss other boundary conditions and the resulting
Fourier series.
www.unifreebooks.com
which models, for example, a hanging bar with the bottom end free. In order to
consider a spectral method, we define the subspace
The operator Lm is symmetric with positive eigenvalues, it has a trivial null space,
and the range of Lm is all of C[0,^] (see Exercise 5.1.6). Therefore, Lmu = f has
a unique solution for every / e C[0,^], and we will show, in the next section, how
to compute the solution by the spectral method. First, however, we must find the
eigenvalues and eigenfunctions of Lm.
Since Lm has only positive eigenvalues, we define A = 0 2 , where 9 > 0, and
solve
The first boundary condition, u(Q) = 0, implies that c\ — 0, and hence any nonzero
eigenfunction must be a multiple of
or
Since
(5.17) becomes
where
In the exercises, the reader is asked to derive other Fourier series, including
the appropriate series for the boundary conditions
Exercises
1. Use the trigonometric identity
3-. Repeat Exercise 2 for the differential operator Lfh defined in Exercise 5.1.7.
The resulting eigenfunctions are the quarter-wave cosine functions.
4. (Hard) Define LR as in Exercise 5.1.11.
(a) Show that LR has only positive eigenvalues.
(b) Show that LR has an infinite sequence of positive eigenvalues. Note:
The equation that determines the positive eigenvalues cannot be solved
analytically, but a simple graphical analysis can be used to show that
they exist and to estimate their values.
(c) For o: = K = 1, find the first two eigenpairs by finding accurate estimates
of the two smallest eigenvalues.
5. (Hard) Consider the differential operator M : C^[0,1] ->• C[0,1] defined by
(recall that C£[0,1] = {u e C2[0,1] : u(0) = g(l) = 0}). Analyze the eigen-
pairs of M as follows:
(a) Write down the characteristic polynomial of the ODE
(b) There are three cases to consider, depending on whether the discriminant
in the quadratic formula is negative, zero, or positive (that is, depending
on whether the characteristic roots are complex conjugate, or real and
repeated, or real and distinct). In each case, write down the general
solution of (5.18).
(c) Show that in the case of real roots (either repeated or distinct), there is
no nonzero solution.
(d) Show that there is an infinite sequence of values of A, leading to complex
conjugate roots, each yielding a nonzero solution of (5.18). Note: The
equation that determines the eigenvalues cannot be solved analytically.
However, a simple graphical analysis is sufficient to show the existence
of the sequence of eigenvalues.
(e) Find the first two eigenpairs (that is, those corresponding to the two
smallest eigenvalues), using some numerical method to compute the first
two eigenvalues accurately.
(f) Show that the first two eigenfunctions are not orthogonal.
6. Define
Find necessary and sufficient conditions on the coefficients an,012,021? #22 for
the operator L^ to be symmetric.
7. Compute the Fourier sine series, on the interval [0,1], for each of the following
functions:29
8. Explain why a Fourier sine series, if it converges to a function on [0, £], defines
an odd function of x € R. (A function / : R ->• R is odd if f(—x) = —f(x)
for all x e R.)
9. What is the Fourier sine series of /(#) = sin (3-rrx) on the interval [0,1]?
10. Repeat Exercise 7 using the quarter-wave sine series (see Section 5.2.S).29
11. Repeat Exercise 7 using the quarter-wave cosine series (see Exercise 3).29
where the coefficients ci, C 2 , . . . , CN are known. We then look for the solution in the
form
It is easy to find the coefficients &i, 62, • • • ? &AT satisfying this equation; we need
or
where
In Figure 5.6, we display both the right-hand side f and the solution u.
When / is of the special form (5.20), the solution technique described above
is nothing more than the spectral method explained for matrix-vector equations in
Section 3.5. Writing
and then divide the coefficients by the eigenvalues to get the solution:
Figure 5.6. The right-hand side f (top) and solution u (bottom) from
Example 5.10.
where
This approximation gets better and better (at least in the mean-square sense) as
TV -»• oo.
We know how to solve Lpu — /AT; let us call the solution UN-
It is reasonable to believe that, since /N gets closer and closer to / as N —> oo, the
function UN will get closer and closer to the true solution u as N —> oo.
(see Exercise 5). We begin by computing the Fourier sine coefficients of f(x] = x.
We have
is then
We can now compare UN with the exact solution u. In Figure 5.7, we show
the graphs of u anduw; on this scale, the two curves are indistinguishable. Figure
5.8 shows the approximation error u(x) — UIQ(X).
The fact that UN approximates u so closely is no accident. If we compute the
Fourier sine coefficients ai, 02, as,... of u directly, we find that
These are precisely the coefficients of UN'- Therefore, UN is the best approximation
to u using the first N eigenfunctions.
The last example is typical: By solving LDU = /N, where /AT is the best ap-
proximation to / using the first N eigenfunctions, we obtain the best approximation
UN to the solution u of LDU = /. We can demonstrate this directly. We assume
that u satisfies w(0) = u(C) = 0, and we write ai,012,03,... for the Fourier (sine)
coefficients of u:
Figure 5.7. The exact solution u of (5.21) and the approximation UIQ.
Figure 5.8. The error in approximating the solution u of (5.21) with UIQ.
www.unifreebooks.com
is
Since —Td?u/dx2 = f by assumption, the Fourier sine series of the two functions
must be the same, and so we obtain
or
Example 5.12. Consider an elastic string that, when stretched by a tension of10 N,
has a length 50 cm. Suppose that the density of the (stretched) string is p = 0.2 g/ cm.
If the string is fixed horizontally and sags under gravity, what shape does it assume*
We let u(x), 0 < x < 50, be the vertical displacement (in cm) of the string.
To use consistent units, we convert 10 Newtons to 106 dynes (gcm/s2). Then u
satisfies the BVP
or
www.unifreebooks.com
(using 980 cm/s2for the gravitational constant). To solve this, we first compute the
Fourier sine coefficients of the right-hand side:
We plot the approximate solution u^o in Figure 5.9. The maximum deflection of
the string is quite small, less than half of a millimeter. This is to be expected, since
the tension in the string is much more than the total gravitational force acting on
it.
Written as a differential operator equation, this takes the form Lmu = /, where Lm
is defined as in Section 5.2.3, but including the factor of T:
Therefore, we write
where
The fact that these are the correct Fourier coefficients can be verified by a calculation
exactly like (5.23) (see Exercise 7) and is also justified below in Section 5.3.5 (see
(5.29)).
The BVP (5.24) can now be written as
or
where k = 7 • 1010, p — 2640 kg/m3, and g = 9.8 m/s2. The Fourier quarter-wave
sine coefficients of the constant function pg are
We then have
www.unifreebooks.com
Thus the bar stretches by only about 1.85 • 10~7 m, or less than two ten-thousandths
of a millimeter.
The Fourier series method is a fairly complicated technique for solving such
a simple problem as (5.13). As we mentioned in Section 5.1.1, we could simply
integrate the differential equation twice and use the boundary conditions to deter-
mine the constants of integration. The Fourier series method will prove its worth
when we apply it to PDEs, either time-dependent problems (Chapters 6 and 7) or
problems with multiple spatial dimensions (Chapter 8). We introduce the Fourier
series method in this simple context so that the reader can understand its essence
before dealing with more complicated applications.
satisfies the boundary conditions (p(0) = a, p(t) = b). If we define v(x) = u(x) —
#(V), then
Thus v(x) solves (5.10), so we know how to compute v(x). We then have u(x) =
v(x] +p(x).
This technique, of transforming the problem to one with homogeneous bound-
ary conditions, is referred to as the method of shifting the data.
Let p(x] = I — x, the linear function satisfying the boundary conditions, and define
v(x) — u(x] —p(x). Then v(x) solves (5.21), and so
We then have
Example 5.15. Consider again the bar of Example 5.13, and suppose that now a
mass of 1000 kg is hung from the bottom end of the bar. Assume that the mass is
evenly distributed over the end of the bar, resulting in a pressure of
on the end of the bar. The BVP satisfied by the displacement u is now
where k — 7 • 1010, p = 2640 kg/m3, and g = 9.8 m/s2. To solve this problem using
the Fourier series method, we shift the data by finding a linear function satisfying
the boundary conditions. The function
satisfies
and
We then obtain
5.3.5 Summary
We can now summarize the method of Fourier series for solving a BVP. We assume
that the BVP has been written in the form Ku — /, where, as usual, the boundary
conditions form part of the definition of the domain of the differential operator K.
For the Fourier series method to be applicable, it must be the case that
K is symmetric;
K has a sequence of eigenvalues AI, A2, AS, ..., with corresponding eigenfunc-
tions Vi? V% V'S) • • • (which are necessarily orthogonal);
where
where ai, 02,03,... are the Fourier coefficients of u. This follows from the symmetry
of K and the definition of the Fourier coefficients &i, 62,63,... of Ku:
whence we obtain
www.unifreebooks.com
and
5. Equate the coefficients in the series for the left- and right-hand sides of the
differential equation, and solve for the unknowns.
when k(x) is nonconstant, it is more work to find the eigenfunctions than to just
solve the problem using a different method. For this reason, we discuss a more
broadly applicable method, the finite element method, beginning in Section 5.4.
www.unifreebooks.com
1. We have already seen that the eigenfunctions of the negative second derivative
operator, on the interval [0,2] and subject to Dirichlet conditions, are
Thus
so we have
This yields
and so
We must first shift the data to transform the problem to one with homogeneous
boundary conditions. The function p(x] — 3 — Sx satisfies the boundary conditions,
so we define v = u — p and solve the BVP
and so
and so
5. We thus obtain
or
This yields
Exercises
In Exercises 1-4, solve the BVPs using the method of Fourier series, shifting the data
if necessary. If possible,30 produce a graph of the computed solution by plotting a
partial Fourier series with enough terms to give a qualitatively correct graph. (The
number of terms can be determined by trial and error; if the plot no longer changes,
qualitatively, when more terms are included, it can be assumed that the partial
series contains enough terms.)
30
That is, if you have the necessary technology.
www.unifreebooks.com
3. The results of Exercises 5.2.2 and 5.2.3 will be useful for these problems:
4. The results of Exercises 5.2.2 and 5.2.3 will be useful for these problems:
Show that it is not possible to represent the Fourier sine coefficients of —d?u/dx2
in terms of 61,62, &3, — This shows that it is not possible to use the "wrong"
eigenfunctions (that is, eigenfunctions corresponding to different boundary
conditions) to solve a BVP.
7. Suppose u satisfies
is symmetric (see Exercise 1), and there exists an orthogonal sequence of eigenfunc-
tions. However, when the coefficient k(x] is not a constant, there is no simple way
to find these eigenfunctions. Indeed, computing the eigenfunctions requires much
more work than solving the original BVP.
Because of the limitations of the Fourier series approach, we now introduce the
finite element method, one of the most powerful methods for approximating solutions
to PDEs. The finite element method can handle both variable coefficients and, in
multiple spatial dimensions, irregular geometries. We will still restrict ourselves to
symmetric operators, although it is possible to apply the finite element method to
nonsymmetric problems.
The finite element method is based on three ideas:
1. The BVP is rewritten in its weak or variational form, which expresses the
problem as infinitely many scalar equations. In this form, the boundary con-
ditions are implicit in the definition of the underlying vector space.
2. The Galerkin method is applied to "solve the equation on a finite-dimensional
subspace." This results in an ordinary linear system (matrix-vector equation)
that must be solved.
3. A basis of piecewise polynomials is chosen for the finite-dimensional subspace
so that the matrix of the linear system is sparse (that is, has mostly zero
entries).
We describe each of these ideas in the following sections, using the BVP (5.32) as
our model problem. We always assume that the coefficient k(x] is positive, since
it represents a positive physical parameter (stiffness or thermal conductivity, for
example).
5.4.1 The principle of virtual work and the weak form of a BVP
When an elastic material is deformed, it stores potential energy due to internal
elastic forces. It is not obvious from first principles how to measure (quantitatively)
this elastic potential energy; however, we can deduce the correct definition from the
equations of motion and the principle of conservation of energy.
Suppose an elastic bar, with its ends fixed, is in motion, and its displacement
function u(x, t) satisfies the homogeneous wave equation:
We now perform the following calculation (a trick—multiply both sides of the wave
equation by du/dt and integrate):
www.unifreebooks.com
Also,
Therefore, we obtain
This equation implies that the sum of the two integrals is constant with respect to
time, that is, that
is conserved. Obviously, the first integral represents the kinetic energy (one-half
mass times velocity squared), and we define the second integral to be the elastic
potential energy. The elastic potential energy is the internal energy arising from
the strain du/dx.
We now return to the bar in equilibrium, that is, to the bar satisfying the
BVP (5.32). We have an expression for the elastic potential energy of the bar:
The bar possesses another form of potential energy, due to the external force /
acting upon it. The proper name of this energy depends on the nature of the force;
if it were the force due to gravity, for example, it would be called the gravitational
www.unifreebooks.com
potential energy. We will call this energy the external potential energy. This energy
is different in a fundamental way from the elastic potential energy: it depends on the
absolute position of the bar, not on the relative position of parts of the bar to other
parts. For this reason, we do not know the external potential energy of the bar in its
"reference" (zero displacement) position (whereas the bar has zero elastic potential
energy in the reference position). We define £Q to be the external potential energy of
the bar in the reference position, and we now compute the change of energy between
the bar in its reference position and the bar in its equilibrium position. The change
in potential energy due to the external force / is equal to the work done by / when
the bar is deformed from its reference position to its equilibrium position.
The work done by / acting on the part P of the bar originally between x and
x + Ax is approximately
(recall that u(x) is the displacement of the cross-section of the bar originally at
x—thus u(x) is the distance traveled by that cross-section). To add up the work
due to the external force acting on all little parts of the bar, we integrate:
We now have an expression for the total potential energy of the bar in its
equilibrium position:
If / and u are both positive, for instance, then the bar has less potential energy in
its equilibrium position (think of gravity). This accounts for the sign on the second
integral.
Next we wish to prove the following fact: the equilibrium displacement u of
the bar is the displacement with the least potential energy. That is, if w ^ u is any
other displacement satisfying the Dirichlet conditions, then
We have
www.unifreebooks.com
that is,
(The boundary term disappears in the above calculation since v(0] = v(t] = 0.)
The equilibrium displacement u satisfies
the differential equation from (5.32), as we derived in Section 2.2. Therefore, the
integral above vanishes, and we have
If v is not identically zero, then neither is dv/dx (only a constant function has
a zero derivative, and v cannot be constant unless it is identically zero, because
v(Q) =v(l) = G). Since
(see (5.38)). The linear term in this expression must be D£pot(u)v, the directional
derivative of £pot at u in the direction of v. The minimality of the potential energy
then implies that D£poi(u} = 0, or, equivalently,
This yields
(as we saw above), which is called the principle of virtual work. (The term linear
in u dominates the work £pot (u + v} — £pot (u) when the displacement v is arbitrarily
small ("virtual"), and is called the virtual work. The principle says that the virtual
work is zero when the bar is at equilibrium.)
The principle of virtual work is also called the weak form of the BVP; it is
the form that the BVP would take if our basic principle were the minimality of
potential energy rather than the balance of forces at equilibrium. By contrast, we
will call the original BVP,
the strong form. We can show directly that the two forms of the BVP are equivalent,
in the sense that, for / 6 C[0, I], u satisfies the strong form if and only if it satisfies
the weak form.
5.4.2 The equivalence of the strong and weak forms of the BVP
The precise statement of the weak form of the BVP is:
We have already seen the proof of the following fact: If u satisfies (5.39), the
strong form of the BVP, then u also satisfies (5.40), the weak form. This was proved
www.unifreebooks.com
just below (5.38), using integration by parts. Indeed, the simplest way of deriving
the weak form is to start with the differential equation
Integrating by parts on the left and applying the boundary conditions yield the
weak form.
Now suppose u satisfies (5.40), the weak form of the BVP. Then, by definition
of V, w(0) = u(i] = 0. We now use integration by parts to show that u satisfies the
strong form of the differential equation. We have
The boundary terms vanish because of the boundary conditions v(Qi) = v(i] = 0.
We have
on the interval [0, i]. The proof is simple, given the following fact: If 0 < c < d < I,
then there exists a function V[c^] £ V such that v^c^(x) > 0 for all x € (c,d) and
v
[c,d](x) = 0 for all x in [0,c] or [d,i\. (Exercise 3 asks the reader to construct such
a function v\c &.} If
www.unifreebooks.com
would be positive on [c, d\ and zero on the rest of [0, ^], and hence
would be positive. Since this integral is zero for all v £ V, this shows that
Exercises
1. Show that the differential operator
defined by
is symmetric:
2. Suppose that k(x) > 0 for all x £ [0,1]. Show that if the operator K, defined in
the previous exercise, has an eigenvalue, then it must be positive. (Hint: Let
A be an eigenvalue and u a corresponding eigenfunction. Compute (Ku,u)
two ways, once using the fact that u is an eigenfunction and again using
integration by parts once.)
3. Let 0 < c < d < t hold. Find a function V[CJ(Q that is twice-continuously
differentiate on [0, i] and satisfies the conditions that
www.unifreebooks.com
and
Then define
The function is called bilinear because, holding one argument fixed, the function is
linear in the other:
www.unifreebooks.com
Bilinearity and symmetry are two of the properties of an inner product (see Section
3.4). The third property also holds if we restrict a(-, •) to vectors in V = Cf^O,^]:
and
Since the integrand is nonnegative, we clearly have a(u, u) > 0 for all u. Moreover,
the integral of a nonnegative function can only be zero when the function (the
integrand) is the zero function. Thus,
where (-, •) is the L2 inner product. Thus, the weak form (5.40) of the model BVP
(5.39) can be written as
Below we show that (5.44) has a unique solution that can be found by solving a
matrix-vector equation (that is, a system of linear algebraic equations). First we
show that solving (5.44) is useful: the Galerkin approximation is the best approxi-
mation, from Vn, to the true solution.
www.unifreebooks.com
Since o(-, •) defines an inner product on V, the projection theorem (see Theorem
3.36 in Section 3.4) shows that vn is the best approximation to u from Vn, when
"best" is defined by the norm induced by o(-, •):
where
We usually refer to || • \\E as the energy norm and to «(-,-) as the energy inner
product.
To compute vn, suppose {</>i,02, • • • ,^n} is a basis for Vn. Then (5.44) is
equivalent to
Since vn belongs to Vn, it can be written as a linear combination of the basis vectors:
(We now have two meanings for the symbol "u." The function u is the exact
solution to the BVP, while the components of the vector u are the weights in the
representation of the approximation vn in terms of the basis 0i, 02, • • • , (f>n- We will
live with this ambiguity in order to adhere to standard notation.)
Finding vn is now equivalent to determining HI, 1*2,..., un. Substituting (5.46)
into (5.45) yields
This is a system of n linear equations for the unknowns wi, U2, • • • , un. We define a
matrix K € R n x n and a vector f e Rn by
(We now also have two meanings for the symbol "f": the function / is the right-hand
side of the differential equation, while the vector f has components fi — (/,&).}
Finding vn is now equivalent to solving the linear system
The matrix K is usually called the stiffness matrix, since, when applied to problems
in mechanics, the entries in K depend on the stiffness k(x) of the material. For
analogous reasons, the vector f is usually called the load vector.31
The reader will recall that, in computing a best approximation, it is advan-
tageous to have an orthogonal basis, since then the stiffness (or Gram) matrix is
diagonal, and the projection is computed by n inner products. However, the basis
for Vn must be orthogonal with respect to the energy inner product, and with a
nonconstant coefficient k ( x ) , it is usually difficult32 to find an orthogonal basis.
Therefore, in the finite element method, we will use a nonorthogonal basis.
We now illustrate the Galerkin method by applying it to two BVPs, one with
constant coefficients and the other with nonconstant coefficients.
This basis is orthogonal with respect to the ordinary L2 inner product on the interval
[0,1].
Consider the BVP
31
The stiffness matrix is precisely the Gram matrix appearing in the projection theorem; see
page 62. If we apply the projection theorem directly to compute vn, we need to compute the
right-hand-side vector f whose components are a(u, </>i); the weak form allows us to compute these
components without knowing u, since a(it,(fo) = (/, </>i).
32
That is, in the sense that it is computationally expensive to compute an orthogonal basis.
Given any basis, it is simple in principle to apply the Gram-Schmidt procedure to obtain an or-
thogonal basis. The reader can consult any introductory book on linear algebra for an explanation
of the Gram-Schmidt procedure.
www.unifreebooks.com
and
Therefore,
and the basis turns out to be orthogonal with respect to the energy inner product as
well. We also have
These form the entries of the matrix K and the vector f. Since K is diagonal, we
can solve the system Ku = f immediately to obtain
The resulting approximation, for N = 20, is displayed in Figure 5.10. The energy
inner product, for a constant function k ( x ) , is just the L2 inner product applied to
the derivatives, and so the calculations are intimately related to those we perform
in computing a Fourier series solution; indeed, the final result is the same!
We will apply the Galerkin method with the same approximating subspace and basis
as in the previous exercise. The calculations are similar, but the bilinear form
changes to
and the basis functions are no longer orthogonal in the energy inner product.
www.unifreebooks.com
We have
and
These form the entries of the matrix K and the vector f. We cannot solve Ku = f
explicitly; that is, we cannot derive a useful formula for the coefficients Ui,i =
1,2,..., N, in the formula
However, we can solve for the unknowns numerically using Gaussian elimination,
and thereby produce the approximation w from FN. The result, for N = 20, is
shown in Figure 5.10.
Figure 5.10. Solving BVPs (5.47) (left) and (6.48) (right) using the
Galerkin method. The solutions are graphed in the top figures and the errors in
the solutions in the bottom.
www.unifreebooks.com
The results in these two examples are of roughly the same quality, showing
that the Galerkin method can be as effective as the Fourier method. The most
significant difference in these two methods is the need to form the matrix K in the
second example and solve the N x N system Ku = f. This is very time-consuming
compared to the computations required in the first example (where the system of
linear equations is diagonal). This question of efficiency is particularly important
when we have two or three spatial dimensions; in a problem of realistic size, it may
take impossibly long to solve the resulting linear system if the coefficient matrix is
dense. A dense matrix is a matrix in which most or all of the entries are nonzero.
A sparse matrix, on the other hand, has mostly zero entries.
The finite element method is simply the Galerkin method with a special choice
for the subspace and its basis; the basis leads to a sparse coefficient matrix. The
ultimate sparse, nonsingular matrix is a diagonal matrix. Obtaining a diagonal
matrix requires that the basis for the approximating subspace be chosen to be
orthogonal with respect to the energy inner product. As mentioned earlier, it is too
difficult, for a problem with variable coefficients, to find an orthogonal basis. The
finite element method uses a basis in which most pairs of functions are orthogonal;
the resulting matrix is not diagonal, but it is quite sparse.
Exercises
1. Determine whether the bilinear form
2. Show that if FN is the subspace defined in Example 5.18, and the Galerkin
method is applied to the weak form of
with FJV as the approximating subspace, the result will always be the partial
Fourier sine series (with N terms) of the exact solution u.
3. Define 5 to be the set of all polynomials of the form ax + bx2, considered as
functions defined on the interval [0,1].
(a) Explain why 5 is a subspace of C2[0,1].
www.unifreebooks.com
5. Define
Find the exact solution and graph the exact and approximate solutions to-
gether.
The points XQ , Xi,..., xn are called the nodes of the mesh. Often we choose a regular
mesh, with xi — ih, h = t/n. A function p : [0,^] —>• R is piecewise linear (relative
to the given mesh) if, for each i = l , 2 , . . . , n , there exist constants d{, b{, with
www.unifreebooks.com
We now argue that the subspace Sn satisfies the three requirements for an approx-
imating subspace that are listed above. Two of the properties are almost obvious:
1. Since the functions belonging to Sn are piecewise polynomials, they are easy
to manipulate—it is easy to differentiate or integrate a polynomial.
3. Smooth functions can be well-approximated by piecewise linear functions. In-
deed, in the days before hand-held calculators, the elementary transcendental
functions like sin (x) or ex were given in tables. Only a finite number of func-
tion values could be listed in a table; the user was expected to use piecewise
linear interpolation to estimate values not listed in the table.
The fact that smooth functions can be well-approximated by piecewise linear
functions can also be illustrated in a graph. Figure 5.12 shows a smooth func-
tion on [0,1] with two piecewise linear approximations, the first corresponding
to n = 10 and the second to n = 20. Clearly the approximation can be made
arbitrarily good by choosing n large enough.
In order to discuss Property 2, that the stiffness matrix should be sparse,
we must first define a basis for Sn. The idea of piecewise linear interpolation
www.unifreebooks.com
have the same nodal values, since two continuous piecewise linear functions are equal
if and only if they have the same nodal values. Therefore, we substitute x = Xj into
(5.52):
www.unifreebooks.com
Then, in particular,
This implies that all of the coefficients c\, c^,..., c n _i are zero, so {(f>i, 02, • • • ? (f>n-i}
is a linearly independent set. A typical basis function (f)i(x) is displayed in Figure
5.13.
Here is the fundamental observation concerning the finite element method: since
each fa is zero on most of the interval [0,£], most of the inner products a(0j,^>j)
are zero because the product
www.unifreebooks.com
is zero. Therefore, the matrix K turns out to be tridiagonal, that is, all of its entries
are zero except (possibly) those on three diagonals (see Figure 5.14).
to invalidate the entire context on which the Galerkin method depends. In fact,
however, this presents no difficulty—the important fact is that equations defining
the weak form are well-defined, that is, that we can compute
Since <fo is piecewise linear, its derivative dfa/dx is piecewise constant and hence
integrable.
The key to a mathematically consistent treatment of finite element methods
is to use a larger space of functions, one that includes both Cf)[0,l] and Sn as
subspaces. This will show that the basic property of the Galerkin method still holds
when we use Sn as the approximating subspace: the Galerkin method produces the
best approximation from Sn, in the energy norm, to the true solution u. We sketch
this theory in Section 10.3. For a more complete exposition of the theory, we refer
the reader to more advanced texts, for example, Brenner and Scott [6].
The exact solution is u(x] = —ex + (e — l)x + 1. We use a regular mesh with n
subintervals and h = l/n. We then have
www.unifreebooks.com
Therefore,
and
(These calculations are critical, and the reader should make sure he or she thoroughly
understands them. The basis function fa is nonzero only on the interval [(i — l)h, (i+
l)h], so the interval of integration reduces to this subinterval. The square of the
derivative of fa is l/h2 on this entire subinterval. This gives the result for KH. As
for the computation of Ki^+i, the only part of [0,1] on which both fa and fa+i are
nonzero is [ih,(i + l)h]. On this subinterval, the derivative of fa is —l/h and the
derivative of fa+i is l/h.)
This gives us the entries on the main diagonal and first super-diagonal ofK;
since K is symmetric and tridiagonal, we can deduce the rest of the entries. We
also have
It remains only to assemble the tridiagonal matrix K and the right-hand-side vector
f, and solve Ku = f using Gaussian elimination.
For example, for n = 5, we have K G R 4x4 ;
www.unifreebooks.com
The corresponding piecewise linear approximation, together with the exact solution,
is displayed in Figure 5.15.
Figure 5.15. Exact solution and piecewise linear finite element approxima-
tion for -£-% = ex,u(Q) = w(l) = 0 (top). Error in piecewise linear approximation
(bottom).
The exact solution is u(x) = In (1 + x)/ln2 — x. We again use a regular mesh with
n subintervals and h — l/n.
The bilinear form a(-, •) now takes the form
www.unifreebooks.com
We obtain
and
It remains only to assemble the tridiagonal matrix K and the right-hand-side vector
f, and solve Ku = f using Gaussian elimination.
For example, if n — 5, the matrix K is 4 x 4,
and f is a 4-vector,
The resulting u is
The piecewise linear approximation, together with the exact solution, is shown in
Figure 5.16.
• How can the stiffness matrix K and the load vector f be computed efficiently
and automatically on a computer?
• How can the sparse system Ku = f be solved efficiently? (This is primarily an
issue when the problem involves two or three spatial dimensions, since then
K can be very large.)
Another issue that will be important for higher-dimensional problems is the descrip-
tion of the mesh—special data structures are needed to allow efficient computation.
A careful treatment of these questions is beyond the scope of this book, but we will
provide some answers in Chapter 10.
can be solved using the method of "shifting the data" introduced earlier. In this
method, we find a function g(x] satisfying the boundary conditions and define a
www.unifreebooks.com
new BVP for the unknown w(x) = u(x] — g(x). We can apply this idea to the weak
form of the BVP.
A calculation similar to that of Section 5.4.1 shows that the weak form of
(5.55) is
It turns out that solving (5.57) is not much harder than solving the weak formulation
of the homogeneous Dirichlet problem; the only difference is that we modify the
right-hand-side vector f, as we explain below.
Shifting the data is easy because we can delay the choice of the function g until
we apply the Galerkin method; it is always simple to find a finite element function
gn which satisfies the boundary conditions on the boundary nodes (actually, for a
one-dimensional problem like this, it is trivial to find such a function g in any case;
however, this becomes difficult in higher dimensions, while finding a finite element
function to satisfy the boundary conditions, at least approximately, is still easy in
higher dimensions).
The Galerkin problem is:
We choose gn to be piece wise linear and satisfy gn(xo} = a, gn(xn) = /3- the simplest
such function has value zero at the other nodes of the mesh, namely gn = afio+ftfin.
Substituting wn = ^ii=i ai^i m*° (5-58), we obtain, as before, the linear system
Ku = f. The matrix K does not change, but f becomes
The stiffness matrix K is identical to the one calculated in Example 5.21, while the
load vector f is modified as indicated in (5.59). We obtain
Now,
so
and
With n = 5, we obtain
The results are shown in Figure 5.17. In this case, the computed solution equals the
exact solution (the error shown is Figure 5.17 is only due to round-off error in the
computer calculations) (see Exercise 2).
www.unifreebooks.com
Exercises
1. (a) Using direct integration, find the exact solution to the BVP from Exam-
ple 5.21.
(b) Repeat the calculations from Example 5.21, using an increasing sequence
of values of n. Produce graphs similar to Figure 5.16, or otherwise mea-
sure the errors in the approximation. Try to identify the size of the error
as a function of h.34
2. (a) Compute the exact solution to the BVP from Example 5.22.
(b) Explain why, for this particular BVP, the finite element method computes
the exact, rather than an approximate, solution.
3. Use piecewise linear finite elements and a regular mesh to solve the following
34
To perform these calculations for n much larger than 5 will require the use of a computer.
One could, of course, write a program, in a language such as Fortran or C, to do the calculations.
However, there exist powerful interactive software programs that integrate numerical calculations,
programming, and graphics, and these are much more convenient to use. MATLAB is particularly
suitable for the finite element calculations needed for this book, since it is designed to facilitate
matrix computations. Mathematica and Maple are other possibilities.
www.unifreebooks.com
problem:
Here error is defined to be the maximum absolute difference between the exact
and approximate solutions. (Determine the exact solution by integration; you
will need it to compute the error in the approximations.)
4. Repeat Exercise 3 for the BVP
where k and p satisfy k(x) > 0, p(x] > 0 for x G [0,^]. What is the bilinear
form for this BVP?
6. Repeat Exercise 3 for the BVP
The results of the last exercise will be required. The exact solution is
www.unifreebooks.com
where
The "data" for (5.61) is the forcing function /, which is a function of the spatial
variable x. By two integrations, we can determine a formula for u in terms of /:
(To verify the last step, the reader should sketch the domain of integration for the
double integral, and change the order of integration.) We can thus write the solution
as
www.unifreebooks.com
where
By inspection of formula (5.62), we see that, for a particular x, the value u(x) is
a weighted sum of the data / over the interval [0,£]. Indeed, for a given x and y,
g ( x ; y ) indicates the effect on the solution u at x of the data / at y. The function
g is called the Green's function for BVP (5.61).
To expose the meaning of the Green's function more plainly, we consider a
right-hand-side function / that is concentrated at a single point x = £. We define
dAx by
(see Figure 5.18) and let f&x(x) = d^x(x — ^). The solution of (5.61), with / = /A X)
is
Since
for all Ax, we see that u(x) is a weighted average of g(x; y) (considered as a function
of y) over the interval £ — Ax < y < £ + Ax. As Ax —>• 0, this weighted average
converges to <?(x;£).
We now interpret this result in terms of a specific application. We consider
an elastic bar of length I and stiffness k(x) hanging with one end fixed at x = 0
and the other end (at x = K) free. The displacement u of the bar is modeled by the
BVP (5.61), where / is the external force density (in units of force per volume).
The quantity
and /AX is zero except on the interval [£ — Ax,£+Ax], we see that the total pressure
exerted on the bar is A and it is concentrated more and more at x = £ as Ax -> 0.
In the limit, the external force on the bar consists of a pressure of 1 unit acting
on the cross-section of the bar at x = £. The response of the bar, in the limit, is
w(x) =g(x]£).
www.unifreebooks.com
Thus we see that, for a fixed £, g(x; £) is a solution to (5.61) for a special right-
hand side—a forcing function of magnitude 1 concentrated at x = £. However, this
forcing function is not a true function in the usual sense. Indeed, the function d^\x
has the following properties:
The "function" 8 is not a function at all—any ordinary function d has the property
that if d is nonzero only at a single point on an interval, then the integral of d over
that interval is zero. However, it is useful to regard 8 as a generalized function. The
particular generalized function 8 is called the Dirac delta function (or simply the
delta function) and is defined by the siftinq property:
If g is a continuous function and 0 e [0,6], then Ja 8(x)g(x}dx =
c/(0). If 0 <£ [a, 6], then fc S(x}g(x) dx = 0.
By a simple change of variables, we see that the following property also holds:
If g is a continuous function and £ G [a, 6], then J 8(x)g(x — £} dx =
0(0-
Since S is formally an even function (8(—x) = 8(x)), we also have
If g is a continuous function and £ e [a, 6], then J 8(x)g(£ — x}dx =
0(0.
Since 6 is not a function, but a generalized function, we regard the last two properties
as assumptions.
From this discussion, we see that the Green's function g for (5.61) has the
property that u(x) = g(x; £) is the solution of the BVP
We can verify this result using physical reasoning; this is particularly simple
in the case of a homogeneous bar. We consider the following thought experiment:
We apply a unit pressure (in the positive direction) to the cross-section at x = £ 6
(0,^). (It is not obvious how such a pressure could actually be applied in a physical
experiment, which is why we term this a "thought experiment.") Since the bar is
fixed at x = 0, and the end at x — t is free, it is not hard to see what the resulting
displacement will be. The part of the bar originally between x = 0 and x — £ will
stretch from its original length of £ to a length of £ + A£, where
What about the part of the bar originally between x = £ and x = 11 This part of
the bar is not stretched at all; it merely moves because of the displacement in the
part of the bar above it. We therefore obtain
or simply
(see Figure 5.19). Thus we see that u(x) = g(x;£), where g is given by (5.63)
(specialized to the case in which k is constant).
Example 5.23. Consider BVP (5.61) with 1=1, k(x) = 1-x, and f ( x ) = 1. We
have
www.unifreebooks.com
Therefore,
Our results above show that, for each / € C[0,£], there is a unique solution to
Ku = f . In other words, K is an invertible operator. Moreover, the solution to
Ku = f is u = Mf, where M : C[0,l] -> C^[0,£] is denned by
x
Therefore, KM f = /, which shows that M = K , the inverse operator of K. It
follows that
must also hold. Thus the Green's function defines the inverse of the differential
operator.
Exercises
1. Use the Green's function to solve (5.61) when t = 1, /(#) = 1, and k(x) = ex.
2. Prove directly (by substituting u into the differential equation and boundary
conditions) that the function u defined by (5.62) and (5.63) solves (5.61).
www.unifreebooks.com
(a) Using physical reasoning (as on page 205), determine a formula for the
Green's function in the case that k is constant.
(b) Derive the Green's function for the BVP (with a possibly nonconstant
k} by integrating the differential equation twice and interchanging the
order of integration in the resulting double integral.
(c) Simplify the Green's function found in Exercise 3b in the case that the
stiffness k is constant. Compare to the result in part 3a.
(d) Use the Green's function to solve (5.66) for 1=1, f ( x ) = x, k(x) = 1 + x.
4. Consider the BVP
(a) Using physical reasoning (as in the text), determine a formula for the
Green's function in the case that k is constant. (Hint: Since the bar
is homogeneous, the displacement function u(x) = g(x; y) (y fixed) will
be piecewise linear, with w(0) = u(i) = 0. Determine the displacement
of the cross-section at x = y by balancing the forces and using Hooke's
law, and then the three values w(0), u(y], and u(i] will determine the
displacement function.)
(b) Derive the Green's function for the BVP, still assuming that k is constant,
by integrating the differential equation twice and interchanging the order
of integration in the resulting double integral. Verify that you obtain the
same formula for the Green's function.
(c) (Hard) Derive the Green's function in the case of a nonconstant stiffness
k(x).
5. Since the BVP (5.61) is linear, the principle of superposition holds, and the
solution to
www.unifreebooks.com
is u(x) — w(x) + v(x), where w solves (5.61) (hence w is given by (5.62)) and
v solves
Solve (5.67) and show that the solution can be written in terms of the Green's
function (5.63).
and rewrite
The purpose of this problem is to derive the Fourier sine series of g(x] y) in
three different ways. Since g depends on the parameter y, its Fourier sine
coefficients will be functions of y.
(a) First compute the Fourier sine series of g(x; y) directly (that is, using
the formula for the Fourier sine coefficients of a given function), using
the formula for g as determined in Exercise 4.
(b) Next, derive the Fourier sine series of g(x; y) as follows: Write down
the Fourier series solution to the BVP. Pass the summation through the
integral defining the Fourier coefficients of the right-hand side /. Identify
the Fourier sine series of the Green's function g(x; y).
www.unifreebooks.com
using the Fourier series method. Use the sifting property of the delta
function to determine its Fourier coefficients.
Verify that all three methods give the same result.
Chapter 6
This PDE models the temperature distribution u(x,t) in a bar (see Section 2.1) or
the concentration w(ar, t] of a chemical in solution (see Section 2.1.3). Since the first
time derivative of the unknown appears in the equation, we need a single initial
condition.
Our first model problem will be the following initial-boundary value problem
(IBVP):
We apply the Fourier series method first and then turn to the finite element method
We close the chapter with a look at Green's functions for this and related problems
Along the way we will introduce new combinations of boundary conditions.
211
www.unifreebooks.com
series representation of u(x,t) (regarded as a function of x). The series takes the
form
The function u will then automatically satisfy the boundary conditions in (6.1).
We must choose the coefficients an(t) so that the PDE and initial condition are
satisfied.
We represent the right-hand side f ( x , t ] in the same way:
We then express the left-hand side of the PDE as a Fourier series, in which the
Fourier coefficients are all expressed in terms of the unknowns ai(i), a^t], To
do this, we have to compute the Fourier coefficients of the functions
and
Just as with the function u itself, we are using the Fourier series to represent the
spatial variation (i.e. the dependence on x} of these functions. Since they also
depend on t, the resulting Fourier coefficients will be functions of t.
To compute the Fourier coefficients of
we integrate by parts twice, just as we did in the previous chapter, and use the
boundary conditions to eliminate the boundary terms:
www.unifreebooks.com
We used the conditions sin (0) = sin (n?r) = 0 and w(0, t] = u(l,t) = 0 in canceling
the boundary terms in the above calculation.
We now compute the Fourier sine coefficient of pcdu/dt. Using Theorem 2.1,
we have
Since
where 61,62; • • • are the Fourier sine coefficients of ijj(x). Therefore, we obtair
These conditions provide initial conditions for the ODEs. To find an(t), we solve
the IVP
www.unifreebooks.com
The coefficients cn(t] and bn are computable from the given functions f ( x , t ) and
$(%)•
The IVP (6.2) is of the type considered in Section 4.2.3, and we have a formula
for the solution:
Example 6.1. We consider an iron bar, of length 50cm, with specific heat c —
0.437 J/(gK), density p = 7.88 g/cm3, and thermal conductivity K = 0.836 Wf(cmK).
We assume that the bar is insulated except at the ends and that it is (somehow) given
the initial temperature
where ^(x) is given in degrees Celsius. Finally, we assume that, at time t — 0, the
ends of the bar are placed in an ice bath (0 degrees Celsius). We will compute the
temperature distribution after 20, 60, and 300 seconds.
We must solve the IBVP
The solution is
and
where K, p, and c have the values given above. This gives us an explicit formula for
the solution u,
Figure 6.1. The solution u(x,t) from Example 6.1 at times 0, 20, 60, and
300 (seconds). Ten terms of the Fourier series were used to create these curves.
1. For a fixed time t > 0, the Fourier coefficients an(t] decay exponentially as n —>•
oo (cf. equation (6.3), in which the second term is zero for the homogeneous
heat equation). Since larger values of n correspond to higher frequencies, this
shows that the solution u(x,t) is very smooth as a function of x for any t > 0.
www.unifreebooks.com
2. For each fixed n, the Fourier coefficient an(t) decays exponentially as t —>• oo.
Moreover, the rate of decay is faster for larger n. This is another implication of
the fact that the temperature distribution u becomes smoother as t increases,
and means that, as t grows, fewer and fewer terms in the Fourier series are
required to produce an accurate approximation to the solution u(x,t}. When
t is large enough, the first term from the Fourier series provides an excellent
approximation to the solution.
As an illustration of this, we graph, in Figure 6.2, the difference between
u(x, t) and the first term of its Fourier series for t = 10, t = 20, and t = 300.
(We used 10 terms of the Fourier series to approximate the exact solution.
Figure 6.2 suggests that this is plenty.)
3. The material characteristics of the bar appear in the formula for the solution
www.unifreebooks.com
Figure 6.2. The error in approximating, at times 0, 20, 60, and 300 (sec-
onds), the solution u(x,t) from Example 6.1 with only the first term in its Fourier
series.
For example, in the case of the iron bar of Example 6.1, we have
If the bar were made of aluminum instead, with p — 2.70, c = 0.875, and
K = 2.36, and still had length 50cm, we would have
6.1.2 Nondimensionalization
Point 3 above raises the following question: Suppose we cannot solve a PDE explic-
itly. Can we still identify the critical parameters (or combination of parameters)
www.unifreebooks.com
in the problem? In the case of the homogeneous heat equation, the parameters p,
c, K, and t are not significant individually, but rather in the combination K/(pcl2).
Can we deduce this from the equation itself, rather than from its solution?
It turns out that this is often possible through nondimensionalization, which
is the process of replacing the independent variables (and sometimes the dependent
variable) with nondimensional variables. We continue to consider heat flow in a
bar. The independent variables are x and t. The spatial variable has dimensions of
cm, and it is rather obvious how to nondimensionalize x—we describe the spatial
location in terms of the overall length t of the bar. That is, we replace x with
parameter units
P g/cm3
c J/(gK)
K J/(scmK)
t cm
and
is equivalent to
which simplifies to
www.unifreebooks.com
Example 6.2. The diffusion coefficient for carbon monoxide (CO) in air is D =
0.208cm 2 /s. We consider a pipe of length 100cm, filled with air, that initially
contains no CO. We assume that the two ends of the pipe open onto large reservoirs
of air, also containing no CO, and that CO is produced inside the pipe at a constant
rate of 10~7 g/cm3 per second. We write u(x, t}, 0 < x < 100, for the concentration
of CO in air, in units of g/cm3, and model u as the solution of the IBVP
35
For a thorough discussion of nondimensionalization and scale models, see [36], Chapter 6.
www.unifreebooks.com
so that
We have
where
Example 6.3. We suppose that the iron bar of Example 6.1 is heated to a constant
temperature of 4 degrees Celsius, and that one end (x = 0) is placed in an ice bath
(0 degree Celsius), while the other end is maintained at 4 degrees. What is the
temperature distribution after 5 minutes ?
The IBVP is
Since p(x) = 4#/50 satisfies the boundary conditions, we will define v(x,t) =
u(x,t) — p(x). Then, as is easily verified, v satisfies
www.unifreebooks.com
where
The solution
so the solution is
satisfies these conditions. The reader should notice that the function v(x,i) =
u(x, t) —p(x, t] will not satisfy the same PDE as does w; the right-hand side will be
different. See Exercise 5.
www.unifreebooks.com
Figure 6.5. The temperature distribution after 300 seconds (see Example 6.3).
As t —>• oo, the first term tends to zero for each n, and so
(see Exercise 2). It should be noted that the initial temperature distribution is
irrelevant in determining the steady-state temperature distribution.
Similar results hold for the diffusion equation, which is really no different from
the heat equation except in the meaning of the parameters. Indeed, Example 6.2
is an illustration; the concentration u approaches a steady-state concentration, as
suggested by Figure 6.4 (see Exercise 1).
In the next section, we will turn our attention to two new sets of boundary
conditions for the heat equation and derive Fourier series methods that apply to
the new boundary conditions. First, however, we briefly discuss another derivation
of the Fourier series method.
The reader should notice that the PDE is homogeneous; this is necessary and a
significant limitation of this technique.
Here is the key idea of the method of separation of variables: we look for
separated solutions: u(x, t) = X(x)T(t) (X and T are functions of a single variable).
Substituting; u into the PDE vields
www.unifreebooks.com
The last step follows upon dividing both sides of the equation by XT. The crucial
observation is the following:
is a function of t alone. The only way these two functions can be equal is if they
are both constants:
(the function T(t) cannot be zero, for otherwise u is the trivial solution).
We see that the function X must satisfy the eigenvalue problem
We then have
Exercises
1. What is the steady-state solution of Example 6.2? What BVP does it satisfy?
2. Find the Fourier sine series of the solution of (6.6) and show that it equals
u8(x).
3. Solve the following IBVP using the Fourier series method:
Define
6.2. Pure Neumann conditions and the Fourier cosine series 229
12. Consider a 100 cm circular bar, with radius 4 cm, designed so that the thermal
conductivity is nonconstant and satisfies K(X) = 1 + ax W/(cmK) for some
a > 0. Assume that the sides of the bar are completely insulated, one end
(x = 0) is kept at 0 degrees Celsius, and heat is added to the other end at
a rate of 4 W. The temperature of the bar reaches a steady state, u = u(x),
and the temperature at the end x = 100 is measured to be
Estimate a.
13. Compute the Fourier sine coefficients of each of the following functions, and
verify the statements on page 216 concerning the rate of decay of the Fourier
coefficients. (Take the interval to be [0.11.)
The eigenvalue/eigenfunctions pairs for Lm, the negative second derivative operator
under the mixed boundary conditions (Dirichlet at the left, Neumann at the right
are
then u will satisfy the boundary conditions. Just as in the previous section, we
can derive an ODE with an initial condition for each coefficient an(t) and thereby
determine u. We will illustrate with an example.
Example 6.4. We consider the temperature distribution in the iron bar of Example
6.1, with the experimental conditions unchanged except that the right end (x = I)
of the bar is perfectly insulated. The temperature distribution u(x,t) then satisfies
the IBVP
We have
where
www.unifreebooks.com
6.2. Pure Neumann conditions and the Fourier cosine series 231
The PDE and initial condition for u then imply that the coefficient an(t) must satisfy
the following IVP:
The solution is
Unlike the negative second derivative operator under the other sets of boundary
conditions we have considered, LN has a nontrivial null space; indeed, L^u = 0 if
and only if u is a constant function (see Example 3.17). Therefore, AQ = 0 is an
eigenvalue of LN with eigenfunction 70 (x) = 1. It is straightforward to show that
LJV is symmetric, so that its eigenvalues are real and eigenfunctions corresponding to
distinct eigenvalues are orthogonal. Moreover, apart from AQ, the other eigenvalues
of Z/jv are positive (see Exercise 3). We now determine these other eigenvalues and
the corresponding eigenfunctions.
www.unifreebooks.com
Figure 6.6. The solution u(x,t) from Example 6.4 at times 0, 20, 60, and
300 (seconds). Ten terms of the Fourier series were used to create these curves.
Therefore,
and
so the first boundary condition implies C2 = 0. We then have u(x] = c\ cos (Ox) and
the second boundary condition becomes
www.unifreebooks.com
6.2. Pure Neumann conditions and the Fourier cosine series 233
that is, if
(we disregard the possibility that c\ = 0, as this does not lead to an eigenfunction).
The value of the constant c\ is irrelevant.
We thus see that the operator
The eigenfunctions are orthogonal, as we knew they would be due to the symmetry
of I/AT-
By the projection theorem, the best approximation to / G C*[0,£] from the
subspace spanned by
is
where
that is,
www.unifreebooks.com
where the convergence is in the mean-square sense (not necessarily in the pointwise
sense—the distinction will be discussed in detail in Section 9.4.1). This is the
Fourier cosine series of the function /, and the coefficients 6 0 , & i , & 2 , - - - are the
Fourier cosine coefficients of /.
We can now solve the following IBVP for the heat equation:
We write the unknown solution u(x, t) in a Fourier cosine series with time-
dependent Fourier coefficients:
The problem of determining u(x,t) now reduces to the problem of solving for
b0(t),bi(t),b2(t),.... We write the PDE
in terms of Fourier cosine series; this requires determining formulas for the Fourier
cosine coefficients of du/dt(x,t) and —d2u/dx2(x,t) in terms of the Fourier coeffi-
cients of u(x, t). By Theorem 2.1, we have
6.2. Pure Neumann conditions and the Fourier cosine series 235
Therefore,
We equate the two series, given in (6.12) and (6.13), and obtain
Example 6.5. We continue to consider the iron bar of Example 6.1, now with both
ends insulated. We must solve the IBVP
and then
Also,
www.unifreebooks.com
6.2. Pure Neumann conditions and the Fourier cosine series 237
where
that is,
Thus we solve
to get
and
to get
where
Therefore,
with ^0,^1,^2,... given above. Figure 6.7 is analogous to Figures 6.1 and 6.6,
showing snapshots of the temperature distribution at the same times as before. It
also shows the equilibrium temperature; an inspection of the formula for u(x,t)
makes it clear that u(x,t} -> do = 5/2 as t —> oo.
Figure 6.7. The solution u(x,t] from Example 6.5 at times 0, 20, 60, and
300 (seconds). Ten terms of the Fourier series were used to create these curves.
6.2. Pure Neumann conditions and the Fourier cosine series 239
a solution or the solution is not unique! We already discussed this fact in Examples
3.14 and 3.17 in Section 3.2. For emphasis, we will repeat the justification from
several points of view.
Physical reasoning
The source function f ( x ) in (6.15) represents the rate at which (heat) energy is
added to the bar (in units of energy per time per volume). It depends on x (the
position in the bar) because we allow the possibility that different parts of the bar
receive different amounts of heat. However, it is independent of time, indicating that
the rate at which energy is added is constant. Clearly, for a steady-state solution to
exist, the total rate at which energy is added must be zero; if energy is added to one
part of the bar, it must be taken away from another part. Otherwise, the total heat
energy in the bar would be constantly growing or shrinking, and the temperature
could not be constant with respect to time. All of this implies that (6.15) may not
have a solution; whether it does depends on the properties of /(#).
On the other hand, if (6.15) does have a solution, it cannot 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,
is not uniquely determined by the BVP.
Mathematical reasoning
Recall that f ( x ) has units of energy per unit volume per unit time; the total rate
at which energy is added to the bar is
or simply
must hold in order for a solution to exist. But we can see this directly from the
BVP. Suppose u is a solution to (6.15). Then
www.unifreebooks.com
and
Therefore, v is another solution of (6.15), and this is true for any real number C.
This shows that if (6.15) has a solution, then it has infinitely many solutions.
Then, computing the cosine coefficients of —d?u/dx2(x) in the usual way, we have
(note that the constant term 60 vanishes when u(x) is differentiated). Also,
where
Equating the series for —Kd?u/dx2(x) and /(#), we find that the following equations
must hold:
Since the coefficient co,ci,C2,... are given and the coefficients O o ? 0 i 5 0 2 , - - - are to
be determined, we can choose
and thereby satisfy all but the first equation. However, the equation
www.unifreebooks.com
6.2. Pure Neumann conditions and the Fourier cosine series 241
Thus we see again that the compatibility condition (6.16) must hold in order for
(6.15) to have a solution.
Moreover, assuming that CQ = 0 does hold, we see that the value of 60 is
undetermined by the BVP. Indeed, with CQ = 0, the general solution of the BVP is
where 60 can take on any value. Thus, when a solution exists, it is not unique.
It is easy to show, by direct integration, that the solution set consists of all constant
functions defined on [0,£]. Therefore, the compatibility condition suggested by the
finite-dimensional situation is that (6.15) has a solution if and only if / is orthogonal
to every constant function. But
is equivalent to
or simply to
Summary
As the above example shows, a steady-state (time-independent) BVP with pure
Neumann conditions can have the property that either there is no solution or there
is more than one solution. It is important to note, however, that this situation
depends on the differential operator as well as on the boundary conditions. For
example, the BVP
(K, a > 0) has a unique solution, and there is no compatibility condition imposed
on /. The difference between (6.18) and (6.15) is that the differential operator in
(6.18) involves the function u itself, not just the derivatives of u. Therefore, unlike
in problem (6.15), the addition of a constant to u is not "invisible" to the PDE.
Exercises
1. Solve the IBVP
and graph the solution at times 0,0.02,0.04,0.06, along with the steady-state
solution.
2. Solve the IBVP
and graph the solution at times 0,0.02,0.04,0.06, along with the steady-state
solution.
3. (a) Show that Ljy is symmetric.
www.unifreebooks.com
6.2. Pure Neumann conditions and the Fourier cosine series 243
8. Consider the experiment described in Exercise 6.1.8. Suppose that, after the
20 minutes are up, the ends of the bar are removed from the ice bath and are
insulated. Compute the eventual steady-state temperature distribution in the
bar.
10. Consider an iron bar (p = 7.87 g/cm3, c = 0.449 J/(gK), K = 0.802 W/(cm K))
of length 1 m and cross-sectional area 2 cm2. Suppose that the bar is heated to
a constant temperature of 30 degrees Celsius, the left end (x = 0) is perfectly
insulated, and heat energy is added to (or taken from) the right end (x — 100)
at the rate of 1W (the variable x is given in centimeters). Suppose further
that heat energy is added to the interior of the bar at a rate of 0.1 W/cm3.
(a) Explain why the temperature will not reach steady state.
(b) Compute the temperature distribution u(x, t] by formulating and solving
the appropriate IBVP, and verify that u(x, t) does not approach a steady
state.
(c) Suppose that, instead of the left end's being insulated, heat energy is
removed from the left end of bar. At what rate must energy be removed
if the temperature distribution is to reach a steady state?
(d) Verify that your answer to the previous part is correct by formulating
and solving the appropriate IBVP and showing that u(x,t) approaches
a limit.
(e) Suppose that a steady state is to be achieved by holding the temperature
at the left end at a fixed value. What must the value be? Explain.
11. The purpose of this exercise is to show that if u(x,t) satisfies homogeneous
Neumann conditions, and u(x,t) is represented by a Fourier sine series, then a
www.unifreebooks.com
6.3. Periodic boundary conditions and the full Fourier series 245
and u satisfies
of u. Then compute the series (6.19), and explain why it does not equal
-d2u/dx2(x,t).
(see Figure 6.8). We can model the flow of heat in the ring by the heat equation
however, the variable x, representing the cross-section of the bar, is now related to
the polar angle 9. Purely for mathematical convenience, we will assume that the
length of the bar is 21, and we will label the cross-sections by x € (—£,^j, where
x = Oi/7r. In particular, x — —t and x = t now represent the same cross-section of
the bar.
There is an additional level of approximation involved in modeling heat flow in
a circular bar (as compared to a straight bar) by the one-dimensional heat equation.
www.unifreebooks.com
We mentioned earlier that, in the case of the straight bar, if the initial temperature
distribution and the heat source depend only on the longitudinal coordinate, then
so does the temperature distribution for any subsequent time. This is not the case
for a circular bar, as the geometry suggests (for example, the distance around the
ring varies from It — 2-jrS to It + 2-jrS, depending on the path). Nevertheless, the
modeling error involved in using the one-dimensional heat equation is not large
when the bar is thin (i.e. when 6 is small compared to t).
We will consider an initial condition as before:
A ring does not have physical boundaries as a straight bar does (a ring has a lateral
boundary, which we still assume to be insulated, but it does not have "ends").
However, since x = — t represents the same cross-section as does x = l,we still have
boundary conditions:
(the temperature and temperature gradient must be the same whether we identify
the cross-section by x = —lorbyx = l). These equations are referred to as periodic
boundary conditions.
We therefore wish to solve the following IBVP:
www.unifreebooks.com
6.3. Periodic boundary conditions and the full Fourier series 247
As we have seen several times now, the first step is to develop a Fourier series
method for the related BVP
**j
6.3.1 Eigenpairs of — -£-5 under periodic boundary conditions
We define
where
Using techniques that are by now familiar, the reader should be able to demonstrate
that
Lp is symmetric, and
and
and, moreover, that with one of these values for A, every function of the form
satisfies (6.22).
Now,
are linearly independent, which means that there are two independent eigenfunc-
tions for each positive eigenvalue, a situation we have not seen before. The complete
list of eigenpairs for the negative second derivative operator, subject to periodic
boundary conditions, is
is orthogonal to both
Similarly,
www.unifreebooks.com
6.3. Periodic boundary conditions and the full Fourier series 249
is orthogonal to both
where
We will show in Section 9.6 that the full Fourier series of a C[—l, I] function con-
verges to it in the mean-square sense (that is, that the sequence of partial Fourier
series converges to the function in the I/2-norm).
where the coefficients ao, ai, 02, • • • , &i, &2, • • • are to be determined. Then u au-
tomatically satisfies the periodic boundary conditions. The full Fourier series for
—d2u/dx2 is given by
where the coefficients CQ, ci, C 2 , . . . , d i ,fife?• • • can be determined explicitly, since /
is known. Then the differential equation
implies that the Fourier series (6.27) and (6.28) are equal and hence that
From these equations, we deduce first of all that the source function / must satisfy
the compatibility condition
Example 6.6. We consider a thin gold ring, of radius 1cm. In the above notation,
then, I = TT. The material properties of gold are
We assume that heat energy is being added to the ring at the rate of
Since
www.unifreebooks.com
6.3. Periodic boundary conditions and the full Fourier series 251
the BVP
(we take ao = 0, thus choosing one of the infinitely many solutions). We then have
Also,
where
(The value of CQ is already known to be zero since f satisfies the compatibility con-
dition.) Equating the last two series yields
Thus
A graph of u is shown in Figure 6.9. We emphasize that this solution really only
shows the variation in the temperature—the true temperature is u(x) + C for some
real number C. The assumptions above do not give enough information to determine
C; we would have to know the amount of heat energy in the ring before the heat
source f is applied.
www.unifreebooks.com
Figure 6.9. The temperature distribution in Example 6.6. This graph was
computed using 10 terms of the Fourier series.
6.3. Periodic boundary conditions and the full Fourier series 253
We then write the source term /(#,£) as the (time-varying) full Fourier series,
Substituting (6.31), (6.32), and (6.33) into the heat equation and equating
coefficients yield
We can solve these ODEs for the unknown coefficients once we have derived initial
conditions. These come from the initial condition for the PDE, just as in Section
6.1. We write the initial value ib(x] in a full Fourier series, sav
We also have
Example 6.7. We consider again the ring of Example 6.6. We will assume that
the temperature in the ring is initially 25 degrees Celsius, and that at time t = 0
(t measured in seconds), heat energy is added according to the function f given in
that example. We wish to findu(x,t], which describes the evolution of temperature
in the ring. To do this, we solve the IBVP
We already have the full Fourier series of f , and the initial temperature distribution
is given by a full Fourier series with exactly one nonzero term, namely, the constant
term 25. We must therefore solve the IVPs
Snapshots of this temperature distribution are shown in Figure 6.10. The reader
should notice the relationship between the steady-state temperature of the ring and
the solution to the previous example.
www.unifreebooks.com
6.3. Periodic boundary conditions and the full Fourier series 255
Figure 6.10. The solution w(x,t) to Example 6.7 at times 0, 0.25, 0.5,
and 1 (seconds), along with the steady-state solution. These solutions were estimated
using 10 terms in the Fourier series.
Exercises
1. Repeat Example 6.6, assuming the ring is made of silver instead of gold:
p = 10.5 g/cm3, c = 0.235 J/(gK), « = 4.29 W/(cm K). How does the steady-
state temperature compare to that of the gold ring?
2. Repeat Example 6.7, assuming the ring is made of silver instead of gold:
p = 10.5g/cm3, c = 0.235 J/(gK), K = 4.29W/(cmK).
3. Consider a ring, 5cm in radius, made of lead (which has physical properties
p = 11.3 g/cm3, c = 0.129 J/(gK), « = 0.353 W/(cm K)). Suppose, by heating
one side of the ring, the temperature distribution
is induced. Suppose the heat source is then removed and the ring is allowed
to cool.
(a) Write down an IBVP describing the cooling of the ring.
(b) Solve the IBVP.
(c) Find the steady-state temperature of the ring.
(d) How long does it take the ring to reach steady state (within 1%)?
www.unifreebooks.com
4. Consider the lead ring of the previous exercise. Suppose the temperature is
a constant 25 degrees Celsius, and an (uneven) heat source is applied to the
ring. If the heat source delivers heat energy to the ring at a rate of
how long does it take for the temperature at the hottest part of the ring to
rpa.rh 30 HPCTTPPS ("Iplsiiifi?
6. Assuming that u is a smooth function defined on [—£, £], the full Fourier series
of u is given by (6.26), and u satisfies periodic boundary conditions, show that
the full Fourier series of —d^u/dx2 is given by (6.27).
8. Show that the Fourier series representation (6.32) follows from (6.30) and
Theorem 2.1.
We begin by deriving the weak form of the IBVP, following the pattern of Section
5.4.2 (multiply the differential equation by a test function and integrate by parts
on the left). In the following calculation, V is the same space of test functions used
for the problem in statics:
We have
We integrate by parts in the second term on the left; the boundary term from
integration by parts vanishes because of the boundary conditions on the test function
v(x), and we obtain
This is the weak form of the IBVP. To get an approximate solution, we apply the
Galerkin method with approximating subspace
where the piecewise linear functions are defined on the grid 0 = XQ < x\ < • • • <
xn = t and {0i, 02? • • • , 0n-i} is the standard basis defined in the previous chapter.
For each t, the function u(-,t] must lie in Sn, that is,
www.unifreebooks.com
or
If we now define the mass matrix matrix M and the stiffness matrix K by
(The names "mass matrix" and "stiffness matrix" for M and K, respectively, arise
from the interpretation for similar matrices appearing in mechanical models. We
have already seen the stiffness matrix in Chapter 5; we will see the mass matrix in
Chapter 7. In the context of the heat equation, these names are not particularly
meaningful, but the usage is well established.)
The initial condition u(x,to) = ip(x), 0 < x < t can be approximately imple-
mented as
www.unifreebooks.com
satisfies
We call V> the piecewise linear interpolant of tf}(x) (see Figure 6.11 for an example).
Figure 6.11. ^(x) = sin (STTX) and its piecewise linear interpolant.
where
www.unifreebooks.com
1
To solve this, we can multiply the ODE on both sides by M to obtain
that is,
We will approximate the solution using piecewise linear finite elements with a regular
mesh of 100 subintervals. We write n = 100, h = 100/n, Xi = ih, i = 0,1,2,..., n.
37
In practice, we do not actually compute either M"1 or A. When implementing numerical
algorithms, it is rarely efficient to compute an inverse matrix, particularly when the matrix is
sparse, as in this case. Instead, the presence of M"1 is a signal that a linear system with coefficient
matrix M must be solved. This is explained below when we discuss the implementation of Euler's
method and the backward Euler method.
www.unifreebooks.com
As usual, {(f)i, 02, • • • , 0n-i} will be the standard basis for the subspace Sn of con-
tinuous piecewise linear finite elements. It is straightforward to compute the mass
and stiffness matrices:
We first try taking N = 180 steps (At = 1 s) of Euler's method; however, the result
is meaningless, with temperatures on the order of 1040 degrees Celsius! Clearly
Euler's method is unstable with this choice of At. A little experimentation shows that
At cannot be much more than 0.7 seconds, or instability will result. The temperature
distribution att = 180 seconds, computed using 260 time steps (At = 0.69J, is shown
in Figure 6.12.
Before leaving this example, we should explain how Euler's method is imple-
mented in practice. The system of ODEs is
Figure 6.12. The temperature distribution in Example 6.8 after 180 sec-
onds (computed using the forward Euler method, with At = 0.69J.
Therefore, one tridiagonal solve is required during each iteration, at a cost of O(8n)
operations, instead of a multiplication by a dense matrix, which costs O(2n2) oper-
ations.38
Although the time step of At = 0.7 seconds, required in Example 6.8 for
stability, does not seem excessively small, it is easy to show by numerical experi-
mentation that a time step At on the order of h2 is required for stability. (Exercise
10 asks the reader to verify this for Example 6.8.) That is, if we wish to refine the
spatial grid by a factor of 2, we must reduce the time step by a factor of 4. This
is the typical situation when we apply the method of lines to the heat equation:
The resulting system of ODEs is stiff, with the degree of stiffness increasing as the
spatial grid is refined.
The reason for the stiffness in the heat equation is easy to understand on
an intuitive level. The reader should recall from Section 4.5 that stiffness arises
when a (physical) system has components that decay at very different rates. In
heat flow, the components of interest are the spatial frequencies in the temperature
distribution. High frequency components are damped out very quickly, as we saw
from the Fourier series solution (see Section 6.1.1). Low frequency components, on
the other hand, decay more slowly. Moreover, as we refine the spatial grid, we can
38
We can even do a bit better, by factoring the matrix M once (outside the main loop) and
then using the factors in the loop to solve for s^). This reduces the cost to O(6n) per iteration.
Factorization of matrices is discussed briefly in Section 10.2.
www.unifreebooks.com
Example 6.9. We now apply the backward Euler method to the previous example.
Using n = 100 subintervals in space and At = 2 (seconds), we obtain the result
shown in Figure 6.13. Using a time step for which Euler's method is unstable, we
produced a result which is qualitatively correct.
The backward Euler method takes the form
Figure 6.13. The temperature distribution in Example 6.8 after 180 sec-
onds (computed using the backward Euler method, with At = 1).
Exercises
Show that the mass matrix M is nonsingular. (Hint: This follows from the
general result that if {ui,U2,... ,u n } is a linearly independent set in an in-
ner product space, then the Gram matrix G defined by Gij = (uj, Uj) is
nonsingular. To prove this, suppose Gx = 0. Then (x, Gx) = 0, and by
www.unifreebooks.com
Use the finite element method, with the approximating subspace 83 (and a
regular grid), to do the discretization in space.
(a) Explicitly compute the mass matrix M, the stiffness matrix K, and the
load vector f(t).
(b) Explicitly set up the system of ODEs resulting from applying the method
of lines.
4. Consider a heterogeneous bar, that is, a bar in which the material properties
/9, c, and K are not constants but rather functions of space: p = p(x), c = c(x),
K = K(X).
(a) What is the appropriate form of the heat equation for this bar?
(b) What is the appropriate weak form of the resulting IBVP (assuming
homogeneous Dirichlet conditions)?
(c) How does the system of ODEs change?
5. An advantage of the weak formulation of a BVP (and therefore of the fi-
nite element method) is that the equation makes sense for discontinuous
coefficients. Consider a metal bar of length 1m and diameter 4cm. As-
sume that one-half of the bar is made of copper (c = 0.379 J/(gK), p =
8.97g/cm3, K = 4.04 W/(cmK)), and the other half is made of iron (spe-
cific heat c = 0.437 J/(gK), density p = 7.88 g/cm3, thermal conductivity
K = 0.836 W/(cmK)). Suppose the bar is initially heated to 5 degrees Celsius
and then (at time 0) its ends are placed in an ice bath (0 degrees Celsius).
www.unifreebooks.com
and
(c) Illustrate by solving (6.43) with /9, c, K equal to the material constants
for iron, t = 100cm, ^)(x) = 0 degrees Celsius, a(t] = 0, and b(t) =
sin (607r£).
7. Consider the IBVP from Examples 6.8 and 6.9.
(a) Using the method of Fourier series, find the exact solution u(x,t).
(b) Using enough terms in the Fourier series to obtain a highly accurate
solution, evaluate u(x, 180) on the regular grid with n = 100 used in
Examples 6.8 and 6.9.
(c) Reproduce the numerical results in Examples 6.8 and 6.9, and, by com-
paring to the Fourier series result, determine the accuracy of each result.
8. Repeat Example 6.8, with the following changes. First, assume that the bar
is made of copper (p = 8.96g/cm3, c = 0.385 J/(gK), K = 4.01 W/(cmK))
instead of iron. Second, assume that the heat "source" is given by
(note that / adds energy over part of the interval and takes it away over an-
other part). Graph the temperature after 180 seconds. Does the temperature
approach a steady state as t ->• oo?
www.unifreebooks.com
To derive the weak form, we multiply both sides of the differential equation by a
test function, and integrate by parts. We take for our space of test functions
In the context of (6.45), we refer to (6.44) as the strong form of the BVP.
Now, V C V, where V is defined as the space of test functions used for a Dirichlet
problem:
Therefore, in particular, (6.46) holds for all v e V. Since the boundary term in
(6.46) vanishes when v(0) = v(t} = 0, we obtain
or
Thus, if u satisfies the weak form of the BVP, it must satisfy at least the differential
equation appearing in the strong form.
It is now easy to show that the boundary conditions also hold. The condition
(6.46) is equivalent to
we see that
We now take, for example, v(x) = I — x/l, which certainly belongs to V. With this
choice of v, (6.47) becomes
(since v(0) = 1, v(i) = 0). Since fc(0) > 0 by assumption, this can hold only if
www.unifreebooks.com
must hold. Thus, when u satisfies the weak form (6.45), it must necessarily satisfy
the Neumann boundary conditions. This completes the proof that the strong and
weak forms of BVP (6.44) are equivalent.
Figure 6.14. The piecewise linear basis functions </>o and (f)n.
Having defined the approximating subspace 5n, we apply the Galerkin method
to the weak form (6.45), yielding the problem
www.unifreebooks.com
or, equivalently,
The calculations involved in forming the matrix K and the vector f are exactly the
same as for a Dirichlet problem, except that 00 and 4>n are qualitatively different
from 0i, 02,..., 0n-i (0o and 0n are each nonzero on a single subinterval, namely
[XQ, Xi] and [x n _i, xn], respectively, while each 0j, i = 1,2,..., n — 1, is nonzero on
[Xi-i,Xi+i}}.
Having now reduced the problem to the linear system Kii = f, where now
K 6 R(n+i)x(n+i) and ^ f e R n+i 5 we face the Difficulty that K is a singular
matrix. This is not surprising, since we know that the original BVP (6.44) does not
have a unique solution. We can show directly that K is singular, and understand
the nature of the singularity, as follows. If
www.unifreebooks.com
then
But
is piecewise linear and has value one at each mesh node. It follows that (6.50) is
the constant function one, and hence has derivative zero. Therefore (Ku c )j = 0 for
each ij which shows that Ku c = 0 and hence that K is singular. Moreover, it can
be shown that uc spans the null space of K; that is, if Ku = 0, then u is a multiple
of uc (see Exercise 5].
The fact that K is singular means that we must give special attention to the
process of solving Ku = f. In particular, if we ignore the singularity of K and
solve Kii = f using computer software, we will get either a meaningless solution
or an error message. To solve this singular system correctly, we must add another
equation (one additional equation, correctly chosen, will be sufficient, because the
null space of K is one-dimensional). A simple choice is the equation un = 0; this is
equivalent to choosing, out of the infinitely many solutions to (6.44), the one with
u(i] — 0. Moreover, we can impose this additional equation by simply removing
the last row and column from K, and the last entry from f. The last column of K
consists of the coefficients of the terms in the equations involving un; if we insist
that un = 0, then we can remove these terms from all n + 1 equations. We then
have n + l equations in the n unknowns WQ, W i , . . . , w n _i. This is one more equation
than we need, so we remove one equation, the last, to obtain a square system. It
can be proved that the resulting n x n system is nonsingular (see Exercise 11).
Of course, we could have removed a different row and column. If we remove
the iih row and column, we are selecting the approximate solution vn satisfying
Vn(Xi) = 0.
We compute as follows (as suggested above, the computations involving <^o and (f)n
must be handled separately from those involving </»i, ^2, • • • , (f>n-i)-'
Since K is symmetric and tridiagonal, this completes the computation ofK. Next,
we have
www.unifreebooks.com
Figure 6.15. The exact and computed solution (top) and the error in
the computed solution (bottom) for (6.51). The computed solution was found using
piecewise linear finite elements with a regular grid of 10 subintervals.
In deriving the weak form of the BVP, the boundary terms from the integration by
parts do not vanish:
www.unifreebooks.com
When we apply the Galerkin method, we end up with a slightly different right-
hand-side vector f. We have
Example 6.11. We now apply the finite element method to the inhomogeneous
Neumann problem
(again choosing the solution with u(l] = Q). The calculations are exactly the same
as for Example 6.10, except that the first and last components of f are altered as
given in (6.54)- We therefore have
Figure 6.16. The exact and computed solution (top) and the error in
the computed solution (bottom) for (6.55). The computed solution was found using
piecewise linear finite elements with a regular grid of 10 subintervals.
Finite element methods for. the heat equation with Neumann conditions are derived
as in Section 6.4. The following differences arise:
• In the derivation of the weak form of the IBVP, the space V of test functions
is replaced by V.
• When the Galerkin method is applied, the approximating subspace Sn is re-
placed by Sn.
• The mass matrix M e R( n - 1 ) x ( n - 1 ), stiffness matrix K € RC11-1)^"-1), and
load vector f(t) G R11"1 are replaced by M € R(n+i)x(n+i) ? £ e R(n+i)x(n+i) }
and f(t) G Rn+1, respectively. The new stiffness matrix K was derived in Sec-
tion 6.5.3, and the new form of the mass matrix, M, is derived analogously.
In contrast to the case of a steady-state BVP, the singularity of the matrix K causes
no particular problem in an IBVP, since we are not required to solve a linear system
whose coefficient matrix is K.
www.unifreebooks.com
This last expression is (proportional to) the time rate of change of the total heal
energy contained in the bar (see (2.2) in Section 2.1).
We leave the detailed formulation of a piecewise linear finite element method
for (6.56) to the exercises (see Exercise 6).
Exercises
1. Consider an aluminum bar of length 1 m and radius 1 cm. Suppose that the
sides and ends of the bar are perfectly insulated, and heat energy is added to
the interior of the bar at a rate of
3. Consider a copper bar (thermal conductivity 4.04 W/(cm K)) of length 100 cm.
Suppose that heat energy is added to the interior of the bar at the constant
www.unifreebooks.com
rate of f ( x ) = 0.005 W/cm3, and that heat energy is added to the left end
(x = 0) of the bar at the rate of 0.01 W/cm2.
(a) At what rate must heat energy be removed from the right end (x = 100)
in order that a steady-state solution exist? (See Exercise 6.2.5a, or just
use common sense.)
(b) Formulate the BVP leading to a steady-state solution, and approximate
the solution using the finite element method.
4. Suppose that, in the Neumann problem (6.44), / does not satisfy the com-
patibility condition
Suppose we just ignore this fact and try to apply the finite element method
anyway. Where does the method break down? Illustrate with the Neumann
problem
5. The purpose of this exercise is to provide a sketch of the proof that the null
space of K is spanned by u c , where K is the stiffness matrix arising in a
Neumann problem and uc is the vector with each component equal to one.
(a) Suppose Ku = 0, where the components of u are UQ, ui,..., un. Show
that this implies that a(v,v) =0, where
and graph the solution at times 0,0.02,0.04,0.06, along with the steady-
state solution. (See Exercise 6.2.1 and Figure C.12.)
7. (a) Formulate the weak form of the following BVP with mixed boundary
conditions:
(b) Show that the weak and strong forms of (6.57) are equivalent.
8. Repeat Exercise 7 for the BVP
where / is the right-hand side of the ODE (see Section 4.6 for an example). This
formula shows the contribution of the data at time s on the solution at time t—
this contribution is G(t] s)f(s) ds.39 The reader should notice how the value u(t) is
found by "adding up" the contributions to u(t) of the data from the time interval
[to, oo). (The value of G(t; s) is zero when s > t, so in fact only the data from the
time interval [tQ,t] can affect the value of u(t).)
We have also seen an example of a Green's function for a steady-state BVP
(see Section 5.7), where the data (the right-hand side of the differential equation) is
given over a spatial interval such as [0,1]. In this case, the value u(x) is determined
by adding up the contributions from the data at all points in the interval. The
solution formula takes the form
In the case of a time-dependent PDE, the data /(x,t) (the right-hand side of
the PDE) is prescribed over both space and time. Therefore, we will have to add
up the contributions over both space and time, and the formula for the solution will
involve two integrals:
39
By this we mean that the contribution of the data over a small interval (s — e, s + e) is
www.unifreebooks.com
where
and
We can derive an expression for the Green's functions by manipulating the formula
for u(x,i):
If we define
then we have
Having derived the Green's function, we ought to ask the question: What is it
good for? It may be obvious to the reader that the formula for u is no more useful,
for computational purposes, than the original Fourier series solution. Therefore,
the value of the Green's function is not as a computational tool.40 Rather, the
Green's function is valuable because of the insight it gives us into the behavior of
solutions to the IBVP. Indeed, the Green's function can be regarded as a solution
to the IBVP with a special right-hand side. The solution to
is
Formula (6.59) has its shortcomings; for example, if one wishes to compute a
snapshot of G(x,t;y0, s 0 ) for t greater than but very close to SQ, then many terms
of the Fourier series are required to obtain an accurate result (see Exercise 1). It is
possible to obtain a more computationally efficient formula for use when t is very
close to SQ- However, to do so would require a lengthy digression.42
Exercises
1. Let G(x,t]yo,so) be the Green's function from Example 6.12 (yo = 75, SQ =
60). Suppose one wishes to produce an accurate graph of G(x,t;yo, SQ) for
various values of t > SQ. How many terms of the Fourier series are necessary
to obtain an accurate graph for t = 6060 (10 minutes after the heat energy is
added)? For t = 61 (1 second afterward)? (Hint: Using trial and error, keep
adding terms to the Fourier series until the graph no longer changes visibly.)
Produce a graph similar to Figure 6.17 (use the values of p, c, K, yo, and SQ
from Exercise 6.12).
www.unifreebooks.com
Produce a graph similar to Figure 6.17 (use the values of p, c, K, yo, and SQ
from Exercise 6.12).
4. Compute the Green's function for the IBVP
Chapter 7
waves
We now treat the one-dimensional wave equation, which models the transverse
vibrations of an elastic string or the longitudinal vibrations of a metal bar. We will
concentrate on modeling a homogeneous medium, in which case the wave equation
takes the form
Our first order of business will be to understand the meaning of the parameter c. We
then derive Fourier series and finite element methods for solving the wave equation.
It is straightforward to extend the finite element methods to handle heterogeneous
media (nonconstant coefficients in the PDE).
(To simplify the algebra that follows, we assume in this section that the initial time
is to = 0.) With a little cleverness, it is possible to derive an explicit formula for the
solution in terms of the initial conditions i^(x) and ^(x). The key point in deriving
this formula is to notice that the wave operator
www.unifreebooks.com
can be factored:
For example,
or
will also solve the homogeneous wave equation. If u(x,t) = f(x — ct), where / :
R —t R is any twice differentiate function, then
is a solution of the homogeneous wave equation. We now show that (7.2) is the
general solution.
To prove that (7.2) really represents all possible solutions of the homogeneous
wave equation, it suffices to show that we can always solve (7.1) with a function of
www.unifreebooks.com
the form (7.2) (since any solution of the wave equation satisfies (7.1) for some ip
and 7). Moreover, by linearity (the principle of superposition), it suffices to solve
and
and
so if we take
The first equation implies that /(#) = —g(x); substituting this into the second
equation yields
A solution to this is
www.unifreebooks.com
is
Several snapshots of this solution are graphed in Figure 7.2. Notice how the initial
"blip" splits into two parts which move to the right and left.
Theorem 7.2. Suppose u(x,t) solves the IVP (7.1), x is any real number, and
t > 0. // ifi(x) and 'j(x) are both zero for all x satisfying x — ct < x < x + ct, then
u(x,t] = 0.
www.unifreebooks.com
Proof. We have
If tfj(x) and 7(x) are both zero for all x satisfying x — ct < x < x + ct, then all three
terms in this formula for u(x,t) are zero, and hence u(x,i) = 0. D
We therefore call the interval [x — ct,x + ct\ the domain of dependence of the
space-time point (x, t). We illustrate the domain of dependence in Figure 7.3.
Figure 7.3. Left: The domain of dependence of the point (x, t) = (1000,1)
with c = 522. The domain of dependence is the interval shaded on the x-axis. Right:
The domain of influence of the point (#o,0) = (1000,0).
We can look at this result from another point of view. The initial data at a
point #o, VKxo) and 7(^0), can only affect the solution u(x,t) if t is large enough,
specifically, if
The set
sufficient time has passed. For this reason, the solution to the wave equation in an
infinite medium provides a realistic idea of what happens (in certain experiments)
in a bounded region, at least for a finite period of time (namely, until enough
time has elapsed for the disturbance to reach the boundary). However, there is no
simple formula for the solution of the wave equation subject to boundary conditions.
To attack that problem, we must use Fourier series, finite elements, or other less
elementary methods.
Exercises
1. Solve (7.1) with
43
The value 522 is physically meaningful, as we will see in the next section.
www.unifreebooks.com
which models the small displacements of a vibrating string. We write the solution
in the form
where
where
Using the same reasoning as in Section 6.1, we can express the left-hand side of the
PDE in a sine series:
Setting this equal to the series for /(#,£), we obtain the ODEs
Initial conditions for these ODEs are obtained from the initial conditions for the
wave eauation in (7.7). If
then we have
We thus find the Fourier sine coefficients of the solution u(x, t) by solving the IVPs
www.unifreebooks.com
for n = 1,2,3, — In Section 4.2.2, we presented an explicit formula for the solution
of (7.8). The use of this formula is illustrated in Example 7.4 below.
which yields
is
This formula shows the essentially oscillatory nature of solutions to the wave equa-
tion; indeed, the Fourier sine coefficients of the solution are periodic:
The frequencies en/ (21} are called the natural frequencies of the string.44 These fre-
quencies are called natural because any solution of the homogeneous wave equation
is an (infinite) combination of the normal modes of the string,
44
The units of frequency are literally I/second, which is interpreted as cycles per second, or
Hertz. Sometimes the natural frequencies are given as
Each normal mode is a standing wave with temporal frequency en/ (21) cycles per
second. Several examples are displayed in Figure 7.4.
that is, the solution is periodic with period 2£/c. The frequency c/(2l) is called the
fundamental frequency of the string—it is the frequency at which the plucked string
vibrates.
An interesting question is the following: What happens to a string that is
subjected to an oscillatory transverse pressure with a frequency equal to one of the
www.unifreebooks.com
natural frequencies of the string? The answer is that resonance occurs. This is
illustrated in Exercise 8 and also in Section 7.4.
We now give an example of using the Fourier series method to solve an IBVP
for the wave equation.
which is the frequency of the musical note called "middle C." The initial conditions
indicate that the string is "plucked" at the center. Using the notation introduced
above, we have cn(t] = 0 and dn = 0 for all n, and
We must solve
and therefore
Several snapshots of the solution are graphed in Figure 7.5. The reader should
observe that when a wave hits a boundary where there is a Dirichlet condition,
the wave inverts and reflects. Therefore, for example, w(x,3T/8) = —u(x,T/8]
and u(x,T/2) = —u(x,ty, where T is the period corresponding to the fundamental
frequency: T — 2/522 = 1/261. Also, u(x,T) = w(x,0), as expected.
The reader should recall, from Section 2.3, that the wave speed c is determined
by the tension T and the density p of the string: c2 = T/p. The fundamental
frequency of the string is
www.unifreebooks.com
Figure 7.5. The solution u(x,t) to (7.7) at times 0, T/8, 3T/8, T/2, and
T. For this example, we took I = 1, c = 522, /(#,£) = 0, 7(2) = 0, and the initial
condition ijj given in (7.10). One hundred terms of the Fourier series were used.
which shows that if the tension and density of the string stay the same, but the
string is shortened, then the fundamental frequency is increased. This explains how
a guitar works—the strings are shortened by the pressing of the strings against the
"frets," and thus different notes are sounded.
Example 7.4. Consider a metal string, such as a guitar string, that can be
attracted by a magnet. Suppose the string in question is 25 cm in length, with
c = 522 in the wave equation, its ends are fixed, and it is "plucked" so that its
initial displacement is
and released (so that its initial velocity is zero). Suppose further that a magnet
exerts a constant upward force of 100 dynes. We wish to find the motion of the
string.
www.unifreebooks.com
and determine the coefficients ai (£), 02 (£), 03 (£),... by solving the IVPs (7.8). We
have
with
and
with
Twenty-five snapshots of the solution (taken during one period) are shown in Figure
7.6. The effect of the external force on the motion of the string is clearly seen. (The
reader should solve Exercise 1 if it is not clear how the string would move in the
absence of the external force.)
Figure 7.6. Twenty-five snapshots of the vibrating string from Example 7.4-
Example 7.5. Consider a string of length 100 cm that has one end fixed at x = 0,
with the other end free to move in the vertical direction only (tied to a frictionless
pole, for example). Let the wave speed in the string be c = 2000 cm/5.45 Suppose the
free end is "flicked," that is, moved up and down rapidly, according to the formula
u(100,t) = /(*), where
45
The fundamental frequency is then
If we write
We note that
Then we have
Several snapshots of the solution are shown in Figure 7.8. For each t, the Fourier
coefficients of u(x,t] decay to zero relatively slowly in n, so a good approximation
requires many terms in the Fourier series. To produce Figure 7.8, we used 200
terms. The reader should observe the behavior of the wave motion: the wave pro-
duced by the flick of the end travels from right to left, reflects, travels from left to
right, reflects again, and so on. At each reflection, the wave inverts.46
Example 7.6. Consider a steel bar of length 1 m, fixed at the top (x — 0) with
the bottom end (x = I) free to move. Suppose the bar is stretched, by means of a
downward pressure applied to the free end, to a length of 1.002 m, and then released.
We wish to describe the vibrations of the bar, given that the type of steel has stiffness
k = 195 GPa and density p = 7.9 g/cm3.
The longitudinal displacement u(x,t) of the bar satisfies the IBVP
(see Section 2.2). The eigenpairs of the negative second derivative operator, under
these mixed boundary conditions, are
www.unifreebooks.com
(see Section 5.2.3), with 1=1. We therefore represent the solution of (7.12) as
with
This, together with the fact that the initial velocity of the bar is zero, yields initial
conditions for the ODEs:
The solution is
(we convert k and p to consistent units before computing c), and the fundamental
frequency is
Several snapshots of the displacement of the bar are shown in Figure 7.9.
www.unifreebooks.com
Exercises
1. Find the motion of the string in Example 7.4 in the case that no external force
is applied, and produce a graph analogous to Figure 7.6. Compare.
2. Consider a string of length 50 cm, with c = 400 cm/s. Suppose that the string
is initially at rest, with both ends fixed, and that it is struck by a hammer at
its center so as to induce an initial velocity of
(a) How long does it take for the resulting wave to reach the ends of the
string?
(b) Formulate and solve the IBVP describing the motion of the string.
(c) Plot several snapshots of the string, showing the wave first reaching the
ends of the string. Verify your answer to 2a.
3. Find the motion of the string in Example 7.4 if the only change in the exper-
imental conditions is that the right end (x = 25) is free to move vertically.
(Imagine that the right end is held at u = 0 and then released, along with the
rest of the string, at t = 0.)
4. Repeat Exercise 2, assuming that right end of the string is free to move ver-
tically.
www.unifreebooks.com
5. Find the motion of the string in Example 7.4 in the case that both ends of the
string are free to move vertically. (All other experimental conditions remain
the same.)
6. Consider a string whose (linear) density (in the unstretched state) is 0.25 g/cm
and whose longitudinal stiffness is 6500 N (meaning that a force of 13pN is
required to stretch the string by p%). If the unstretched (zero tension) length
of the string is 40 cm, to what length must the string be stretched in order
that its fundamental frequency be 261 Hz (middle C)?
7. How does the motion of the bar in Example 7.6 change if the force due to
gravity is taken into account?
8. Consider a string that has one end fixed, with the other end free to move
in the vertical direction. Suppose the string is put into motion by virtue of
the free end's being manually moved up and down periodically. An IBVP
describing this motion is
(a) Solve the IBVP with u not equal to a natural frequency of the string.
Graph the motion of the string with uj equal to half the fundamental
frequency.
(b) Solve the IBVP with uj equal to a natural frequency of the string. Show
that resonance occurs. Graph the motion of the string with u) equal to
the fundamental frequency.
with if)(x} as the initial condition (we need a second initial condition in the wave
equation; we take the initial velocity equal to zero). The results are shown in Figures
7.10 and 7.11. The graphs show that the discontinuity is immediately "smoothed
away" by the heat equation, but preserved by the wave equation.
The standard method for applying finite elements to the wave equation, which
we now present, works well if the true solution is smooth. Methods that are effective
when the solution has singularities are beyond the scope of this book.
Figure 7.10. The solution to the heat equation with a discontinuous initial
condition (see (7.13)). Graphed are four time snapshots, including t = 0.
This is the weak form. We now apply the Galerkin technique, approximating u(x, t)
by
where </>i, ^ 2 , • • • , <$>n-\ are the standard piecewise linear finite element basis func-
tions, and requiring that the variational equation (7.16) hold for all continuous
piecewise linear test functions:
Figure 7.11. The solution to the wave equation with a discontinuous initial
condition (see (7.14)). Graphed are four time snapshots, including t = 0.
If we now define matrices M and K (the mass and stiffness matrices, respectively)
bv
Similarly, we require
(7.20)
To apply one of the numerical methods for ODEs that we studied in Chapter
4, we must first convert (7.20) to a first-order system. We will define
where47 A = -M 1
K and g(t) = M 1f(t). We also have initial conditions:
47 1
As we discussed in Section 6.4, we do not actually form the inverse matrix M . Instead,
when the action of M^ 1 is needed, we solve the appropriate linear system.
www.unifreebooks.com
We can now apply any of the numerical methods that we have previously learned,
such as Euler's method, RK4, or an adaptive scheme.
Just as in the case of the heat equation, stability is an issue. If the time step
At is chosen to be too large relative to the spatial mesh size h, then the approximate
solution computed by the time stepping method can "blow up" (i.e. increase without
bound). For the heat equation, using Euler's method, we needed At = O(h2).
This required such a large number of time steps that it was advantageous to use
special methods (such as the backward Euler method) for the sake of efficiency. The
requirement on At is not so stringent when solving the wave equation; we just need
At = O(h/c}. For this reason, we usually use explicit methods to solve the system of
ODEs arising from the wave equation; the improved stability properties of implicit
methods are not really needed.48 We must keep the stability requirement in mind,
though. If, in applying (7.20) to approximate a solution to the wave equation, we
notice that the approximate solution is growing unreasonably in amplitude, then
the time step must be decreased.
The resulting solution is quite smooth, so the finite element method should work
well. We use a regular grid with n = 20 subintervals (h = 1/n), and apply the RK4
method to integrate the resulting ODEs. The fundamental frequency of the string is
48
However, in a sense, the use of the finite element obscures the distinction between an implicit
and an explicit method. The mass matrix couples the derivatives, and so, to advance a time-
stepping method, it is necessary to solve a linear system, even in an explicit method. This means
that explicit methods are no more efficient than implicit methods. The same was true in the case of
the heat equation, with, however, a key difference. For the heat equation, the stability requirement
is such that it is not advantageous to use explicit methods anyway, and so the coupling introduced
by the finite element method is not important. For the wave equation, explicit finite difference
methods do not couple the derivatives, and there is no need to solve a linear system to take a time
step. For this reason, finite difference methods are preferred for the wave equation if the geometry
is simple. Finite element methods still have advantages for complicated geometries.
www.unifreebooks.com
We compute the motion of the string over one period, using 50 steps (At = T/50J.
The results are shown in Figure 7.12.
Figure 7.12. The solution to the wave equation in Example 7.7. Shown
are 25 snapshots taken over one period of the motion.
seems rather small. Moreover, it can be shown that it cannot be much larger without
instability appearing in the computation. On the other hand, as mentioned above,
the time step At must be decreased only in proportion to h to preserve stability.
This is in contrast to the situation with the heat equation, where At = O(/i 2 ) is
reauired.
(compare Example 7.3). Since the initial displacement if} is not very smooth (V> is
continuous but its derivative has singularities), our comments at the beginning of
the section suggest that it may be difficult to accurately compute the wave motion
using finite elements.
We use the same spatial mesh (h = 1/20,), time-stepping algorithm (RK4),
and time-step (£±t = T/50J as in the previous example. In Figure 7.13, we show
three snapshots of the solution. We already know how the solution should look:
The initial "blip" splits into two pieces, one moving to the right and the other to
the left, preserving the original shape (see Figure 7.5). The computed solution,
while demonstrating the basic motion, is not very accurate—the shapes are not well
represented.
Figure 7.13. The solution to the wave equation in Example 7.8, computed
with a mesh size of h = 1/20 and a time step of A£ = T/50. Shown are 3 snapshots
corresponding t = Q,t = T/50; t = 2T/50.
Figure 7.14. The solution to the wave equation in Example 7.8, computed
with a mesh size of h = 1/100 and a time step of At = T/250. Shown are 3
snapshots corresponding t = 0, t — T/50, t = 2T/50.
Since the Dirichlet condition is essential, it appears in the definition of the space
of test functions; however, the Neumann condition is natural and does not appear
explicitly. Therefore, the weak form is
where
The reader should note that this is exactly the same as the weak form derived for
the Dirichlet problem, except for the space of test functions used.
www.unifreebooks.com
and choose the finite element subspace consisting of all continuous piecewise linear
functions (relative to the given mesh) satisfying the Dirichlet condition at the left
endpoint. This subspace can be represented as
The only difference between Sn and Sn, the subspace used for the Dirichlet problem,
is the inclusion of the basis function (f)n corresponding to the right endpoint. For
simplicity, we will use a regular grid in the following calculations.
The calculation then proceeds just as for the Dirichlet problem, except that
there is an extra basis function and hence an extra unknown and corresponding
equation. We write
for the approximation to the solution u(x, t). Substituting into the weak form yields
the equations
The stiffness matrix K is also tridiagonal, with the following nonzero entries:
www.unifreebooks.com
Having derived the system of ODEs, the formulation of the initial conditions
is just as before:
The IVP
Example 7.9. We will compute the motion of the string in Example 7.7, with the
only change being that the right end of the string is now assumed to be free to move
vertically. The IBVP is
www.unifreebooks.com
with c = 522. The only change from the earlier calculations is that there is an
extra row and column in the mass and stiffness matrix. We will again use n = 20
subintervals in the spatial mesh (h = 1/20,). The fundamental period is now
We use the RK4 algorithm and 100 time steps to compute the motion over one
period (At = T/lOOj. The results are shown in Figure 7.15.
Figure 7.15. The solution to the wave equation in Example 7.9. Shown
are 25 snapshots taken over one period of the motion.
Exercises
1. Use piecewise linear finite elements to solve the IBVP
on the interval 0 < t < T, where T is the fundamental period. Take c = 1000.
Graph several snapshots.
www.unifreebooks.com
2. Repeat the previous exercise, assuming the PDE is inhomogeneous with right-
hand side equal to the constant —100.
(a) How long does it take for the resulting wave to reach the ends of the
string?
(b) Formulate and solve the IBVP describing the motion of the string. Use
the finite element method with RK4 or some other numerical method for
solving the system of ODEs.
(c) Plot several snapshots of the string, showing the wave first reaching the
ends of the string. Verify your answer to 3a.
4. Repeat Exercise 3, assuming that the right end of the string is free to move
vertically.
5. Solve (7.14) using the finite element method, and try to reproduce Figure
7.11. How small must h (the length of the subintervals in the mesh) be to
obtain a good graph?
6. (Cf. Example 7.6.) Consider a steel bar of length 1 m, fixed at the top (x = 0)
with the bottom end (x = 1) free to move. Suppose the bar is stretched, 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
the bar, given that the type of steel has stiffness k = 195 GPa and density
p = 7.9g/cm3. Produce a graph analogous to Figure 7.9.
7. Consider a heterogeneous bar with the top end fixed and the bottom end free.
According to the derivation in Section 2.2, the displacement u(x,t) of the bar
satisfies the IBVP
(b) Apply the Galerkin method to obtain a system of ODEs with initial
conditions. How do the mass and stiffness matrices change from the case
of a homogeneous bar?
8. Repeat Exercise 6, assuming now that the bar is heterogeneous with density
and stiffness
where we assume that 0 < a < t. This models the vibrating string, where the string
is assumed to vibrate due to a time-varying force applied at the point x = a.
We can solve (7.26) exactly as in Section 7.2. We use the sifting property of
the delta function to compute the Fourier sine coefficients of f(t}8(x — a):
49
The reader is assumed to have read Section 4.6 and/or Section 5.7; the material on the Dirac
delta function found in those two sections is prerequisite for this section.
www.unifreebooks.com
We then must solve the following IVP to find the unknown coefficients an(t):
According to the results derived in Section 4.2.2, the solution to this IVP is
where
One the other hand, if cj = cm/2, one of the natural frequencies of the string, then
(formula (7.27) still holds, with o> = cm/2, for the coefficients an(t) with n / m).
In the case that the external frequency a; is a natural frequency of the string,
the result (7.28) shows that the string oscillates with an ever-increasing ampli-
tude. (The reader should notice the factor of t, which shows that the amplitude
increases without bound.) This phenomenon is called resonance. When the exter-
nal frequency is close to but not equal to a natural frequency, formula (7.27) shows
that the nearby natural frequency is amplified in the solution (though it remains
bounded)—this is because the denominator in (7.27) is very small.
www.unifreebooks.com
Example 7.10. We now solve (7.26) with c = 522 and 1 = 1 (this corresponds
to a fundamental frequency of middle C, as we saw in Example 7.3), to = 0 and
f ( t ) = s'm(27rujt) for various values ofui. We locate the point source at a = l/\/2-
Figure 7.16 shows the solutions corresponding to u = 260, LJ = 520, u; = 780, and
u} = 1040, close to the natural frequencies 0/261, 522, 783, and 1044, respectively.
The reader will notice how the solutions resemble the first four normal modes of the
string. In Figure 7.17, we display some snapshots of the solution for u = 1044, the
fourth natural frequency. The effect of resonance is clearly seen in the increasing
amplitude.
Figure 7.17. Solution to (7.26) with an oscillatory forcing term (see Ex-
ample 7.10). The frequency of the forcing term is 1044, the fourth natural frequency
of the string, and the solution exhibits resonance.
Then, by the usual calculation, the coefficient an(t) satisfies the IVP
where
and
If u 7^ cn/2 for all n (that is, if u; is not one of the natural frequencies of the string),
then we obtain
www.unifreebooks.com
The results are very similar to those for the point source. If the externally
applied frequency is not a natural frequency of the string, then no resonance occurs.
Formula (7.32) shows, though, that the amplitude of the vibrations gets larger as
(jj approaches one of the natural frequencies.
If the external frequency is a natural frequency, then resonance occurs, as
indicated by the factor of t in the formula for an(t}.
Example 7.11. Suppose c = 522 and u) = c/2 = 261, the fundamental frequency
of the string. With e = 0.001, we obtain the motion shown in Figure 7.18.
Exercises
1. Suppose a string with total mass of 10 g is stretched to a length of 40 cm. By
varying the frequency of an oscillatory forcing term until resonance occurs, it
is determined that the fundamental frequency of the string is 500 Hz.
(a) How fast do waves travel along the string?
(b) What is the tension in the string? (Hint: See the derivation of the wave
equation in Section 2.3.)
(c) At what other frequencies will the string resonate?
2. Consider an iron bar of length 1 m, with a stiffness of k — 90 GPa and a
density of p = 7.2g/cm 3 . Suppose that the bottom end (x = 1) of the bar is
fixed, and the top end is subjected to an oscillatory pressure:
(a) What is the smallest value of u; that causes resonance? Call this fre-
quency (Jr.
(b) Find and graph the displacement of the bar for w = w r .
(c) Find and graph the displacement of the bar for a; = w r /4.
3. If a string is driven by an external force whose frequency equals a natural
frequency, does resonance always occur? Consider the string of Example 7.10,
and suppose u = 1044, a = 1/2. Produce a plot like Figure 7.17. Does
resonance occur? Why or why not?
4. Solve the IBVP
www.unifreebooks.com
to finite elements, namely, the method of finite differences. This method is very
popular for the wave equation and similar PDEs, for the reason briefly mentioned
in the footnote on Page 310. Strikwerda [47] is an advanced treatment of the finite
difference method for PDEs. Celia and Gray [9] covers both finite differences and
finite elements (including finite element methods that are not Galerkin methods).
www.unifreebooks.com
Chapter 8
Jgihlems in multiple
spatial dimensions
327
www.unifreebooks.com
or simply by
50
For our purposes, it does not seem worthwhile to define precise conditions on fi and its bound-
ary that allow the application of the divergence theorem. We will assume that the reader has an
intuitive idea of the meaning of "smooth boundary" and "piecewise smooth boundary." For exam-
ple, the unit ball, S = {(xi,X2,xs) G R3 : x2 + y2 + z2 < 1 j, has a smooth boundary, while the
unit cube, R = { ( x i , X 2 , x z ) e R3 : 0 < x\ < 1,0 < #2 < 1,0 < #3 < ij, has a boundary that is
piecewise smooth.
www.unifreebooks.com
for example, then the volume integral can be rewritten as an iterated integral:
where g : d£l —»• R and da represents an infinitesimal surface area element, or simply
Both volume and surface integrals can have vector-valued integrands, in which case
each component is integrated.
If Jl is a domain in R 2 , then
is an area integral that can, for many regions fi, be rewritten as a doubly iterated
integral. Since dQ, is a curve in this case.
is a line integral.51
A vector field defined on £) is just a vector-valued function—a mapping of the
form
if fi is in R2 or
51
Line integral is a misnomer, since the domain of integration is generally a curve, not a (straight)
line.
www.unifreebooks.com
in three dimensions. The following theorem, which holds in both two and three
dimensions, explains why this combination of derivatives is so significant.
Theorem 8.1. (The divergence theorem) Let 17 be a bounded open set with a
piecewise smooth boundary $17. Assume that f is a smooth vector field defined on
17 U d£l, and that n is the (outward pointing) unit normal to 017. Then
Moving the derivative through the integral sign, we obtain the following expression
for the rate of change of total heat energy contained in uj:
We can also describe this rate of change by computing the rate at which heat
energy flows across duj. Let q(x,£) € R3 be the heat flux at x e 17 at time t. The
heat flux is a vector—its direction is the direction of the flow of energy, and its
magnitude gives the rate at which energy is flowing across the plane at x to which
q(x, £) is orthogonal, in units of energy/(time-area). At each point of duj, the rate
at which energy is flowing into u; is
(This follows from the fact that q is a vector quantity and hence can be decomposed
into the component in the direction of —n, which is —q • n, and the component
www.unifreebooks.com
We now make the assumption called Fourier's law, that the heat flux is pro-
portional to the temperature gradient:52
We wish to equate this expression with (8.1) and derive a PDE. To do so, we must
apply the divergence theorem to convert the boundary integral to a volume integral:
We thus have
or
Since (8.2) holds for every subdomain uj of £), by exactly the same reasoning
as in one dimension, the integrand must be identically zero. We therefore obtain
the PDE
52
The gradient of a scalar-valued function of several variables points in the direction in which
the function increases most rapidly.
www.unifreebooks.com
and so
is called the Laplacian.53 Using this notation, we obtain the three-dimensional heat
equation:
If / : fi x (to, 00} ->• R is a heat source (or sink), with units of energy per volume
per time, then we obtain the inhomogeneous three-dimensional heat equation:
It should be obvious to the reader how to modify this equation if the material
properties (p, c, K) are not constants but rather functions of x G 0 (see Exercise 1).
It is also possible to insulate the boundary, which leads to the condition that
the heat flux across the boundary is zero:
53
Another common symbol for the Laplacian is V 2 .
www.unifreebooks.com
where i and r are given positive constants. The set fHs a circular cylinder centered
on the interval [0,^1 on the xi-axis. Consider the following IBVP:
where Fe represents the ends of the bar and Tt the transverse sides:
The reader should notice that both the heat source / and the initial temperature
distribution if) are independent of x-2 and x3.
The solution to (8.5) is w(xi,x 2 ,x 3 ,i) = v(xi,t), where v is the solution of
the IBVP
The proof of this is a direct verification of the equations in (8.5) and is left to an
exercise.
www.unifreebooks.com
The distinction between the two- and three-dimensional Laplacian will be under-
stood from context.
In this equation, the forcing function / is the negative divergence of the body force:
Dirichlet boundary conditions for the vibrating membrane indicate that the
boundary is fixed (one can picture, for example, a circular drumhead with its bound-
ary attached to the drum). Neumann conditions indicate that the boundary is free
to move in a vertical direction.
Of course, this equation is interesting only if the boundary conditions are inhomo-
geneous.
(£1 is the closure of Q, that is, fi together with its boundary: J7 = i7 U 9fi) and
and
To derive Green's identity, we need an analogous product rule for higher dimensions
www.unifreebooks.com
It is not completely obvious how to obtain the needed product rule, but we
can be guided by the fact that we want to obtain a formula involving
This is proved directly; see Exercise 5. Combining (8.8) with the divergence theorem
gives the desired result:
We can now prove the symmetry of the Laplacian under Dirichlet conditions.
If w , v € 07^(0), then
Exercises
1. How does the heat equation (8.3) change if p, c, and K are functions of x?
www.unifreebooks.com
Hint: Rewrite the area integral on the left as an iterated integral and apply
the fundamental theorem of calculus. Compare the result to the boundary
integral on the right.
3. Let £7 C R2 be the unit square:
Define F : ft -> R2 by
Verify that the divergence theorem holds for this domain fl and this vector
field F.
4. Let il C R2 be the unit disk:
Define F : ft -» R2 by
Verify that the divergence theorem holds for this domain Q and this vector
field F.
5. Prove (8.8) as follows: Write
and apply the ordinary (scalar) product rule to each term on the right.
6. Define
and
7. Suppose that the boundary of £7 is partitioned into two disjoint sets: dtl —
FI UF 2 . Define
and
with the last step following from Green's first identity and the fact that u vanishes
on the boundary of f). Since
only if Vw is identically equal to the zero vector. But this holds only if u is a
constant function, and, due to the boundary conditions, the only constant function
in Cpfil) is the zero function. By assumption ||w|| = 1, so u is not the zero function.
Thus we see that, in fact, A > 0 must hold. This proof did not use the particular
form of fJ, and the result is therefore true for nonrectangular domains.
Thus we wish to find all positive values of A such that the BVP
has a nonzero solution. We are now faced with a PDE for which we have no general
solution techniques. We fall back on a time-honored approach: make an inspired
guess as to the general form of the solution, substitute into the equation, and try
to determine specific solutions. We will look for solutions of the form
that is, functions of two variables that can be written as the product of two func-
tions, each with only one independent variable. Such functions are called separated,
and this technique is called the method of separation of variables.
We therefore sunnose that w,(x1 = wi (x-i }u^(x^} satisfies
We have
If we rewrite this as
must be constant functions. For on the left side of (8.12) is a function depending
only on x\, and on the right is a function depending only on X2. If we differentiate
with respect to 0:1, we see that the derivative of the first function must be zero,
and hence that the function itself must be constant. Similarly, the second function
must be constant.
We have therefore shown the following: If A is positive and
(There is also the possibility that u\(x\) = 0, but then u is the zero function, and
we are only interested in nontrivial solutions.) By similar reasoning, we obtain
and
www.unifreebooks.com
where 9\ and #2 can be any real numbers adding to A. But we have already solved
these problems (in Section 5.2). For (8.14), the permissible values of B\ are
Any solution to (8.14) times any solution to (8.15) forms a solution to (8.11), so we
obtained a doublv indexed sequence of solutions to (8.11):
we can show that the eigenpairs (8.16) are sufficient for our purposes. Indeed, it is
not difficult to argue that every function u £ C(ft) should be representable as
where the convergence is in the mean-square sense. We will call such a series a
Fourier (double) sine series. We consider any u = u(xi,x<2) (not necessarily satisfy-
ing the Dirichlet boundary conditions). Regarding x% € (0,^) as a parameter, we
can write
where
where
with
Example 8.2. Let Q = {(xi,x2) e R2 : 0 < xi < 1, 0 < x2 < l}, and let
Then
Figure 8.4. A partial Fourier (double) sine series (400 terms) approxi-
mating ll(xi,X2) = XiX-2.
www.unifreebooks.com
We first write the constant function /(x) = 1 as a Fourier sine series. We have
where
where
and therefore
www.unifreebooks.com
In Figure 8.5, we graph the partial Fourier series with M — 10, N = 10.
Example 8.4. We will solve the following IBVP for the wave equation on the unit
square:
www.unifreebooks.com
We take c = 261V5. This IBVP models a (square) drum struck by a square hammer.
We write the solution u as
where
and
We have
where
www.unifreebooks.com
Putting together the PDE and the initial conditions, we obtain the following
sequence of IVPs:
where
(see Exercise 14). The determination of the coefficients amn(t) follows the now-
familiar pattern.
www.unifreebooks.com
By the same reasoning given in Section 8.2.1, this collection of eigenfunction should
be sufficient to represent any function in (7(fi); the series representation is
where
then the Neumann problem (8.23) has infinitely many solutions, while if / does not
satisfy the compatibility condition, then there is no solution.
Then
We also have
where
The reader should notice that CQO = 0 is the compatibility condition, and so there
are infinitely many solutions. Equating the series for —Aw and f yields
www.unifreebooks.com
Figure 8.7. The solution to the BVP in Example 8.5. This graph was
produced using a total of 120 terms of the (double) Fourier cosine series.
If we wish to solve (8.26) using the method of Fourier series, then it is desirable
to shift the data to obtain homogeneous boundary conditions. The reader should
www.unifreebooks.com
recall the method of shifting the data from Section 5.3: Given a smooth function p
defined on ft satisfying p(xi,#2) = 5(^1,^2) on 5ft, we define v = u — p, where u
satisfies (8.26). Then, in ft,
and, on 5ft,
and the edges of the membrane are fixed to a frame, so that the vertical deflection
of the membrane satisfies the following boundary conditions:
Then u satisfies
www.unifreebooks.com
and we have
We therefore solve
where /(xi,^) = (#2 — 15)/1500, by the Fourier series method. The eigenpairs of
—A on fi are
where
The Neumann problem for Laplace's equation can be handled in much the
same way. An example is given in Appendix B (Example B.2).
Figure 8.8. The solution to the BVP in Example 8.6. This graph was
produced using 100 terms of the (double) Fourier sine series.
Exercises
1. Let fJ be the unit square in R 2 ,
6. Let u € C(fJ) be given, and define FMN to be the subspace of C(f)) spanned
by
where
Show that the best approximation to u (in the I/2 norm) from FMN is given
by (8.17), (8.18).
7. Consider the iron plate of Exercise 5. Suppose that plate initially has constant
temperature 2 degrees Celsius and that at time t = 0 the edges are instantly
brought to temperature 5 degrees and held there. How long does is take until
the entire plate has temperature at least 4 degrees? (Hint: To deal with the
inhomogeneous boundary condition, just shift the data. It is trivial in this
case, because the boundary data is constant.)
Suppose u satisfies u(x) = 0 for x e dfl. Prove that the Fourier series of —Aw
is
where
9. In Example 8.4, how long does it take for the leading edge of the wave to
reach the boundary of 0? Is the computed time consistent with Figure 8.6?
when at rest, and suppose the drum is "plucked" so that its initial (vertical)
displacement is the (piecewise linear) function
(see Figure 8.9). Find the resulting vibrations of the drumhead by solving
Let LN '• Cpf(ft) —> C(ft) be defined by L^u = —Aw. Use separation of
variables to find the eigenpairs of LN with separated eigenfunctions.
13. 54 Suppose an elastic membrane occupies the unit square,
and something pushes up at the center of the membrane (a pin or the tip
of a pencil, for example). The purpose of this question is to determine the
resulting shape of the membrane. This can be done by solving the BVP
Graph the solution. Note: The Fourier coefficients of the point source can be
found using the sifting property of the Dirac delta function.
54
The material on the delta function found in Section 4.6 or Section 5.7 is needed for this
exercise.
www.unifreebooks.com
Figure 8.9. The partition of the unit square used in Exercise 11.
14. Let (7 be the rectangle (8.10), and suppose d£l is partitioned as in (8.13).
Define
where A > 0 is a constant. We wish to develop Fourier series methods for the
following Dirichlet problem:
www.unifreebooks.com
The first step is to find the eigenvalues and eigenfunctions of the Laplacian, subject
to the Dirichlet conditions on the circle.
We have only one technique for finding eigenfunctions of a differential operator
in two variables, namely separation of variables. However, this technique is not
very promising in rectangular coordinates, since the boundary condition does not
separate. For this reason, we first change to polar coordinates. If we define
where (r, 9) are the polar coordinates corresponding to the rectangular coordinates
(#1,0:2), then the Dirichlet condition becomes simply
If we apply separation of variables and write v(r,0) = R(r)T(0), then the Dirichlet
condition is R(A}T(9] = 0 for all 0, which implies (if v is nontrivial) that R(A] = 0.
The use of polar coordinates introduces periodic boundary conditions for T:
This allows us to replace the partial derivative with respect to x\ by partial deriva-
tives with respect to the new variables r and 0, provided we can compute
We have
and, similarly,
Also,
and, similarly,
and so
www.unifreebooks.com
Adding these two results and using the identity cos2 (0) + sin2 (9) = 1, we obtain
that have the form v(r,9) = R(r}T(0). Substituting the separated function v = RT
into the PDE yields the following:
Since the left side of this equation is a function of 0 alone, while the right side is a
function of r alone, both sides must be constant. We will write
or
www.unifreebooks.com
We then have
or
This last equation can be written as an eigenvalue problem for R, but it is not one
we have studied before. We will study it in detail below, but first we deal with the
easier eigenvalue problem for T.
As we mentioned above, the angular variable 0 introduces periodic boundary
conditions for T, so we must solve the eigenvalue problem
As we saw in Section 6.3, the eigenvalues are 0 and n 2 , n = 1,2,3, — The constant
function 1 is an eigenfunction corresponding to 7 = 0, and each positive eigenvalue
7 = n2 has two independent eigenfunctions, cos (nO) and sin (nO).
We know that A must be positive, since the Laplacian has only positive eigenvalues
under Dirichlet conditions (see Section 8.2.1). We can considerably simplify the
analysis by the change of variables
We define
so tnat
and
www.unifreebooks.com
We then have
The ODE
is called Bessel's equation of order n. In the new variables, the BVP (8.32) becomes
Bessel's equation does not have solutions that can be expressed in terms of
elementary functions. To find a solution of Bessel's equation, we can use a power
series expansion of the solution. We suppose55 that (8.33) has a solution of the
form
and so
Also,
55
This is yet another example of an inspired guess at the form of a solution. It is based on the
fact that Euler's equation,
It is helpful to write
or
This equation implies that the coefficient of each power of s must vanish, and so we
obtain the equations
which simplify to
Moreover, the condition that 5(0) be finite rules out the possibility that a = —n,
so we conclude that
must hold. This, together with the second equation in (8.37), immediately implies
that
Since a\ = 0, (8.38) implies that all of the odd coefficients are zero:
and, in general,
Since any multiple of a solution of (8.33) is again a solution, we may as well choose
the value of ao to give as simple a formula as possible for a 2 j • For this reason, we
choose
and obtain
and called the Bessel function of order n. The reader should note that the above
calculations are valid for n = 0 as well asn = l,2,3, —
This recursion relation can be verified directly by computing the power series
of the right-hand side and simplifying it to show that it equals the left-hand
side (see Exercise 10).
3. If, for a given value of a, Jn(aA) — 0, then
We will sketch the proof of this result. Since Jn satisfies Bessel's equation, we
have
or
In the last step, we used the fact that n 2 J n (0) = 0 since either n = 0 or
Jn(0) = 0. We can now evaluate the integral
www.unifreebooks.com
with the last step following from the assumption that Jn(o:a) = 0. Finally,
applying (8.41), we obtain (8.42).
namely,
Therefore, for each value of n, n = 0,l,2,..., there are infinitely many solutions to
(8.32). For each value of n, there are two independent solutions to (8.31):
57
These estimates were computed in Mathematica, using the BesselJ function and the Find-
Root command.
www.unifreebooks.com
Using the properties of the Bessel functions developed above, we can simplify
((VmniVmn)
(!) (2) (2) ^\
(!) \ andA (((pmrnVmn):
and, similarly,
Given that software routines implementing the Bessel functions are almost as readily
available as routines for the trigonometric functions, it would appear that these
formulas are as usable as the analogous formulas on the rectangle. However, we
must keep in mind that we do not have formulas for the values of amn. Therefore,
to actually use Bessel functions, we must do a certain amount of numerical work to
obtain the needed values of amn and the eigenvalues \mn = c?mn.
Similarly,
(see (8.43)). Since A = 1 in this example, we have amn = smn and \mn = ^mn-
The needed coefficients are58
We now have the first three terms of the Fourier series for g. The graph of g is
shown in Figure 8.11, while the approximation is shown in Figure 8.12. Exercise 1
asks the reader to improve the approximation by using more terms.
where the coefficients cmo can be computed as in the previous example. We now
write
where the coefficients bmo are to be determined. (Since the forcing function is radial
(i.e. independent of 0), the solution will also be radial. Therefore, we do not need
the eigenfunctions that depend on 9.) Since each Jo(amQr) is an eigenfunction of
—A p under the given boundary conditions, we have
www.unifreebooks.com
where the eigenvalue Amo is given by Amo = #mo • Therefore, the PDE implies that
We computed C\Q, c^o, c^o, «iO; &2Q, o,nd 0,3$ in the previous example, so we see
that
Example 8.9. We will now solve the wave equation on a disk and compare the
fundamental frequency of a circular drum to that of a square drum. We consider
the IBVP
where f) is the disk of radius A, centered at the origin. We write the solution as
where cmn, dmn are the (generalized) Fourier coefficients for <f>, and emn, fmn
are the (generalized) Fourier coefficients for 7. By applying the results of Section
4-7 and using the fact that \mn — o^nn, we obtain the following formulas for the
coefficients of the solution:
The square drum sounds a lower frequency than the circular drum.
Exercises
1. Let g(r,9) = 1 — r 2 , as in Example 8.7. Compute the next three terms in the
series for g.
2. Let f(r,9] = I — r. Compute the first nine terms in the generalized Fourier
series for / (that is, those corresponding to the eigenvalues
where £7 is the unit disk. Graph the solution. (Hint: Change to polar coordi-
nates and use the results of the previous exercise.)
4. Let /(r, 9} = r. Compute the first nine terms in the generalized Fourier series
for / (that is, those corresponding to the eigenvalues
where £7 is the unit disk. Graph the solution. (Hint: Change to polar coordi-
nates and use the results of the previous exercise.)
6. Let /(x) = (1 — #1 — Xz)(xi + xz). Convert to polar coordinates and compute
the first 16 terms in the (generalized) Fourier series (that is, those correspond-
ing to A mn , m = 1,2,3,4, n — 0,1,2,3). Graph the approximation and its
error.
7. Consider a disk made of copper (p = 8.97g/cm3, c = 0.379J/(gK), K =
4.04 W/(cmK)), of radius 10cm. Suppose that the temperature in the disk
is initially 4>(r,6) = rcos (0)(10 — r)/5. What is the temperature distribution
after 30 seconds (assuming that the top and bottom of the disk are perfectly
insulated, and the edge of the disk is held at 0 degrees Celsius)?
8. Consider an iron disk (p = 7.88 g/cm3, c = 0.437 J/(gK), « = 0.836W/(cmK))
of radius 15 cm. Suppose that heat energy is added to the disk at the constant
rate of
Assume that the top and bottom of the disk are perfectly insulated and that
the edge of the disk is held at 0 degrees Celsius.
(a) What is the steady-state temperature of the disk?
(b) Assuming the disk is initially 0 degrees Celsius throughout, how long
does it take for the disk to reach steady state (to within 1%)?
www.unifreebooks.com
The last step follows from the fact that v vanishes on dtl.
We define the bilinear form a(-, •) by
The proof that a solution of the weak form also satisfies the original BVP follows
the same pattern as in Section 5.4.2 (see Exercise 6).
The reader will notice that the derivation of the equation Ku = f is exactly as in
Section 5.5, since Galerkin's method is described in a completely abstract fashion.
www.unifreebooks.com
The specific details, and the differences from the one-dimensional case, arise only
when the approximating subspace Vn is chosen.59
Moreover, just as in the one-dimensional case, the bilinear form a(-, •) defines
an inner product, called the energy inner product, and the Galerkin method pro-
duces the best approximation, in the energy norm, to the true solution u from the
approximating subspace Vn.
59
Just as in Section 5.5, each of the symbols "u" and "f" has two meanings: u is the true
solution of the BVP, while u G Rn is the vector whose components are the unknown weights in
the expression (8.55) for the approximate solution vn. Similarly, / is the forcing function in the
BVP, while f e Rn is the load vector in the matrix-vector equation Ku = f.
60
Another way to handle this is to allow "triangles" with a curved edge.
www.unifreebooks.com
Figure 8.13. Triangular meshes defined on (1) a square (upper left), (2) a
union of three squares (upper right), (3) an annulus (lower left), and (4) a rhombus
(lower right). Since the annulus is not polygonal, the triangulated domain is only
an approximation to the original domain.
Example 8.10. For simplicity, we take as our example the constant coefficient
problem
The support?1 of fa is shown in Figure 8.17, which also labels the triangles in the
mesh, TI , TI ,..., Ts2. This support is made up of six triangles; on each of these
triangles, fa has a different formula. We therefore compute KH by adding up the
contributions from each of the six triangles:
On TI, V0i(x) = (l//i, 0), where h = 1/4 (observing how fa changes along
the horizontal and vertical edges ofTi leads to this conclusion). The area ofTi (and
of all the other triangles in the mesh) is /i 2 /2. Thus,
61
As we explained in Section 5.6, the support of a function is the set on which the function is
nonzero, together with the boundary of that set.
www.unifreebooks.com
Figure 8.17. The support of 4>i (Example 8.10). The triangles of the
mesh, TI , T-2,..., T32 are also labeled.
Since the PDE has constant coefficients (and the basis functions are all the same
up to translation), it is easy to see that
We now turn our attention to the off-diagonal entries. For what values of
j ^ i will Kij be nonzero ? By examining the support of fa, we see that only fa,
04, and 05 have a support that overlaps (in a set of positive area, that is, not just
along the edge of a triangle) that of fa. The reader should study Figure 8.16 until
he or she is convinced of the following fundamental conclusion: The support of fa
and the support of fa have a nontrivial intersection if and only if nodes
i and j belong to a common triangle. By examining Figure 8.16, we see that
the following entries of K might be nonzero:
We now compute the first row ofK. We already know that KH = 4. Consult-
ing Fiaure 8.17, we see that
OnT3,
so
On T12,
so
The rest of the calculations are similar, and the result is the following stiffness
matrix:
which is quite tedious when done by hand (unlike V0j, 0j itself is not piecewise
constant). We just show one representative calculation. We have
Therefore,
www.unifreebooks.com
The calculations in the previous example are elementary, but extremely time-
consuming, and are ideal for implementation in a computer program. When these
calculations are programmed, the operations are not organized in the same way as
in the above hand calculation. For example, instead of computing one entry in K
at a time, it is common to loop over the elements of the mesh and to compute
all the contributions to the various entries in K and f from each element in turn.
Among other things, this simplifies the data structure for describing the mesh. (To
automate the calculations presented above, it would be necessary to know, given a
certain node, which nodes are adjacent to it. This is avoided when one loops over
the elements instead of over the nodes.) Also, the various integrations are rarely
carried out exactly, but rather by using quadrature rules. These implementation
details are discussed in Section 10.1.
As we have discussed before, an important aspect of the finite element method
is the fact that the linear systems that must be solved are sparse. In Figure 8.19,
we display the sparsity pattern of the stiffness matrix for Poisson's equation, as in
Example 8.10, but with a finer grid. The matrix K is banded, that is, all of its
entries are zero except those found in a band around the main diagonal. Efficient
solution of banded and other sparse systems is discussed in Section 10.2.
62
It is expected that a computer program will be used to solve any linear system large than 2 x 2
or 3 x 3. We used MATLAB to solve Ku = f for this example.
www.unifreebooks.com
Figure 8.19. The sparsity pattern of the discrete Laplacian (200 triangular
elements).
www.unifreebooks.com
The weak form of (8.59) is now derived exactly as on page 378; the boundary
integral
now vanishes because v = 0 on FI and du/dn — 0 on F2. Thus the weak form of
(8.59) is:
The bilinear form a(-, •) is defined exactly as before (the only difference from (8.53)
is in the space of test functions).
We now restrict our discussion once more to two-dimensional polygonal do-
mains. To apply the finite element method, we must choose an approximating
subspace of V. Since the boundary conditions are mixed, there are at least two
points where the boundary conditions change from Dirichlet to Neumann. We will
make the assumption that the mesh is chosen so that all such points are nodes (and
that all such nodes belong to F1; that is, that FI includes its "endpoints"). We can
then choose the approximating subspace of V as follows:
If the BVP includes only Neumann conditions, then the stiffness matrix will
be singular, reflecting the fact that BVP either does not have a solution or has
infinitely many solutions. Special care must be taken to compute a meaningful
solution to Ku = f.
inhomogeneous Neumann conditions are taken into account directly when deriving
the weak form. Both types of boundary conditions lead to a change in the load
vector. Exercises 5 and 7 ask the reader to derive the load vectors in these cases.
Exercises
1. Consider the BVP
where £) is the unit square, k(x) = I + x\x^ and /(x) = 1. Produce the
piecewise linear finite element (approximate) solution using a regular grid
with 18 triangles.
2. Repeat Exercise 1, but suppose that the boundary conditions are homogeneous
Neumann conditions on the right side F2 of the square and homogeneous
Dirichlet conditions on the other three sides.
3. Repeat Exercise 1, but suppose that the boundary conditions are homogeneous
Neumann conditions on every part of the boundary of fi. Let the right-hand
side be /(x) = #1 — 1/2 (so that the compatibility condition is satisfied and
a solution exists).
4. If u does not belong to Vn, then
Let J7 be the unit square and use a regular grid with 18 triangles.
6. Suppose u is a solution to (8.53). Prove that u also solves (8.52).
7. (a) Explain how to solve an inhomogeneous Neumann problem using piece-
wise linear finite elements.
(b) What is the compatibility condition for an inhomogeneous Neumann
problem?
(c) Illustrate the procedure on the following BVP:
Let fi be the unit square and use a regular grid with 18 triangles.
Chapter 9
In the preceding chapters, we introduced several kinds of Fourier 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 on two facts:
1. Each is based on an orthogonal sequence with the property that every con-
tinuous function can be represented in terms of this sequence.
2. The terms in the series represent eigenfunctions of certain simple differential
operators (under various boundary conditions). This accounts for the fact
that it is computationally tractable to determine a series representation of
the solution to the corresponding differential equation.
In this chapter we will go deeper into the study of Fourier series. Specifically,
we will consider the following questions:
1. What is the relationship among the various kinds of Fourier series?
2. How can a partial Fourier series be found and evaluated efficiently?
3. Under what conditions and in what sense can a function be represented by its
Fourier series?
4. Can the Fourier series method be generalized to more complicated differential
equations (including nonconstant coefficients and/or irregular geometry)?
Our discussion will justify many of the statements we made earlier in the book
concerning the convergence of Fourier series. It also introduces the fast Fourier
transform (FFT), which is an exciting and recent development (from the last half
of the twentieth century63) in the long history of Fourier series. The calculation of
N Fourier coefficients would appear to require O(JV 2 ) operations (for reasons that
63
The FFT was popularized in the 1960s, by the paper [12]. However, the method was known
to Gauss long before; see [25].
393
www.unifreebooks.com
we explain in Section 9.2). The FFT reduces the operation count to O(NlogN), a
considerable savings when TV is large.
We begin by introducing yet another type of Fourier series, the complex
Fourier series, that is convenient both for analysis and for expressing the FFT.
This formula holds even if r\ and r% are complex, in which case u is complex-valued
for most choices of c\ and c^. (We also saw, in Section 4.2.1, how to recover the
general real-valued solution if desired.)
In a similar way, there are some advantages to using complex-valued eigenfunc-
tions, even when solving differential equations involving only real-valued functions.
Using Euler's formula,
we see that
and therefore
This suggests that the negative second derivative operator has complex exponential
eigenfunctions.
We leave it to the exercises (see Exercise 4) to show that nonzero solutions to
the BVP
www.unifreebooks.com
In this section we use the eigenfunctions given in (9.2) to form Fourier series
representing functions on the interval (—£,(.). Since Fourier series calculations are
based on orthogonality, we must take a slight detour to discuss complex vector space
and inner products. Some of the following results have been used earlier in the text,
but only briefly in the course of demonstrating that a symmetric operator has only
real eigenvalues.
This suggests that either (w,u) or (iu,iu) is negative, contradicting one of the rules
of inner products (and making it impossible to define a norm based on the inner
product).
For this reason, the definition of inner product is modified for complex vector
spaces.
www.unifreebooks.com
for z € C. We define
(We will use the same notation as for the real L2 inner product, since, when / and g
are real-valued, the presence of the complex conjugate in the formula has no effect,
and the ordinary L2 inner product is obtained.)
where
These complex Fourier coefficients are computed according to the projection theo-
rem; it follows that
closest to / in the L2 norm. Also, we will show in Section 9.6 that the complex
Fourier series converges to / in the L2 norm under mild conditions on / (in partic-
ular, if / is continuous).
www.unifreebooks.com
where
Now,
For n > 0,
Therefore,
(The reader should notice how all imaginary quantities sum to zero in this calcula-
tion.)
Therefore, for any N > 0,
This shows that every (symmetric) partial sum of the complex Fourier series of a
real-valued function is real and also that the complex Fourier series is equivalent to
the full Fourier series.
Exercises
1. Let / : [-1,1] ->• R be defined by f ( x ) = I — x2. Compute the complex
Fourier series
for TV = 10,20,40.
2. Let / : [—7r,7r] —>• R be denned by f ( x ) = x. Compute the complex Fourier
coefficients c n , n = 0, ±1, ±2,..., of /, and graph the errors
for TV = 10,20,40.
3. Let / : [—1,1] —> C be defined by f ( x ) = elx. Compute the complex Fourier
coefficients cn, n — 0, ±1, ±2,..., of /, and graph the errors
www.unifreebooks.com
for N = 10,20,40. (Note: You will have to either graph the real and imaginary
parts of the error separately or just graph the modulus of the error.)
4. Consider the negative second derivative operator under periodic boundary
conditions on [—£,•£].
(a) Show that each pair listed in (9.2) is an eigenpair.
(b) Show that (9.2) includes every eigenvalue.
(c) Show that every eigenfunction is expressible in terms of those given in
(9.2).
(d) Compare these results to those derived in Section 6.3, and explain why
they are consistent.
5. Suppose that / : [—•£,•£] —> C is defined by f ( x ) = g(x] + ih(x), where g and
h are real-valued functions defined on [—i,£]. Show that the complex Fourier
coefficients can be expressed in terms of the full Fourier coefficients of g and
h.
6. Prove that, for any real numbers 0 and A,
\ / \ /
is a finite geometric series, for which there is a simple formula. On the other
hand.
as our first example. To solve this by the method of Fourier series, we express u
and / in complex Fourier series, say
and we obtain
The reader will notice the similarity to how the problem was solved in Section
6.3.2. (The calculations, however, are simpler when using the complex Fourier
series instead of the full Fourier series.) As in Section 6.3.2, the coefficient do must
be zero, that is,
must hold, in order for a solution to exist. When this compatibility condition holds,
the value of CQ is not determined by the equation and infinitely many solutions exist,
differing only in the choice of c0.
For analytic purposes, the formula (9.6) may be all we need. For example, as
we discuss in Section 9.5.1, (9.6) shows that the solution u is considerably smoother
than the forcing function / (since the Fourier coefficients of u decay to zero faster
than those of /). However, in many cases, we want to produce a numerical estimate
of the solution u. We may wish, for example, to estimate the values of u on a grid
so that we can graph the solution accurately. This requires three steps:
www.unifreebooks.com
on a grid covering the interval [—I, I], say Xj — jh, j = 0, ±1,±2,... ,±JV,
/i = £/JV.
If JV is chosen large enough, this will produce accurate estimates of u(xj), j —
0,±1,±2,...,±JV.
Until this point, we have implicitly assumed that all of the calculations nec-
essary to compute u would be done analytically (using various integration rules to
compute the necessary Fourier coefficients, for example). This is not always possi-
ble (some integrals cannot be computed using elementary functions) and not always
desirable when it is possible (because there may be more efficient methods). We
will therefore consider how to estimate u.
A simple formula for estimating this integral is the so-called (composite) trapezoidal
rule, which replaces the integral by a discrete sum that can be interpreted as the
eiim rvf arooc nf trar^ovnirlc'
For details, see any book on numerical analysis, for example, [2].
www.unifreebooks.com
Since
and
where
and
The reader should take note of the special definition of f-N, which reduces to simply
f_N = f(x-N) = /(-£) when / is 2^-periodic (so that f(-l) = f ( t } } .
The sequence of estimates F-N, F_JV+I, • • • , FN-I is essentially produced by
applying the discrete Fourier transform to the sequence /-AT, f-N+i, • • • , /jv-i, as
we now show.
www.unifreebooks.com
where
The proof of this relationship is a direct calculation (see Exercise 5). We will often
refer to the sequence A0,Ai,... ,AM-I as the DFT of ao>«i, • • • >«M-I, although
the correct way to express the relationship is that A0,Ai,..., AM-I is the image
under the DFT of OQ, a i , . . . , OM-I (the DFT is the mapping, not the result of the
mapping). This abuse of terminology is just a convenience, and is quite common.
As another convenience, we will write the sequence 00,01,... ,OM-I as {aj}1^1,
or even just {a,j} (if the limits of j are understood).
We will now show that the relationship between the sequences {/jj^T.1^ and
[Fn}n=-N can be expressed in terms of the DFT. (The reader will recall that
Fn = dn, the nth Fourier coefficient of the function / on [—I,i}.} Since elQ is
27r-periodic, we have
then we have
we have
Thus {Fn} is the DFT of {/j}. With this rearrangement of terms understood, we
can say that {Fn} is the DFT of {fj}.
To actually compute {Fn}n=-N f rom {/jljL^-V' we perform the following
three steps:
1. Replace the sequence
with
The representation of the original sequence in terms of its DFT and the com-
plex exponentials can be viewed as trigonometric interpolation, since it provides
a combination of complex exponentials (and hence sines and cosines) that inter-
polates the sequence /_AT,/_JV+I,-• • ,/JY-I and therefore the function /. To be
precise, define a function / : R -» C by
and
Example 9.3. We define f : [—1,1] —>• R by /(#) = x3. We will compute the
interpolating function I of the previous paragraph with N = 3. The sequence {fj}
is (approximately)
In Figure 9.2, we display the function f , the sequence {fj}, and the interpolating
function
Figure 9.2. The function f ( x ) — x3, the sequence {fj}, and the trigono-
metric interpolating function I ( x ) = X) n __ 3 Fnetwnx (see Example 9.3).
2. Conversely, given the first 2AT complex Fourier coefficients of a periodic func-
tion, we can estimate the function (on a regular grid with IN + 1 nodes) by
computing an inverse DFT.
These facts are significant because there is a fast algorithm for computing the DFT;
this algorithm is called, appropriately enough, the fast Fourier transform (FFT).
There is a similar fast algorithm for the inverse DFT, which is simply called the
inverse FFT.
A direct implementation of formula (9.9) requires O((M) 2 ) arithmetic oper-
ations to compute a DFT. The FFT algorithm, on the other hand, can require as
little as O(Mlog2 (M)) operations to obtain the same result. The efficiency of the
FFT depends on the prime factorization of M; if M is the product of small primes,
then the FFT is very efficient. The ideal situation is that M be a power of 2; in
this case, the O(Mlog 2 (M)) operation count applies. There are many books that
explain how the FFT algorithm works, such as Kammler [28], Chapter 6. We will
not concern ourselves with the implementation of the algorithm in this text, but
just regard the FFT as a black box for computing the DFT.66
66
The FFT is one of the most important computer algorithms for computational science (indeed,
the original paper [12] announcing the algorithm is reputed to be the most widely cited mathemat-
ical paper of all time—see [28], page 295). For this reason, implementations of the FFT exist on
every major computer platform and it is also a feature of computer packages such as MATLAB,
Mathematica^ and Maple.
www.unifreebooks.com
Using the above results, we can devise an efficient algorithm for solving (ap-
proximately) the BVP (9.4):
1. Using the FFT, estimate the Fourier coefficients d-w,d-N+i, • • •,djv-i of /.
2. Use (9.6) to estimate the corresponding Fourier series of the solution u.
3. Use the inverse FFT to estimate the values of u on the grid —i, —l+h,..., i—h,
h = t/N.
The forcing function f(x] = x3 satisfies the compatibility condition, as can easily
be verified. An exact solution is u(x) = (x — x5)/2Q, which corresponds to choosing
CQ = 0 in the Fourier series
We will use N = 128 = 27; which makes the FFT particularly efficient. Using
(9.8), implemented by the FFT, we produce the estimates
(Recall the /_i28 i$ taken as the average of f(—1) and /(I); in this case, this aver-
age is 0.) To indicate accuracy of the computed Fourier coefficients, we graph the
logarithm of the absolute error in the resulting trigonometric interpolating function
I ( x ] , as given by (9.11), in Figure 9.3. As this graph shows, the error is essentially
zero at the interpolation nodes and very small in between, except near the endpoints
where Gibbs's phenomenon is evident (because f is not periodic). (We graph the
logarithm of the error because of the great disparity in the magnitude of the error
near the endpoints and in the interior of the interval. If we graphed the error itself,
only the Gibbs's phenomenon would be discernible on the scale of the graph.)
We next compute the estimates 0/c_i28,C-i27 5 ... ,0127.'
and we take c$ — 0. Finally, we use the inverse FFT to produce the estimates
www.unifreebooks.com
We then have
It can be shown that the DST is its own inverse, up to a multiplicative constant:
applying the DST to F0,FI, ..., FN-I produces the original sequence multiplied by
27V (see Exercise 9).
In solving a BVP or an IBVP with Dirichlet conditions, the main calculations
are:
As with the DFT and complex Fourier series, we can solve these problems approx-
imately using the DST. If / e (?[(),£], then the Fourier sine coefficients of / are
cnvpn V>v
Using the regular grid Xj = jh, j — 0,1,2,..., A/", h = t/N, and the trapezoidal
rule, we obtain
where fj = f ( x j ) . The trapezoidal rule simplifies due to the fact that sin(O) =
sin (n?r) = 0. We therefore see that the approximate Fourier sine coefficients are
just a multiple of the DST of the sequence /(#i), /(a^), ••••> f(%N-i)-
On the other hand, suppose the Fourier sine series of u is
and we know Ci,C2,. - . , cjv-i (or approximations to them). We then have, for
j = l,2,...,JV-l,
and we see that u can be estimated on a regular grid by another application of the
DST.
Since we are interested in the DST, we will look at the imaginary part of Fn, which
is (using the fact that /0 = /AT = 0)
(using the fact that fj+N = /ZN-N-J = /N-J for j = 1,2,..., TV — 1). We have
and so
Exercises
1. Define a sequence {fj}}=0 by
Use the inverse DFT to estimate / on a grid, and graph both / and the
computed estimate on [—1,1]. Use c_ie, c _ i 5 , . . . , Ci5.
4. Show that, with / defined by (9.11), the interpolation equations (9.12) and
(9.13) hold.
5. Let ao, « i , . . . , CLN-I be a sequence of real or complex numbers, and define
Prove that
Use the DST and ai, 02, • • • , «es to estimate / on a grid with 63 evenly spaced
points.
9. Let /o, /i,..., /jv-i be a sequence of real numbers, and define F0, FI , . . . , FN-I
by (9.15). Then define # 0 ,£i, • • • ,9N-i by
9.3. Relationship of sine and cosine series to the full Fourier series 415
(a) Reasoning as in Section 9.2.4, show how the DCT can be used to estimate
the Fourier cosine coefficients of a function in C[0,£j.
(b) Reasoning as in Section 9.2.4, show how the DCT can be used to estimate
a function from its Fourier cosine coefficients.
(c) Modifying the technique presented in Section 9.2.5, show how to compute
the DCT using the DFT (and hence the FFT). (Hint: Given {fj}?=0,
define {&*£„ by
Examples of odd functions include polynomials with only odd powers and
sin (x). Polynomials with only even powers and cos (x) are examples of even func-
tions, while sine and cosine are the prototypical periodic functions (both have period
2?r). The algebraic properties defining odd and even functions imply that the graph
of an odd function is symmetric through the origin, while the graph of an even
function is symmetric across the y-axis (see Figure 9.5).
We will show that the full Fourier series of an odd function reduces to a sine
series, and that the full Fourier series of an even function reduces to a cosine series.
We need this preliminary result:
www.unifreebooks.com
Lemma 9.6.
1. Suppose f : R —>• R is odd. Then
Making the change of variables x = — s in the first integral on the right, we obtain
The result for even / is proved by making the same change of variables.
9.3. Relationship of sine and cosine series to the full Fourier series 417
and
That is, the full Fourier series (on [—1, i]) of an odd function is the same as
its Fourier sine series (on [0,f\).
2. If f is even, then
6n = 0, n = l,2,3,...
and
That is, the full Fourier series (on [—1,1]) of an even function is the same as
its Fourier cosine series (on [Q,i]).
is odd and
is even. This, together with the previous lemma, yields the first result.
If / is even, then
is even and
We can use the preceding result in the following fashion. Suppose we wish
to understand the convergence of the Fourier sine series of / : (0, i) —>• R. Define
fodd '• (—£•,£) —>• R-5 the odd extension of /, by
www.unifreebooks.com
Then, by the previous theorem, the (full) Fourier series of f0dd is the sine series of /,
so the convergence of the sine series can be understood in terms of the convergence
of a related (full) Fourier series.
Similarly, given / : (0,^) -> R, we define feven : (—£,£) -> R, the even
extension of /, by
The Fourier series of feven is the cosine series of /, so, again, the convergence of
the cosine series can be examined in terms of the convergence of a related Fourier
series.
Figure 9.6 shows the odd and even extensions of / : [-1,1] ->• R defined by
f ( x ) = 1 + x.
Figure 9.6. The function f(x} = l + x and its odd (left) and even (right)
extensions.
Exercises
1. Compute the Fourier sine series of f ( x ) = x on the interval [—1,1] and graph
the sum of the first 50 terms on the interval [—3,3]. To what function does
the series appear to converge? What is the period of this function?
2. Compute the Fourier cosine series of f ( x ) = x on the interval [—1,1] and
graph it on the interval [—3,3]. To what function does the series appear to
converge? What is the period of this function?
www.unifreebooks.com
5. Show how to relate the quarter-wave sine series of / : [0,£| -> R to the full
Fourier series of a related function. (Hint: This other function will be denned
on the interval [-2^,2^].)
6. Show how to relate the quarter-wave cosine series of / : [0, t] —>• R to the full
Fourier series of a related function. (Hint: This other function will be defined
on the interval [-2^,2^].)
1. We say that {/AT} converges pointwise to / on [a, b] if, for each x £ [a, 6], we
have /jv(ar) ->• f ( x ) as N ->• oo (i.e. |/(ar) - /AT(X)| -)• 0 as N -> oo).
Actually, this definition is stated correctly only if all of the functions involved
are continuous, so that the maximum is guaranteed to exist. The general
definition is: {/AT} converges to / uniformly on [a, b] if, given any e > 0,
there exists a positive integer Ne such that, if N > Ne and x e [a, 6], then
\f(x) — /TV(X)| < e. The intuitive meaning of this definition is that, given any
small tolerance e, by going far enough out in the sequence, /N will approximate
/ to within this tolerance uniformly, that is, on the entire interval.
The following theorem shows that the uniform convergence of a sequence im-
plies its convergence in the other two senses. This theorem is followed by examples
that show that no other conclusions can be drawn in general.
Figure 9.7 shows the graphs of g§, giQ, and #20 • Then {gN} converges pointwise
to the zero function. Indeed, pAr(O) = 0 for all N, so clearly pAr(O) -» 0, and if
0 < x < 1, then for N sufficiently large, 2/N < x. Therefore gN(x) = 0 for all N
sufficiently large, and so gN(x) —> 0.
A direct calculation shows that gN —>• 0 in L2:
www.unifreebooks.com
Figure 9.7. The functions g$, gw, #20 (see Example 9.9).
Example 9.10. This example is almost the same as the previous one. We define
(see Figure 9.8). We have HN -> 0 pointwise on [0,1], and {h^} does not converge
uniformly to 0 on [0,1], by essentially the same arguments as in the previous exam-
ple. In this example, however, the sequence also fails to converge in the L2 norm.
We have
www.unifreebooks.com
Figure 9.8. The functions h^, HIQ, H^Q (see Example 9.10).
Our starting point is a direct calculation showing that a partial Fourier series of a
function / can be written as the integral of / times a term from a delta sequence.
The difficult part of the proof will be showing that this sequence really is a delta
sequence; that is, that it satisfies the sifting property. (Delta sequences and the
sifting property were discussed in Sections 4.6 and 5.7, but the essence of those
discussion will be repeated here, so it is not necessary to have studied the earlier
sections. The concepts from those section must be modified slightly here anyway,
to deal with periodicity.)
www.unifreebooks.com
We write
and using some clever manipulations, we can simplify the formula for KN consid-
erably:
www.unifreebooks.com
Periodic convolution
The integral sign without limits means integration over the entire real line (we do
not discuss here conditions on g and h that guarantee that these integrals exists).
The formula for /jv is similar to a convolution, except that the integration is over
the finite interval [—1,1]. A fundamental property of an ordinary convolution is its
symmetry; the change of variables that replaces x — s by s yields
www.unifreebooks.com
A similar formula holds for integrals such as that in (9.16), provided the functions
involved are periodic.
A direct calculation shows that if #, h are 2^-periodic functions defined on R,
then
The last step follows from the fact that s >-)• g(s)h(x — s) is 2^-periodic, and so its
integral over anv interval of length 21 is the same. We refer to
For example, in Figure 9.10 we graph the function gper, where g(x] = x on [—1,1].
For any g and h defined on [—i, ^], periodic or not, we interpret the periodic
convolution of g and h to be
KN as a delta sequence
An examination of the graph of the kernel K^ (see Figure 9.9) shows that most of
its "weight" is concentrated on a small interval around 0 = 0. The effect of this on
the periodic convolution
is that the integral produces a weighted average of the values of /, with most of
the weight on the values of f ( s ) near s — x. Moreover, this effect is accentuated as
N —> oo, so that if / is regular enough, we obtain pointwise convergence. Thus KN
acts like a delta sequence (see Section 4.6).
How regular must / be in order for convergence to occur? It turns out that
mere continuity is not sufficient, as there are continous functions on [-€, i] whose
Fourier series fail to converge at an infinite number of points. Some differentiability
of / is necessary to guarantee convergence. On the other hand, we do not really want
to require / to be continuous, since we often encounter discontinuities in practical
problems, if not of /, then of fper.
A suitable notion of regularity for our purposes is that of piecewise smoothness.
We make the following definitions.
at XQ G (a, b) if
both exist but are not equal. (Recall that if both one-sided limits exist and are equal
to f ( x o ) , then f is continuous at x — XQ.)
We say that f is piecewise continuous on (a, b) if
1. f is continuous at all but a finite number of points in (a,b);
2. every discontinuity of f in (a, b) is a jump discontinuity;
3. lima._>a+ f ( x ) and \im.x_^b- f(x] exist.
Finally, we say that f is piecewise smooth on (a, b) if both f and df/dx are
piecewise continuous on (a, b).
Before we give the main result, we give two lemmas that we will find useful.
Lemma 9.12.
The next lemma is called Bessel's inequality and follows directly from the
projection theorem.
is the element of the subspace VN = span {</>i, < / > 2 , . . . , 0jv} closest to /, and /AT is
orthogonal to / — /N. Therefore, by the Pythagorean theorem,
Moreover, since 0i, </>2, ^>s, • • • are mutually orthogonal, we have (also by the Pythagorea
theorem)
JVf n
Therefore,
and
Therefore,
www.unifreebooks.com
From now on, for conciseness, we will write / rather than fper and remember to
interpret f ( s ) in terms of the periodic extension of / whenever s is outside of the
infprval f — P t\ Alsn -rarp writ.p
With this understanding, our task is to show that, for each x G [—f.,1],
and
We will prove that (9.20) holds; the proof of (9.19) is similar. Equation (9.20) is
eauivalent to
By (9.18),
so
We can recognize this integral as l/(2£) times the L2 inner product (on the interval
(0,£)) of the functions
and
The sequence
is an orthogonal sequence with respect to the L2 inner product (see, for example,
Exercise 5.2.2). Bessel's inequality then implies that
and therefore
exists as a finite number, this will show that F^ is piecewise continuous, and hence
in V. Since / and df/dx each has at most a finite number of jump discontinuities,
there is an interval (0,e) such that the function s !->• f ( x - s) is continuous and
differentiate on (0,e). It follows from the mean value theorem that, for each s €
(0,e), there exists 7S e (0,1) such that
Also, by the mean value theorem, there exists As € (0,1) such that
This shows that lims_>0+ F(x)(s) exists, which completes the proof.
Example 9.15. We will compute the complex Fourier series of g : [—1,1] -> R
defined by g(x) = x. Figure 9.10 shows thatgper is piecewise smooth, and continuous
except at integral values of x. We therefore expect that the Fourier series of g will
converge to gper(x} except when x is an integer. At the points of discontinuity, the
average of the left- and right-hand limits is 0, which will be the limit of the series
at those points.
The Fourier coefficients of g are
www.unifreebooks.com
Figure 9.12. The partial Fourier series /4o for Example 9.15.
Corollary 9.16.
1. Suppose f : (—£, i) -> R is piecewise smooth. Then the full Fourier series of
f,
2. Suppose f : (0, t) —> R is piecewise smooth, and let f0dd be the periodic, odd
extension of f to R (that is, the periodic extension to R of the odd extension
°f f t° (—£•>£))• Then the Fourier sine series of f,
3. Suppose f : (0,£) —> R is piecewise smooth, and let feven be the periodic, even
extension of f toU (that is, the periodic extension to R of the even extension
of f to (—£,1)). Then the Fourier cosine series of f,
Example 9.17. Let f : (0,1) —> R be defined by f ( x ) = 1. Then the periodic, odd
extension of f , f0dd, is defined by
(the so-called "square wave"). Thus f0dd is discontinuous at every integer value of
x; at those points of dicontinuities, the average of the left and right endpoints is
zero. Figure 9.13 shows f0dd together with its partial sine series having 5, 10, 20,
and 40 terms. As the above corollary guarantees, the sine series converges to f at
every point of continuity (every nonintegral point, in this case) and to zero at every
point of discontinuity.
We can draw some further conclusions from Theorem 9.14 and Corollary 9.16:
www.unifreebooks.com
Figure 9.13. The square-wave function from Example 9.17, together with
its Fourier sine series with 5, 10, 20, and 40 terms.
Corollary 9.18.
1. If f : (—£,£) —> C is continuous and piecewise smooth, then fper is continuous
everywhere except (possibly) at the points ±£,±31,— It follows that the
Fourier series of f converges to f(x) for all x € (—i,i).
2. If f : [—t,£\ ->• C is continuous and piecewise smooth, and f(—t] = f ( l ) ,
then fper is continuous everywhere, and so the Fourier series of f converges
to f(x] for all x € [—•£,•£] (including the endpoints).
3. If f : [0,1] —>• R is continuous and piecewise smooth, then f0dd (the periodic
extension of the odd extension of f ) is continuous everywhere except (possi-
bly) at the points 0, ±£, ±21, — It follows that the Fourier sine series of f
converges to f(x) for all x e (0,^).
4- If f '• [0,^] —>• R is continuous and piecewise smooth, and /(O) = f ( i ) = 0,
then f0dd is continuous everywhere. It follows that the Fourier sine series of
f converges to f(x] for all x € [0,£] (including the endpoints).
www.unifreebooks.com
5. If f : [0, t] —>• R is continuous and piecewise smooth, then feven (the periodic
extension of the even extension of f ) is continuous everywhere. It follows that
the Fourier cosine series of f converges to f(x) for all x G [0,^] (including
the endpoints).
Proof. The conclusions all follow directly from Corollary 9.16, except for the
following: If / : [0,1] —> R is continuous, then feven is continuous, and f0dd is
continuous provided /(O) — f(i] = 0. The reader is asked to verify these conclusions
in Exercise 7. D
When fper (or f0dd, or feven) is continuous everywhere, we can draw a stronger
conclusion, as we show in the next section. The reader should note that, from the
point of view of approximating a given function, the cosine series is more powerful
than the sine series, since feven is continuous everywhere for any continuous / :
[Q,£] -» R. Therefore, for example, Gibbs's phenomena cannot occur with the
cosine series approximating such a function.
Exercises
1. Let / : [-7r,7r] ->• R be defined by f(x) = x3. Does the full Fourier series of
/ converge (pointwise) on R? If so, what is the limit of the series?
2. Define / : [-2,2] ->• R by f(x] = x3 + 1. Write down the limits of
(a) the Fourier sine series of / (regarded as a function defined on [0,2]),
(b) the Fourier cosine series of / (regarded as a function defined on [0,2]),
and
(c) the full Fourier series of /.
3. Find an example of a function / : [0,1] —>• R such that it is not the case that
the Fourier cosine series of / converges to / at every x € [0,1].
4. Using the original formula for KN,
Theorem 9.19. Suppose that f : (—£,1) -> C is piecewise smooth, and let cn,
n = 0, ±1, ±2,..., be the complex Fourier coefficients of f . Then
Since each of these three terms is bounded by a constant times l/|n|, the result
follows. We have used the fact that / and df/dx, being piecewise continuous, are
both bounded on (—1,1).
When / has some additional smoothness, its Fourier coefficients can be shown
to decay more rapidly.
Theorem 9.20. Suppose f : (—(.,£) —>• C has the property that its periodic exten-
sion fper and the first k — 2 derivatives of fper are continuous, where k >2, and
the (k — l)st derivative of f is piecewise smooth. If cn, n = 0, ±1, ±2,..., are the
complex Fourier coefficients of f, then
Proof. Suppose fper is continuous and df/dx is piecewise smooth. Then, by inte-
gration by parts, we have
www.unifreebooks.com
where dn, n = 0, ±1, ±2,..., are the Fourier coefficients of df/dx. By Theorem 9.19,
we have s * \
and so
as desired.
The proof of the general case is similar; one shows that the Fourier coefficients
of dk~1f/dxk~1 are of order l/|n|, the Fourier coefficients of dk~2f/dxk~2 are of
order l/|n| , and so forth to obtain the desired result.
Example 9.21.
with CQ = 0.
with CQ — 1/3.
3. Define f : (—1,1) —>• R by f ( x ) = x5—2x3+x. Then fper and its derivative are
continuous, but its second derivative has jump discontinuities (atx = (2k —I),
www.unifreebooks.com
with CQ — 0.
4- Define f : (—1,1) —>• R by f(x] = x4 — 2x2 + 1. Then fper and its first two
derivatives are continuous, but its third derivative has jump discontinuities (at
x — (2k — 1}, k = 0,±1,±2,...J. By Theorem 9.20, the Fourier coefficients
of f must be of order l/\n 4 . In fact, the Fourier coefficients are
with CQ = 8/15.
In Figure 9.14 we graph the error in approximating each of the above four functions
by a truncated Fourier series with 41 terms (the constant term and the 20 lowest
frequencies). The results are as expected; as fper gets smoother, the convergence of
the Fourier series to f becomes more rapid.
we have
i7rnx/l
(using the fact that e = 1). This holds for all x € R, and so
is convergent, the tail of the series tends to zero, which shows that
tends to zero at a rate that is independent of x 6 R. This proves the desired result.
Corollary 9.23.
1. Suppose f : (—t,i] —>• R is continuous and piecewise smooth, df/dx is piece-
wise smooth, and f(—£) = /(£)• Then the full Fourier series of f converges
uniformly to f on (—1,1) (and therefore to fper on R,).
2. Suppose f : (0,^) -> R is continuous, df/dx is piecewise smooth, and /(O) =
f(i] = 0. Then the Fourier sine series converges uniformly to f on (—£,£}
(and hence to f0dd, the periodic, odd extension of f, on all ofH).
3. Suppose f : (0,£) —> R is continuous and df/dx is piecewise smooth. Then
the Fourier cosine series converges uniformly to f on (—i-,K) (and hence to
feven, the periodic, even extension of f, on all ofH).
Proof.
1. This follows immediately from the equivalence of the full Fourier series and
the complex Fourier series.
2. This follows from the fact that the sine series of / is the full Fourier series of
fodd and from the fact that the continuity of / and the boundary conditions
/(O) = f(t] = 0 guarantee that f0dd is continuous.
3. This follows from the fact that the cosine series of / is the full Fourier series
of feven and from the fact that the continuity of / guarantees that Seven is
continuous.
Example 9.24. Let f : [0,1] —> R be defined by f(x) = x2. Since f does not
satisfy the Dirichlet conditions, the sine series does not converge uniformly on [0,1].
www.unifreebooks.com
However, even though f does not satisfy the Neumann conditions either, the cosine
series does converge uniformly on [0,1]. Figure 9.15 illustrates these results.
Example 9.25. Define f : (-1,1) -»• R by f ( x ) = ecos(27ra;). Then fper and all
of its derivatives are continuous. By Theorem 9.20, the Fourier coefficients of f
converge to zero faster than any power of l/\n\. It is not possible to compute a
formula for these coefficients (the integrals that must be computed are intractable),
but we can estimate them using the techniques discussed in Section 9.2. Figure 9.16
shows the error in estimating f with 41 terms in its Fourier series. This graph
should be compared with Figure 9.14-
www.unifreebooks.com
Exercises
1. Consider the following functions defined on [—1,1]:
but not
then
In contrast to pointwise or uniform convergence, it turns out that the mildest as-
sumption about / guarantees mean-square convergence of the Fourier series.
In order to discuss mean-square convergence, it had better be the case that /
has a finite L2 norm: a
www.unifreebooks.com
It turns out that this essential assumption is the only assumption required to guar-
antee the convergence of the Fourier series to / in the mean-square sense. To justify
this statement, we must begin with some technical preliminaries. The technicalities
are sufficiently subtle as to be beyond the scope of this book—the reader will have
to accept certain assertions on faith.
since the integrand is zero everywhere except a single point. Therefore, in order
for (9.23) to be satisfied, we have to agree that / and g are regarded as the same
function provided
must be positive.
www.unifreebooks.com
of functions in L2(—l,l) and /AT —>• / in the mean-square sense, then / 6 L2(—£,l).
Is this property satisfied by L?(-t, t) as defined by (9.22)? The answer is, it depends
on the definition of the integral used in (9.22). For example, any function with an
infinite singularity fails to be Riemann integrable; as an example, consider the
function / : [— 1,1] —>• R defined by
This function is not Riemann integrable on (—1,1) because of the infinite disconti-
nuity at x = 0. However, \f(x}\2 has a finite area under its graph, as the following
calculation shows:
if and only if / and g differ only on a set of measure zero. It is in this sense
that a set of measure zero is negligible: functions differing only on a set of
measure zero are regarded as being the same.
This last property assures us that whenever we are dealing with a continuous or
piecewise continuous function, we can compute its integral using the familiar tech-
niques of caculus. On the other hand, the Lebesgue integral is sufficiently powerful
to handle pathological cases that arise inevitably when mean-square convergence
is studied. We will discuss other properties of Lebesgue integration and L2 (—£,(.)
below.
We can now define L2(—l,l) more precisely as the set of all measurable func-
tions / : (—t,K) —> C satisfying
with the understanding that two functions that differ only on a set of measure zero
represent the same element of the space.
In order to understand the L2 theory of Fourier series, we need two more facts
about L2(—l.,l}, facts that we cannot prove here, as their development would take
us too far astray. Even stating the second fact takes a certain amount of work.
The first fact, Theorem 9.26, allows us to prove that the Fourier series of every L2
function converges to the function in the mean-square sense.
Theorem 9.26. Let f e L2(—l,l), and let e be any positive real number (no matter
how small). Then there is an infinitely differentiate function g : [—•£,•£] —>• C such
that
This theorem simply says that any L2(—t, (,} function can be approximated ar-
bitrarily well, in the mean-square sense, using a smooth function satisfying Dirichlet
conditions.
www.unifreebooks.com
Then
Proof. We must show that for any e > 0, there exists a positive integer 7Ve such
that
for every N > Ne. The proof is a typical e/3 argument—we show that /N is close to
/ by using the triangle inequality with two intermediate functions. To be specific,
let g be a smooth function satisfying g(—I) = g(i] and
By Corollary 9.23, QN —>• g uniformly on [—1, £], and therefore there exists a positive
integer Nf such that
It follows that
www.unifreebooks.com
and so
Finally, we have that /AT — QN is the partial Fourier series of the function f — g, and
hence that /AT — QN is the projection onto the space spanned by
It follows that
Thus we obtain
Now that we have obtained this fundamental result, we can draw some further
conclusions. First, a question of terminology: the above theorem shows that the
complex exponentials e™nx/1, n = 0, ±1, ±2,..., are complete in I/ 2 (—£,£).
This result justifies a fact that we have used constantly in developing Fourier series
methods for BVPs: Two functions are equal if and only if they have the same
Fourier coefficients.
Proof. Obviously, if u = v, then (u, 0j)y = (v, 0j)v for all j. On the other hand,
if (u, (f)j)v = ( v > 0j)v for all j, then w = u — v satisfies
Finally, because all other Fourier series (sine, cosine, full, quarter-wave sine,
quarter-wave cosine) are special cases of the complex Fourier series, all of the above
results extend to these other Fourier series as well. For example, we define L 2 (0,^)
to be the space of all measurable functions / : (0,^) -> R such that
Then, if / e £2(0, £), the Fourier sine series of / converges to / in the mean-square
sense (see Exercise 6).
We have now completed the basic theory used in the earlier chapters of this
book. In the next section, we discuss one further point for the sake of tying up a
loose end.
It follows that
(using the orthogonality of {0i, 02,0s, • • • } ) • Since we are assuming that (9.25)
holds, we conclude that
It follows that
Definition 9.31. Let V be a normed vector space, and suppose {un} is a sequence
in V. We say that {un} is Cauchy if, for any e > 0, there exists a positive integer
N such that
or, in brief,
sequence. On the other hand, the converse (does every Cauchy sequence converge?)
depends on the space as well as on the norm of the space.
Example 9.32. Define a sequence of rational numbers {xn} by the rule that xn
is the number obtained by truncating the decimal expansion of IT after n digits (so
xi = 3, X2 = 3.1, #3 = 3.14, and so on). Then {xn} is certainly Cauchy (ifm > n,
then \xm—xn\ < W~n+1). However, the question of whether {xn} converges depends
on the space under consideration. If the space is Q, the set of rational numbers, then
{xn} fails to converge. On the other hand, if the space is R, then {xn} converges,
and the limit is the irrational number TT.
This last example may seem rather trivial; it just points out the fact that
the real number system contains numbers that are not rational, and that without
the irrational numbers there are "holes" in the system. The next example is more
relevant to our study.
Let /AT : [0,1] —>• R be the function defined by the partial Fourier sine series of
f with N terms. Then \\f — /N\\L* ~* 0 as n —> °°j so {fn} is convergent and
hence Cauchy. However, if the space under consideration is (7[0,1], the space of all
continuous functions defined on the interval [0,1], and the norm is the L2 norm,
then {/AT} is still Cauchy and yet is not convergent (since f 0 C[0,1]).
We see that the second example is analogous to the first. The space (7[0,1],
which is a subspace of L 2 (0,1), has some "holes" in it, at least when the norm is
taken to be the L2 norm.
We have a name for a space in which every Cauchy sequence converges.
We now have two different (and unrelated) uses for the word "complete." An
orthogonal sequence in an inner product space can be complete, and a normed
vector space can be complete.
The above examples show that Q is not complete, and neither is C[0,1] under
the L2 norm.73 On the other hand, R is complete (as is R n ). Also, the space
L 2 (0,1) is complete, the proof of which result is beyond the scope of this book.
73
A standard result from analysis is that C[0,1] is complete under a different norm, namely, the
norm of uniform convergence:
This result follows from the fact that if a sequence of continuous functions converges uniformly to
a function, the limit function must also be continuous.
www.unifreebooks.com
Theorem 9.35. Both real and complex L2(a,b) are complete spaces.
We can now answer the question we posed at the beginning of this section: If
{0j} is an orthonormal sequence in a complex inner product space V and {a,j} is a
sequence of complex numbers satisfying
does
Theorem 9.36. Let V be a complete (complex) inner product space, and let
<^i>02,03, • • • be an orthonormal sequence in V. If 01,02,03,... is a sequence of
complex numbers satisfying
then
Proof. Since V is complete, it suffices to show that the sequence {vn} of partial
sums,
The conclusion of all this is that if a (complex) inner product space contains
a complete orthonormal sequence {0j}, then there is a one-to-one correspondence
between V and the space
Exercises
1. Consider the sine series
(a) Explain why this series converges to a function / in (complex) £ 2 (-l, 1).
(b) Graph the partial series with 2TV + 1 terms, for various values of TV, and
guess the function /. Then verify your guess by calculating the Fourier
coefficients of /.
4. Consider the function / : [0,1] —»• R defined by /(#) = x 1 / 4 (l — x), and its
Fourier sine series
the eigenpairs. Instead, the results can be deduced from some fairly sophisticated
mathematical arguments that are beyond the scope of this book. Therefore, we will
not attempt to justify all of our statements in this section.
We define Kr> : C&(ti) by
(The reader should notice that, since we cannot assume a priori that A and
u are real, we use the complex I/2 inner product.) This shows that A is a
nonnegative real number. Moreover,
the last step following from the Dirichlet boundary conditions. Therefore, KD
has only positive eigenvalues.
2. Eigenfunctions of KD corresponding to distinct eigenvalues are orthogonal.
As we have seen before, the orthogonality of eigenfunctions depends only on
the symmetry of the operator, which is easy to verify using integration by
parts (see Exercise 1).
3. The operator KD has an infinite sequence {\n}^L1 of eigenvalues satisfying
www.unifreebooks.com
and
It is possible (although not necessarily useful) to order the \mn and ^mn in (singly-
indexed) sequences.
The usefulness of the above facts for many computational tasks is limited,
since, for most domains f) and coefficients fc(x), it is not possible to obtain the
eigenvalues and eigenfunctions analytically (that is, in "closed form"). However, as
we have seen before, the eigenpairs give some information that can be useful in its
own right. It may be useful to expend some effort in computing a few eigenpairs
numerically. We illustrate this with an example.
Example 9.37. Consider a membrane that at rest occupies the domain tl, and
suppose that the (unforced) small transverse vibrations of the membrane satisfy the
74
The technique for doing this is called the Gram-Schmidt procedure; it is explained in elemen-
tary linear algebra texts such as [34].
www.unifreebooks.com
IB VP
The question we wish to answer is: What is the lowest frequency at which the
membrane will resonate? This could be an important consideration in designing a
device that contained such a membrane.
The key point is that, if we knew the eigenvalues and eigenvectors of the nega-
tive Laplacian on fi (subject to Dirichlet conditions), then we could solve the IBVP
just as in the Fourier series method. Suppose the eigenpairs are
Therefore,
This example shows that we would gain some useful information by computing
the smallest eigenvalue of the operator on £). We will revisit this example in Section
10.4, where we use finite element methods to estimate the smallest eigenvalue of
various domains.
Exercises
1. Prove that the operator K defined above is symmetric.
www.unifreebooks.com
3. Consider an iron plate occupying a domain £) in R2. Suppose that the plate
is heated to a constant 5 degrees Celsius, the top and bottom of the plate
are perfectly insulated, and the edges of the plate are fixed at 0 degrees. Let
w(x, t) be the temperature at x 6 fJ after t seconds. Using the first eigenvalue
and eigenfunction of the negative Laplacian on 0, give a simple estimate of
w(x,£) that is valid for large t. What must be true in order that a single
eigenpair suffices to define a good estimate? (The physical properties of iron
are p = 7.88g/cm3, c = 0.437 J/(gK), AC = 0.836 W/(cmK).)
Chapter 10
In this chapter, we will look more deeply into finite element methods for solving
steady-state BVPs. Finite element methods form a vast area, and even by the end
of this chapter, we will have only scratched the surface. Our goal is modest: We
wish to give the reader a better idea of how finite element methods are implemented
in practice, and also to give an overview of the convergence theory.
The main tasks involved in applying the finite element method are
• Defining a mesh on the computational domain.
• Computing the stiffness matrix K and the load vector f.
• Solving the finite element equation Ku = f.
We will mostly ignore the first question, except to provide examples for simple do-
mains. Mesh generation is an area of study in its own right, and delving into this
subject is beyond the scope of this book. We begin by addressing issues involved
in computing the stiffness matrix and load vector, including data structures for
representing and manipulating the mesh. We will concentrate on two-dimensional
problems, triangular meshes, and piecewise linear finite elements, as these are suf-
ficient to illustrate the main ideas. Next, in Section 10.2, we discuss methods for
solving the finite element equation Ku = f, specifically, on algorithms for taking
advantage of the sparsity of this system of equations. In Section 10.3, we provide a
brief outline of the convergence theory for Galerkin finite element methods. Finally,
we close the book with a discussion of finite element methods for solving eigenvalue
problems, such as those suggested in Section 9.7.
461
www.unifreebooks.com
• Efficient computation of the various integrals that define the entries in the
stiffness matrix and load vector.
• Algorithms for assembling the stiffness matrix and the load vector.
We will now discuss these issues.
be the set of nodes of the triangles in Th- (Standard notation in finite element
methods labels each mesh with /i, the length of the longest side of any triangle in
the mesh. Similarly, the space of piecewise linear functions relative to that mesh is
denoted Vh, and an arbitrary element of Vh as Vh- We will now adopt this standard
notation.)
To make this discussion as concrete as possible, we will use as an example a
regular triangular mesh, defined on the unit square, consisting of 32 triangles and
25 nodes. This mesh is shown in Figure 10.1.
In order to perform the necessary calculations, we must know which nodes are
associated with which triangles. Of course, each triangle has three nodes; we need
to know the indices of these three nodes in the list HI, 112,.. - , HM- We define the
mapping e by the property that the nodes of triangle Tj are ne(i;1), n e (j ;2 ), ne(i,3) •
(So e is a function of two variables; the first must take an integral value from 1 to
L, and the second one of the integers 1,2,3.)
In our sample mesh, there are 32 triangles (L = 32), and they are enumerated
as in Figure 10.2. The M = 25 nodes are enumerated as shown in Figure 10.3, which
explicitly shows the indices of the nodes belonging to each triangle. For example,
expressing the fact that the vertices of triangle 10 are nodes 6, 7, and 12.
Each of the standard basis functions for the space of continuous piecewise
linear functions corresponds to one node in the triangulation. The basis functions
75
If the domain fi has curved boundaries, then, in the context of piecewise linear finite elements,
the boundary must be approximated by a polygonal curve made up of edges of triangles. This
introduces an additional error into the approximation. When using higher-order finite elements, for
example, piecewise quadratic or piecewise cubic functions, then it is straightforward to approximate
the boundary by a piecewise polynomial curve of the same degree as is used for the finite element
functions. This technique is called the isoparametric method, and it leads to a significant reduction
in the error. We will ignore all such questions here by restricting ourselves to polygonal domains.
www.unifreebooks.com
By design, most of these values will be zero; let us focus on a fixed i between 1 and
AT, and ask the question: For which values of j will KIJ be nonzero?
As an example, consider i — 5 for our sample mesh. The support of ^13 = 0/5
is shown in Figure 10.4. The question we must answer is: What other basis functions
(f>fj have a support that intersects of ^13 (the intersection must have a positive
area; if the intersection is just an edge of a triangle, this will not lead to a nonzero
contribution to K). It is easy to see that the desired basis functions correspond to
nodes of triangles of which 1113 is itself a node, that is, to the nodes of the triangles
shaded in Figure 10.4.
this information, one can compute the matrix K by rows, according to the following
algorithm:
for i = 1 , 2 , . . . , N
for each j = l,2,...,N such that the supports of (f)fj and (f>ft overlap,
compute Kij = a (<j>f., 0^).
However, this is probably not the most common approach, for the following reason:
In order to compute the necessary integrals, one must know the nodes that form the
vertices of each triangle. It turns out that the stiffness matrix can be formed with
only this information, that is, without explicitly storing the connectivity information
mentioned above.
The integral represented by a (0^., <}>f.) is naturally decomposed into the sum
of several integrals, one for each triangular element making up the domain of inte-
gration. It is convenient to make this decomposition, as <j>f4 and 0^. are given by
different formulas on the different elements. It is then natural to compute, for each
element Tk, the contributions to various entries of the stiffness matrix K.
For example, consider % = 5, j = 1 in our sample mesh. Then a ((f>f^ 0/J is
the sum of two integrals, one over triangle Ti2 and the other over Ti3:
There is no reason that these two integrals must be computed together, as long as
both contributions to K5i are eventually accumulated.
Following the above reasoning, a standard algorithm for computing K is to
loop over the elements (i.e. the triangles) in the mesh (rather than over the nodes)
and compute the contributions to K from each element in turn. Since each triangle
has three nodes, a given element contributes to up to 9 entries in K. There is
one piece of information, however, that is not available unless we make a point to
record it in the data structure: the "inverse" of the mapping i t-t fa. In the course
of assembling the stiffness matrix, we need to be able to decide if a given node n^ is
a free node (that is, if j = fa for some i) and, if so, to determine i. So let us define
a mapping j •->• gj by
for A? = 1,2,...,L
f o r » = 1,2,3
for j = 1,2,3
if P = 9e(k,i) ^ 0 and q = ge(kij) ± 0
Add the contribution to Kpq obtained by integrating over Tk.
The condition that ge(k,i) / 0 indicates that the ith vertex (i = 1,2,3) of triangle
Tk is a free node, and similarly for <?e(fc,j) • The integral mentioned in the last line
www.unifreebooks.com
By way of example, Table 10.1 shows these arrays for the sample mesh of Figure
10.1. The information recorded in these arrays will suffice for straightforward finite
element problems with homogeneous Dirichlet or Neumann boundary conditions
(or even for inhomogeneous Dirichlet problems—see Exercise 5). For problems with
inhomogeneous Neumann conditions, it may also be necessary to record whether a
given edge belongs to the boundary. The ElementList array can be augmented by
columns containing flags indicating whether the edges lie on the boundary. (Or, of
course, these flags can be stored in independent arrays, if desired.) This extension
is left to the reader.
10.1.4 Quadrature
Up to this point, we have computed all integrals exactly, perhaps with the help of a
computer package such as Mathematica or Maple. However, this would be difficult to
incorporate into a general-purpose computer program for finite elements. Moreover,
it is not necessary to compute the various integrals exactly, and it may be more
76
Using modern techniques, such as modular programming or object-oriented programming, one
might define a structure or a class to represent a mesh.
www.unifreebooks.com
ElementList
1 1 6 7
2 1 2 7
3 2 7 8
NodeList NodePtrs
4 2 3 8
5 3 8 9
1 0 0 1 0
2 0.2500 0 2 0
6 3 4 9
3 0.5000 0 3 0
7 4 9 10
4 0.7500 0 4 0
8 4 5 10
5 1.0000 0 5 0
9 6 11 12
6 0 0.2500 6 0
10 6 7 12
7 0.2500 0.2500 7 1
11 7 12 13
8 0.5000 0.2500 8 2 PreeNodePtrs
12 7 8 13
13 8 13 14
9 0.7500 0.2500 9 3 1 7
10 1.0000 0.2500 10 0 2 8
14 8 9 14
11 0 0.5000 11 0 3 9
15 9 14 15
12 0.2500 0.5000 12 4 4 12
16 9 10 15
13 0.5000 0.5000 13 5 5 13
17 11 16 17
14 0.7500 0.5000 14 6 6 14
18 11 12 17
15 1.0000 0.5000 15 0 7 17
19 12 17 18
16 0 0.7500 16 0 8 18
20 12 13 18
17 0.2500 0.7500 17 7 9 19
21 13 18 19
18 0.5000 0.7500 18 8
22 13 14 19
19 0.7500 0.7500 19 9
23 14 19 20
20 1.0000 0.7500 20 0
24 14 15 20
21 0 1.0000 21 0
25 16 21 22
22 0.2500 1.0000 22 0
26 16 17 22
23 0.5000 1.0000 23 0
27 17 22 23
24 0.7500 1.0000 24 0
28 17 18 23
25 1.0000 1.0000 25 0
29 18 23 24
30 18 19 24
31 19 24 25
32 19 20 25
Table 10.1. The data structure for the mesh of Figure 10.1.
where w\, w?,..., Wk, the weights, are real numbers and (si, £1), ($2, £ 2 ) , . . . , (fifc, £&),
the nodes, are points in the domain of integration R. Equation (10.1) defines a k
point quadrature rule.
The Gaussian quadrature rules are defined on the reference interval [-1,1]; to apply
the rules on a different interval requires a simple change of variables.
In multiple dimensions, it is also possible to define quadrature rules with a
given degree of precision. Of course, things are more complicated because of the
variety of geometries that are possible. We will exhibit rules for triangles with
degree of precision 1 and 2. These rules will be defined for the reference triangle
www.unifreebooks.com
TR with vertices (0,0), (1,0), and (0,1) (see Figure 10.5). The following one-point
rule has degree of precision 1:
(see Exercise 1), while the following two-point rule has degree of precision 2:
and the integrand is constant when k is constant (a linear function has a con-
stant gradient). Therefore, the one-point rule will give exact results for a constant
coefficient problem,77 and, by our rule of thumb, the same rule is adequate for
nonconstant coefficient problems.
If we were to use piecewise quadratic functions, then V0j • V0j would be
piecewise quadratic as well, and so we would need a quadrature rule with degree of
precision 2. The three-point rule (10.4) would be appropriate in that case.
77
Actually, a rule with degree of precision 0 would suffice; however, a rule cannot use less than
one quadrature node, and so we use the above one-point rule, which has degree of precision 1.
www.unifreebooks.com
There is still the following technical detail to discuss: How can we apply a quadra-
ture rule defined on the reference triangle TR to an integral over an arbitrary triangle
T? We assume that T has vertices (pi,p2), (tfi^), and (ri,r2). We can then map
(^1,^2) G TR to (xi,#2) € T by the linear mapping
The mapping (10.5) sends (0,0), (1,0), and (0,1) to (pi,p2), (tfi,<?2), and (ri,r 2 ),
respectively. We will denote this mapping by x = F(y), and we note that the
Jacobian matrix of F is
We can now aonlv the rule for a change of variables in a multiple integral:78
it is easy to apply the change of variables and then any desired quadrature rule.
For example, the three-point rule (10.4) would be applied as follows:
Exercises
1. Verify that (10.3) produces the exact integral for the monomials 1, x, y.
2. Verify that (10.4) produces the exact integral for the monomials 1, x, ?/, x 2 ,
xy, y2.
3. Let T be the triangular region with vertices (1,0), (2,0), and (3/2,1), and let
/ : T -> R be defined by /(x) = x\x\. Compute
78
This rule is explained in calculus texts such as Gillett [17], or more fully in advanced calculus
texts such as Kaplan [29].
www.unifreebooks.com
Figure 10.6. A coarse mesh (left), refined in the standard fashion (right).
(Note: The mesh is a triangulation of the rhombus in both figures; the circumscribed
box just indicates the axes.)
www.unifreebooks.com
5. Explain how to use the information stored in the data structure suggested in
the text to solve an inhomogeneous Dirichlet problem.
6. Consider the data structure suggested in the text. What information is lacking
that is needed to solve an inhomogeneous Neumann problem?
79
In general, Gaussian elimination is numerically unstable unless partial pivoting is used. Partial
pivoting is the technique of interchanging rows to get the largest possible pivot entry. This ensures
that all of the multipliers appearing in the algorithm are bounded above by one, and in virtually
every case, that roundoff error does not increase unduly. There are special classes of matrices,
most notably the class of symmetric positive definite matrices, for which Gaussian elimination is
provably stable with no row interchanges.
www.unifreebooks.com
n time (s)
100 0.0116
200 0.107
400 1.57
800 12.7
1600 102
The operation counts shows how the computation time increases as the size
of the system increases—doubling the size of the system causes an 8-fold increase
in computation time. As a frame of reference, Table 10.2 gives the time required to
solve an n x n linear system on a reasonably good personal computer at the time
of this writing.81
With the rapid improvements in computer hardware of the last two decades,
it might seem that concerns about algorithmic efficiency are less significant than
they used to be. Indeed, many problems that required mainframe computers 25
years ago can now easily be solved on inexpensive personal computers. However,
with an operation count of 0(2n3/3), it is not difficult to encounter problems that
exceed available computing power. For example, consider the discretization of a
three-dimensional cube. If there are N divisions in each dimension, then the size of
the system will be on the order of N3 x N3, and, if a dense linear system of this order
is to be solved (or even if a sparse linear system is solved by a dense method, that
is, a method that does not take advantage of sparsity), then the operation count
will be O(N9). Merely to refine the mesh by a factor of 2 in each dimension will
increase the computation time by a factor of 512. (We are not even considering the
memory requirements.) Thus, given the times in Table 10.2, to solve a problem on
a 10 x 10 x 10 grid might take a minute; to solve the same problem on a 20 x 20 x 20
grid would take more than 8 hours!
This discussion should convince the reader that algorithmic efficiency is critical
for solving some realistic problems. We now discuss the solution of sparse systems;
a comparison of operation counts will show the advantages of a method, such as
finite elements, that leads to sparse linear systems.
P if
Suppose £7 is the unit square (J7 = {x € R2 : 0 < x\ < 1,0 < #2 < l})> and we
apply the finite element method with a regular triangulation of f) and piecewise
linear finite element functions. Dividing the x and y intervals, [0,1], into n subin-
tervals each, we obtain 2n2 elements and (n + I) 2 nodes. Only the interior nodes
are free, so the stiffness matrix is (n — I) 2 x (n — I) 2 . As we showed in Example
8.10, a typical free node rifi iteracts with nodes
(also with nodes n/ i-n and n/i+n, but, with constant coefficients, the corresponding
entries of K turn out to be zero due to cancellation), so that the subdiagonals of
A indexed by — n + 1, — 1 and the superdiagonals indexed by 1, n — 1, along with
the main diagonal, contain nonzero entries. Thus A is banded with half-bandwidth
n - 1. See Figure 10.7 for the sparsity pattern of A.
It is completely straightforward to apply Gaussian elimination with back sub-
stitution to a banded system. Indeed, the typical step of the algorithm is just as
in the dense case, except that the inner loops run over a limited range of indices—
keeping the computation within the band. Here is the algorithm:
Figure 10.7. The sparsity pattern of the discrete Laplacian (200 triangular
elements).
if the standard Gaussian elimination algorithm is used. (For SPD matrices, these
operation counts can be divided by two.)
The cost of a direct method performed on a sparse matrix is controlled, not
merely by the number of nonzeros in the matrix, but by the fill-in that occurs during
the course of the algorithm. Fill-in is said to have occurred whenever an entry that
is originally zero becomes nonzero during the course of the algorithm. In factoring
a banded matrix, fill-in occurs within the bands, as can be seen by inspecting the
L and U factors (see Figure 10.8). Entries that become nonzero during the course
of the algorithm must be included in subsequent calculations, increasing the cost.
Figure 10.8. The sparsity pattern of the L (left) and U (right) factors of
the discrete Laplacian (200 triangular elements).
of the matrix-vector product is mostly governed by the density of the matrix (the
percentage of nonzero entries).
Figure 10.9. A random sparse matrix (left) and its lower triangular factor
(right).
Moreover, a consideration of the second derivative matrix shows that this stationary
point is the global minimizer of 0 (a quadratic form defined by an SPD matrix is
analogous to a scalar quadratic ax2+bx+c with a > 0—see Figure 10.10). Therefore,
solving Ax = b and minimizing 0 are equivalent.
We can thus apply any iterative minimization algorithm to 0, and, assuming
it works, it will converge to the desired value of x. A large class of minimization
algorithms are descent methods based on a line search. Such algorithms are based
on the idea of a descent direction: Given an estimate x^ of the solution, a descent
direction p is a direction such that, starting from x^, 0 decreases in the direction
of p. This means that, for all a > 0 sufficiently small,
www.unifreebooks.com
Given a descent direction, a line search algorithm will seek to minimize 0 along the
ray (x^ + ap : a > 0} (that is, it will search along this "line," which is really a
ray).
Since 0 is quadratic, it is particularly easy to perform the line search—along
a one-dimensional subset, (j> reduces to a scalar quadratic. Indeed,
(the symmetry of A was used to combine the terms x^ • Ap/2 and p • Ax^/2)-
The minimum is easily seen to occur at
www.unifreebooks.com
How should the descent direction be chosen? The obvious choice is the steepest
descent direction
Figure 10.11. The contours of the quadratic form from Figure 10.10. The
steepest descent direction from x = (4,2) (marked by the "o") is indicated, along
with the minimizer in the steepest descent direction (marked by "o"). The desired
(global) minimizer is marked by "x."
Example 10.2. To test the algorithms described in this section, we will use the
BVP
www.unifreebooks.com
solves
www.unifreebooks.com
We now wish to find a new search direction p(fe+1) with the following property: If
It is not clear that such a p(fc+1) can be found; however, it can be, as we now show.
To solve (10.11), we must find /?i, /92, • • • , 0k+i such that
is as small as possible. (We separate the last term, 0k+ip(k+1\ from the sum
because we already know how to make
is zero, then
and the resulting /?i,$2, • • • ,flk+i will be the solution of (10.11). This is what we
want, since we already have computed the minimizer of (10.12).
Our problem then reduces to finding p(fe+1) to satisfy
To compute the search direction p( fc+1 ), then, we just take a descent direction
and subtract off its component lying in the subspace
the result will be orthogonal to each of the vectors p^\p^,. - - , p^- We will use
the steepest descent direction r = — V^(x( fc )) to generate the new search direction.
To achieve the desired orthogonality, we must compute the component of r in Sfc
by projecting r onto Sk in the inner product defined by A. We therefore take
For reasons that we cannot explain here, most of the inner products r • ApW are
zero, and the result is
We can then use the formula from (10.9) to find the minimizer ak+i in the direction
of p(fe+1), and we will have found x(fe+1).
By taking advantage of the common features of the formulas (10.9) and (10.14)
(and using some other simplifications), we can express the CG algorithm in the
following efficient form. (The vector b — Ax(fc) is called the residual in the equation
Ax = b—it is the amount by which the equation fails to be satisfied.)
82
It can be shown that, since A is positive definite, x • Ay defines an inner product on R n ; see
Exercise 5.
www.unifreebooks.com
The reader should note that only a single matrix-vector product is required at each
step of the algorithm, making it very efficient. We emphasize that we have not
derived all of the steps in the CG algorithm.83
The name "conjugate gradients" is derived from the fact that many authors
refer to the orthogonality of the search directions, in the inner product defined
by A, as A-conjugacy. Therefore, the key step is to make the (negative) gradient
direction conjugate to the previous search directions.
Example 10.3. We apply 100 steps of the CG method to the system Ku = f from
Example 10.2. The result differs from the exact solution u by about 0.001% in the
Euclidean norm, and the corresponding piecewise linear function is just as accurate
(error of about 3% in the energy norm) as that obtained from solving Ku = f
exactly.
2. Even apart from the issue of round-off errors, CG is not used as a direct
method for the simple reason that n steps is too many! We look to iterative
83
For a complete derivation and discussion of the CG algorithm, see [19], for example.
www.unifreebooks.com
10.2.7 Preconditioned CG
It is often possible to replace a matrix A with a related matrix whose eigenvalues
are clustered, and for which CG will converge quickly. This technique is called
preconditioning, and it requires that one find a matrix M (the preconditioned that is
somehow similar to A (in terms of its eigenvalues) but is much simpler to invert. At
each step of the preconditioned conjugate gradient (PCG) algorithm, it is necessary
to solve an equation of the form Mq = r.
Preconditioners can be found in many different ways, but most require an
intimate knowledge of the matrix A. For this reason, there are few general-purpose
methods. One method that is often used is to define a preconditioner from an
incomplete factorization of A. An incomplete factorization is a factorization (like
Cholesky) in which fill-in is limited by fiat. Another method for constructing pre-
conditioners is to replace A by a simpler matrix (perhaps arising from a simpler
PDE) that can be inverted by FFT methods.
Exercises
1. Suppose A 6 R n x n . Determine the exact number of arithmetic operations
required for the computation of A = LU via Gaussian elimination. Further
count the number of operations required to compute L-1b and U~ 1 L~ 1 b.
Verify the results given in the text. The following formulas will be useful:
where
Show that
is orthogonal to V0(y).
5. Suppose A e R n x n is SPD. Show that
where
www.unifreebooks.com
(a) Perform one step of the steepest descent algorithm, beginning at x(°) =
(4,2). Compute the steepest descent direction at x(°) and the minimizer
along the line defined by the steepest descent direction. Compare your
results to Figure 10.11.
(b) Now compute the second step of the steepest descent algorithm. Do you
arrive at the exact solution of Ax = b?
(c) Perform two steps of CG, beginning with x(°) = 0. Do you obtain the
exact solution?
(a) Write a program implementing the CG algorithm with the above stop-
ping criterion.
(b) Use your program to solve the finite element equation Ku = f arising
from the BVP (10.10) for meshes of various sizes. For a fixed value of
e, how does the number of iterations required depend on the number of
unknowns (free nodes)?
9. Explain how the CG algorithm must be modified if the initial estimate x(°)
is not the zero vector. (Hint: Think of using the CG algorithm to compute
y = x — x(°). What linear system does y satisfy?)
10.3. An outline of the convergence theory for finite element methods 489
However, as we pointed out in Section 5.6 (for the one-dimensional case), the choice
of Cf^rj) for the space of test functions is not really appropriate for our purposes,
since the finite element method uses functions that are not smooth enough to belong
to <?£>(£)) • Moreover, the statement of the weak form does not require that the test
functions be so smooth.
We can define the appropriate space of test functions by posing the following
question: What properties must the test functions have in order that the variational
equation
(The coefficient of the PDE, fc(x), is also involved. However, if we assume that k
is smooth and bounded, then, for the purposes of this discussion, it may as well
be constant and therefore can be ignored.) It suffices, therefore, that the partial
derivatives of u and v belong to L2(t)}, and it is natural to define the space
(the boundary integral must vanish since 0 and all of its derivatives are zero on the
boundary). We can define a derivative of / G L 2 (f2) by this equation: If there is a
function g € L2 (17) such that
84
The reader will recall that the support of a function is the closure of the set on which the
function is nonzero.
www.unifreebooks.com
then g is called the (weak) partial derivative of / with respect to x\, and denoted
df/dxi. The definition of df/dx2 in the weak sense is entirely analogous.
We use the same notation for the weak partial derivatives as we do for the
classical partial derivatives; it can be proved that if the classical partial derivatives
of / exist, then so do the weak partial derivatives, and the two are the same. The
definition (10.17) is to be interpreted in terms of weak derivatives. The space Hl(tl)
is an example of a Sobolev space.
It can be shown that continuous piecewise linear functions belong to /f1(J7),
while, for example, discontinuous piecewise linear functions do not. Exercise 2
explores this question in one dimension; a more complete justification is beyond the
scope of this book.
The standard inner product for Hl(tl) is
Then, by the so-called trace theorem, HQ (17) is a well-defined and closed subspace
of H1^). Moreover, it can be shown that Hl(fl) (and hence #Q(^)) is complete
under the Hl norm. (The notion of completeness was defined in Section 9.6.)
Moreover, the energy inner product is equivalent to the H1 norm on the subspace
HQ($I), which implies that HQ(O,) is complete under the energy norm as well. It
then follows from the Riesz representation theorem that the weak form of the BVP,
which we now pose as
has a unique solution for each / e L 2 (f2). When / is continuous and there is a
classical solution u to the BVP, then u is also the unique solution to the weak form
of the BVP.
www.unifreebooks.com
10.3. An outline of the convergence theory for finite element methods 491
Figure 10.12. Two functions belonging to Hl(Q, 1) (left) and their deriva-
tives (right). The difference in the two functions is less than 5% in the L2 norm,
but it is more than 91% in the H1 norm.
The various analytical results mentioned in this section, such as the trace
theorem, completeness of the Sobolev space Hl(£t), and the Riesz representation
theorem, are discussed in advanced books on finite elements, such as [6].
where x^, x / 2 , . . . , ~x.fN are the free nodes of the mesh. If we can determine how well
HI approximates u in the energy norm, then, since uj € Vh and the finite element
approximation Uh is the best approximation to u from Vh, we know that the error
in Uh is no greater.
It can be shown that, if u has some extra smoothness (in particular, if u is a so-
lution of the strong form of the BVP, so that it is twice continuously differentiable),
then
where h is the length of the largest side of any triangle in the mesh Th and C is a
constant that depends on the particular solution u but is independent of the mesh.85
It follows that
so that
In each of the three previous inequalities, the constant C represents a generic con-
stant (not necessarily the same in each inequality) that can depend on the particular
solution u and the domain f) but is independent of h.
85
There are some restrictions on the nature of the meshes TH as h —>• 0, basically that the
triangles do not become arbitrarily "skinny."
86
A set fi is called convex if, whenever the endpoints of a line segment lie in J7, then the entire
line segment lies in fi.
www.unifreebooks.com
10.3. An outline of the convergence theory for finite element methods 493
Exercises
1. Suppose 0 € Co*(ti) and / : fi ->• R is smooth. Prove that
for i = 1,2. What would the boundary integral be in this integration by parts
formula if it were not assumed that 0 is zero on dfi?
2. The purpose of this exercise is to illustrate why continuous piecewise linear
functions belong to /^(O,!), but discontinuous piecewise linear functions do
not.
(a) Define / : [0,1] -» R by
Show that / belongs to H1 (0,1) and that its weak derivative is as defined
above by verifying that
for every 0 6 C™(Q, 1). (Hint: Start with the integral on the right,
rewrite it as the sum of two integrals, and apply integration by parts to
each.)
(b) Define g : [0,1] ->• R by
is u(x) = x3(l — x). Consider the regular mesh with three elements, the
subintervals [0,1/3], [1/3,2/3], and [2/3,1].
(a) Compute the piecewise linear finite element approximation to u, and call
it v.
(b) Compute the piecewise linear interpolant of w, and call it w.
(c) Compute the error in v and w (as approximations to u) in the energy
norm. Which is smaller?
We follow the usual procedure to derive the weak form: multiply by a test function,
and integrate by parts:
www.unifreebooks.com
In the last step, the boundary term vanishes because of the boundary conditions
satisfied by the test function v. The weak form of the eigenvalue problem is therefore
or to
which is the ordinary eigenvalue problem for the matrix M 1 K. However, this
transformation has several drawbacks, not the least of which is that M-1K will
usually not be symmetric even if both K and M are symmetric. (The reader should
recall that symmetric matrices have many special properties with respect to the
eigenvalue problem: real eigenvalues, orthogonal eigenvectors, etc.)
The preferred method for converting Ku = AMu into an ordinary eigenvalue
problem uses the Cholesky factorization . Every SPD matrix can be written as
the product of a nonsingular lower triangular matrix times its transpose. The
mass matrix, being a Gram matrix, is SPD (see Exercise 10.2.6), so there exists a
nonsingular lower triangular matrix L such that M = LLT. We can then rewrite
the problem as follows:
Example 10.4. We will estimate the smallest eigenvalue and the corresponding
eigenfunction of the negative Laplacian (subject to Dirichlet conditions) on the unit
square fi. The reader will recall that the exact eigenpair is
We establish a regular mesh on £), with 2n2 triangles, (n+1)2 nodes, and (n—I)2 free
nodes. We compute the stiffness matrix K and the mass matrix M, and solve the
generalized eigenvalue problem using the function eig from MATLAB. The results,
for various values ofn, are shown in Table 10.3. The reader should notice that the
eigenvalue estimate is converging faster than the eigenfunction estimate. This is
typical. As the results suggest, the error in the eigenvalue is O(h2), while the error
in the eigenfunction is O(h) (measured in the energy norm).
www.unifreebooks.com
Table 10.3. Errors in the finite element estimates of the smallest eigen-
value and corresponding eigenfunction of the negative Laplacian on the unit square.
The errors in the eigenfunction are computed in the energy norm.
The reader will recall from Section 9.7 that the fundamental frequency of a
membrane occupying a domain 17 is ci/A7/(27r), where AI is the smallest eigenvalue
of the negative Laplacian on 17 (under Dirichlet conditions) and c is the wave speed.
Therefore, the fundamental frequency of a square membrane of area 1 is
Using finite elements, we can compute the fundamental frequency for membranes
of other shapes. In the next example, we consider an equilateral triangle with area
1.
This triangle is equilateral and has area 1. We use the finite element method to
estimate the smallest eigenvalue of the negative Laplacian on this domain, using
5 successive regular grids. The coarsest has 16 triangles, and is shown in Figure
10.13. The remaining grids are obtaining by refining the original grid in the standard
fashion (see Exercise 10.1.4). The finest mesh has 4096 triangles. The estimates
of the smallest eigenvalue, as obtained on the successively finer meshes, are
We conclude that the smallest eigenvalue is AI = 22.8, and the fundamental fre-
quency is
Exercises
1. (a) Suppose u, v e Rn contain the nodal values of piecewise linear functions
Uh,Vh € Vh, respectively. Explain how to compute the L2 inner product
of Uh and Vh from u and v.
(b) Show that if u and v satisfy
where A / // and K and M are the stiffness and mass matrices, respec-
tively, then the corresponding piecewise linear functions Uh,Vh € Vh are
orthogonal in the I/2 inner product.
2. The results of this section are easily specialized to one-dimensional problems.
Consider the eigenvalue problem
domain fJ. You will also need access to a routine to solve the generalized
eigenvalue problem.
(a) Repeat Example 10.5, replacing the triangular domain by a domain
bounded by a regular pentagon with area 1.
(b) Let AI be the smallest eigenvalue of —A on a region having area 1 and
bounded by a regular n-gon. Form a conjecture about
(c) Test your hypothesis by repeating Example 10.5 for a regular n-gon,
choosing n to be the largest integer that is practical. (Whatever value of
n you choose, you have to create one or more meshes on the corresponding
n-gon.)
4. Repeat Exercise 2 using k(x) = 1 + (x — I) 2 .
Appendix A
and
501
www.unifreebooks.com
(the columns of X are orthonormal, so X T X = I; this is why the factor of XTX dis-
appeared in the above calculation). This shows that u 2 ,113,..., u/t are eigenvectors
of A corresponding to A. Moreover,
(0 is the zero vector in Rn 1 ] , from which we can deduce that {ui, 112,..., u^} is
a linearly independent set of eigenvectors of A corresponding to A. This completes
the proof.
www.unifreebooks.com
Appendix B
Suppose we find a function p defined on J7 and satisfying p(x) = #(x) for all
x e dfL We then define v = u — p and note that
and
(since p satisfies the same Dirichlet conditions that u is to satisfy). We can then
solve
where
RDR
www.unifreebooks.com
The result will be a rapidly converging series for v, and then u will be given by
u = v + p.
We now describe a method (admittedly rather tedious) for computing a func-
tion p that satisfies the given Dirichlet conditions. We first note that there is a
polynomial of the form
We then define
Finally, we define
www.unifreebooks.com
The reader should notice how the second term interpolates between the boundary
values on FI and F3, while the third term interpolates between the boundary values
on F2 and IT^. In order for these two terms not to interfere with each other, it is
necessary that the boundary data be zero at the corners. It was for this reason that
we transformed the g^s into the h^s. The first term in the formula for p undoes
this transformation.
It is straightforward to verify that p satisfies the desired boundary conditions.
For example,
To compute p, we define
www.unifreebooks.com
and
where
we have
www.unifreebooks.com
and
satisfies
and similarly for 92,93,94 and /i2,/is,/i4. Since these derivatives of the boundary
data at the corners are (plus or minus) the mixed partial derivatives of the de-
sired function at the corners, it suffices to find a function q(xi,xz) satisfying the
conditions
www.unifreebooks.com
where
Then p satisfies the original Neumann conditions, as the interested reader can verify
directly. We will illustrate this computation with an example.
To compute p, we define
and
With
we have
www.unifreebooks.com
where
Figure B.2. The solution to the BVP in Example B.2. This graph was
produced using a total of 40 terms of the (double) Fourier cosine series.
www.unifreebooks.com
Appendix C
Solutions to
odd-numbered exercises
Chapter 1
1. (a) First-order, homogeneous, linear, nonconstant-coefficient, scalar ODE.
(b) Second-order, inhomogeneous, linear, constant-coefficient, scalar PDE.
(c) First-order, nonlinear, scalar PDE.
3. (a) Second-order, nonlinear, scalar ODE.
(b) First-order, inhomogeneous, linear, constant-coefficient, scalar PDE.
(c) Second-order, inhomogeneous, linear, nonconstant-coefficient, scalar PDE.
5. (a) No.
(b) Yes.
(c) No.
7. There is only one such /: f ( t ) = tcos (t).
9. For any constant C ^ 1, the function w(t) = Cu(t) is a different solution of the
differential equation.
Section 2.1
1. The units of K are energy per length per time per temperature, for example, J/(cm s K) =
W/(cmK).
3. The units of Apcu&x are
515
www.unifreebooks.com
Since the area of the bar's cross-section is vr cm2, the rate at which energy is flowing
through the bar is 0.08027T = 0.252 W (in the negative direction).
9. Consider the right endpoint (x = I). Let the temperature of the bath be ue, so that
the difference in temperature between the bath and the end of the bar is u(i, t} — ut.
The heat flux at x = i is, according to Fourier's law,
so the statement that the heat flux is proportional to the temperature flow is written
(The sign change appears because, at the left end, a positive heat flux means that
heat flows into the bar, while at the right end the opposite is true.)
11. The IBVP is
(b) The rate of mass transfer varies inversely with t and directly with the square
of r.
15. We have
and
www.unifreebooks.com
Section 2.2
1. The sum of the forces on the cross-section originally at x = t must be zero. As
derived in the text, the internal (elastic) force acting on this cross-section is
while the external traction results in a total force of pA (force per unit area times
area). Therefore, we obtain
or
The units of / are N/m3 (force per unit volume). The units of the first term on the
left are
7. (a) We have
while
Therefore,
(b) Regardless of the value of 0, u(Q, t) = 0 holds for all t. The only way that
u(l, t) — 0 can hold for all t is if
Section 2.3
1. Units of acceleration (length per time squared).
3. Units of velocity (length per time).
5. The internal force acting on the end of the string at, say, x = I , is
If this end can move freely in the vertical direction, force balance implies that (C.I)
must be zero.
Section 3.1
1. A function of the form f(x) = ax + b is linear if and only if b = 0. Indeed, if
/ : R —» R is linear, then f(x) — ax, where a = /(I).
3. (a) Vector space (subspace of C[0,1]).
(b) Not a vector space; does not contain the zero function. (Subset of C[0,1], but
not a subspace.)
(c) Vector space (subspace of C[Q, 1]).
(d) Vector space.
(e) Not a vector space; does not contain the zero polynomial. (Subsei of Pn, but
not a sub space.)
www.unifreebooks.com
while
and
Now,
as desired. The third equality follows from the commutative and associative
properties of addition, while the fourth equality follows from the distributive
property of multiplication over addition.
www.unifreebooks.com
Section 3.2
1. The range of A is
{a(l,-l) : a € R } ,
which is a line in the plane. See Figure C.I.
3. (a) A is nonsingular.
(b) A is nonsingular.
(c) A is singular. Every vector in the range is of the form
That is, every y € R2 whose first and second components are equal lies in the
range of A. Thus, for example, Ax = b is solvable for
5. The solution set is not a subspace, since it cannot contain the zero vector (AO =
O^b).
www.unifreebooks.com
are functions of the form u(x) = Cix + C?. The Neumann boundary condition
at the left endpoint implies that C\ = 0, and the Dirichlet boundary condition
at the right endpoint implies that €2 = 0. Therefore, only the zero function is
a solution to L^u = 0, and so the null space of Z/m is trivial.
(b) Suppose / G C[a,6] is given and u € C^[a, b] satisfies
The last step follows from the Neumann condition at x = a. We now integrate
again:
This shows that L/mU = f has a unique solution for each / € C[a, b].
11. By the fundamental theorem of calculus,
satisfies Du = f . However, this solution is not unique; for any constant (7,
is another solution.
www.unifreebooks.com
Section 3.3
1. (a) Both equal (14,4, -5).
(b) Both equal
3. The given set is not a basis. If A is the matrix whose columns are the given vectors,
then A/"(A) is not trivial.
5. We know that P% has dimension 3, and therefore it suffices to show either that the
given set of three vectors spans Ti or that it is linearly independent. If p e Pz, then
we write
Then
and, similarly, q(x-z) = p ( x z ) , q(xz) = p(%s)- But then p and q are second-
degree polynomials that agree at three distinct points, and three points determine
a quadratic (just as two points determine a line). Therefore,
Section 3.4
1. (a) The verification is a direct calculation of Vi • Vj for the 6 combinations of i, j.
For example,
and so forth,
(b)
www.unifreebooks.com
3. We have
Therefore,
If z is any vector in W, then, since {wi, W 2 , . . . , w n } is a basis for W', there exist
scalars ai, 0:2, • • • , otn such that
We then have
or
Figure C.2. The data from Exercise 3-4-7 and the best linear approximation.
Figure C.3. The function g(x] = sin (TTX) and its best quadratic approxi-
mation over the interval [0,1].
www.unifreebooks.com
Section 3.5
1. The eigenvalues of A are AI = 200 and A2 = 100, and the corresponding (normalized)
eigenvectors are
Thus
Similar calculations show that this formula holds for k = I and k = n also.
Therefore, s^' is an eigenvector of L with eigenvalue
(b) The eigenvalues \j are all positive and are increasing with the frequency j.
www.unifreebooks.com
Since Xj increases with j, this shows that, in producing x, the higher frequency
components of b are dampened more than are the lower frequency components
of b. Thus x is smoother than b.
Section 4.1
1. Define
Then
3. Define
Then
5. Define
Section 4.2
1. (a) We first note that the zero function is a solution of (4.4), so S is nonempty. If
u, v € S and a, /3 G R, then w = au + /3v satisfies
is a solution of (4.4) for each choice of ci, 02- We wish to show that, given fci, ki € R,
there is a unique choice of ci, ci such that -u(O) = ki, du/dt(0) = k^. We have
Since the coefficient matrix is obviously nonsingular (regardless of the value of r),
there is a unique solution Ci,C2 for each ki,kz.
5. (a) The only solution is u(x) = 0.
(b) The only solution is u(x) = 0.
(c) The function u(x) = sin (-KX) is a nonzero solution. It is not unique, since any
multiple of it is another solution.
7. By the product rule and the fundamental theorem of calculus,
www.unifreebooks.com
Therefore, with
we have
= au(t) + /(*)•
Thus u satisfies the differential equation. We also have
Section 4.3
1. The solution is
The population of the first species (x(t)) increases exponentially, while the
population of the second species (y(t)) goes to zero in finite time (y(t) = 0 at
t = ln(3)/4). Thus the second species becomes extinct, while the first species
increases without bound.
www.unifreebooks.com
(b) If the initial populations are x(0) = r, y(0) = s, then the solution to the IVP
is
Section 4.4
1. (a) Four steps of Euler's method yield an estimate of 0.71969.
(b) Two steps of the improved Euler method yield an estimate of 0.80687.
(c) One step of the RK4 method yields an estimate of 0.82380.
Euler's method gives no correct digits, the improved Euler method gives one correct
digit, and RK4 gives three correct digits. Each of the methods evaluated f ( t , u) four
times.
(b) The routine ode45 from MATLAB (version 5.3) required 421 steps to produce
a graph with the ending point apparently coinciding with the initial value.
The graph of y(t) versus x(t) is given in Figure C.4. The graphs of x(t)
and y ( t ) , together with the times steps, are given in Figure C.5. They show,
not surprisingly, that the time step is forced to be small precisely when the
coordinates are changing rapidly.
(c) The minimum step size taken by ode45 was 3.28 • 10~4, and using this step
length over the entire interval of [0, T] would require almost 19000 steps. This
is to be compared to the 421 steps taken by the adaptive algorithm. (Note: The
exact results for minimum step size, etc., will differ according to the algorithm
and tolerances used.)
5. (a) We first note that a+(ti— to) < t < b+(ti — to) if and only if a < t—(t\ — to) <b,
so the function v is well-defined. In fact,
Figure C.5. The coordinates of the satellite in Exercise 4-4-3 (top two
graphs) with the step lengths taken (bottom graph).
www.unifreebooks.com
We have
At Error
1/4 2.4332e-05
1/8 1.3697e-06
1/16 8.1251e-08
1/32 4.9475e-09
1/64 3.0522e-10
1/128 1.8952e-ll
By inspection, we see that as At is cut in half, the error is reduced by a factor
of approximately 16, as expected for O(At 4 ) convergence.
(b) The following errors were obtained at t = 2.0:
www.unifreebooks.com
At Error
1/4 5.0774e-03
1/8 3.2345e-03
1/16 3.1896e-04
1/32 1.0063e-04
1/64 8.9026e-06
1/128 3.4808e-06
The error definitely does not exhibit O(At 4 ) convergence to zero. The reason
is the lack of smoothness of the function 1 + \x — 1|; the rate of convergence
given in the text only applies to ODEs defined by smooth functions. When
integrating from t = 0 t o t = 0.5, the nonsmoothness of the right-hand side is
not encountered since x(t) < 1 on this interval. This explains why we observed
good convergence in the first part of this problem.
Section 4.5
1. (a) The exact solution is
(b) By trial and error, we find that At < 0.02 is necessary for stability. Specifically,
integrating from t = 0 t o t = l , n = 49 (i.e. At = 1/49) yields
Since the eigenvalues of A are —1, —100, it is not hard to see that the upper
bound for At is At < 0.02, just as was determined by experiment.
(d) For the backward Euler method, a similar calculation shows that
Section 4.6
3. The IVP is
5. The solution is
Section 5.1
1. (a) Since MD is linear, it suffices to show that the null space of MD is trivial. If
MDU = 0, then, du/dx — 0, that is, u is a constant function: u(x) — c. But
then the condition u(0) = 0 implies that c = 0, and so u is the zero function.
Thus M(MD] = {0}.
(b) If u € CofO, f] and MDU — /, then we have
If / € C[Q, I] does not satisfy this condition, then it is impossible for MDU = f
to have a solution.
3. (a) If v,w G S are both solutions of Lu = /, then Lv = Lw, or (by linearity)
L(v — w) = 0. Therefore v — w € A/"(Z>). But, since S is a subspace, v — w is
also in S. If the only function in both Af(L) and S is the zero function, then
v — w must be the zero function, that is, v and w must be the same function.
Therefore, if J\f(L) n S = {0}, then Lu = f can have at most one solution for
any/.
(b) We have already seen that Lu = f has a solution for any / € C[0, f\ (see the
discussion immediately preceding Example 5.2). We will use the result from
the first part of this exercise to show that the solution is unique.
The null space of L is the space of all first degree polynomials:
Therefore u is the zero function, and so N(L} C\S = {0}. The uniqueness
property then follows from the first part of this exercise.
5. The condition
implies that du/dx is zero, and hence that u is constant. The boundary conditions
on u would then imply that u is the zero function. But, by assumption, u is nonzero
(we assumed that (u, u) = 1). Therefore, (C.2) cannot hold.
7. (a) If LmU — 0, then u has the form u(x) = ax + b. The first boundary condition,
du/dx(Q) = 0, implies that a — 0, and then the second boundary condition,
u(i] = 0, yields 6 = 0. Therefore, u is the zero function and M(Lm] is trivial.
www.unifreebooks.com
This shows that Lmu = f has a solution for any / € C7[0,^], and therefore
K(Lto) = C[0,f\.
(c) Suppose u,v € Cft[Q,£\. Then
Thus Lm is symmetric.
(d) Suppose A is an eigenvalue of Lm with corresponding eigenfunction u, and
assume that u has been normalized so that (u,u) — I. Then
The last step follows because every nonzero function in CjjO, •£] has a nonzero
derivative.
9. Define u(x) = x(l — x), v(x) = x2(l — x). Then a direct calculation shows that
but
www.unifreebooks.com
Section 5.2
This last expression simplifies to four terms, each including the sine function evalu-
ated at an integer multiple of TT, and hence each equal to zero. Thus (un,um) = 0
for n 7^ TO.
www.unifreebooks.com
Case 1: A = 21/4. In this case, the characteristic roots are r = 1/2,1/2 and the
general solution of the ODE is
The boundary condition u(Q) — 0 yields c\ = 0, and then the boundary condition
u(l) = 1 implies that c<i = 0. Thus there is no nonzero solution to the BVP, and
A = 21/4 is not an eigenvalue.
Case 2: A < 21/4. In this case, the characteristic roots, given by (C.3), are real and
distinct. The general solution of the ODE is
This system has the unique solution c\ = ci = 0, so there is no nonzero solution for
A < 21/4. Hence no A < 21/4 is an eigenvalue.
Case 3: A > 21/4. In this case, the roots are complex conjugate:
Although this equation cannot be solved explicitly, a simple graph shows that there
are infinitely many solutions 0 < 6\ < 62 < • • •, with
Define A& by
www.unifreebooks.com
that is,
which yields
The errors in approximating the original functions using 10 terms of the Fourier sine
series are graphed in Figure C.6.
9. sin (STTX) (That is, all of the Fourier sine coefficients are zero, except the third, which
is one.)
11. The series have the form
where
The errors in approximating the original functions using 10 terms of the Fourier
quarter-wave cosine series are graphed in Figure C.7.
www.unifreebooks.com
Section 5.3
5. We have
so
www.unifreebooks.com
Using integration by parts twice, almost exactly as in (5.23), we can express &„ in
terms of an:
This gives the desired result. (Actually, since it is known that the negative second
derivative operator is symmetric under the mixed boundary conditions, we can just
appeal to (5.29), which is the above calculation written abstractly.)
9. Let ai, 0,2,as,... be the Fourier quarter-wave sine coefficients of u; then
Figure C.8. The temperature distribution (in degrees Celsius) in Exercise 5.3.9.
Section 5.4
1. Suppose f , g <E Cr>[0,<], so that
Then
www.unifreebooks.com
This shows that derivative with respect to time of the total energy is always negative,
and hence that the total energy is always decreasing.
Section 5.5
1. (a) Yes.
(b) No, o(/, /) = 0 for /(x) = 1, but / / 0.
(c) No, o(/, /) = 0 for f ( x ) = 1, but / / 0.
3. (a) The set S is the span of {x, x 2 } and therefore is a subspace.
(b) As discussed in the text, a(-,-) automatically satisfies two of the properties
of an inner product. Every function p in S satisfies p(Q) = 0, so a(-, •) also
satisfies the third property (a(u, u) = 0 implies that u = 0) for exactly the
same reason as given in the text for the subspace V (see page 181).
(c) The best approximation is p(x) = (9 — 3e)x2 + (4e — 10)x.
(d) The bilinear form is not an inner product on 7>2, since a(l, 1) = 0 but 1 / 0
(a constant is "invisible" to the energy inner product and norm). Therefore,
every polynomial of the form (9 — 3e)o;2 + (4e — 10)x + C € S is equidistant
from f ( x ) = ex in the energy norm.
5. Write p(x] — x(l — x) and q(x) — x(l/2 — x)(l — x). The approximation will be
v(x) = mp(x) + u-2q(x), where Ku = f. The stiffness matrix K is
Therefore,
www.unifreebooks.com
Figure C.9. The exact and approximate solutions from Exercise 5.5.5.
7. (a) It will take about 103 times as long, or 1000 seconds (almost 17 minutes), to
solve a 1000 x 1000 system, and 1003 times as long, or 106 seconds (about 11.5
days) to solve a 10000 x 10000 system.
(b) Gaussian elimination consists of a forward phase, in which the diagonal entries
are used to eliminate nonzero entries below and in the same column, and a
backward phase, in which the diagonal entries are used to eliminate nonzero
entries above and in the same column. During the forward phase, at a typical
step, there is only 1 nonzero entry below the diagonal, and only 5 arithmetic
operations are required to eliminate it (1 division to compute the multiplier,
and 2 multiplications and 2 additions to add a multiple of the current row
to the next). Thus the forward phase requires O(5n) operations. A typical
step of the backward phase requires 3 arithmetic operations (a multiplication
and an addition to adjust the right-hand side and a division to solve for the
unknown). Thus the backward phase requires O(3n) operations. The grand
total is O(8n) operations.
(c) It will take about 10 times as long, or 0.1 seconds, to solve a 1000 x 1000
tridiagonal system, and 100 times as long, or 1 second, to solve a 10000 x 10000
tridiagonal system.
www.unifreebooks.com
Section 5.6
1. (b) Here are the errors for n = 10, 20,40, 80:
n maximum error
10 1.6586 10~3
20 4.3226 10~4
4
40 1.1036 io-
80 2.7881 10~5
We see that, when n is doubled, the error decreases by a factor of approximately
four. Thus
3. The exact solution is u(x) — x(l — x )/12. Here are the errors for n = 10, 20,40,80:
n maximum error
10 1.1286 • 10~3
20 2.9710 • 10~4
40 7.6186 • 10~&
80 1.9288 • 10~&
We see that, when n is doubled, the error descreases by a factor of approximately
four. Thus
Section 5.7
3. (a) This BVP models a bar whose top end (originally at x = 0) is free and whose
bottom end is fixed at x = i. If we apply a unit force to the cross-section
at x = s, then the part of the bar originally between x = s and x = t will
compress, and the part of the bar originally above x = s will just move rigidly
with u(x) — u(s) for 0 < x < s. The compression of the bottom part of the
bar will satisfy Hooke's law:
www.unifreebooks.com
(d)
that is,
Section 6.1
1. The steady-state solution of Example 6.2 satisfies the BVP
www.unifreebooks.com
Either by solving this BVP or by taking the limit (as t —> oo) of the solution of
Example 6.2, we find that the steady-state solution is
3. The solution is
Figure C.10. The snapshot w(-,0.1), together with the initial temperature
distribution, for Exercise 6.1.3.
5. With
We also have
www.unifreebooks.com
and
We define
and
Then v satisfies
7. Define v(x, t) = u(x, t) — xcos (t). Then v satisfies the following IBVP (with homo-
geneous boundary conditions, but with a nonzero source term):
where
The solution to the original IBVP is then u(x,t) = v(x,t) + xcos(t). A graph of
«(•, 1.0) is given in Figure C.ll.
9. The temperature u(x, t) satisfies the IBVP
The solution is
Figure C.ll. The snapshot u(-, 1.0), together with the initial temperature
distribution, for Exercise 6.1.7.
The solution is
This yields
Section 6.2
1. The solution is
where
Figure C.12. The solution w(x,t) from Exercise 6.2.1 at times 0, 0.02,
0.04, and 0.06, along with the steady-state solution. These solutions were estimated
using 10 terms in the Fourier series.
has eigenpairs
The method of Fourier series can be applied to show that a unique solution
exists for each / G C[0,^]. (The key is that 0 is not an eigenvalue of K, as it
is of LN.)
7. As shown in this section, the solution to the IBVP is
where do, di, c?2, • • • are the Fourier cosine coefficients of if). We have
This last series certainly converges (as can be proved, for example, using the cora-
narisrm t.pst^ anr\
The limit do is
and u satisfies
www.unifreebooks.com
Since the values w(0, t) and u(l, t) are unknown, we see that it is not possible
to express the Fourier sine coefficients of —d2u/dx2 in terms of oi(t),a2(t), —
(b) The Fourier sine series of u(x, t) = t is
However,
and so all of the Fourier sine coefficients of —d2u/dx2 should be zero. Thus
the formal calculation is wrong.
Section 6.3
1. The formula for the solution u is exactly the same as in Example 6.6, with a different
value for K (4.29 instead of 3.17). This implies that the amplitude of the solution
is reduced by about 26%. Therefore, there is less variation in the temperature
distribution in the silver ring as opposed to the gold ring.
3. fa) The IBVP is
www.unifreebooks.com
where
holds for every x € [—STT, STT]. By trial and error, we find that about 360
seconds (6 minutes) are required.
5. (a) To show that Lp is symmetric, we perform the now familiar calculation: we
form the integral (Lpu, v) and integrate by parts twice to obtain (u, Lpv). The
boundary term from the first integration by parts is
so the boundary term vanishes. The boundary term from the second integra-
tion by parts vanishes for exactly the same reason.
(b) Suppose Lpu = \u, where u has been normalized: (u, u) = 1. Then
or simply
Section 6.4
1. We give the proof for the general case of a Gram matrix G. Suppose Gx = 0, where
x € R n . Then (x, Gx) = 0 must hold, and
is the zero vector. But, since {wi, W 2 , . . . ,un} is linearly independent, this in turn
implies that x\ = xi = • • • = xn = 0, that is, that x = 0. Since the only vector
x € Rn satisfying Gx = 0 is the zero vector, G is nonsingular.
3. (a)
that is,
(b) The mass matrix M is tridiagonal and symmetric, and its nonzero entries are
and
The stiffness matrix K is tridiagonal and symmetric, and its nonzero entries
are
and
www.unifreebooks.com
7. The solution is
where
The errors in Examples 6.8 and 6.9 are graphed in Figure C.13.
Figure C.13. The errors in Examples 6.8 and 6.9 (see Exercise 6.4-V-
9. (a) ThelBVPis
(c) The temperature distribution after 120 seconds is shown in Figure C.14.
www.unifreebooks.com
Figure C.14. The temperature distribution after 120 seconds in Exercise 6.4-9.
Section 6.5
1. The BVP to be solved is
with k = 1.5 and f(x) = 10~7x(25 - z)(100 - z) +1/240. The steady-state temper-
ature is not unique; the solution with ii(100) = 0 is shown in Figure C.15.
3. (a) The total amount of heat energy being added to the bar is 0.51A W, where A
is the cross-sectional area (0.01 AW through the left end and 0.5AW in the
interior). Therefore, 0.51 AW must be removed through the right end; that is,
heat energy must be removed at a rate of 0.51 W/cm2 through the right end.
(b) The BVP is
5. (a) We have
Therefore,
Since the integrand is nonnegative, this implies that the integrand is in fact
zero, and, since K(X) is positive, we conclude that
is a constant function, where MO, 1*2, • • • , un are the components of u. But then
there is a constant C such that v(xi) — C, i = 0,1, 2 , . . . , n. These nodal
values of v are precisely the numbers UQ, MI, . . . , u n , so we see that u = Cuc,
which is what we wanted to prove.
7. (a) Define
(b) The fact that a solution of the strong form is also a solution of the weak
form is proved by the usual argument: multiply the differential equation by an
arbitrary test function v € V", and then integrate by parts.
www.unifreebooks.com
The proof that a solution of the weak form is also a solution of the strong form
is similar to the argument given on page 268. Assuming that u satisfies the
weak form (C.4), an integration by parts and some simplification shows that
Choosing any v € V with v(i} ^ 0 shows that the Neumann condition holds
at x — t.
9. The temperature distribution after 300 seconds is shown in Figure C.I7.
Figure C.I7. The temperature distribution from Exercise 6.5.9 (after 300
seconds).
where
www.unifreebooks.com
But then, by the usual reasoning, v must be a constant function, and v(xn) = 0
(since (j)i(xn) = 0 for i = 0,1, 2 , . . . , n — 1). Thus v is the zero function, which implies
that the nodal values of v are all zero. Therefore u = 0, and so K is nonsingular.
Section 6.6
1. For t = 6060, only 2 terms are required for an accurate graph, while for t = 61,
about 150 terms are required.
3. The Green's function G(a;,t;r/,s) is given by
for to < s < t, while G(x, t; y, s) = 0 for s > t. Selected snapshots of G(x, t] 75,60)
are shown in Figure C.I8.
Section 7.1
1. Some snapshots of the solution are shown in Figure C.19.
3. The two waves join and add constructively, and then separate again. See Figure
C.19.
www.unifreebooks.com
Section 7.2
1. The solution is found by setting cn = 0 in Example 7.4:
www.unifreebooks.com
Figure C.20. Fifty snapshots of the vibrating string from Example 7-4,
with no external force.
3. The solution is
where
and
The fundamental frequency is now c/100 instead of c/50. Fifty snapshots are shown
in Figure C.21.
5. The solution is
where
Fifty snapshots of the solution are shown in Figure C.22. The solution gradually
moves up; this is possible because both ends are free to move vertically.
www.unifreebooks.com
Figure C.21. Fifty snapshots of the vibrating string from Example 7.4,
with the right end free.
Figure C.22. Fifty snapshots of the vibrating string from Example 7.4,
with both ends free.
www.unifreebooks.com
7. The solution is
where
Snapshots of the solution are graphed in Figure C.23, which should be compared to
Figure 7.9.
Section 7.3
1. The fundamental period is li/c = 0.2. Using h = 100/20 = 5, Dt = T/60, and the
RK4 method, we obtain the solution shown in Figure C.24.
3. (a) Since the initial disturbance is 24cm from the boundary and the wave speed
is 400cm/s, it will take 24/400 = 0.06s for the wave to reach the boundary.
www.unifreebooks.com
Figure C.25. The computed solution of the wave equation in Exercise 7.3.3.
Figure C.26. The computed solution of the wave equation in Exercise 7.3.5.
(b) The system of ODEs has the same form as in the case of a homogeneous bar:
Section 7.4
1. (a) The fundamental frequency is c/(2i) = c/80. Therefore
(b) We have c = T/p, where T is the tension. The density p is 10/40 = 0.25 g/cm,
so T is 4 • 108 dynes (gcm/s 2 ).
(c) The other resonant frequencies are the integer multiples of the fundamental
frequency: 1000,1500, 2000,... Hz.
3. Snapshots of the solution are shown in Figure 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). (In the formula (7.28),
sin (rmra) — sin (2vr) = 0.)
Section 8.1
1. The heat equation for a heterogeneous medium is
Figure C.27. Solution to (7.26) with an oscillatory forcing term (see Exer-
cise 7.4.3). The frequency of the forcing term is 1044, the fourth natural frequency.
However, the solution does not exhibit resonance since the point source is placed at
a fixed point of the fourth standing wave.
— (u,Lmv).
The boundary terms vanish because the product that forms the integrand is zero
over the entire boundary. For example,
Section 8.2
1. (a)
5. (a) ThelBVPis
where
The solution is
(d) The maximum difference between the temperature after 10 minutes and th
steady-state temperature is about 1 degree. The difference is graphed in Figur
C.29.
7. The minimum temperature in the plate reaches 4 degrees Celsius after 825 seconds
9. The leading edge of the wave is initially 2/5 units from the boundary, and th
wave travels at a speed of 261-\/2 units per second. Therefore, the wave reaches th
boundary after V^/1305 = 0.00108 seconds. Figure 8.6 shows the wave about t<
reach the boundary after 10~3 seconds.
11. The difficult task is to compute the Fourier coefficients of the initial displacemen
ill. If we write
www.unifreebooks.com
Figure C.29. The difference between the temperature in the plate after 10
minutes and the steady-state temperature. (See Exercise 8.2.5.)
The result is
where
The solution is
www.unifreebooks.com
(d) After 10 minutes, the temperature u is not very close to the steady-state tem-
perature; the difference u(x, y, 600) —us(x, y) is graphed in Figure C.32. (Note:
The temperature variation in this problem may be outside the range in which
the linear model is valid, so these results may be regarded with some skepti-
cism.)
Figure C.32. The difference between the temperature in the plate after 10
minutes and the steady-state temperature. (See Exercise 8.2.15.)
Section 8.3
1. The next three coefficients in the series for g are
3. The solution is
where
www.unifreebooks.com
the cmo are the coefficients of /(r, 0) = 1 — r, and the som are the positive roots of
Jo. A direct calculation shows that
The solution (approximated by six terms of the series) is graphed in Figure C.33.
5. The solution is
where
the Cmo are the coefficients of /(r, 0) = r, and the som are the positive roots of JQ.
A direct calculation shows that
www.unifreebooks.com
The solution (approximated by six terms of the series) is graphed in Figure C.fr
7. If we write
then
www.unifreebooks.com
However, since 0(r, 9} — r(l — r) cos (#)/5 (a function of r times cos (6)), all of the
coefficients of <f) are zero except for
Therefore,
with a m i(£) given above. After 30 seconds, the temperature distribution can be
approximated accurately using a single eigenfunction (corresponding to the largest
eigenvalue, An), so we need only
9. A circular drum of radius A has area nA2, the same area as a square drum of side
length ^/TrA. The fundamental frequency of such a square drum is
Comparing to Example 8.9, we see that the circular drum sounds a lower frequency
than a square drum of equal area.
www.unifreebooks.com
Section 8.4
1. The mesh for this problem is shown in Figure C.36, in which the free nodes are
labeled. The stiffness matrix is
The resulting weights for the finite element approximation are given by
3. The mesh for this problem is shown in Figure C.37, in which the free nodes are
labeled. The stiffness matrix is 16 x 16 and neither it nor the load vector will be
reproduced here. The matrix is singular, as is expected for a Neumann problem.
www.unifreebooks.com
where G is any function satisfying the condition G(x) = p(x) for x € dQ, and
When using piecewise linear finite elements, we can satisfy the boundary con-
ditions approximately by taking G to be a continuous piecewise linear function
whose values at the boundary nodes agree with the given boundary function
g. For simplicity, we take G to be zero at the interior nodes. The resulting
load vector is then given by
Since G is zero on interior nodes, the quantity a(G, &) is nonzero only if (free)
node i belongs to a triangle adjacent to the boundary.
(b) The regular triangulation of the unit square having 18 triangles has only four
interior (free) nodes, and each one belongs to triangles adjacent to the bound-
ary. This means that every entry in the load vector is modified (which is not
the typical case). Since / = 0, the load vector f is defined by
We will apply Galerkin's method with Vm equal to the space of all continuous
piecewise linear function relative to a given triangulation T. We label the
standard basis of Vm as </>i, 02, - - - , <f>n, and the nodes as zi, Z 2 , . . . , z n . (Every
node in the mesh is now free.) Thus Vn — span{0i,^2, • - - , (j>n}-
We then define the Galerkin approximation wn by
Writing
and
where O is the unit square. We will produce the finite element solution using
the regular grid with 18 triangles (16 nodes). The stiffness matrix K e R16x16
is singular, as should be expected, and there are infinitely many solutions. The
www.unifreebooks.com
Section 9.1
1. The complex Fourier series of / is
The errors in approximating / by a partial Fourier series are shown in Figure C.38.
The magnitudes of the error in approximating / by a partial Fourier series are shown
in Figure C.39.
5. Let
where
www.unifreebooks.com
Finally,
7. We have
www.unifreebooks.com
Moreover, since el6 is a 27r-periodic function of 9, we see that e27ry = 1 and hence
that
The second equation is one of the results we set out to prove. The first equation
can be written, using the trigonometric identity sin2 (9) = I — cos2 (0), as
which simplifies to
or
then follows.
www.unifreebooks.com
Section 9.2
1. The graph of {|Fn|} is shown in Figure C.40.
Figure C.40. The magnitude of the sequence {Fn} from Exercise 9.2.1.
(note that /(—I) = /(!))• Therefore, we can estimate {f(xj}} by taking the inverse
DFT (using the inverse FFT) of {cn}. The results are shown in Figure C.41.
5. We have
If j — ra, then
www.unifreebooks.com
Figure C.41. The function f(x) = x(l — x2) (the curve) and the esti-
mates of f(xj) (the circles) computed from the complex Fourier coefficients of f
(see Exercise 9.2.3).
Therefore,
and so we obtain
as desired.
www.unifreebooks.com
7. Below we show the exact Fourier sine coefficients of /, the coefficients estimated by
the DST, and the relative error. Since both an and the estimated an are zero for n
even, we show only an for n odd.
9. We have
By the hint,
Section 9.3
1. The partial Fourier sine series, with 50 terms, is shown in Figure C.42. It appears
that the series converges to the function F satisfying
5. The quarter-wave sine series of / : [0, i] —>• R is the full Fourier series of the function
/ : [—2i, 2i] -» R obtained by first reflecting the graph of / across the line x = t (to
obtain a function defined on [0, 21]) and then taking the odd extension of the result.
That is, /is defined by
Since this function is odd, its full Fourier series has only sine terms (all of the cosine
coefficients are zero), and because of the other symmetry, the even sine terms also
drop out.
Section 9.4
1. The Fourier series of / converges pointwise to the function F defined by
3. There are many such functions /, but they all have one or more discontinuities. An
www.unifreebooks.com
5. If {/N} converges uniformly to / on [a, 6], then it obviously converges pointwise (after
all, the maximum difference, over x (E [a, 6], between /N(X) and f ( x ) converges to
zero, so each individual difference must converge to zero). To prove that uniform
convergence implies mean-square convergence, define
Then
Obviously, then, feven is continuous on every interval (2ki, (Ik + 1)1) and ((2k —
1)1,2k£.), that is, except possibly at the points Ikt and (2k — l)i, k — 0, ±1, ±2,
1H7_ 1
and
Since feven(2kf) = /(O) by definition, this shows that feven is continuous at x = 2n£.
A similar calculation shows that
Section 9.5
1. The function h(x) fails to satisfy h(—1) = h(l), so its Fourier coefficients decay
like 1/n and its Fourier series is the slowest to converge. The function / satisfies
/(—I) = /(I), but df/dx has a discontinuity at re = 0 (and the derivative of fper also
has discontinuities at x = ±1). Therefore, the Fourier coefficients of / decay like
1/n2. Finally, gper and its first derivative are continuous, but its second derivative
has a jump discontinuity at x = ±1, so its Fourier coefficients decay like 1/n3. The
Fourier series of g is the fastest to converge.
3. Figure C.43 shows the /, its partial Fourier series with 21, 41, 81, and 161 terms,
and the line y = 1.09. Zooming in near x = 0 shows that the overshoot is indeed
about 9%; see Figure C.44.
Figure C.43. The function f from Exercise 9.5.3, its partial Fourier series
with 21, 41, 81, and 161 terms, and the line y = 1.09.
www.unifreebooks.com
Section 9.6
1. (a) The infinite series
87
A standard result in the theory of infinite series is that
converges if A; is greater than 1. This can be proved, for example, by comparison with the improper
integral
www.unifreebooks.com
Figure C.45. The partial sine series, with 100 terms, from Exercise 9.6.1.
For A; = -1/2,
www.unifreebooks.com
(c) The graphs of /, the partial Fourier sine series, with 63 terms, and the differ-
ence between the two, are shown in Figure C.46.
Figure C.46. The function f ( x ) = x 1//4, together with its partial Fourier
sine series (first 63 terms) (top), and the difference between the two (bottom). See
Exercise 9.6.3.
Section 9.7
1. The proof is a direct calculation, using integration by parts (Green's identity): Sup-
pose u, v £ Cf)(fi). Then
3. If t is very large, then we can approximate -u(x, t] by the first term in its gener-
alized Fourier series. Using the same notation as before for the eigenvalues and
eigenfunctions of the negative Laplacian on fi, we have
The constant c\ is the first generalized Fourier coefficient of the initial temperature
5:
The approximation is valid provided AI is a simple eigenvalue; that is, there is only
one linearly independent eigenvector corresponding to AI. Then all of the other
terms in the generalized Fourier series decay to zero much more rapidly than does
the first term.
Section 10.1
1. We must check that the one-point rule gives the exact values for the integral
and
www.unifreebooks.com
so the rule is exact in this case as well. By symmetry, the rule must hold for
/(x) = X2, which shows that the rule has degree of precision at least 1. To show
that the degree of precision is not greater than 1, we note that, for /(x) = xl,
while
3. We have
The Jacobian is
we have
by
The quantity a(G, fa) is nonzero only if the free node 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 loop over
the triangles, we can determine, for each, whether it contains both a free node and
a nonfree node. If it does, we modify the load vector accordingly.
Section 10.2
1. Computing A = LU requires n — 1 steps, and step i uses
This agrees with the O(2n3/3) operation count given in the text.
The computation of L -1 b requires n — 1 steps, with 2(n — i) arithmetic operations
nfir stfvn. Thfi tnta.l is
The final step of back substitution requires n steps, with 2(n — i) + 1 operations per
step, for a total of
The total for the two triangular solves is 2n2 — n, which also agrees with the count
given in the text.
3. With
www.unifreebooks.com
we have
with
The third property would be true for any matrix A, the second property obviously
requires that A be symmetric, and the first property requires that A be positive
definite.
7. (a) With x(0) = (4,2), the negative gradient is -V0 (x (0) ) = (-2, -1), and so we
must minimize
Section 10.3
1. Let the vector-valued function F be defined by F(x) = (/(x),0). Then
while
Section 10.4
1. (a) Let u, v € Rn contain the nodal values of piecewise linear functions Uh,Vh,
respectively, so that
It follows that
www.unifreebooks.com
(b) As shown in the text, if u and v are generalized eigenvectors for the problem
Ku = AMu, then LTu and LTv are orthogonal in the Euclidean norm. But
then
where Ai = 18.2 is the smallest eigenvalue on the disk of area 1. (The value of
Ai was found near the end of Section 8.3.)
(c) Repeating the calculation again for a regular decagon of area 1, we find that
the smallest eigevalue is approximately 18.3. (The values obtained on four
successively finer meshes were 19.0328, 18.5055, 18.3268, 18.2755.)
Bibliography
[1] Stuart S. Antman. The equations for large vibrations of strings. American
Mathematical Monthly, 87:359-370, 1980.
[2] Kendall E. Atkinson. An Introduction to Numerical Analysis. John Wiley &
Sons, New York, 2nd edition, 1989.
[3] Eric B. Becker, Graham F. Carey, and J. Tinsley Oden. Finite Elements.
Prentice-Hall, Englewood Cliffs, 1981.
[4] T. A. Bick. Elementary Boundary Value Problems. Marcel Dekker, New York,
1993.
[5] William E. Boyce and Richard C. DiPrima. Elementary Differential Equations
and Boundary Value Problems. John Wiley & Sons, New York, 7th edition,
2000.
[6] Susanne C. Brenner and L. Ridgway Scott. The Mathematical Theory of Finite
Element Methods. Springer-Verlag, New York, 1994.
[7] W. L. Briggs and V. E. Henson. The DFT: An Owner's Manual for the Discrete
Fourier Transform. Society for Industrial and Applied Mathematics, Philadel-
phia, 1995.
[8] E. O. Brigham. The Fast Fourier Transform and Its Applications. Prentice-
Hall, Englewood Cliffs, 1988.
[9] Michael A. Celia and William G. Gray. Numerical Methods for Differential
Equations: Fundamental Concepts for Scientific and Engineering Applications.
Prentice-Hall, Englewood Cliffs, 1992.
[10] Ruel V. Churchill and James Ward Brown. Fourier Series and Boundary Value
Problems. McGraw-Hill, New York, 5th edition, 1993.
[11] Philippe G. Ciarlet. The Finite Element Method for Elliptic Problems. North
Holland, Amsterdam, 1978.
603
www.unifreebooks.com
604 Bibliography
[13] James W. Demmel. Applied Numerical Linear Algebra. Society for Industrial
and Applied Mathematics, Philadelphia, 1997.
[14] G. B. Folland. Introduction to Partial Differential Equations. Princeton Uni-
versity Press, Princeton, 2nd edition, 1995.
[15] Gerald B. Folland. Fourier Analysis and Its Applications. Brooks/Cole, Pacific
Grove, 1992.
[16] George E. Forsythe, Michael A. Malcolm, and Cleve B. Moler. Computer Meth-
ods for Mathematical Computations. Prentice-Hall, Englewood Cliffs, 1977.
[17] Philip Gillett. Calculus and Analytic Geometry. D. C. Heath, Lexington, 1984.
[18] Jack L. Goldberg and Merle Potter. Differential Equations: A Systems Ap-
proach. Prentice-Hall, Upper Saddle River, 1997.
[19] Gene H. Golub and Charles F. Van Loan. Matrix Computations. Johns Hopkins
University Press, Baltimore, 3rd edition, 1996.
[20] Michael Greenberg. Advanced Engineering Mathematics. Prentice-Hall, Upper
Saddle River, 2nd edition, 1998.
[21] M. E. Gurtin. An Introduction to Continuum Mechanics. Academic Press,
New York, 1981.
[22] Richard Haberman. Elementary Applied Partial Differential Equations: With
Fourier Series and Boundary Value Problems. Prentice-Hall, Upper Saddle
River, 1998.
[23] William W. Hager. Applied Numerical Linear Algebra. Prentice-Hall, Engle-
wood Cliffs, 1988.
[24] J. Ray Hanna and John H. Rowland. Fourier Series, Transforms, and Bound-
ary Value Problems. John Wiley & Sons, New York, 2nd edition, 1990.
[25] M. T. Heideman, D. H. Johnson, and C. S. Burrus. Gauss and the history of
the fast Fourier transform. Archive for History of Exact Science, 34:265-277,
1985.
[26] Morris Hirsch and Stephen Smale. Differential Equations, Dynamical Systems,
and Linear Algebra. Academic Press, New York, 1974.
[27] Claes Johnson. Numerical Solution of Partial Differential Equations by the
Finite Element Method. Cambridge University Press, Cambridge, 1987.
[28] David W. Kammler. A First Course in Fourier Analysis. Prentice-Hall, Upper
Saddle River, 2000.
[29] Wilfred Kaplan. Advanced Calculus. Addison-Wesley, Reading, 4th edition,
1994.
www.unifreebooks.com
Bibliography 605
[30] David Kincaid and Ward Cheney. Numerical Analysis. Brooks/Cole, Pacific
Grove, 2nd edition, 1996.
[31] Patrick M. Knupp and Stanly Steinberg. The Fundamentals of Grid Genera-
tion. CRC Press, Boca Raton, 1993.
[32] Young W. Kwon and Hyochoong Bang. The Finite Element Method Using
MATLAB. CRC Press, Boca Raton, 1997.
[33] J. D. Lambert. Numerical Methods for Ordinary Differential Systems. John
Wiley & Sons, Chichester, 1991.
[34] David C. Lay. Linear Algebra and Its Applications. Addison Wesley Longman,
Reading, 2nd (updated) edition, 2000.
[35] David R. Lide, editor. CRC Handbook of Chemistry and Physics. CRC Press,
Boca Raton, 1998.
[36] C. C. Lin and L. A. Segel. Mathematics Applied to Deterministic Problems in
the Natural Sciences. Society for Industrial and Applied Mathematics, Philadel-
phia, 1988.
[37] Jerrold E. Marsden and Anthony J. Tromba. Vector Calculus. W. H. Freeman,
New York, 4th edition, 1996.
[38] R. M. M. Mattheij and J. Molenaar. Ordinary Differential Equations in Theory
and Practice. John Wiley & Sons Ltd., Chichester, 1996. Reprinted by the
Society for Industrial and Applied Mathematics, Philadelphia, 2002.
[39] Robert C. McOwen. Partial Differential Equations: Methods and Applications.
Prentice-Hall, Upper Saddle River, 1996.
[40] Carl D. Meyer. Matrix Analysis and Applied Linear Algebra. Society for In-
dustrial and Applied Mathematics, Philadelphia, 2000.
[41] Jeffrey Rauch. Partial Differential Equations. Springer-Verlag, New York,
1991.
[42] L. F. Shampine and M. W. Reichelt. The MATLAB ODE suite. SIAM Journal
on Scientific Computing, 18:1-22, 1997.
[43] Lawrence E. Shampine. Numerical Solutions of Ordinary Differential Equa-
tions. Chapman & Hall, New York, 1994.
[44] Gilbert Strang. Linear Algebra and Its Applications. Harcourt, Brace, Jo-
vanovich, San Diego, 3rd edition, 1988.
[45] Gilbert Strang and George J. Fix. An Analysis of the Finite Element Method.
Wellesley-Cambridge Press, Wellesley, 1988.
[46] Walter A. Strauss. Partial Differential Equations: An Introduction. John Wiley
& Sons, New York, 1992.
www.unifreebooks.com
606 Bibliography
[47] John C. Strikwerda. Finite Difference Schemes and Partial Differential Equa-
tions. Chapman & Hall, New York, 1989.
[48] Paul N. Swarztrauber. Fftpack, 1985.
[49] Lloyd N. Trefethen and David Bau. Numerical Linear Algebra. Society for
Industrial and Applied Mathematics, Philadelphia, 1997.
[50] Charles Van Loan. Computational Frameworks for the Fast Fourier Transform.
Society for Industrial and Applied Mathematics, Philadelphia, 1992.
[51] J. S. Walker. Fast Fourier Transform. CRC Press, Boca Raton, 2nd edition,
1996.
[52] H. F. Weinberger. A First Course in Partial Differential Equations with Com-
plex Variables and Transform Methods. Blaisdell, New York, 1965.
[53] Antoni Zygmund. Trigonometric Series. Cambridge University Press, Cam-
bridge, 2nd edition, 1959.
www.unifreebooks.com
Index
607
www.unifreebooks.com
608 Index
Index 609
610 Index
Index 611
612 Index
Index 613
614 Index
Young's modulus, 22
APPLICATION FOR COMPLIMENTARY STUDENT MEMBERSHIP www.unifreebooks.com
For buyers of Gockenbach's PDEs book
Name
Mailing
Address
University/College
Name and Address
Phone and E-mail Listing in I hereby authorize my telephone number and e-mail address to be listed in the Combined Membership
Combined Membership List List of AMS, AMATYC, AWM, MAA, and SIAM. Yes No Initial
Primary Q 1. Linear algebra and matrix theory. Q 11. Control and systems theory Q 21. Chemical kinetics, combustion
Professional Interests Q 2. Real and complex analysis including optimal control. theory, thermodynamics, and heat
transfer.
(Check no more than 3) including approximation theory, Q 12. Optimization theory and
integral transforms (including mathematical programming Q 22. Biological sciences including
Fourier series and wavelets), including discrete and numerical biophysics, biomedical engineering,
integral equations, asymptotic optimization and linear and and biomathematics.
methods, and special functions. nonlinear programming. Q 23. Environmental sciences.
Q 3. Ordinary differential equations Q 13. Communication theory including Q 24. Economics.
including dynamical systems. information theory and coding
Q 25. Social sciences.
Q 4. Partial differential equations theory.
Q 26. Functional analysis and operator
including inverse problems. Q 14. Applied geometry including
equations, and integral and
Q 5. Discrete mathematics and graph computer-aided design and related
functional equations.
theory including combinatorics, robotics.
Q 27. Management sciences including
combinatorial optimization, and Q 15. Image processing including
operations research.
networks. computer graphics, computer vision,
Q 28. Applied mathematics education
Q 6. Numerical analysis (theory). related robotics, and tomography.
(K-12, undergraduate curriculum,
Q 7. Computational mathematics '-' '6- Classical mechanics of solids
graduate study and modeling
including scientific computing, including elasticity, structures and
courses).
parallel computing, and algorithm vibrations, and constitutive models.
Q 29. Astronomy, planetary sciences,
development. Q 17. Fluid mechanics including
and optics.
Q 8. Computer science including turbulence, aeronautics, and
multiphase flow. Q 30. Simulation and modeling.
computer architecture, computer
hardware, computational Q 18. Quantum physics, statistical Q 31. Materials science, polymer physics,
complexity, applied logic, database, mechanics, and relativity. and structure of matter.
symbolic computation. Q 19 Geophysical sciences including Q 32. Electromagnetic theory,
Q 9. Applied probability including reservoir modeling, seismic semiconductors, and circuit
stochastic processes, queueing exploration, and petroleum analysis.
theory, and signal processing. engineering. a Other
Q 10. Statistics including data analysis Q 20. Atmospheric and oceanographic
and time series analysis. sciences.
SIAM Journal Subscriptions: Student members may purchase one each of not more than four SIAM journals in
print, for their personal use only, at member discount prices. A package of the complete library of SIAM journals,
via electronic access only, is also available. A list of current SIAM journals can be found at
http://epubs.siam.org/. Please contact Customer Service for the current discounted prices. Contact information i s listed
below. Please list name of journal and amount paid.
All Students are required to complete the Student Status Certification information:
CERTIFICATION
Please mail this completed form (original only; photocopies will not be accepted) and your payment for additional
Activity Groups or journal subscriptions to:
SIAM
Customer Service
3600 University City Science Center, Philadelphia, PA 19104-2688
For further information, please contact SIAM Customer Service:
Toll free in USA and Canada: 800-447-SIAM • Worldwide: 215-382-9800 • Fax: 215-386-7999
[email protected] • www.siam.org