This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
0. O. It follows that g can be 00
g(r,O)
=L
cmOJo(amor).
m=1
not surprising; surprising; since g is independent 0, it only the This is not independent of 9, it is reasonable that only eigenfunctions independent eigenfunctions independent of of 09 are needed needed to to represent g. Since we must compute numerical numerical estimates of the eigenvalues \),mn, we will mn, we content eigenfunctions, those corresponding to the eigenvalues content ourselves with using 3 eigenfunctions, ),10, ),20, ),30.
Chapter spatial dimensions Chapter 8. 8. Problems Problems in in multiple multiple spatial dimensions
372
To six digits, we have SlO
== 2.40483, S20 == 5.52008, S30 == 8.65373
{see Smn s~n' (see {8.43}}. (8.43)). Since A = 1 in this example, we we have Q amn = s and \Amn = ^ mn and mn = mn58 The needed needed coefficients coefficients are are58 ClO
1
=
rr(Jl(QlO)) C20
=
C30 =
1
rr(Jl(Q20)) 1
rr(Jl(Q30))
2111"
(l
-1I"io
g(r,())Jo(QlO r )rdrd() == 1.10802,
2111" (l g(r, ())JO(Q20r)r dr d() == -0.139778, -1I"io 2111" (l g(r,())Jo(Q30 r )rdrdfJ == 0.0454765. -1I"io
of the Fourier series for We now have the first three terms of for g. The graph of 9g is shown in Figure 8.11, 8.11, while the approximation approximation is shown in Figure 8.12. 8.12. Exercise 1 approximation by using more terms. terms. asks the reader to improve the approximation
0.8 0.6 0.4 0.2
o 1
-1 -1
2 Figure 8.11. function g(r g(r,: ()) 8.11. The The function 9} = = 11 - rr2. .
8.3.6 8.3.6
Solving PDEs on a disk
Having found the the disk and under the eigenvalues eigenvalues and eigenfunctions eigenfunctions of -Ll — App on the Dirichlet we can now apply Fourier Dirichlet conditions, conditions, we Fourier series methods to solve any of the equation. familiar equations: the the Poisson Poisson equation, the the heat equation, and the wave wave equation. 58 58The were computed Mathematica, using The integrals integrals were computed in in Mathematica, using the the Integrate Integrate command. command.
373
8.3. 8.3. Fourier Fourier series on a disk
-1 -1
2 Figure approximation to to function function g(r,0] g(r, 0) = = 1I — - r r2, using three Figure 8.12. 8.12. The The approximation , using three of the Fourier series series (see Example 8.7). 8.7). terms of the Fourier (see Example
Example will solve solve (approximately) (approximately) the Example 8.8. 8.8. We We will the BVP BVP
-.:lpu
=1-
r2
u = 0 on
in
n,
(8.48)
an,
where disk. We have already already seen seen that that where n 0, is is the the unit unit disk. We have 00
1 - r2 =
L
cmOJo(amor),
m=l
where coefficients cCmO be computed as in in the the previous previous example. example. We where the the coefficients can be computed as We now now mo can write write 00
u(r,B) =
L
bmoJo(amor),
m=l
where the the coefficients coefficients b bmo are to to be be determined. determined. (Since (Since the the forcing forcing function function is is radial radial where mo are (i.e. independent independent of the solution be radial. we do (i.e. of 0), B), the solution will will also also be radial. Therefore, Therefore, we do not not need need the eigenfunctions that depend on 9.) Since each Jo(a Qr) is an eigenfunction of the eigenfunctions that depend on B.) Since each Jo(amor) is an eigenfunction of m —A p under under the boundary conditions, have -.:lp the given given boundary conditions, we we have 00
-.:lpu(r,O)
=L m=l
AmObmOJo(amor),
374 374
Chapter Chapter 8. 8. Problems Problems in in multiple multiple spatial spatial dimensions dimensions
where the eigenvalue A AmO AmO PDE implies that = a~o. #mo • Therefore, Therefore, the PDE m o is given by A mo = AmObmO = Cmo, m = 1,2,3, ... , and so the solution is
00
L
c~o Jo(amor). m=1 a mO We computed ClO, C\Q, C20, c^o, C30, c^o, alO, «iO; a20, &2Q, and o,nd a30 0,3$ in the previous example, so we see that u(r, B) =
u(r,B) = 0.191594Jo(alOr) - 0.00458719Jo(a2or)
+ 0.000607268Jo(a30r) + ....
Example Example 8.9. 8.9. We will now solve the wave equation on a disk and compare the fundamental frequency of fundamental of a circular drum to that of of a square drum. We consider the IBVP IBVP
(Pu
at 2
-
c2 Ll p u = 0, (r,B)
E
fl, t
> 0,
(8.49)
u(r,B,O) = ¢(r,B), (r,B) E fl,
au at (r, B, 0) = 'Y(r, B), u(A,B, t)
= 0,
-7r
(r, B) ~
E
(8.50)
fl,
(8.51)
B < 7r, t> 0,
where fl f) is the disk of radius A, A, centered at the origin. We write the solution as 00
u(r, B, t)
=L
amo(t)Jo(amor)
m=1 00
+L
00
L
(amn(t) cos (nB)
+ bmn(t) sin (nB)) In(amnr).
m=1 n=1
argument, Then, by the usual argument, mo aat2 u(r, B, t) - C2 Llpu(r, B, t) =;;;:1 ~ (dla 2 ) ~(t) + CAmOamO(t) 2
+ ~1 ~
(
(,pd~;n (t) +
Jo(amor)
2 C Amnamn(t))
cos (nB)
+ (,p!r;n (t) + C2 Amnbmn(t)) sin (nB)) In(amnr). The wave equation then implies the following ODEs: ,pamn
~ 2
d bmn
~
2
+C Amnamn 2
= 0, m = 1,2,3, ... ,n = 0,1,2, ... ,
+ C Amnbmn = 0, m,n = 1,2,3, ....
375
8.3. Fourier series on a disk
From obtain From the the initial initial conditions conditions for for the the PDE, PDE, we we obtain amn(O) = cmn' damn dt (0) = d mn, m = 1, 2, 3, ... , n = 0 , 1 , 2, ... , bmn(O) db mn (0) --;]i'"
= emn , = fmn,
m, n
= 1,2,3, ... ,
where (generalized) Fourier fmn where c Cmn d mn are are the the (generalized) Fourier coefficients coefficients for for
+
mn d sin (Co:mnt) , m = 1,2,3, ... , n = 0, 1,2, ... , CO: mn
bmn(t) = e mn cos (co:mnt)
+
fmn sin (Co:mnt) , m, n = 1,2,3, .... CO: mn
The of any of these these coefficients of aw: 0,1$: The smallest smallest period period of any of coefficients is is that that of Tw=
~ = ~=
2A1l'.
Co: 10
CSOl
csodA
The corresponding is the this circular The corresponding frequency, frequency, which which is the fundamental fundamental frequency frequency of of this circular drum, drum, is is F = CSOl = ~ SOl == 0 382740~ 10 2A1l' A 21l" A. It would of radius (diameter 1A) It would be be reasonable reasonable to to compare compare aa circular circular drum drum of radius A A (diameter 2A) with with drum of of side side length length 2A. 1A. (Another (Another possibility is to to compare compare the the circular aa square square drum possibility is circular drum the same This is is Exercise fundamental drum with with aa square square drum drum of of the same area. area. This Exercise 9.) The The fundamental frequency is frequency of of such such aa square square drum drum is
The square the circular drum. The square drum drum sounds sounds aa lower lower frequency frequency than than the circular drum.
Exercises Exercises 2
1. Let 1— the 1. Let g(r,9) g(r, B) = = 1 - rr2,, as as in in Example Example 8.7. 8.7. Compute Compute the the next next three three terms terms in in the series for g. series for g. 2. Let Let f(r,9] f(r,B) = = 1Compute the the first first nine nine terms terms in in the the generalized generalized Fourier 2. I — r. Compute Fourier series for /f (that (that is, is, those those corresponding corresponding to to the the eigenvalues series for eigenvalues
Take to be be the the unit unit disk. Take n fJ to disk.
376
Chapter 8.
Problems spatial dimensions dimensions Problems in multiple spatial
3. Solve the BVP
= 1 - Vx 2 + y2 in 0, u = 0 on a~,
-~u
0 is the unit disk. Graph the the solution. (Hint: Change to polar polar coordiwhere £7 nates and use the results of the previous exercise.) 4. Let f(r,O) the first first nine nine terms terms in in the the generalized generalized Fourier Fourier series 4. Let /(r, 9} = r. Compute Compute the series for /f (that is, those those corresponding corresponding to to the the eigenvalues for (that is, eigenvalues
Take f2 0 to be the unit disk. the BVP 5. Solve the -~u u
= VX2 +y2 in 0, = 0 on a~,
0 isisthe where £7 theunit unit disk. disk. Graph Graphthe the solution. solution. (Hint: (Hint: Change Changetotopolar polar coordicoordinates and use the results of the previous exercise.) 6. Let Let /(x) f(x) = = (1 (1xi -— Xz)(xi X~)(XI + xz). X2). Convert Convert to to polar polar coordinates coordinates and and compute 6. — #1 compute the first 16 16 terms in the (generalized) Fourier series (that (that is, those corresponding to Amn n — = 0,1,2,3). Graph approximation and its 1,2,3,4, n Graph the approximation mn ,, m = 1,2,3,4, error. error. 7. Consider aa disk disk made made of of copper 8.97 g/cm 33,, c = = 0.379J/(gK), 0.379 J/(gK), K, 7. Consider copper (p = 8.97g/cm K = (cm K)), of radius 10 cm. Suppose that the temperature temperature in the disk 4.04 WI W/(cmK)), 10cm. initially 4>(r,6) ¢(r, 0) = = rcos r cos (0)(10 — - r)/5. What What is the temperature temperature distribution is initially distribution after 30 30 seconds seconds (assuming (assuming that that the the top top and and bottom bottom of the disk disk are are perfectly after of the perfectly insulated, and the edge of the disk is held at 0 degrees Celsius)?
8. Consider Consider an an iron 0.836W/(cmK)) 8. iron disk disk (p (p == 7.88 7.88 g/cm gl cm33,, cc = = 0.437 0.437 J/(gK), JI (g K), « K, = = 0.836 WI (em K)) of radius radius 15 cm. Suppose that heat heat energy energy is is added added to to the the disk disk at at the the constant of 15 cm. Suppose that constant of rate of f(r,O) = I~Or(sin (0) + eos (0)) W lem 3 , where the disk occupies the set 0= {(r,O) : r<15}.
bottom of the disk are perfectly insulated Assume that the top and bottom insulated and that degrees Celsius. the edge of the disk is held at 0 degrees
(a) steady-state temperature What is is the the steady-state temperature of of the the disk? disk? (a) What (b) disk is degrees Celsius (b) Assuming Assuming the the disk is initially initially 00 degrees Celsius throughout, throughout, how how long long does for the steady state 1%)? does it it take take for the disk disk to to reach reach steady state (to (to within within 1%)?
elements in two dimensions dimensions 8.4. Finite elements
377
9. Which Which has has aa lower fundamental frequency, square drum drum or or aa circular drum 9. lower fundamental frequency, aa square circular drum of equal area? of equal area? 10. Show Show that holds by the power power series series for for the side that (8.41) (8.41) holds by deriving deriving the the right-hand right-hand side 10. and showing that it the power power series the left-hand left-hand side. side. and showing that it simplifies simplifies to to the series for for the
8.4
Finite elements in two two dimensions dimensions
We now now turn turn our attention to finite element element methods methods for for multidimensional multidimensional problems. problems. We our attention to finite the sake we will restrict our to problems in two two spatial For the For sake of of simplicity, simplicity, we will restrict our attention attention to problems in spatial dimensions and, as one dimension, to piecewise piecewise linear linear finite finite elements. elements. dimensions and, as in in one dimension, to The The general general outline outline of of the the finite finite element element method method does does not not change change when when we we move to to two-dimensional two-dimensional space. space. The The finite finite element method is obtained via via the move element method is obtained the following following steps: steps:
1. Derive form of of the given BVP. 1. Derive the the weak weak form the given BVP. 2. Apply the method to weak form. 2. Apply the Galerkin Galerkin method to the the weak form.
3. Choose aa space space of approximating subspace subspace in 3. Choose of piecewise piecewise polynomials polynomials for for the the approximating in the method. the Galerkin Galerkin method. The first step is similar to in one one dimension; one might The first step is very very similar to the the derivation derivation in dimension; as as one might expect, the the main main difference difference is is that that integration integration by by parts parts is replaced by Green's first first expect, is replaced by Green's The Galerkin Galerkin method method is unchanged when when applied to aa two-dimensional two-dimensional identity. identity. The is unchanged applied to The most most significant two-dimensional problems problems is is problem. problem. The significant difference difference in in moving moving to to two-dimensional in defining defining the element spaces. spaces. We We must create aa mesh on the the computational computational the finite finite element must create mesh on in domain and and define on the We will restrict ourselves ourselves to to define piecewise piecewise polynomials polynomials on the mesh. mesh. We will restrict domain triangulations and and piecewise linear functions. functions. triangulations piecewise linear 8.4.1 8.4.1
The weak form of a BVP BVP in in multiple dimensions
We begin begin with with the following Dirichlet Dirichlet problem: problem: We the following
- \7 . (k(x)\7u) u(x)
= f(x), x E 0, = 0, x E ao.
(8.52)
2 3 Here 0f) is domain in there is difference in derivation. Here is aa domain in R R2 or or R R3;; there is no no difference in the the following following derivation. We space V V of of test functions by We define define the the space test functions by
V=
eben) =
{v E
e 2 (n)
: v(x) =
0,
x E
ao}.
We original PDE an arbitrary arbitrary vv E € V V and and apply apply Green's Green's We then then multiply multiply the the original PDE by by an identity: identity: -\7. (k(x)\7u)(x) = f(x), x E 0 ::::} -\7. (k(x)\7u(x))v(x) = f(x)v(x), x E 0, v E V
: : } -In
\7 . (k(x)\7u)v
=
In
fv for all v E V
Chapter 8. Problems in multiple spatial dimensions
378
=> - {
ien
=>
In
k(x)v ~u
+ {
un
k(x)\7u . \7v =
in
k(x)\7u· \7v = ( Jv for all v E V
In
in
Jv for all v E V.
The last last step from the the fact that vv vanishes The step follows follows from fact that vanishes on on an. dtl. We define define the the bilinear bilinear form We form a(·, a(-, .)•) by by a(u,v) =
In
k(x)\7u· \7v.
We then obtain form of of the BVP (8.52): (8.52): We then obtain the the weak weak form the BVP Find u E V such that a( u, v) = (f, v) for all v E V.
(8.53)
The proof that that aa solution solution of of the the weak also satisfies the original original BVP BVP follows The proof weak form form also satisfies the follows the same same pattern as in in Section Section 5.4.2 5.4.2 (see (see Exercise Exercise 6). 6). the pattern as
8.4.2 8.4.2
Galerkin's method Galerkin's method
To apply Galerkin's method, we we choose choose aa finite-dimensional finite-dimensional subspace of V To apply Galerkin's method, subspace Vn Vn of V and and ¢2,···, a basis {(1)1, {^1,^2, • • • , ¢n}
We as We write write the the solution solution as
(8.54)
n Vn
= LUi¢i
(8.55)
i=1
and note note that that (8.54) (8.54) is is equivalent equivalent to: to: and Find U E Vn such that a( u, ¢i) = (f, ¢i), i = 1,2, ... , n.
(8.56)
Substituting (8.55) (8.55) into into (8.56), (8.56), we we obtain the following following equations: Substituting obtain the equations:
n
=> La(¢j,¢i)Uj
= (f,¢i), i = 1,2, ... ,n
j=1
=> Ku = f. The stiffness stiffness matrix K and the load load vector ff are are defined by
Kij = a(¢j,¢i), i,j = 1,2, ... ,n, Ji = (f,¢i), i = 1,2, ... ,no The reader reader will notice that that the the derivation of the the equation Ku = exactly as in The will notice derivation of equation Ku = ff is is exactly as in Section since Galerkin's method is is described described in in aa completely completely abstract fashion. Section 5.5, 5.5, since Galerkin's method abstract fashion.
8.4. 8.4.
379
Finite Finite elements in in two dimensions dimensions
The specific specific details, details, and and the the differences differences from from the the one-dimensional one-dimensional case, case, arise arise only only The 59 when the the approximating approximating subspace when subspace Vn Vn is is chosen. chosen.59 Moreover, as in form a(·,·) a(-, •) defines defines Moreover, just just as in the the one-dimensional one-dimensional case, case, the the bilinear bilinear form an inner inner product, product, called called the the energy inner product, product, and the Galerkin Galerkin method method proan energy inner and the prothe best best approximation, approximation, in in the the energy norm, to to the the true true solution u from from the duces the duces energy norm, solution u the approximating subspace approximating subspace Vnn..
8.4.3 8.4.3
Piecewise finite elements elements in in two two dimensions dimensions Piecewise linear linear finite
The graph graph of degree polynomial polynomial in in two two variables variables is is aa plane, plane, and and three three points The of aa first first degree points it algebraically, algebraically, the the equation equation of of aa first determine aa plane. plane. Or, Or, looking looking at determine at it first degree degree polynomial is is determined determined by by three three parameters: polynomial parameters:
z = a+bx+cy. For this this reason, reason, it it is is natural natural to to discretize discretize aa two-dimensional two-dimensional domain 0 by by defining For domain fU defining aa triangulation on on O-that fi—that is, is, 0f) is is divided divided into into triangular triangular subdomains. subdomains. (If 0il is is not not aa polygonal polygonal domain, domain, then then 0f) itself itself must must be be approximated approximated by by aa polygonal polygonal domain domain at at 60 the cost of some approximation error. 60) See Figure 8.13 for examples of triangular the cost of some approximation error. ) See Figure 8.13 for examples of triangular Figure 8.14 8.14 for for the the graph graph of of aa piecewise piecewise linear meshes defined defined on various regions regions and meshes on various and Figure linear The reader reader should notice how how the the graph graph of of aa piecewise piecewise linear is function. The function. should notice linear function function is made up of of triangular "patches." "patches." 0, we we write write n for for the the number number of "free" nodes, nodes, For aa given given triangulation triangulation 7T of of il, For of "free" that is, is, nodes nodes that that do do not not lie lie on on the the boundary boundary and and hence hence do do not not correspond to aa that correspond to Dirichlet boundary boundary condition. condition. We We will will denote denote aa typical typical triangular triangular element element of of T 7 by by Dirichlet T, and and aa typical typical node node by by z. z. Let Let Vn be the the following following approximating approximating subspace Vn be subspace of of V:
Vn == {v {v E€ C(O) C(fi) :: vv isis piecewise piecewise linear linear on on 7, T, v(z) v(z) == 00 for for all all nodes nodes zz E6 aO} dfl} .. Vn To apply apply the the Galerkin Galerkin method, method, we we must must choose choose aa basis basis for This is is done done exactly To for Vnn.. This exactly as . . . ,, zZn. We number number the the free free nodes nodes of of T 7 as as zZ1, Z2, Then, since since as in in one one dimension. dimension. We i5z 2 , ... n . Then, a piecewise piecewise linear linear function function is is determined determined by by its its values values at at the the nodes nodes of of the the mesh, mesh, we define fa ~i e E Vn by the the condition condition define Vn by ,j, ( )
'l'i Zj
=
{I, 0
,
i = j, . ...t.. Z I J.
(8.57)
~i is the one-dimensional A typical
v(x)
= 2.: V(Zi)~i(X). i=1
59 59Just Just as as in Section 5.5, the symbols symbols "u" "f" has has two two meanings: meanings: u is is the the true true in Section 5.5, each each of of the "u" and and "f" solution of of the the BVP, BVP, while while u u G ER Rnn is the vector vector whose whose components components are are the the unknown unknown weights weights in in solution is the the expression expression (8.55) (8.55) for the approximate approximate solution solution Vn. Similarly, /f is is the the forcing forcing function function in in the the the for the vn. Similarly, BVP, while while ffERn the load load vector vector in in the the matrix-vector matrix-vector equation Ku = f. BVP, e Rn is is the equation Ku f. 60 60Another Another way way to to handle handle this this is is to to allow allow "triangles" with aa curved curved edge. edge. "triangles" with
380 380
Chapter 8. Problems Problems in in multiple multiple spatial dimensions Chapter
-0.5 -1~----~~~~~
-1
o
1
1r-----~~----~
1
0.5
0.5 0
-0.5
- 0.5 -1 -1
-1~----~~-----J
0
-1
1
o
1
Figure 8.13. Triangular Triangular meshes defined on on (1) (1) aa square (upper left), left), (2) (2) aa Figure 8.13. meshes defined square (upper union union of of three three squares (upper (upper right), right), (3) (3) an an annulus annulus (lower (lower left), left), and and (4) (4) aa rhombus rhombus (lower Since the polygonal, the (lower right). right). Since the annulus annulus is is not not polygonal, the triangulated triangulated domain domain is is only only an an approximation approximation to to the the original original domain. domain. It now straightforward It is now straightforward (albeit quite tedious) to assemble the stiffness stiffness matrix K and the the load load vector vector f-it f—it is is just just aa matter matter of of computing computing the the quantities quantities a( o(0j,0f) K and
Example For simplicity, Example 8.10. 8.10. For simplicity, we we take take as as our our example example the the constant constant coefficient coefficient problem problem -~U=Xl,
xEn,
u(x) = 0, x E
where n £) is is the the unit unit square: square: where
an,
(8.58)
381
8.4. Finite elements in two two dimensions dimensions 8.4. Finite elements in
0.4
0.2
o -0.2 1
-1 -1
Figure 8.14. A defined on triangulation of Figure 8.14. A piecewise piecewise linear linear function function defined on the the triangulation of the annulus Figure 8.13. 8.13. the annulus from from Figure
o
0
Figure 8.15. One One of the standard basis functions. functions. Figure 8.15. of the standard piecewise piecewise linear linear basis
382
Chapter Chapter 8. Problems in multiple spatial dimensions
We triangles, 25 nodes, and and 9 free nodes. We choose choose aa regular regular triangulation triangulation with with 32 32 triangles, 25 nodes, 9 free nodes. The shown in Figure 8.16, with the free nodes nodes labeled from 11 to The mesh mesh is is shown in Figure 8.16, with the free labeled from to 9. 9.
Figure 8.16. 8.16. The mesh for for Example Example 8.10. Figure The mesh 8.10.
We with the computation of of We begin begin with the computation
K11
= a((/h,¢>d =
k
\l¢>l' \l¢>l'
The support!H1 of of ¢>l is shown shown in Figure 8.17, which also triangles in The support? fa is in Figure 8.17, which also labels labels the the triangles in the the mesh, TI1 ,, TTI2 ,..., Ts2. This support triangles; on mesh, T support is is made made up up of of six six triangles; on each each of of these these , •.. , T 32 • This triangles, ¢>l fa has has aa different different formula. We therefore therefore compute by adding the triangles, formula. We compute KH K11 by adding up up the contributions contributions from from each each of of the the six six triangles; triangles:
kr\l¢>l . \l¢>l = inr \l¢>l' \l¢>l + hr \l¢>l' \l¢>l + hr \l¢>l' \l¢>l +
r \l¢>l . \l¢>l + irnl \l ¢>l . \l ¢>l + in2r \l¢>l . \l¢>l .
~o
On TI,1 , V0i(x) (l//i, 0), where 1/4 (observing fa changes changes along On T \l¢>l(X) = = (l/h,O), where h h = 1/4 (observing how how ¢>l along the horizontal and vertical vertical edges edges ofT ofTi1 leads leads to to this conclusion). The The area the horizontal and this conclusion). area ofTi ofT1 (and (and 2 of the other other triangles triangles in in the the mesh) mesh) is is /i /2. Thus, Thus, of all all the h 2 /2.
hi 61
\l ¢>l . \l ¢>l =
hi :2 (:2) (~2) =
=
~.
61 As As we we explained Section 5.6, the support of aa function function is set on function is is explained in in Section 5.6, the support of is the the set on which which the the function nonzero, together together with the boundary boundary of that set. nonzero, with the of that set.
8.4. two dimensions 8.4. Finite Finite elements elements in in two dimensions
383
On T T-2, V^i(x) = = (0, (0, l/h), and we obtain On I/h), and we obtain 2 , V'4>1(X)
I/h), and and On On TT33,, V'4>1(X) V^i(x) = = (-l/h, (-1/fc, l/h),
Figure support of 4>1 (Example Figure 8.17. 8.17. The The support of 4>i (Example 8.10). mesh, mesh, T TI1 ,, TT-2,..., T32 are are also also labeled. labeled. 2 , •.• ,T
It should be be easy easy to to believe, believe, from symmetry, symmetry, that that
Adding up from the six triangles, we obtain obtain Adding up the the contributions contributions from the six triangles, we
Kll =
k
V'4>1 . V'4>1 = 4.
The The triangles triangles of of the the
384
Chapter 8. Problems in multiple spatial dimensions dimensions
Since the PDE (and the the basis the same Since the PDE has has constant constant coefficients coefficients (and basis functions functions are are all all the same, up to to translation), translation), it it is is easy easy to to see that up see that Kii
= 4, i = 1,2, ... ,9.
We now now turn turn our our attention attention to to the the off-diagonal off-diagonal entries. entries. For what values values of We For what of jj ^ ? By fa, we fa, =I- ii will will Kij Kij be be nonzero nonzero? By examining examining the the support support of of (PI, we see see that that only only
We now now compute compute the the first first row row of ofK. We already already know that KH 4. ConsultConsultWe K. We know that Kll == 4. ing Figure Fiaure 8.17, 8.17, we see see that
OnT3,
\7
On T 12 12,,
\7
Thus K12 Ki2 == -1. -l. Thus The following calculations: calculations: The reader reader can can verify verify the the following
385 385
8.4. Finite elements in two dimensions
= -1,
K 15 =
1
\l¢5' \l¢l
+
Tn
= (0)
1
\l¢5' \l¢l
T12
(~2) + (0) (h;)
=0. The rest rest of are similar, and the the result result is is the stiffness The of the the calculations calculations are similar, and the following following stiffness matrix: 4 -1 0 -1 0 0 0 0 0 4 -1 -1 0 -1 0 0 0 0 4 0 0 0 0 -1 0 0 -1 0 0 4 -1 0 0 -1 0 -1 4 -1 0 -1 0 -1 0 0 -1 K= 4 0 0 -1 0 0 -1 0 -1 4 -1 0 0 0 -1 0 0 0 4 -1 0 0 0 0 -1 0 -1 4 0 0 0 0 -1 0 0 -1 To load vector vector f, must evaluate integrals To compute compute the the load f , we we must evaluate the the integrals
L
f(x)¢i(X) dx,
which is is quite quite tedious tedious when when done done by by hand hand (unlike (unlike \l¢i, V0j, ¢i 0j itself itself is not piecewise which is not piecewise constant). constant). We We just show one one representative representative calculation. calculation. We We have Xl
X
E
T1 ,
X
E
T2 ,
X
E
T3 ,
X
E
T lO ,
,
X
E
Tu ,
,
X
E
T 12 ,
h' X2 h' ¢1(Xl,X2) =
X2-X1+h h Xl-X2+h h 2h-X2 -h2h-X1 -h-
0, Therefore, Therefore,
, ,
otherwise.
386
Chapter 8. Problems dimensions Problems in multiple spatial dimensions
Continuing in in this this manner, manner, we we find Continuing find h3 2h 3
f
=
3h3 h3 2h 3 3h3 h3 2h 3
3h3 62 We now solve Ku obtain We can can now solve62 Ku = = ff to to obtain
u =
0.015904 0.027344 0.027065 0.020647 0.035156 0.034040 0.015904 0.027344 0.027065
The piecewise linear displayed in Figure 8.18. 8.18. The resulting resulting piecewise linear approximation approximation is is displayed in Figure
The calculations calculations in the previous example are are elementary, elementary, but extremely timetimeThe in the previous example but extremely consuming, and and are are ideal ideal for for implementation implementation in in aa computer computer program. When these these consuming, program. When not organized the same as calculations are programmed, programmed, the calculations are the operations operations are are not organized in in the same way way as in the above hand For example, example, instead instead of of computing one entry entry in K in the above hand calculation. calculation. For computing one in K at time, it to loop the elements the mesh to compute at aa time, it is is common common to loop over over the elements of of the mesh and and to compute all contributions to to the various entries entries in in K K and from each each element element in turn. all the the contributions the various and ff from in turn. Among other other things, this simplifies simplifies the data structure structure for for describing describing the mesh. (To Among things, this the data the mesh. (To automate know, given a automate the calculations calculations presented above, it would be necessary to know, certain node, are adjacent adjacent to it. This is avoided avoided when one loops loops over certain node, which which nodes nodes are to it. This is when one over the elements over the Also, the the various various integrations are rarely the elements instead instead of of over the nodes.) nodes.) Also, integrations are rarely carried out but rather by using rules. These carried out exactly, exactly, but rather by using quadrature quadrature rules. These implementation implementation details are are discussed discussed in in Section Section 10.l. 10.1. details As we have have discussed before, an finite element As we discussed before, an important important aspect aspect of of the the finite element method method is the the linear linear systems that must is the fact fact that that the systems that must be be solved solved are are sparse. sparse. In In Figure Figure 8.19, 8.19, we we display display the sparsity sparsity pattern of of the stiffness stiffness matrix for for Poisson's Poisson's equation, equation, as as in Example banded, that Example 8.10, 8.10, but with with a finer finer grid. The The matrix K K is banded, that is, all of its its entries the main main diagonal. entries are are zero zero except except those those found found in in aa band band around around the diagonal. Efficient Efficient solution solution of of banded banded and and other other sparse sparse systems systems is is discussed discussed in in Section Section 10.2. 10.2. 62 6 2 It It
is that aa computer computer program program will be used used to linear system is expected expected that will be to solve solve any any linear system large large than than 22 xx 22 or 33 xX 3. 3. We We used used MATLAB MATLAB to solve Ku = ff for for this this example. or to solve Ku = example.
387 387
8.4. 8.4. Finite Finite elements elements in in two two dimensions dimensions
0.01
o
0,.
0
Figure 8.18. The The piecewise linear approximation approximation to to the the solution of {8.58}. (8.58). Figure 8.18. piecewise linear solution of
10~i_. 20 30
40 50
, ••••••••
-.-. ••••
_.
e.
,
-.-. ••••
-.••••••
_.
,,
-.•••••• -...... -...... •••• •••• •.....• •.....• •••• ... ••••... ..•.... ..•.... -. -. .~... :,~~ .... ,
e.
~
70 80
o
~
,, _.
~
~.
m
~
~
00
nz = 369
Figure 8.19. sparsity pattern of Figure 8.19. The The sparsity of the the discrete discrete Laplacian {200 (200 triangular triangular elements}. elements).
Chapter in multiple multiple spatial Chapter 8. 8. Problems Problems in spatial dimensions dimensions
388
8.4.4 8.4.4
Finite elements elements and and Neumann Neumann conditions Finite conditions
We will close Neumann conditions conditions are are handled We will close by by describing describing briefly briefly how how Neumann handled in in twotwodimensional elements. For For the sake of of generality, generality, we we will consider aa problem dimensional finite finite elements. the sake will consider problem with possibly mixed mixed boundary boundary conditions. n isisaadomain with possibly conditions. So So suppose suppose £7 domaininineither eitherR2 R2 oror 3 R3, R , and assume that an dtl has been partitioned partitioned into two two disjoint sets: an d£l == rI\1 ur LJ T^. 2. We consider the BVP: We consider the following following BVP: -\7 . (k(x)\7u) = I(x), x E n,
u(x)
= 0,
au an (x) = 0,
x E r 1,
(8.59)
x E r2.
As we discussed in Section 6.5, 6.5, Dirichlet Dirichlet conditions conditions are are termed essential boundary boundary As we discussed in Section termed essential conditions because because they be explicitly in the method, conditions they must must be explicitly imposed imposed in the finite finite element element method, while Neumann conditions are are called called natural natural and and need not be mentioned. We while Neumann conditions need not be mentioned. We therefore define the space space of of test functions functions by by
v = {u E C
2
(O) : u(x)
= O,X E rt}.
The weak form of of (8.59) is is now derived exactly exactly as as on on page page 378; the the boundary boundary The weak form now derived integral integral
au = r k(X)V au + r k(x)V au r k(X)V a an Jr2 an Jon n Jrl
now vanishes = 00 on and du/dn — 00 on on rF22.. Thus now vanishes because because vv = on rFI1 and au/an = Thus the the weak weak form form of of is: (8.59) is: Find u E V such that a(u, v) = (f, v) for all v E V. (8.60) The bilinear form a(-, is defined defined exactly exactly as as before (the only from (8.53) a(·,·)•) is before (the only difference difference from The bilinear form is in in the space of of test functions). is the space test functions). polygonal doWe now now restrict restrict our our discussion discussion once once more more to to two-dimensional two-dimensional polygonal mains. To To apply apply the the finite element method, method, we must choose choose an an approximating approximating mains. finite element we must there are least two two subspace subspace of of V. Since Since the the boundary boundary conditions conditions are are mixed, mixed, there are at at least Neumann. We We will points where where the the boundary conditions conditions change change from from Dirichlet to Neumann. make the assumption assumption that is chosen chosen so so that that all all such such points are nodes nodes (and (and make the that the the mesh mesh is points are that all such such nodes nodes belong that is, that rFI1 includes its "endpoints"). "endpoints"). We We can that all belong to to rF11;, that is, that includes its can then choose the approximating subspace subspace of of V V as as follows: then choose the approximating follows:
Vn
= {v E C(O') : v is piecewise linear on /, v(z) = 0 for all nodes z E
rt}.
A basis for for Vn Vn is is formed formed by by including including all all basis basis functions functions corresponding corresponding to to interior interior A basis nodes (as case), as as well the basis basis functions nodes (as in in the the Dirichlet Dirichlet case), well as as the functions corresponding corresponding to to boundary nodes that belong to to rFI. For an an example example of function boundary nodes that do do not not belong 1. For of aa basis basis function corresponding see Figure corresponding to to aa boundary boundary node, node, see Figure 8.20. 8.20. Example Example 8.11. 8.11. We We consider consider the BVP BVP -~U=X1,
xEn,
8.4.
Finite elements elements in two dimensions
389
0.8 0.6 0.4
0.2
o 1
o
0
Figure 8.20. A standard standard piecewise piecewise linear function corresponding corresponding to to Figure 8.20. A linear basis basis function aa boundary node. boundary node. u(x) 0, x x E r 3 ,, u(x) = = 0, €T du —(x) an (x) = = o, 0, x x eE rril uUrr22uUrr44,, an
au
(8.61)
where Jl 0 is is the the unit unit square, square, as as in in the the previous previous example, example, and fl' 1^, r 2 , T$, r 3 , and r 4 are are where and TI, and T± defined as in Figure 8.3. We use the same regular triangulation of 0 as in Example defined 8.3. of ft, 05 Example 8.10. Now, however, however, the to r and F r 4 are free nodes 8.10. Now, the boundary boundary nodes nodes belonging belonging to TI,l , r22,, and are free nodes (but not the the corners corners (1,1) and and (0,1) of of OJ. It follows follows that has dimension dimension 20. (but not Ci). It that Vn Vn has 20. The free nodes are labeled labeled in in Figure Figure 8.21. 8.21. The free nodes are The calculation of of the the new new stiffness stiffness matrix matrix K K and and load load vector vector ff proceed proceed as as The calculation before, and the linear approximation to the true solution is disbefore, and the resulting resulting piecewise piecewise linear approximation to the true solution is displayed in Figure 8.22. 8.22. played in Figure If stiffness matrix will If the BVP includes only Neumann conditions, then the stiffness be singular, singular, reflecting reflecting the the fact fact that that BVP BVP either not have solution or or has has be either does does not have aa solution infinitely many solutions. Special care must be taken taken to compute a meaningful meaningful solution to Ku = = f. f. solution to Ku
8.4.5
Inhomogeneous boundary conditions conditions
In a two-dimensional problem, inhomogeneous boundary conditions are handled conditions are addressed just as in one dimension. Inhomogeneous Dirichlet Dirichlet conditions addressed via the method of shifting shifting the data (with a specially chosen piecewise linear function), while
390
Chapter 8. Problems in dimensions in multiple spatial dimensions
20
15
10
Figure Figure 8.21. 8.21. The The mesh for Example 8.11. 8.11.
0.3
0.2
0.1
o 1
Figure 8.22. Figure 8.22. The piecewise linear approximation to the solution of (8.61). (8.61).
391
8.4. Finite elements in in two two dimensions 8.4. Finite elements dimensions
inhomogeneous Neumann Neumann conditions conditions are are taken taken into into account account directly directly when when deriving inhomogeneous deriving the weak form. Both types the load the weak form. Both types of of boundary boundary conditions conditions lead lead to to aa change change in in the load vector. Exercises and 77 ask ask the reader to to derive derive the the load load vectors vectors in in these these cases. cases. vector. Exercises 55 and the reader
Exercises 1. 1. Consider the BVP
-V'. (k(x)V'u)
= I(x),
x EO,
u(x) = 0, x E a~,
where is the the unit square, k(x) k(x) == 1I + x\x^ where 0£) is unit square, X1X2 piecewise linear finite element (approximate) with 18 18 triangles.
and I(x) /(x) = = 1. 1. and solution using a
Produce the the Produce regular grid
2. Repeat Repeat Exercise 1, but but suppose suppose that that the the boundary boundary conditions conditions are are homogeneous 2. Exercise 1, homogeneous Neumann conditions conditions on on the the right right side side f2 F2 of of the square and and homogeneous Neumann the square homogeneous Dirichlet conditions conditions on the other three sides. sides. 3. Repeat Exercise 1, 1, but suppose that the boundary conditions are homogeneous Neumann conditions conditions on on every every part part of of the the boundary of O. fi. Let Let the the right-hand right-hand boundary of Neumann side be /(x) = = #1 1/2 (so (so that that the compatibility condition condition is is satisfied satisfied and and side be I(x) Xl -—1/2 the compatibility solution exists). exists). aa solution
4. If If Uu does does not belong to to V Vnn,, then then 4. not belong n W
= LU(Zi)¢i i=l
is not equal to u. Instead, linear interpolant is not equal to Instead, w w is is the the piecewise piecewise linear interpolant of of Uu (relative (relative to to the given is one the given mesh mesh T). The The interpolant interpolant of of Uu is one piecewise piecewise linear linear approximation approximation to U; to aa BVP, BVP, then then the finite element computes to u] if if Uu is is the the solution solution to the finite element method method computes another. The purpose of this exercise is to compare the two. (a) Verify X1X2(1 -— #i)(l xd(1 -— #2) X2) is the the solution to the Verify that u(x) w(x) = = #1X2(1 the Dirichlet problem problem -6.u = 2Xl(1 - Xl) u(x) = 0, x E a~,
+ 2x2(1 -
X2), x E fl,
where 0fi is is the unit square. square. (b) (b) Let Let T be be the regular triangulation of of 0£) with 18 18 triangles. Compute Compute the the finite element approximation to u using piecewise linear functions on finite element approximation to u using piecewise linear functions on T. T. (c) relative to to T. (c) Compute Compute the the piecewise piecewise linear linear interpolant interpolant of of uu relative T. (d) better approximation finite element or (d) Which Which is is aa better approximation of of u, the the finite element approximation approximation or the your answer numerically. the interpolant? interpolant? Justify Justify your answer both both theoretically theoretically and and numerically.
392 392
Chapter 8. Problems in multiple spatial dimensions
5. (a) (a) Explain Explain how how to solve an an inhomogeneous inhomogeneous Dirichlet 5. to solve Dirichlet problem problem using using piecepiecewise linear linear finite finite elements. elements. wise (b) Illustrate the procedure on the following BVP: -~u
= 0 in 0,
u(x) =
xi, x E a~.
Let be the unit square use aa regular regular grid grid with Let 0J7 be the unit square and and use with 18 18 triangles. triangles. 6. 6. Suppose uu is a solution to (8.53). (8.53). Prove that uu also solves (8.52). (8.52).
7. (a) (a) Explain Explain how to solve solve an inhomogeneous Neumann Neumann problem 7. how to an inhomogeneous problem using using piecepiecewise linear finite elements. (b) the compatibility compatibility condition Neumann (b) What What is is the condition for for an an inhomogeneous inhomogeneous Neumann problem? problem? (c) the procedure procedure on (c) Illustrate Illustrate the on the the following following BVP: BVP:
-~u = X1X2 + ~ in 0,
au
an(x)
3xi
= -5'
x E a~.
Let fi 0 be the unit square and use a regular grid with 18 18 triangles.
8.5 8.5
Suggestions for for further further reading Suggestions reading
The foundation of PDEs in two or more spatial dimensions is advanced calculus. Kaplan [29] introduction; an alternative at the same is Kaplan [29] gives gives aa straightforward straightforward introduction; an alternative at the same level level is Greenberg advanced treatment can be found in and 'Tromba Tromba Greenberg [20]. A A more more advanced treatment can be found in Marsden Marsden and [37]. All of the references references cited PDEs in All of the cited in in Sections Sections 5.8 5.8 and and 6.7 6.7 deal deal with with PDEs in multiple multiple spatial dimensions. Another source source of of information Bessel function is Folland Folland spatial dimensions. Another information about about Bessel function is [15].
Chapter 9
about f.+~,Mope iI?!ri~'~I¢.~~ bout Fourier Fourier series series
In the preceding chapters, we we introduced several kinds of Fourier series: series: the Fourier sine series, cosine series, quarter-wave sine series, quarter-wave cosine series, and the full Fourier series. These series were primarily used to represent the solution to differential differential equations, and their usefulness was based based on two facts: facts: 1. with the property that con1. Each Each is is based based on on an an orthogonal orthogonal sequence sequence with the property that every every continuous function can be represented represented in terms of this sequence. sequence.
2. The terms in the series represent eigenfunctions of certain simple differential differential operators (under various boundary conditions). conditions). This accounts for the fact that it is computationally tractable representation of of tractable to determine a series representation the solution to the corresponding differential differential equation. equation. In this chapter we we will go deeper into the study of Fourier series. Specifically, Specifically, we will consider the following questions: 1. 1. What is the relationship among the various kinds of Fourier series?
2. partial Fourier 2. How How can can aa partial Fourier series series be be found found and and evaluated evaluated efficiently? efficiently? conditions and in what sense can a function be represented by its 3. Under what conditions Fourier series? 4. the Fourier be generalized to more 4. Can Can the Fourier series series method method be generalized to more complicated complicated differential differential equations nonconstant coefficients equations (including (including nonconstant coefficients and/or and/or irregular irregular geometry)? geometry)? book Our justify many many of Our discussion discussion will will justify of the the statements statements we we made made earlier earlier in in the the book concerning the convergence of Fourier series. It also introduces the fast fast Fourier convergence transform (FFT), (FFT), which which is is an an exciting exciting and and recent recent development development (from (from the last half transform the last half 63 of the twentieth century63) of ) in the long history of Fourier series. The calculation calculation of 2 coefficients would appear appear to require O(JV O(N2) operations (for (for reasons that N Fourier coefficients ) operations 63 63The The FFT FFT was was popularized popularized in in the the 1960s, 1960s, by by the the paper paper [12]. [12]. However, However, the the method method was was known to Gauss long long before; before; see see [25]. [25]. to Gauss
393
Chapter 9. 9. More More about about Fourier Fourier series series Chapter
394
we explain explain in in Section Section 9.2). 9.2). The The FFT FFT reduces operation count count to to O(NlogN), we reduces the the operation O(NlogN), aa considerable when N considerable savings savings when TV is is large. large. We begin introducing yet yet another type of the complex complex We begin by by introducing another type of Fourier Fourier series, series, the Fourier series, series, that that is is convenient convenient both for analysis analysis and and for for expressing expressing the the FFT. FFT. both for Fourier
9.1 9.1
The complex complex Fourier Fourier series series The
We saw saw in in Chapter Chapter 44 that that problems problems apparently apparently involving involving only only real can We real numbers numbers can sometimes be addressed with with techniques techniques that that use use complex complex numbers. For exsometimes be best best addressed numbers. For example, if if the the characteristic characteristic roots and r2 r-2 of of the ODE roots r\ rl and the ODE ample, rPu
du
+ b dt + cu = 0
a dt 2
are distinct, the general general solution is are distinct, then then the solution is
u(t) =
Cl e
Tlt
+ c2e
T2t
•
This formula formula holds even if if rl r\ and and r2 r% are are complex, complex, in which case case uu is is complex-valued complex-valued This holds even in which for most most choices choices of of Cl c\ and and C2. c^. (We (We also also saw, saw, in in Section Section 4.2.1, 4.2.1, how how to to recover recover the the for general real-valued real-valued solution solution if if desired.) desired.) general In to using using complex-valued In aa similar similar way, way, there there are are some some advantages advantages to complex-valued eigenfunceigenfunctions, even even when solving differential differential equations equations involving involving only only real-valued real-valued functions. functions. tions, when solving Using Euler's formula, formula, Using Euler's eiO = cos e + i sin e, we see see that we that
d~
[eiW
=
!
+ i sin (wx)] = -wsin (wx) + iwcos (wx) = iw (cos (wx) + i sin (wx)) [cos (wx)
= iweiw
and therefore therefore and 2
, ] = -(iw) 2 ' _d_ [e'wx e'wx
dx 2
This the negative This suggests suggests that that the negative second second derivative derivative operator operator has has complex complex exponential exponential eigenfunctions. eigenfunctions. We leave to the exercises (see to show show that solutions to to We leave it it to the exercises (see Exercise Exercise 4) 4) to that nonzero nonzero solutions the BVP BVP the rPu
- dx 2
= AU,
-£ < x < £,
u( -f) = u(£), du (_£) = du (£), dx dx
(9.1)
9.1. 9.1. The complex complex Fourier series
395 395
22 2 exist 0, 1f2 2/£2, ... ,n 7r /£2, ... The has eigenfuncexist only only for for A == 0,7r /7 2 ,..., n 22?r /£ , .— The eigenvalue eigenvalue A == 00 has eigenfunction (the constant function), while each eigenvalue eigenvalue A has two two linearly linearly tion 11 (the constant function), while each A= = n 22ir7r 22/I/£22 has independent eigenfunctions, independent eigenfunctions,
2 2 constant function 1 and A = 1f2/£2 When n == 0, ei7fnx/l e™nx/1 reduces to the constant = n22?r /7 reduces we will of to A = to = O. 0. Therefore, Therefore, to to simplify simplify the notation, notation, we will write the the complete complete list of eigenvalue-eigenfunction pairs as eigenvalue-eigenfunction pairs as
2 2
n 1f i7fnx/l ,n= 0,±, 1 ±2 , .... T,e
(9.2)
In this section we use to form In this section we use the the eigenfunctions eigenfunctions given given in in (9.2) (9.2) to form Fourier Fourier series series the interval (-£, f). Since Fourier series representing functions on representing functions on the interval (—£,(.). Since Fourier series calculations calculations are are we must complex vector vector space based on based on orthogonality, orthogonality, we must take take aa slight slight detour detour to to discuss discuss complex space and products. Some the following have been been used used earlier the text, text, and inner inner products. Some of of the following results results have earlier in in the but operator has only but only only briefly in the course course of demonstrating demonstrating that aa symmetric symmetric operator real eigenvalues. real eigenvalues.
9.1.1 9.1.1
Complex inner products products
As discussed in in Section As we we discussed Section 3.1, 3.1, aa vector vector space space is is aa set set of of objects objects (vectors), (vectors), along along with two operations, and scalar multiplication. To this point, point, we we with two operations, (vector) (vector) addition addition and scalar multiplication. To this have used real real numbers as the however, the can also have used numbers as the scalars; scalars; however, the complex complex numbers numbers can also be be we use use complex numbers as as scalars, we refer used emphasis, when when we used as as scalars. scalars. For For emphasis, complex numbers scalars, we refer to the the vector vector space as aa complex vector space. to space as complex vector space. The vector space The most most common common complex complex vector space is is en, C n , complex complex n-space: n-space:
Just as as for for R addition and scalar multiplication multiplication are are defined defined componentwise. componentwise. Just R nn ,, addition and scalar The only only adjustment adjustment that must be working with complex vector vector The that must be made made in in working with complex spaces is in the inner product. If u vector spaces is in the definition definition of of inner product. If u is is aa vector vector from from aa complex complex vector space, then it is is permissible permissible to to multiply multiply uu by to get get iu. iu. But space, then it by the the imaginary imaginary unit unit ii to But ifif there inner product product (.,.) and if properties of there is is an an inner (•, •) on on the the space, space, and if the the familiar familiar properties of inner inner product hold, product hold, then then
(iu,iu) = i2(u,U) = -(u,u). This suggests suggests that that either (w,u) or or (iu,iu) is is negative, negative, contradicting contradicting one one of of the rules This either (u,u) the rules of inner inner products (and making making it impossible to define aa norm norm based inner of products (and it impossible to define based on on the the inner product). product). For this reason, reason, the inner product is modified modified for for complex complex vector For this the definition definition of of inner product is vector spaces. spaces.
Chapter 9. More More about about Fourier Fourier series series
396
Definition be a complex vector space. An An inner product on V is is aa Definition 9.1. 9.1. Let V be vectors from V and producing a complex complex number, number, in such a way function taking two vectors that the following following three properties properties are satisfied: satisfied: 1. 1. (u,V) (w,t>) = = (v,u) (v,u) for all vectors u and V; v;
2. (au + j3v, — a(u, a(u, w) (w, au au + /3v) fiv) = — a(w, a(w, u) fi(w, v) 2. (au /3v, w] w) = w) + {3(v, /3(v, w) w) and and (w, u) + 73(w, v) for for all all v, and w wand numbers a 0: and /3; vectors u, v, and all all complex numbers 0;
2: 00 for for all vectors u, u, and (u,u) = if and and only only ifu vector. 3. (u,u) (w, w) > — 00 if if u is the zero vector. In the the above above definition, definition, z denotes the the complex complex conjugate conjugate of In z denotes of z E € C. C. (If z = = x+ + iy, with with x, x,yy €E R, R, then then ~zz = = x — - iy.) For C the inner product is is suggested suggested by by the the fact that For Cnn ,, the inner product fact that
IZI=# for We define for z €E C. C. We define
n
(U,V)cn
= U· V = L
UiVi·
j=1
It the properties satisfied. It is is straightforward straightforward to to verify verify that that the properties of of an an inner inner product product are are satisfied. In particular, In particular, n
(u,u)c n = LUi'lli j=1 n
=
L
IUil 2 2: O.
j=1
If we of complex-valued functions defined interval If we now now consider consider the the space space of complex-valued functions defined on on an an interval [a, b], bj, the the same same reasoning reasoning as in Section 3.4 leads leads to to the the complex complex L L22 inner inner product, product, [a, as in Section 3.4 (J,g) =
i
b
f(x)g(x) dx.
(We will will use use the the same notation as the real real L L22 inner inner product, product, since, when /f and (We same notation as for for the since, when and g9 are real-valued, real-valued, the the presence presence of of the complex conjugate in the the formula formula has has no no effect, are the complex conjugate in effect, and the the ordinary ordinary L L22 inner product is is obtained.) and inner product obtained.)
9.1.2 9.1.2
Orthogonality of complex exponentials Orthogonality of the the complex exponentials
A direct that the (9.2) are A direct calculation calculation now now shows shows that the eigenfunctions eigenfunctions given given in in (9.2) are orthogonal orthogonal with respect respect to to the L22 inner product: with the (complex) (complex) L inner product: (ei1fnX/t, em1fix/i)
=
rt ei1fnx/£e-m1fix/£ dx
i-I
397
9.1. The complex Fourier series 9.1.
1£
=
e(n-m)1rix/£ dx
-£
= [e(n-m)1rix/£ ] £
(n - m)7ri/C
=
C
_£
(e(n-m)1Ti _ e-(n-m)1Ti)
(n - m)7ri = 0, m f. n.
n m 1 The last step follows because e^ e(n-m)Oi is 27r-periodic. 27r-periodic. We We also also have have ^ is
(ei1TnX/l,ei1rnX/l) =
1£ 1£
ei1rnx/fe-i1Tnx/fdx
-l
=
dx
-£
= 2£. This shows that that the eigenfunction is is VU. y/%1. This shows the L L22 norm norm of of the the eigenfunction
9.1.3 9.1.3
Representing functions complex Fourier Fourier series Representing functions with with complex series
If f/ is complex-valued function denned on on [[-C, — I , IC], ] , then complex If is aa continuous, continuous, complex-valued function defined then its its complex Fourier is Fourier series series is CXl
'""' cn e i1Tnx /£ , ~ n=-CXl
where where
1 = 2C
1f
.
f(x)e-'1rnx/£ dx.
-£
These complex according to theoThese complex Fourier Fourier coefficients coefficients are are computed computed according to the the projection projection theorem; rem; it it follows follows that that N
L
cnei1Tnx/£
n=-N
is element of subspace is the the element of the the subspace 1 e i1rx, /l span {e -i1rNX/£ , e-i1r(N-l)x/£ , ... , e- i1rx / L" .. "' ei1rNX/L} closest to to /f in the L L22 norm. norm. Also, Also, we we will will show show in in Section 9.6 that the complex complex closest in the Section 9.6 that the in the the L L22 norm norm under under mild mild conditions conditions on on f/ (in Fourier series Fourier series converges converges to to f/ in (in particparticular, if f/ is is continuous). continuous). ular, if
Chapter 9. More about Fourier series
398
9.1.4 9.1.4
The The complex complex Fourier Fourier series series of of a a real-valued real-valued function function
If E C[ -e, e] isis real-valued, If f/ € C[—i,i] real-valued, then, then, according according to to our our assertions assertions above, above, it it can can be represented now show represented by its its complex complex Fourier Fourier series. series. We We now show that, that, since since f/ is is real-valued, each partial sum (n = ... , N) = -N, —TV, -N — JV + 1, 1,..., AT) of the the complex Fourier series is real, and and moreover moreover that that the the complex complex Fourier Fourier series series is is equivalent equivalent to to the the full full Fourier Fourier series series in this case. So we we suppose suppose f/ is is real-valued real-valued and and that that Cn, cn, nn = 0, 0, ±1, ±1, ±2, ±2,... are its its complex complex So ... are we will write the full Fourier coefficients. For reference, we full Fourier series of f/ (see Section Section 6.3) 6.3) as as 00
L
ao +
(an cos (n;x) + bn sin (n;x)) ,
n=l where
ao an
= 2f1
1£
f(x) dx,
-l
11£ f(x)cos (n7rx) -e- dx, n =
="£
-£
bn
11£
="£
-£
.
f(x)sm (n7rx) -e- dx, n
Now, Now, 1
Co = 2f
II
1,2,3, ... ,
= 1,2,3, ....
f(x) dx = ao·
-l
For nn > 0, 0, For C
n=
2~ ill f(x)e-i7rnx/l dx
= ;e ill f(x)
(cos (n;x) - i sin (n;x)) dx
= ;e ill f(x) cos (n;x) dx 1
;e ill f(x) sin (n;x) dx
i
= 2an - 2bn . Similary, with n > 0, we we have C-
;e [ll f(x)ei7rnx/l dx = ;e [i/(X) (cos (n;x) +isin (n;x)) dx = ;e [le f(x) cos (n;x) dx + ;e [: f(x) sin (n;x) dx
n=
9.1. 9.1. The The complex complex Fourier Fourier series series
399 399
Therefore, Therefore, cnei7rnx/£
+ c_ne-i7rnx/l = (~an _ ~bn )
(cos
+ (~an+~bn)
(n;x) + i sin (n;x))
(n;x) _isin(n;x)) = an cos (n;x) + bn sin (n;x). (cos
quantities sum to zero in this calcula(The reader should notice how all imaginary quantities tion.) tion.) 2 0, 0, Therefore, for for any Therefore, any N > N
L
N
Cnei7rnx/l = ao
n=-N
+L
(an cos
(n;x) + bn sin (n;x)) .
n=1
This shows that every (symmetric) (symmetric) partial sum of the complex Fourier series of a is real real and and also also that the complex series is is equivalent equivalent to real-valued function real-valued function is that the complex Fourier Fourier series to the full series. the full Fourier Fourier series.
Exercises
f:
f(x)
x
2
1. Let Let / : [-1,1] [-1,1] ->• 1. -+ R R be be defined defined by by f ( x ) = = 1I -— x2 .. Compute Compute the the complex complex Fourier series Fourier series
of f, /, and of and graph graph the the errors errors N
f(x) - L
cnei7rnx
n=-N
for = 10,20,40. 10,20,40. for TV N =
f:
f(x) x.
2. Let [-71",71"] -+ R be be defined by f ( x ) = the complex complex Fourier Fourier 2. Let / : [—7r,7r] —>• R denned by = x. Compute Compute the coefficients Cn, c n , nn = 0, of /, the errors errors coefficients 0, ±1, ±1, ±2,..., ±2, ... , of j, and and graph graph the N
f(x) - L
cne inx
n=-N
for = 10,20,40. for N TV =
f:
f(x) e
lx 3. be defined by f ( x ) = the complex Fourier 3. Let Let / : [-1,1]-+ [—1,1] —> C be defined by = eix .. Compute Compute the complex Fourier coefficients Cn, cn, nn — = 0, 0, ±1, ±1, ±2,..., ±2, ... , of of f, /, and and graph graph the the errors errors coefficients N
f(x) - L cne7l"nx i
n=-N
Chapter 9. Chapter 9. More More about about Fourier Fourier series series
400
for N 10,20,40. (Note: (Note: You imaginary for N = = 10,20,40. You will will have have to to either either graph graph the the real real and and imaginary separately or just graph the modulus of parts of of the error error separately of the error.) 4. Consider the operator under 4. Consider the negative negative second second derivative derivative operator under periodic periodic boundary boundary conditions on [-f,f]. conditions on [—£,•£]. (a) Show Show that is an eigenpair. (a) that each each pair pair listed listed in in (9.2) (9.2) is an eigenpair. (b) that (9.2) (9.2) includes includes every every eigenvalue. eigenvalue. (b) Show Show that (c) Show Show that in terms given in in that every every eigenfunction eigenfunction is is expressible expressible in terms of of those those given (c) (9.2). (9.2). (d) Section 6.3, 6.3, and to those those derived derived in in Section and explain explain why why (d) Compare Compare these these results results to they consistent. they are are consistent. 5. Suppose that /f:: [—•£,•£] [-f,f] —> ~ C is defined by ff(x) = g(x] g(x) +ih(x), where 9g and (x) = + ih(x), where hh are are real-valued real-valued functions functions defined defined on on [-f,f]. [—i,£]. Show Show that that the the complex complex Fourier Fourier coefficients can can be be expressed in terms terms of of the the full full Fourier Fourier coefficients coefficients of of 9g and coefficients expressed in and h. h. 6. Prove that, that, for for any real numbers numbers 0 () and >., 6. Prove any real and A, ei(II+>') = ei () e i >..
(Hint: Use Euler's Euler's formula formula and trigonometric identities.) 7. Let TV 1, and and 7. Let N be be aa positive positive integer, integer, jj aa positive positive integer integer between between 11 and and N N — - 1, by define vectors u ERN e RN and v ERN e RN by Un
.
= cos ( jn~) N ,Vn = SIn (jn~) N ,n = 0,1, ... ,N \
\
/
1.
/
(For this exercise, it is convenient to index the components of xx E as (For € RN RN as 0,1,..., TV — 1, instead 1,2,..., TV as The purpose 0, 1, ... ,N - 1, instead of of 1,2, ... , N as is is usual.) usual.) The purpose of of this this exercise exercise is to is to prove prove that that
(a) is, u orthogonal. (a) u u·• v v= = 0, 0, that that is, u and and v v are are orthogonal. (b)
Ilull = IIvll = IN/2.
trick: The sum These results are based on the following trick: N-l
L
2
(e1fijn/N)
n=O
N-I
=
L (e
21fij N /
f
n=O
is aa finite formula. On On the other is finite geometric geometric series, series, for for which which there there is is aa simple simple formula. the other hand. hand, N-I
L
2
(e1fijn/N)
(9.3)
n=O 7r l n N can be ' J / by +i sin can be rewritten rewritten by by replacing replacing ee1fijn/N by cos cos (jnir/N) (jn~/N)+i sin (jrnr/N), (jn~/N), expandexpandthe square, square, and and summing. Find the the sum sum (9.3) (9.3) both both ways, ways, and and deduce deduce the ing the ing summing. Find the results above. results given given above.
401
9.2. Fourier series and the FFT FFT
9.2
Fourier series and the FFT FFT
We now show that there is a very efficient efficient way to estimate coefficients and estimate Fourier coefficients evaluate We will will use use the the BVP evaluate (partial) (partial) Fourier Fourier series. series. We BVP cf2u
-K,< x < £, dx 2 = f(x) ,-£ (9.4)
u( -e) = u(£), du(_£) = du(£) dx
dx
as our To solve solve this this by by the the method method of u as our first first example. example. To of Fourier Fourier series, series, we we express express u and f/ in in complex complex Fourier say and Fourier series, series, say 00
u(x) = n=-oo
(en, (cn, n n
= = 0, 0, ±1, ±1, ± ±2, 2 , ... . . . unknown) unknown) and and 00
f(x) =
L
dnei7rnx/f
n=~oo
(dnn,n differential equation equation can then be (d = 0,0,±l,±2,... ±1, ±2, ... known). known). The The differential can then be written written as as ,n = 22
00
'""' K,n ~
1f
£2
00
c
n
ei7rnx/f
n=-oo
= '""' d ei7rnx/f ~n,
(9.5)
n=-oo
and obtain and we we obtain (9.6) The The reader will will notice the similarity to how the the problem was solved solved in in Section Section 6.3.2. (The are simpler when using using the the complex Fourier 6.3.2. (The calculations, calculations, however, however, are simpler when complex Fourier series of the the full Fourier series.) the coefficient series instead instead of full Fourier series.) As As in in Section Section 6.3.2, 6.3.2, the coefficient do must must be zero, zero, that is,
1 f
f(x) dx = 0
~f
must hold, hold, in for aa solution to exist. When this this compatibility holds, must in order order for solution to exist. When compatibility condition condition holds, the value value of Co is not determined by the the equation infinitely many many solutions solutions exist, the of CQ is not determined by equation and and infinitely exist, differing the choice differing only only in in the choice of of cCo. 0. For analytic analytic purposes, purposes, the the formula formula (9.6) need. For For example, For (9.6) may may be be all all we we need. example, as as we discuss in Section 9.5.1, 9.5.1, (9.6) (9.6) shows that the solution uu is is considerably smoother we discuss in Section shows that the solution considerably smoother than the the forcing (since the the Fourier to zero zero faster than forcing function function f/ (since Fourier coefficients coefficients of of u decay decay to faster than those those of of /). f). However, However, in many cases, cases, we we want want to to produce produce aa numerical estimate than in many numerical estimate of the solution We may may wish, example, to to estimate the values values of on aa grid grid of the solution u. We wish, for for example, estimate the of u on so that we we can the solution solution accurately. requires three three steps: so that can graph graph the accurately. This This requires steps:
402
Chapter about Fourier series Chapter 9. 9. More More about Fourier series
1. the Fourier Fourier coefficients ±1, ±2,..., ±2, ... , TV, N, of by evaluating 1. Compute Compute the coefficients ddnn,, nn == 0, 0, ±1, of /f by evaluating
the the appropriate appropriate integrals. integrals.
2. ±1, ±2,..., ±2, ... , N, 2. Compute Compute the the Fourier Fourier coefficients coefficients en, cn, nn = 0, 0, ±1, TV, of of uu from from formula formula (9.6). (9.6). 3. Evaluate the partial sum sum 3. Evaluate the partial N
un(x) =
L
cnei7rnx/£
n=-N on Xj = jh, jj = ±2, ... ,,±JV, ±N, on aa grid grid covering covering the the interval interval [-f, [—I, f], I], say say Xj — jh, = 0, 0, ±1, ±1,±2,... /ih == £/JV. fiN. If produce accurate = If N JV is is chosen chosen large large enough, enough, this this will will produce accurate estimates estimates of of u(Xj), u(xj), jj — 0,±1,±2,...,±JV. 0, ±1, ±2, ... , ±N. Until this point, point, we necUntil this we have have implicitly implicitly assumed assumed that that all all of of the the calculations calculations necbe done various integration essary essary to to compute compute Uu would would be done analytically analytically (using (using various integration rules rules to to compute the necessary for example). This is is not not always compute the necessary Fourier Fourier coefficients, coefficients, for example). This always possipossinot always ble (some ble (some integrals integrals cannot cannot be be computed computed using using elementary elementary functions) functions) and and not always possible (because be more more efficient We desirable desirable when when it it is is possible (because there there may may be efficient methods). methods). We will therefore therefore consider will consider how how to to estimate estimate u. u.
9.2.1 9.2.1
Using the trapezoidal rule to estimate Fourier coefficients
We begin begin by We by estimating estimating the the integrals integrals defining defining the the Fourier Fourier coefficients coefficients of of f:/:
dn =
:f ill
f(x)e-i7rnx/l dx.
A A simple simple formula formula for for estimating estimating this this integral integral is is the the so-called so-called (composite) (composite) trapezoidal trapezoidal rule, which replaces the the integral by aa discrete be interpreted rule, which replaces integral by discrete sum sum that that can can be interpreted as as the the eiim rvf arooc nf trar^ovnirlc' sum of areas of trapezoids:
J{b g(x) dx = 2h a
(
g(xo)
+2
f;
N-l
g(Xj)
)
+ g(XN) + O(h2),
(9.7)
where hh = (b (b -— a)IN a)/N and = 0,1,2, 0,1,2,..., Figure 9.1 9.1 shows the where and Xj Xj = a a + jh, jh, jj = ... , N. N. Figure shows the geometric the trapezoidal trapezoidal rule is geometric interpretation interpretation of of the trapezoidal rule. rule. Although Although the the trapezoidal rule is generally the error for generally only only second-order second-order (that (that is, is, the error is is 0O (h2)), (h2}), it it is is highly highly accurate accurate for 64 periodic functions ,.64 periodic functions To rule to the computation we define To apply apply the the trapezoidal trapezoidal rule to the computation of of ddnn,, we define the the grid grid 0, ±1, ±1, ±2, ±2,..., ±N, hh = fiN. i/N. Then Then Xj = jh, jh, jj = 0, ... , ±N, Xj d n
. 1h
= 2f2
6 4 For
details, see any book on numerical analysis, for example, [2].
9.2. Fourier Fourier series and the FFT
403
0.2
0.6
0.4
0.8
x
Figure 9.1. 9.1. Illustration fllustration of of the the trapezoidal rule for for numerical numerical integration; Figure trapezoidal rule integration; the (signed) (signed) area area under under the the curve curve is is estimated estimated by by the the areas areas of of the the trapezoids. trapezoids. the
Since Since and and
h
2f
1 _ i7fnxj _ i7fnj 2N' l -]\i'
we can can simplify this to we simplify this to d n ..:.. - F n --
~
N-l
'~ " f·Je -i7rnj/N , n -- -N, -N +, I... O N , , ... , - 1, 2N.J=- N
(9.8)
where where
Ii
=f(xj), j=-N+l,-N+2, ... ,O, ... ,N-l
and and f-N
1
= 2 (/(-l) + f(l)).
The reader should take note note of the special _N, which which reduces reduces to simply The reader should take of the special definition definition of of ff-N, to simply f_ = /(-£) is 2^-periodic = f(l)). f(t}}. f-N = f(xf(X-N) f(-l) when when /f is 21-periodic (so (so that that f(-l) f(-l) = N = N) = The sequence F-N, F_JV+I, F_ N +1,"" F N - 1 is essentially The sequence of estimates estimates F-N, • • • , FN-I essentially produced by by discrete Fourier Fourier transform transform to to the the sequence f - N , f-N+i, f - N +1, ... f N -1, as applying the discrete applying the sequence /-AT, • • • ,, /jv-i, as we now now show. show. we
404
Chapter 9. More about Fourier series
9.2.2 9.2.2
The discrete transform The discrete Fourier Fourier transform
[-i, -f] Just as a function defined on \—i, —H\ can be synthesized from functions, each having a distinct distinct frequency, frequency, so so a finite sequence can be synthesized from sequences with distinct distinct frequencies. Definition 9.2. 9.2. Let 0,0,0,1,..., OM-I be a sequence numbers. Definition Let ao, al, ... , aM -1 be sequence of of real or complex numbers. -1 to the sequence sequence Then the discrete Fourier transform (DFT) maps ao, ao, al, a i , ... . . . ,, aM OM-I
where where An
=~ M
M-1 "a·e-27rinj/M L...J J , n
0 1, ... , M - 1. =,
(9.9)
j=O
The original sequence can be recovered by applying the inverse DFT: M-l
- 1. aJ. -- " L...JA n e27rinj/M , J. -- 0 , 1 , 2 , ...M ,
(9.10)
n=O
relationship is a direct calculation calculation (see (see Exercise 5). We We will often often The proof proof of this relationship to the the sequence A o0,A ,AM-1 as the refer to sequence A ,Ai,... the DFT DFT of ao,al, ao>«i, ... • • • ,aM-1, >«M-I, although 1, ... ,AM-I way to express the relationship relationship is the correct way is that A A o0,,Ai,..., A 1, ... , AM-I AM -1 is the image under DFT of of ao, OQ, a1, a i , ... . . . ,, aM-l OM-I (the (theDFT DFT isisthe the mapping, mapping, not notthe the result result ofofthe the under the the DFT mapping). This abuse of terminology is just a convenience, and is quite common. 1 1 we will write the sequence ao, a1, ... ,,OM-I aM -1 as {aj} ~01, As another another convenience, we 00,01,... {aj} ^ , or even even just {a,j} (if the of jj are are understood). understood). or just {aj} the limits limits of 1 an now show that the relationship relationship between the sequences {fJ }.f=--.!-N We will now {/jj^T. ^ and d can e {Fn};;==-~N can be expressed in terms of the DFT. (The reader will recall that [Fn}n=-N b expressed in terms of the DFT. (The reader will recall that i () is Fn = Fn == d d nn,, the the nth nth Fourier Fourier coefficient coefficient of of the the function function /f on on [—I,i}.} [-i,i].) Since Since eelQ is 27r-periodic, we have e-7ri(j+2N)n/N
= e-7rijn/N-27rin = e-7rijn/N e- 27rin = e-7rijn/N.
We can therefore write, for for nn = = -N, —N, -N —N + + 1, 1,..., N — 1, We can therefore write, ... , N - 1,
9.2. Fourier series and and the FFT
2~
=
405
N-l {
L
/je-1rijn/N
j=O
+
2N-l
L
} /j_2Ne-1rijn/N
.
j=N
If {jj}~:O-1 by If we we define a sequence {fj}?= *^ 0
J. =
{ Ij,
)
/j-2N,
j=0,1, ... ,N-1, = N, N + 1, ... , 2N - 1,
j
then have then we we have 2N-l
1 Fn -- 2N
"1~ je -1rijn/N ,
n -- - N , - N
+ 1, ... , N
- 1.
)=0 ze Moreover, by the periodicity of write Moreover, by the periodicity of eeifJ ,, we we can can write
2N-l
Fn
1rij (n+2N)/N =~ I, -l . 2N " ~ 1-·eJ , n = - N ,- N + , ... j=O
Defining the sequence (Fn}^0 l by
= O,l, ... ,N - 1, n = N, N + 1, ... , 2N - 1,
n
we we have have
F:n
2N-l
= _1_ 0, 1, ... , 2N - 1. 2N "~ f-·e-1rijn/N J , n = j=O
Thus {Fn} is is the DFT of of {]j}. {/j}. With Thus {Fn} the DFT With this this rearrangement rearrangement of of terms terms understood, understood, we we can say say that that {Fn} {Fn} is is the the DFT DFT ofJ/j}. of {fj}. can To actually compute {Fn}n~~N we perform perform the the following {Fn}n=-N from f rom {fj}f=-lN' {/jljL^-V' we three steps: three steps: 1. the sequence sequence 1. Replace Replace the !-N'···'
1-1, to, It,···, IN-l
with with
10, It,···, !N-I, I-N' ... ' 1-1,
.
l and label the latter latter sequence sequence as as {]j} {fj}2j~~:0-1 . 0
- 22N-l - 2N-l 2. Compute Compute the the DFT DFT of of {!j}j=o {fj} ^1 to to get get {Fn}n=O {F 2. n}^-i..
3. The The desired desired sequence sequence {F 3. {Fn};;==-~N is n}^~^N is
Chapter Chapter 9. More about Fourier series
406
The representation of the the original original sequence sequence in in terms terms of of its its DFT DFT and and the the comThe representation of complex exponentials viewed as plex exponentials can can be be viewed as trigonometric interpolation, interpolation, since since it it provides provides aa combination combination of of complex complex exponentials exponentials (and (and hence hence sines sines and and cosines) cosines) that that interinterf -N , f -N+1, ...• ,,/JY-I fN -1 and therefore polates the sequence sequence /_AT,/_JV+I,-• therefore the function /.f. To To be by precise, precise, define define aa function function I/ :: R R --t -» C C by N-1
L
I(x) =
(9.11)
n=-N
where Fn, ... is satisfies where F n == 0, 0, ±1, ±1, ±2, ±2,... is defined defined by by (9.8). (9.8). Then Then I/ satisfies n, n I (Xj)
= 1 (Xj) , j = - N + 1, - N + 2, ... ,N -
1
(9.12)
and and (9.13) (see (see Exercise Exercise 4). 4). 3 Example f(x) == x X3. Example 9.3. 9.3. We define define f : [-1,1] [—1,1] --t —>• R by /(#) . We will compute the interpolating function of the the previous with N 3. The The sequence {fj} previous paragraph paragraph with N = 3. sequence {h} interpolating function II of is (approximately) (approximately)
0, -0.29630, -0.037037,0,0.037037,0.29630
(recall f(X3))/2 = (f(-1) f(1))/2 = (-1 The (recall that that 1-3 /_ 3 = - (f(X-3) ( f ( x - 3 ) + fM)/2 (/(-I) + /(l))/2 (-1 + 1)/2 l)/2 = 0). Q). The 65 sequence {F {Fn} y65 by n} is then given b F_ 3 == 1.9466.10- 17 + 1.5519. 1O- 17 i, F-2 == 3.7066.10- 17
-
F-1 == -1.0606.10- 16
7.4842· 1O- 2 i,
+ 9.6225· 1O-2 i,
17
Fo == 3.7007.10- , Fl == 1.4501· 10- 17 - 9.6225· 1O- 2 i, F2 == -4.6788.10- 17 + 7.4842· 1O- 2 i. In Figure 9.2, 9.2, we we display display the the function f , the the sequence sequence {h}, {fj}, and and the the interpolating In Figure function f, interpolating function function 2
I(x)
=
L
Fnei7rnx/l.
n=-3
We We now now have have two two important important facts: facts: 1. 1. By By computing computing aa DFT, DFT, we we can can estimate estimate 2N IN of of the the complex complex Fourier Fourier coefficients coefficients of aa known of known function. function. 65 65The using aa built-in The calculation calculation was was performed performed in in MATLAB MATLAB using built-in function function for for computing computing the the DFT. DFT.
9.2. Fourier series and the FFT FFT
407
0.8
0.6 0.4
0.2
o x
0.5
Figure 9.2. The (x) = —x {fj}, and Figure 9.2. The function function ff(x) x 33,, the the sequence sequence {Ii}, and the the trigonotrigonotwnx metric (x) = __ F e (see Example 9.3). metric interpolating interpolating function function Ilex) = X) L~=-3 Fnei1rnx (see Example 9.3). n 3 n 2. coefficients of func2. Conversely, Conversely, given given the the first first 2AT 2N complex complex Fourier Fourier coefficients of aa periodic periodic function, estimate the + 11 nodes) we can can estimate the function function (on (on aa regular regular grid grid with with IN 2N + nodes) by by tion, we computing DFT. computing an an inverse inverse DFT. These significant because is aa fast fast algorithm algorithm for DFT; These facts facts are are significant because there there is for computing computing the the DFT; the fast fast Fourier Fourier transform (FFT). this algorithm algorithm is is called, called, appropriately appropriately enough, enough, the this transform (FFT). There similar fast simply called the There is is aa similar fast algorithm algorithm for for the the inverse inverse DFT, DFT, which which is is simply called the inverse inverse FFT. FFT. A direct implementation implementation of (9.9) requires O((M) 2 ) arithmetic operA direct of formula formula (9.9) requires O((M)2) arithmetic operations compute aa DFT. on the other hand, can require ations to to compute DFT. The The FFT FFT algorithm, algorithm, on the other hand, can require as as little O(Mlog the little as as OeM log22 (M)) (M)) operations operations to to obtain obtain the the same same result. result. The The efficiency efficiency of of the FFT M; if FFT depends depends on on the the prime prime factorization factorization of of M; if M M is is the the product product of of small small primes, primes, then situation is then the the FFT FFT is is very very efficient. efficient. The The ideal ideal situation is that that M M be be aa power power of of 2; 2; in in this (M)) operation applies. There this case, case, the the O(Mlog OeM log22 (M)) operation count count applies. There are are many many books books that that explain how how the the FFT FFT algorithm algorithm works, works, such such as as Kammler Kammler [28], [28], Chapter 6. We We will will explain Chapter 6. not concern ourselves implementation of of the algorithm in but not concern ourselves with with the the implementation the algorithm in this this text, text, but 66 just regard regard the the FFT FFT as as aa black black box box for for computing computing the the DFT. DFT.66 just 66
66The FFT is of the the most most important important computer computer algorithms algorithms for for computational computational science science (indeed, (indeed, The FFT is one one of the cited mathematmathematthe original original paper paper [12] [12] announcing announcing the the algorithm algorithm is is reputed reputed to to be be the the most most widely widely cited ical paper paper of of all all time—see time-see [28], page 295). 295). For For this this reason, reason, implementations implementations of of the the FFT FFT exist exist on on ical [28], page every is also every major major computer computer platform platform and and it it is also aa feature feature of of computer computer packages packages such such as as MATLAB, MATLAB, Mathematica^ Maple. Mathematica, and and Maple.
408
Chapter 9. More about Fourier series
Using the the above above results, we can can devise solving (ap(apUsing results, we devise an an efficient efficient algorithm algorithm for for solving proximately) BVP (9.4): (9.4): proximately) the the BVP 1. FFT, estimate the Fourier Fourier coefficients coefficients d-w,d-N+i, d-N, d_ N +1 , ... , dN -1 of 1. Using the FFT, estimate the • • •,djv-i of f./.
2. Use (9.6) 2. Use (9.6)totoestimate estimatethe thecorresponding corresponding Fourier Fourier series seriesofofthe thesolution solution u.u.
3. to estimate of uu on FFT to estimate the the values values of on the the grid grid —i, -i, —l+h,..., -i+h, . .. , i—h, i-h, 3. Use Use the the inverse inverse FFT h = iiN. t/N. h Example solution of of Example 9.4. 9.4. We We use the the above algorithm algorithm to to estimate estimate the solution
d2 u
- -dx 2 = x 3 ' -1
< x < 1,
-
u( -1) = u(l),
(9.14)
du (-1) = du (1).
dx
dx
The forcing forcing function function f(x] f(x) = satisfies the the compatibility as can The = xx33 satisfies compatibility condition, condition, as can easily easily be verified. An An exact exact solution solution is )/20, which to choosing choosing be verified. is u(x) u(x) = = (x (x -— xx55)/2Q, which corresponds corresponds to Co the Fourier Fourier series CQ = = 00 in in the series 00
u(x) =
L
cn ei 7l'nx.
n=-oo We will use = 2277,; which which makes the FFT FFT particularly particularly efficient. efficient. We will use N N = 128 128 = makes the implemented by by the the FFT, FFT, we we produce produce the the estimates (9.8), implemented estimates
Using Using
(Recall f-128 is average of f(-l) and /(I); f(l); in case, this aver(Recall the the /_i28 i$ taken taken as the average of f(—1) in this this case, age is indicate accuracy of the the computed computed Fourier Fourier coefficients, coefficients, we we graph graph the age is 0.) To To indicate accuracy of the logarithm of the the absolute absolute error error in interpolating function logarithm of in the the resulting resulting trigonometric trigonometric interpolating function as given given by Figure 9.3. 9.3. As As this graph shows, shows, the error is II(x), ( x ] , as by (9.11), (9.11), in in Figure this graph the error is essentially essentially zero at interpolation nodes nodes and and very very small small in in between, between, except near the zero at the the interpolation except near the endpoints endpoints where Gibbs's Gibbs's phenomenon is is evident (because (because f is is not not periodic). (We (We graph the the of the magnitude of logarithm logarithm of the error error because because of of the the great disparity in the magnitude of the error near the endpoints and and in in the interior of of the the interval. interval. If If we we graphed graphed the the error error itself, near the endpoints the interior itself, only the of the only the Gibbs's Gibbs's phenomenon would be be discernible on on the scale of the graph.) graph.) We next compute the the estimates ... ,0127.' We next compute estimates 0/c_i28,C-i27 of C-128, C-127, 5... ,C127: _ Cj
Fn = 22' n = ±1,±2, ... , n7f
and we we take Co = Finally, we we use the inverse inverse FFT FFT to produce the the estimates and take c$ — O. 0. Finally, use the to produce estimates 127
u- J.
--
'"'" ~
n=-128
i7l'jn/N , J. -- -128 , -127 , ... , 127. cne
9.2.
409
Fourier series and the FFT FFT
Log error in trigonometric interpolation
-15
-.:--20
g -5;
..Q
-25
-30
-4~~1---~0.8::-----:-0:-::.6---~0.~4--:-0~.2:----:0~-~0.2~~0~.4-~0.~6--:0~.8:--"""
Fi~ure 9.3. 9.3. Logarithm Logarithm of of error the trigonometric trigonometric interpolating interpolating function Figure error in in the function
I(x)
= 2:~~-128 Fnei1rnx/f
for f(x)
= x3 .
(See Example 9.4.)
We then have have We then
Uj == u C;8) , j = -128, -127, ... ,127. We graph the the error in the computed solution solution in Figure 9-49.4. We graph error in the computed in Figure
9.2.3 9.2.3
packaged FFT A note about using packaged FFT routines
There is is more more than than one one way way to to define define the the discrete discrete Fourier Fourier transform, transform, and and therefore therefore There various implementations implementations of of the the FFT FFT may may implement implement slightly slightly different formulas. For For various different formulas. formulas for the DFT and the inverse DFT are example, the formulas are asymmetric in in that the the factor of of 1/M 11M appears appears in in the the DFT DFT (9.9) (9.9) but but not not in in the the inverse DFT (9.10). (9.10). However, However, factor inverse DFT some software packages put put the the factor factor of in the the inverse inverse DFT DFT instead. instead. 67 It is some software packages of 11M 1/M in It is also possible to to make make symmetric symmetric formulas by putting putting aa factor factor of in each each of of also possible formulas by of 1/VM 1/vM in 68 the DFT DFT and and the the inverse inverse DFT. DFT.68 One can define the the DFT DFT while while indexing indexing from the One can also also define from -N to to N as in (9.8). -N N - 1, 1, as in (9.8). Given the the diversity diversity in definitions of of the the DFT DFT and therefore of the FFT FFT (which, (which, Given in definitions and therefore of the the reader reader should should bear bear in in mind, mind, is is just just aa fast fast algorithm algorithm for computing the the DFT), as the for computing DFT), it essential that that one one knows knows which which definition definition is is being being used used before before trying trying to to apply apply it is is essential aa packaged packaged FFT FFT routine. routine. 67
57MATLAB one such such package. MATLAB is is one package. 58Mathematica Mathematica does this by by default. does this default.
68
410
Chapter 9. about Fourier series Chapter 9. More More about Fourier series Error in computed solution
-1~--------~----------~--------~--------~
-1
-0.5
0 x
0.5
Figure 9.4. Error Error in computed solution solution in in Example Example 9.4. Figure 9.4. in computed 9.4-
9.2.4 9.2.4
Fast transforms and and other Fast transforms other boundary boundary conditions; conditions; the the sine transform transform discrete sine discrete
Fast transform transform methods methods are not restricted restricted to to problems problems with with periodic periodic boundary Fast are not boundary be defined defined that that are are useful useful for working with conditions. Discrete transforms can conditions. Discrete transforms can be for working with sine, cosine, cosine, quarter-wave and quarter-wave quarter-wave cosine series, as as well well as as with with the sine, quarter-wave sine, sine, and cosine series, the full Fourier series. A comprehensive comprehensive source software for for the the corresponding corresponding fast full Fourier series. A source of of software fast transforms is is [48]. transforms [48]. As an an example, example, we discuss the discrete sine transform (DST) and and its use in solving problems with Dirichlet conditions. The DST of a sequence ft, !N-1 solving problems with Dirichlet conditions. The DST of a sequence /i, 12, /2, •..• ·, • , /AT-I is defined by is defined by Fn
(.) = 2 N-1 ~ Ii sin 7r;J ,n = 0,1, ... ,N -
1.
(9.15)
)=1
It be shown shown that that the the DST DST is its own own inverse, inverse, up up to to aa multiplicative multiplicative constant: It can can be is its constant: , F 1 , ••. applying N -1 produces the original sequence multiplied by applying the DST DST to F Fo0,FI, ...,, F FN-I 2N (see Exercise 9). 27V 9). In solving a BVP or an an IBVP with Dirichlet conditions, the main calculations calculations are:
1. computing computing the function; 1. the Fourier Fourier sine sine coefficients coefficients of of aa given given function; 2. computing computing the solution from its Fourier coefficients. coefficients.
411 411
9.2. Fourier series and the FFT
As the DFT Fourier series, series, we can solve solve these these problems approxAs with with the DFT and and complex complex Fourier we can problems approximately using DST. If If f/ e (?[(),£], then the Fourier sine sine coefficients coefficients of imately using the the DST. E e[O, el, then the Fourier of f/ are are cnvpn V>v given by 2
{l
cn=eJo f(x)sin
(n7rX) -e- dx, n=1,2,3, ....
Using — 0,1,2, 0,1,2,..., and the the trapezoidal trapezoidal Using the the regular regular grid grid Xj Xj == jh, jh, jj = ... , A/", N, h == t/N, elN, and rule, we we obtain rule, obtain
. C2" f (Xj ).sm (n7rXj) -e- h N-1
en =
~
j=1
where ( x j ) . The The trapezoidal rule simplifies simplifies due due to fact that sin(O) where fj fJ == ff(xj). trapezoidal rule to the the fact that sin (0) = sin (n7r) O. We We therefore see that the approximate (n?r) = = 0. approximate Fourier sine coefficients coefficients are f(xd, /(a^), f(X2), ... just a multiple of the DST of the sequence /(#i), ••••>, f(XN-d. f(%N-i)On the other hand, suppose the Fourier sine sine series series of On the other hand, suppose the Fourier of uu is is 00
u(x) = L
Cn
sin
(n;x)
n=1
and C2, .•. N -1 (or and we know know C1, Ci,C2,. - . ,, Ccjv-i (or approximations approximations to them). We then have, for jj = , 2 , .... . . ,, JNV-- l1,, = l1,2, N-l
.~ " Cn sm . (n7rXj) u (Xj ) = -en=1 N-l
.
7rnJ
(.)
= ~Cnsm N
'
and we see that can be estimated on on aa regular grid by by another another application application of of the the and we see that u u can be estimated regular grid DST. DST.
9.2.5 9.2.5
Computing the the DST DST using using the FFT Computing the FFT
As mentioned above, above, there are special special programs available for for computing As mentioned there are programs available computing transforms, transforms, such as as the the DST, DST, using using FFT-like FFT-like algorithms. algorithms. However, However, these are more more such these programs programs are 69 specialized and therefore less widely widely available FFT.69 Fortunately, available than the FFT. Fortunately, the FFT) and few additional DST can can be be computed using using the DFT DFT (and hence hence the the FFT) and aa few additional manipulations. We will will now explain how to do do this. this. manipulations. We now explain how to 69 69For MATLAB has but no no fast command. For example, example, MATLAB has an an FFT FFT command, command, but fast DST DST command.
412
Chapter 9. More about Fourier series
l We is We assume assume that that {Ii {fj}f}f=11 is aa sequence sequence of of real real numbers numbers and and that that we we wish wish to to =l 1 compute the the DST DST of of {Ii}. {fj}. We We define define aa new new sequence sequence {ij}~:0-1 {fj}™^ by by compute
h=
j=1,2, ... ,N-1,
Ij, {
-hN-j,
0,
~=N+1,N+2, ... ,2N-1, J = O,N.
We then define {Fn}2^ to be the DFT of {fj}:
2~
Fn =
2N-1
L
he-1rijnIN
j=O
1 = 2N
?= Ii cos
2N-1
-
z.
(7rJn .)
N
2N-1
- 2N
J~
L
-.
fJ sm
(7rJn . )
N
.
J~
Since we are interested interested in in the the DST, DST, we we will look at at the part of of F Since we are will look the imaginary imaginary part Fn, which n, which is (using the fact that /0 = = /AT is (using the fact that }o }N = = 0) 0) 1 Im(Fn) = - 2N
?= Ii- sin
2N-1
(7rJn . )
N
J=O
= _ 2~
{~}j sin (7r~n) + 2f1 }j sin (7r~n)} }=o
J=N+l
~-2~ {X;fjsm(~tn) - X;fN_jSin(~(j~N)n)} (using /N-J for 1,2,..., 1). We have (using the the fact fact that that fj+N jJ+N = = /ZN-N-J hN-N-j = IN-j for jj = = 1,2, ... , TV N — - 1). We have N-1 ~
- L.....-
I
N-j
.
sm
(
7r(j
+ N)n ) N
=-
j=1
N-1 ~
L.....-
I. j
sm
(
7r ( 2N - j)n ) N
j=1
= -
L
N-1
(
Ij
.
sin 2n7r _ 7r~n
3=1
=
?=
N-l
Ij
sin
7r~n ,
(.
)
J=1
and and so so
Im(Fn) It sequence It follows follows that that the the sequence
~ - 2~ { 2 X; /; sin ( ~tn) } .
)
413 413
Fourier series and the 9.2. Fourier the FFT
is is the the DST DST of of {lj}. {/_,-}. The reader reader should should note note that, that, when when using using the the FFT to compute compute the the DST, DST, N N The FFT to should product of should be be aa product of small small primes primes for for efficiency. efficiency. A similar technique technique allows allows one one to to compute compute the the discrete discrete cosine cosine transform transform (DCT) A similar (DCT) using 10. using the the FFT. FFT. The The DCT is explored explored in in Exercise 10.
Exercises 1. Define Define aa sequence sequence {Ii {fj}}= by 1. g~o by 0
fj
j (37r 10 ) .
. = sm
Compute the the DFT DFT {Fn} {Fn} of of {Ii} {fj} and and graph graph its its magnitude. magnitude. Compute 2. [—7r,7r] -+ —> R R be defined by = x Use the DFT to estimate 2. Let Let /f :: [-7r,7r] be defined by /(#) f(x) = x 22 .• Use the DFT to estimate complex Fourier Fourier coefficients coefficients Ccnn of of f, /, nn == -8, — 8 ,-7, — 7 ,... . . . ,7. , 7 . Compare Compare with complex with exact values: CQ =— 7r 7r22/3, /3, Ccnn = = 2(—l) /n 22 ,, n n == ±1, — 2( -I)nn/n ±I, ±2, .... exact values: Co
the the the the
3. Let Let f/ : [-1,1] [—1,1] ^ R be be defined defined by ( x ) = x(l The complex complex Fourier 3. -+ R by ff(x) x(I -- x22}. ). The Fourier coefficients of / are coefficients of f are Co =
0,
Cn
6i( -I)n
=
3 3
'
n7r
n = ±I, ±2, ....
DFT to estimate Use the the inverse inverse DFT estimate f/ on on aa grid, grid, and and graph graph both both f/ and and the computed estimate estimate on on [-1,1]. [—1,1]. Use Use C-16, c_ie, C-15,· c _ i 5 , .... . ,, C15. Ci5. computed
4. Show that, that, with with I/ defined defined by by (9.11), (9.11), the the interpolation interpolation equations equations (9.12) (9.12) and 4. Show and (9.13) hold. 5. Let Let ao, ao, aI, « i , ... . . . ,, aN CLN-I be aa sequence sequence of of real or complex complex numbers, numbers, and and define define 5. -1 be real or N-l
An
=
~ " a 'e-21Tinj/N ,n=" 0 1 ... , N- . 1 N~J j=O
that Prove Prove that
N-l
A n e21Tinj / N , J. -- 0 , 1 , ... , N - 1 . aJ. -- " ~ n=O
Hint: Substitute Substitute the formula for for A into Hint: the formula An n into N-l
L
Ane21Tinj/N
n=O
and interchange the order of of summation. summation. (A (A dummy dummy index, index, say say m, must be be and interchange the order m, must used in in place place of of jj in in the formula for for A Look for for aa geometric geometric series series and and use use used the formula An.) n.) Look
~ rn = ~
n=O
K
1
r +
-
r-I
1.
414
Chapter Chapter 9. 9. More More about about Fourier Fourier series series
6. Suppose uu satisfies periodic boundary £], and boundary conditions conditions on the interval [-£, [—•£,•£],
L <Xl
cnei1fnx/l
n=-(XJ
is the the complex complex Fourier Fourier series series of of u. Prove Prove that that is
is the the complex complex Fourier Fourier series series of of -cPu/ —d?u/dx is dx 22.• Use the DST to to estimate estimate the first 15 15 Fourier Fourier coefficients coefficients of of the function J(x) f(x} = 7. Use the DST the first the function = x(l -— x) on on the interval [0,1]. Compare Compare to to the exact values x(1 the interval the exact values an = -
4(-1 + (-I)n) 3 3 n7r
n = 1,2,3, ....
'
8. The The Fourier Fourier sine sine coefficients coefficients of of J(x) f ( x ) == x(l x(l -— x) on on [0,1] are are an = -
4(-1 + (_l)n) 3 3 n7r
n = 1,2,3, ....
'
Use Use the the DST DST and and a1, ai, a2, 02, ... • • • ,, a63 «es to estimate estimate /J on on aa grid grid with 63 63 evenly evenly spaced spaced points. points. 9. ... , IN-1 real numbers, 9. Let Let Jo,ft, /o, /i,..., /jv-i be be aa sequence sequence of of real numbers, and and define define Fo0,,F FI1, .... . . , FFN-I N- 1 by ,9N-1 by by (9.15). Then define 90,91, # 0 ,£i, ... • • • ,9N-i by 9j
N-1
=2L
(.)
= 0,1, ... , N
Fn sin 7r;; , j
- 1.
n=l
I[
Show that that QJ = 2N 2JV/j, 0,1,..., I. Hint: Hint: Proceed according to to the the Show 9j = fJ, jj == 0,1, ... , N N -— 1. Proceed according hint the fact vectors hint in in Exercise Exercise 5. 5. You You can can use use the fact that that the the vectors
(~)
sin sin (2~"') .
sm
((N~1)m1f) N
,
.
sin ( 1V ) sin (~)
sm
((;-1)j1f) N
N l1 - for are orthogonal in for j,j, m m= = 1,2,..., 1,2, ... , N N— -1, j :j:. m (see Exercise Exercise 3.5.7). in R RN l,j^m Also, each each of of these these vectors vectors has has norm norm \/N/1 (see Exercise Exercise 9.1.7). 9.1.7). IN/2 (see Also,
10. The The DCT DOT maps maps aa sequence sequence {h}f=o {fj}^=0 of of real real numbers to the the sequence sequence {Fn};;=o, {Fn}^=0, 10. numbers to where where N-l
(.)
Fn=Jo+2~fJcos 7r;} + (-l)nJN' n=O,l, ... ,N. 3=1
9.3. Relationship Relationship of sine and cosine series to the full full Fourier series
415
(a) Reasoning as in Section 9.2.4, 9.2.4, show show how can be estimate (a) Reasoning as in Section how the the DCT neT can be used used to to estimate the C[0,£j. the Fourier cosine coefficients coefficients of a function in C[O, fl. Section 9.2.4, show how the DCT estimate (b) Reasoning Reasoning as in Section neT can be used to estimate aa function function from from its its Fourier Fourier cosine cosine coefficients. coefficients.
(c) Modifying the technique presented presented in Section 9.2.5, show how to compute neT using the DFT nFT (and hence the FFT). FFT). (Hint: Given {f;}.f=o, the DCT {fj}?=0, - N-l define {&*£„ by define {fj} j=-N by jj=fljl, j=-N,-N+1, ... ,N-1,
and treat {jj}f=-l-N {fj}^-^N by the three step process on page 405.) (d) Show that the DCT neT is its own own inverse, up to a constant multiple. To be precise, show that if the DCT neT is applied to a given sequence and then the neT is applied to the result, one obtains DCT obtains 2N IN times the original sequence.
9.3 9.3
Relationship of of sine sine and and cosine cosine series series to the full Relationship to the full Fourier series Fourier series
In Section 9.1, we showed showed that that the complex and and full full Fourier series are are equivalent equivalent In Section 9.1, we the complex Fourier series function. We We will now show that both for a real-valued function. both the Fourier Fourier cosine and the Fourier sine series can be recognized as special cases of the the full Fourier series and hence of the complex Fourier series. This will show that the complex Fourier series is the most general concept. relationships between the various Fourier Fourier series for realTo understand understand the relationships valued must understand following terms: terms: we must understand the the following valued functions, functions, we Definition Let f : R R -+ Definition 9.5. 9.5. Let ->• R. R. Then Then f is 1. odd if f( -x) = f(x) for for all 1. odd if f(-x) = -—f(x) all xx E G R; R;
2. if f(—x) ( x ] for all xx E 6 R; R; 2. even even if f( -x) — = jf(x) for all 3. with period T if if T T > 0, ff(x (x + + T) T) = all xx E e R, R; and and this 3. periodic periodic with period T = f(x] f(x) for for all this T. condition condition does not not hold hold for any smaller positive value of ofT. Examples Examples of odd functions include polynomials with only odd powers and (x). Polynomials Polynomials with only even powers and and cos (x) are examples of even funcfuncsin (x). tions, while sine and cosine are the prototypical prototypical periodic functions (both have period 2?r). functions imply that the graph 27f). The algebraic properties properties defining odd and even functions of an odd function is symmetric through the origin, while the the graph of an even function is symmetric across the y-axis (see Figure 9.5). We will will show show that the full of an an odd odd function function reduces sine We that the full Fourier Fourier series series of reduces to to aa sine series, and that the full Fourier series of an even function reduces to a cosine series. We this preliminary preliminary result: result: We need need this
416
Chapter More about about Fourier Fourier series series Chapter 9. 9. More 2~---------r--------~
1 ~
O~----~~-r--+-----~
-1
-1
o
1
-2~--~----~----~--~
-2
2
-1
o
2
x
x
Figure Figure 9.5. 9.5. Examples of odd (left) (left) and even (right) (right) junctions. functions. Lemma 9.6. Lemma 9.6. 1. Suppose 1 -+ R is odd. odd. Then 1. Suppose f : R —>•
1ft
I(x) dx
= o.
2. f :R R —>• R is 2. Suppose Suppose 1 -+ R is even. Then
( I(x) dx
1-t
=2
(f(x) dx.
10
Proof. Suppose is odd. Then Proof. Suppose 1 / is Then
rt I(x) dx = 1f(x) dx + 10r£ f(x) dx. 1- t 0
l
Making variables x = the first integral integral on the right, we Making the change change of of variables = -s — s in the we obtain
rt I(x) dx = -1£ f( -8) ds + 10(f(x) dx 1-£ 0
=
-1£
I(s) ds
+
1£
I(x) dx (since I( -s) = - I(s))
= O. The result result for for even 1 / is proved by making the same change of variables. We can now derive the main result.
D
9.3.
Relationship of sine and cosine cosine series to the full Fourier series
417
2 Theorem L2(-e,e), suppose that Theorem 9.7. 9.7. Let f E 6L (—t,I), and suppose
f. is the full full Fourier series of f·
1. IfIf ff is odd, odd. then an
and bn =
= 0,
n
= 0,1,2, ...
~ 10£ f(x) sin (n;x) dx.
That is, the full full Fourier series (on [—1, [-e, f]) function is the same as i]) of of an odd function its Fourier sine series (on [0, el). [0,f\). If f is even, then 2. If bnn == 0, ... 6 0, nn == 1,2,3, l,2,3,...
and ao = an =
~ 10£ f(x) dx,
2 r£ C 10 f(x) cos (n7rx) -f- dx.
That is, the full full Fourier series (on [—1,1]) [-e, e]) of of an even function function is the same as its Fourier cosine series (on [0, fl). [Q,i]). Proof. If Proof. If f/ is is odd, odd, then then n7rx) f(x) cos ( -eis is odd odd and and
f(x) sin (n;x) is This, together with the yields the first result. result. is even. even. This, together with the previous previous lemma, lemma, yields the first If f/ is is even, even, then then If n7rx) f(x) cos ( -eis even and is even and
f(x) sin (n;x) is odd. From we obtain the second conclusion. Prom this we
0
We can can use use the preceding result in the we wish wish We the preceding result in the following following fashion. fashion. Suppose Suppose we to understand understand the the convergence the Fourier sine series of f/ : (0, (0, f) -+ R. to convergence of of the Fourier sine series of i) —>• R. Define Define fodd :'•(-f, f) —>• -+ R, the odd odd extension of of /,f, by fodd (—£•,£) R-5 the by
f(x), o<x<e, fOdd(X) = { _ f( -x), -e < x < 0.
418
Chapter 9.
More about Fourier series
Then, by the previous theorem, the (full) (full) Fourier series of ffodd /, 0dd is the sine series of f, so the convergence of of the the sine sine series series can can be understood in in terms of the the convergence so the convergence be understood terms of convergence of a related related (full) Fourier series. Similarly, f) --t we define : (-f, Similarly, given given /f :: (0, (0,^) -> R, R, we define ffeven (—£,£)f) --t -> R, R, the the even even f, by extension of /, f(x), 0 < x < f, feven(x) = { f( -x), -f < x < O. The Fourier series of ffeven f, so, of so, again, the convergence of even is the cosine series of /, the cosine series can be examined in terms of the convergence of a related related Fourier series. Figure 9.6 9.6 shows the odd and even extensions extensions of /f : [-1,1] [-1,1] --t ->• R defined by ff(x) ( x ) = 11 + x. x.
v
2 1
,,
2
1
,,
V
,
>- 0
>- 0 -1
-1
~' ~ ~ ~
-2 -2
~.
-1
o X
1
2
-2 -2
-1
o
1
2
x
Figure 9.6. The The function = 1l + xx and and its its odd odd (left) (left) and and even even (right) (right) Figure 9.6. function f(x} f(x) = extensions.
Exercises 1. = x on 1. Compute Compute the the Fourier Fourier sine sine series series of of ff(x) (x) = on the the interval interval [-1,1] [—1,1] and and graph graph
the sum of the first 50 terms on the interval [-3,3]. [—3,3]. To what function does the series appear appear to converge? What is the period of this function? function?
2. Compute the Fourier cosine series of ff(x) (x) = = x on the interval [-1,1] [—1,1] and graph it it on on the the interval interval [-3,3]. [—3,3]. To To what what function function does does the the series series appear appear to to graph converge? What What is is the the period period of of this this function? function? converge?
9.4.
419 419
Pointwise convergence of series of Fourier series
3. Suppose Suppose I/ : [0, [0,^] —>• R is continuous. continuous. 3. f] -+ R is (a) Under Under what what conditions f0dd continuous? continuous? conditions is is lodd (a) (b) Under Under what what conditions feven continuous? continuous? (b) conditions is is leven 4. Consider aa function function I/ : [—•£,•£] —>• R, and let cn, n = 0, 0, ±1,±2,... 4. Consider [-f, f] -+ R, and let Cn, n = ±1, ±2, ... be be its its complex Fourier coefficients. coefficients. complex Fourier (a) Suppose Suppose I/ is is odd. cn, nn = odd. What What special special property property do do the the coefficients coefficients Cn, = (a) 0, ±1, ±2,... ±2, ... have? have? 0, ±1, (b) Suppose I/ is is even. even. What special property do the cn, n What special property do the coefficients coefficients Cn, n = = (b) Suppose 0, ±1, ±2,... 0, ±1, ±2, ... have? have? 5. Show Show how how to relate the quarter-wave sine sine series series of of I/ : [0, [0,£| -> R full to relate the quarter-wave f] -+ R to to the the full 5. Fourier series series of function. (Hint: (Hint: This function will be denned Fourier of aa related related function. This other other function will be defined on the interval [-2^,2^].) on the interval [2£, 2£].) 6. Show Show how to relate relate the cosine series series of of I/ : [0, [0, t]f] —>• R to full 6. how to the quarter-wave quarter-wave cosine -+ R to the the full Fourier of aa related related function. will be be defined Fourier series series of function. (Hint: (Hint: This This other other function function will defined the interval interval [2f, 2£].) on the on [-2^,2^].)
9.4 9.4
Pointwise convergence convergence of Fourier series Pointwise of Fourier series
Given the relationships relationships that that exist exist among the various various Fourier Fourier series, series, it Given the among the it suffices suffices to to discuss the of complex complex Fourier Fourier series. series. The convergence of of other other series, series, discuss the convergence convergence of The convergence such the Fourier will then then follow follow directly. such as as the Fourier sine sine series, series, will directly. If real- or complex-valued function defined on [-f, f], the partial partial If I/ is is aa realor complex-valued function defined on [—.£, £], then then the sums sums w N
IN(X) =
L
cnei1fnx/l
n=-N
form sequence of of functions. functions. Before discussing the convergence of these partial form aa sequence Before discussing the convergence of these partial sums specifically, we describe different functions can sums specifically, different ways in in which which a sequence sequence of of functions can converge. converge.
9.4.1 9.4.1
Modes sequences of functions Modes of of convergence convergence for for sequences of functions
Given any any sequence sequence {IN {/AT}^ of functions defined defined on Given }]V'=1 on [a, 6] b] and and any any (target) (target) function function =I offunctions I, also on [a, [a, b], we define define three three types types of of convergence convergence of to I./. /, also defined defined on 6], we of the the sequence sequence to That we assign three different different meanings -+ /I as -+ oo." 00." That is, is, we assign three meanings to to "IN "/AT ->• as N N —>• 1. We say converges pointwise to to I/ on on [a, b] b] if, for each each x E [a, b], we 1. We say that that {IN} {/AT} converges if, for £ [a, 6], we have /jv(ar) ->• fI(x) ( x ) as as N ->• oo as N have IN(X) -+ N -+ 00 (i.e. (Le. |/(ar) If(x) -- /AT(X)| fN(X) I -)• -+ 0 as N -> -+ oo). (0).
°
2. We We say say that that {IN} {/AT} converges to /I in (or in in the 2. converges to in L L22 (or the mean-square mean-square sense) ifif ll/ ~ INII /wll —>• as ./V oo. The the (L2) (L 2 ) norm norm of real111-+ 0 as N —>• -+ 00. The reader reader will will recall recall that that the of aa real-
°
420
Chapter 9. Chapter
More about about Fourier series
or g on is or complex-valued complex-valued function function 9 on [a, b] b] is
Therefore, fN —> -+ f in in the the mean-square mean-square sense means that that Therefore, /TV sense means
lb
If(x) - fN(X)12 dx -+ 0 as n -+
00.
3. We say say that that UN} converges to to /f uniformly uniformly on on [a, [a, b] b] ifif 3. We {/AT} converges max {If(x) - fN(X)1 : x E [a, b]} -+ 0 as N -+
00.
Actually, this this definition definition is is stated stated correctly if all all of of the the functions involved Actually, correctly only only if functions involved are so that that the the maximum maximum is is guaranteed guaranteed to to exist. exist. The The general are continuous, continuous, so general definition is: {/AT} converges converges to on [a, if, given given any any te >> 0, 0, definition is: UN} to /f uniformly uniformly on [a, b]b] if, there exists exists aa positive positive integer integer N N,e such such that, that, if if N N > ~ N N,e and and x E [a, 6], b], then there e [a, then \f(x) any If(x) -— /TV(X)| fN(X)1 < < e. t. The The intuitive intuitive meaning meaning of of this this definition definition is is that, that, given given any small tolerance e, t, by by going going far far enough enough out in the the sequence, sequence, /N fN will will approximate small tolerance out in approximate to within within this this tolerance tolerance uniformly, that is, is, on the entire /f to uniformly, that on the entire interval. interval. The following theorem shows that the the uniform uniform convergence convergence of of aa sequence sequence imimThe following theorem shows that plies its its convergence in the the other other two two senses. senses. This This theorem theorem is is followed followed by by examples plies convergence in examples that show show that that no no other conclusions can can be be drawn drawn in in general. that other conclusions general. Theorem 9.8. 9.S. Let Let {fN} sequence of of complex-valued defined on Theorem {/AT} be a sequence complex-valued functions defined [a,6]. -» C, it also [a,b]. //If this sequence converges uniformly uniformly on [a,b] to f : [a,b] [a,b]-+ C, then it mean-square sense. converges to f pointwise and in the mean-square
Proof. See Exercise 5. 5. Proof. See Exercise
0
Example 9.9. 9.9. We define Example define
Nx,
gN(X) =
{
1- N
0,
(x -
*') ,
O::;X<*"
< < N' 2 i.r::;x::;1. 1
N - x
9.7 shows shows the the graphs of of g§, g5, giQ, g1O, and and #20 g20·• Then {gN} converges pointwise Figure 9.7 zero function. Indeed, pAr(O) gN(O) = = 0 0 for all N, gN(O) -» -+ 0, 0, and ifif to the zero N, so clearly clearly pAr(O) 0 < xx ::; < 1, 1, then then for N sufficiently sufficiently large, large, 2/N 2/N < x. x. Therefore Therefore gN(X) gN(x) = 00 for all N N 0< for N for all sufficiently —> O. 0. sufficiently large, large, and and so so gN(x) gN(X) -+ 2 calculation shows that gN —>• -+ 00 in in L L2: A direct calculation :
9.4. 9.4.
421 421
Pointwise Pointwise convergence of Fourier series
Y=9 5 X - _. Y=9 10 (x) . _. _ Y=9 20 (X)
II
0.9 0.8 0.7
I
. if
i I
~ J~
0.6 !
,I
>-0.5 0.4
0.1 0.2
0.6
0.4
0.8
x
The functions functions 95,910,920 Example 9.9). 9.9). Figure 9.7. The g$, gw, #20 (see (see Example The convergence is uniform, since since The convergence is not not uniform,
max {19N(x) - 01 : x E [0, I)} = g
(~)
=
1 for all N.
Example Example 9.10. 9.10. This This example example is is almost almost the the same same as as the the previous previous one. one. We We define define
osx<:kr, < < fij, 2 ~ Sx S1
1 _ X fij
(see Figure 9.8). 9.8). We have HN hN -> -+ 0 pointwise pointwise on on [0,1], and and {hN} does not not converge converge (see Figure We have {h^} does uniformly to to 0 on on [0,1], by by essentially the same same arguments arguments as in the previous examuniformly essentially the as in the previous examIn this example, however, sequence also also fails fails to converge in in the L22 norm. norm. ple. In ple. this example, however, the the sequence to converge the L We have We have IlhN - 011£2 = =
11 f!:
Ih N (x)12 dx
-+
00.
Chapter 9. 9. More More about about Fourier Fourier series series Chapter
422
18
16
Ii
14
I I
I I
I
I
12
I I
I
>-10
I
I"
~I ,
8
II
I
~ 'i
\ \
,
6! " ~I
0.2
0.6
0.4
0.8
x
Figure 9.8. The The functions (see Example 9.10). Figure 9.S. functions h^, h5; HIQ, hlOJ H^Q h 20 (see Example 9.10). We saw saw in in Theorem Theorem 9.8 9.8 that that aa uniformly uniformly convergent convergent sequence sequence also also converges converges We pointwise mean-square sense. that neither pointwise and and in in the the mean-square sense. Example Example 9.9 9.9 shows shows that neither pointpointwise nor nor mean-square convergence implies implies uniform uniform convergence, convergence, while while Example Example 9.10 9.10 wise mean-square convergence shows that convergence does does not imply mean-square mean-square convergence. convergence. We We will shows that pointwise pointwise convergence not imply will see, the context context of of Fourier Fourier series, that mean-square convergence does does not see, in in the series, that mean-square convergence not imply imply pointwise convergence convergence either. either. pointwise 9.4.2 9.4.2
complex Fourier series Pointwise convergence of the complex
We function conconWe now now begin begin to to develop develop conditions conditions under under which which the the Fourier Fourier series series of of aa function verges pointwise, uniformly, and and in in the the mean-square mean-square sense. sense. We We begin with pointwise verges pointwise, uniformly, begin with pointwise convergence. convergence. The partial partial Fourier Fourier series series as integration against against a a kernel kernel The as integration
Our point is partial Fourier Our starting starting point is aa direct direct calculation calculation showing showing that that aa partial Fourier series series of of aa function f/ can can be be written written as as the the integral integral of of f/ times times aa term term from from aa delta delta sequence. sequence. function The part of that this The difficult difficult part of the the proof proof will will be be showing showing that this sequence sequence really really is is aa delta delta that it property. (Delta sequence; sequence; that that is, is, that it satisfies satisfies the the sifting sifting property. (Delta sequences sequences and and the the sifting property were discussed discussed in in Sections Sections 4.6 4.6 and and 5.7, 5.7, but the essence essence of of those those sifting property were but the discussion will be be repeated necessary to have studied discussion will repeated here, here, so so it it is is not not necessary to have studied the the earlier earlier sections. those section be modified sections. The The concepts concepts from from those section must must be modified slightly slightly here here anyway, anyway, to deal deal with with periodicity.) to periodicity.)
9.4. Pointwise convergence of Fourier series
423
We assume that Co, C±1, C±2, . .. are the complex complex Fourier Fourier coefficients coefficients of of 1 We assume that co,c±i,c±2,... are the / :
[-e,e]-+ c: [-*,<]->C:
C
n
= ;e [LL l(s)e-i7rns/L ds,
n
= 0, ±1, ±2, ....
We write write We n=-N
and then then substitute the formula formula for for Ccnn and and substitute the and simplify: simplify: IN(X) = ntN {
= [LL {
;e [LL l(s)e-i7rns/L dS} ei7rnx/L
;e ntN ei7rn(x-s)/f } I(s) ds.
We already already see see that that the the /N IN can can be be written written as as We (9.16)
Dirichlet kernel kernel KN KN is is defined defined by by where the the Dirichlet where
With the the formula finite geometric geometric sum, sum, With formula for for aa finite
and using using some clever manipulations, manipulations, we we can can simplify the formula formula for for KN KN considand some clever simplify the considerably: erably:
1
U
(e i7rli / i )N+1 _ e i7rIi / L -
(ei7rli / l
rN
1
(e i7rli / l (+1/2 _ (ei7rIi/L) -(N+1/ 2) U (e i7rl!/f) 1/2 _ (e i7rli/ f ) -1/2 1
424
Chapter about Fourier Chapter 9. More about Fourier series
1 ei n:(N+l/2)9/l
= 2l
_
e- i n:(N+l/2)(J/i
ei n:(1/2)(J / l _ e-in:(1/2)£J / l
., ((N+~)n:(J) 1 2~sm i 2i sin ( ~~ )
2l • sm
-
((2N+l)n:(J) 2l
2lsin (~n
The N = = 20, 20, is graphed graphed in Figure 9.9. The kernel KN, for TV 9.9. 25~---------r----------~--------~----------~
20 15
10
5
Figure 9.9. 9.9. The kernel K220 Q.• Periodic convolution
The convolution of two functions g9 : R -t and h : R -t The —> C and -» C is defined by
(g*h)(x) =
f
g(x-s)h(s)ds.
The integral integral sign without limits limits means means integration integration over over the the entire entire real real line line (we (we do do The sign without guarantee that these integrals integrals exists). not discuss here conditions on g9 and hh that guarantee The formula for convolution, except IN is is similar similar to to aa convolution, except that that the the integration integration is is over over The formula for /jv the fundamental property its the finite finite interval interval [—1,1]. [-f, fl. A A fundamental property of of an an ordinary ordinary convolution convolution is is its symmetry; of variables symmetry; the the change change of variables that that replaces replaces xx — - ss by by ss yields yields
f
g(x - s)h(s) ds =
f
g(s)h(x - s) ds.
9.4.
Fourier series Pointwise convergence of of Fourier series
425
A similar holds for that in provided the functions A similar formula formula holds for integrals integrals such such as as that in (9.16), (9.16), provided the functions involved are involved are periodic. periodic. A that if A direct direct calculation calculation shows shows that if g, #, hare h are 2C-periodic 2^-periodic functions functions defined defined on on R, R, then then
£ 1
_/(x - s)h(s) ds
= =
1x+£ x-£ g(s)h(x -
1£-l
s) ds
g(s)h(x - s) ds.
The last last step step follows follows from from the the fact fact that >-)• g(s)h(x is 2^-periodic, so its its The that s f-t g(s)h(x -— s) s) is 2C-periodic, and and so integral over any interval 2C is is the the same. We refer refer to integral over anv interval of of length length 21 same. We to
as as the the periodic convolution of of 9g and and h. We can extend the periodic convolution convolution to to nonperiodic nonperiodic functions by We can extend the idea idea of of aa periodic functions by C], then then its its periodic periodic using using the the periodic extension of of aa function. function. If If 9 g is is defined defined on on [-C, [—£, £], extension is gper ER R by by is the the function function g defined for for all all x G per defined
gper (X )
_ { g(x), g(x _ 2kC),
-
-C < x < C, (2k - l)C < x
< 2kC.
For example, we graph gper, g(x) = x on For example, in in Figure Figure 9.10 9.10 we graph the the function function g where g(x] on [-1,1]. [—1,1]. per, where For any 9 and h defined on [-C, C], periodic or not, we interpret the periodic For any g and defined on [—i, ^], periodic or not, we interpret the periodic convolution of and hh to be to be convolution of 9g and
We will will often often write convolution as as simply We write this this convolution simply
[ll g(x - s)h(s) ds, but 9g and are assumed to be be replaced their periodic but and hh are assumed to replaced by by their periodic extensions extensions if if necessary necessary (that is, if they they are are not (that is, if not periodic). periodic). 2C-periodic. Provided Provided the complex The kernel KN KN is is 2^-periodic. complex Fourier series series of of /f conconZ7rnx /£ verges, verges, the the limit limit is obviously obviously aa 2C-periodic 2£-periodic function function (because (because each each function function ei1fnx ^ is 2C-periodic). Therefore, extension of is 2^-periodic). Therefore, it is is natural natural to to consider consider ffpen , the periodic extension of per f, then have /, and and to to interpret interpret (9.16) (9.16) as as aa periodic periodic convolution. convolution. We We then have (9.17)
aa fact below. fact which which we we will will use use below.
426
Chapter 9.
More about Fourier series
3r-----~------~------~------~----~------~
2
-1
-2 -3~----~----~~----~----~~----~----~
-3
-2
-1
0
2
3
x Figure The periodic extension extension of [—1,1] -> R, g(x) x. Figure 9.10. The of g9 :: [-1,1)-+ g(x) — = x. KN as a a delta delta sequence KN as sequence
the kernel KN of An examination examination of the graph of the K^ (see Figure 9.9) shows that most of concentrated on a small interval O. The effect effect of this on its "weight" is concentrated interval around ()0 = = 0. the periodic convolution
integral produces a weighted average of the values of f, of is that the integral /, with most of the values of fI(s) effect is accentuated accentuated as the weight on the the ( s ) near s = — x. Moreover, this effect N -+ oo, 00, so that if 1 regular enough, we obtain obtain pointwise convergence. Thus KN KN N —> / is regular acts like a delta sequence (see Section 4.6). / be in order for for convergence to occur? It turns out that How regular regular must 1 continuity is not sufficient, there are continous functions on [-€, [-l, i]l) whose mere continuity sufficient, as there Fourier series fail to converge at an infinite number of points. Some differentiability differentiability necessary to guarantee we do not really want of 1 / is necessary guarantee convergence. On the other other hand, we we often often encounter discontinuities discontinuities in practical to require /f to be continuous, since we practical problems, of /, fper. I, then then of of fper. problems, if if not not of regularity for our purposes is that of piecewise smoothness. A suitable suitable notion of regularity We make the the following definitions. Definition 9.11. Suppose f is a real- or complex-valued complex-valued function function defined defined on (a,b), 9.11. Suppose (a,b), except possibly at a finite say that 1 except possibly finite number of of points. We say f has a jump discontinuity
427
9.4. Pointwise convergence convergence of Fourier series
at XQ (a, b) if at Xo EG (a, b) if lim f(x) and lim f(x) x-tx;-
x-txci
both both exist exist but but are are not not equal. equal. (Recall (Recall that that if if both both one-sided one-sided limits limits exist exist and and are are equal equal to ff(xo), ( x o ) , then then ff is is continuous continuous at at xx = — xo.) XQ.) to We piecewise continuous We say say that that ff is is piecewise continuous on on (a, (a, b) b) ifif 1. points in b); 1. ff is is continuous continuous at at all all but but aa finite finite number number of of points in (a, (a,b); 2. jump discontinuity; 2. every every discontinuity discontinuity of of ff in in (a, (a, b) b) is is aa jump discontinuity;
3. limx-ta+ lima._>a+ ff(x) ( x ) and and limx-tb\im.x_^b- f(x] exist. 3. f(x) exist. Finally, we we say that ff is is piecewise smooth on on (a, (a, b) b) if if both both ff and and df df/dx say that piecewise smooth Idx are are Finally, piecewise continuous piecewise continuous on on (a, (a, b). b). An example of of aa piecewise piecewise smooth smooth function function is is given given in in Figure 9.11. An example Figure 9.11. 10~------------------~------------------~
5
-
5
Figure 9.11. A function. Figure 9.11. A piecewise piecewise smooth smooth function. Before result, we we will Before we we give give the the main main result, we give give two two lemmas lemmas that that we will find find useful. useful. Lemma 9.12. 9.12. Lemma
(9.18)
Proof. This proved by by direct 4). Proof. This is is proved direct calculation calculation (see (see Exercise Exercise 4).
o
428
Chapter 9. More about Fourier series
The next lemma is called Bessel's inequality and follows directly from the projection theorem.
Lemma 9.13. 9.13. Suppose {0j ;: jj = = 1,2, l,2,...} is an an orthogonal orthogonal sequence sequence in in an Lemma Suppose {cPj ... } is an {infinite-dimensional} (infinite-dimensional) inner product space V, and f E € V. Then
Proof. N, Proof. By the the projection theorem, for for each each JV,
is N = span cP1 , cP2, N} closest N is is is the the element element of of the the subspace subspace V VN span {{>i, < / > 2... , . . . , cP 0jv} closest to to f, /, and and f/AT orthogonal N· Therefore, by the the Pythagorean theorem, orthogonal to to f/ -— f/N. Therefore, by Pythagorean theorem,
This implies that IlfNII~
::;
Ilfll~ for all N = 1,2,3, ....
cP1, c/>2, Moreover, since 0i, >2, cP3, ^>s, ... • • • are are mutually orthogonal, we have (also by by the the Pythagorea Pythagorea theorem) theorem) n
JVf
Therefore,
t
l(f, cPj)12 ::; j=l (cPj, cPj)
holds for each N, TV, and and the the result follows.
Ilfll~
0
Since a Fourier series is based on an orthogonal series, Bessel's inequality can be applied to to the the sequence sequence of of Fourier Fourier coefficients. coefficients. For For instance, instance, if if en, cn, n n = = can be applied 2 0, ±2, ... are Fourier coefficients L2( -f, f), then 0, ±1, ±1, ±2,... are the the complex complex Fourier coefficients of of f/ E eL (—l,l), then
(I, ei7rnx/l) and Therefore, Therefore,
9.4.
429
Pointwise convergence convergence of Fourier series
Bessel's inequality yields 00
n=-oo
Similar Fourier sine Similar results results hold hold for for Fourier sine or or cosine cosine coefficients. coefficients. We can and prove prove the main result pointwise converconverWe can now now state state and the main result concerning concerning the the pointwise gence Fourier series. that the Fourier gence of of Fourier series. The The reader reader should should note note that the convergence convergence of of the the Fourier series terms of properties of those of of series is is naturally naturally expressed expressed in in terms of the the properties of ffper rather than than those per rather /• f· Theorem 9.14. 9.14. Suppose Suppose f : (-i, -+ C smooth. Then the complex Theorem (—l,€)i) -» C is piecewise smooth. Fourier series of f,f, 00
L
cnei1fnx/l,
n=-oo
if converges to ffper(x) if x is a point of of continuity of of ffper, to per(x) per, and to 1 -2 [
lim fper(s)
s--+x -
+ s--+x+ lim fper(S)]
if fper has a jump jump discontinuity at x. if fper atx. Proof. As before, we write Proof.
L
=
1 £
N
fN(X)
cnei1fnx/l
=
n=-N
KN(S)f(x - s) ds.
-l
If ffper is continuous continuous at at x, then then If per is
fper(x)
1
= -2
[lim fper(s) s--+x-
+ s--+x+ lim fper(X)] .
From now on, for for conciseness, will write write /f rather than ffper and remember remember to to From now on, conciseness, we we will rather than per and interpret interpret ff(s) ( s ) in in terms terms of of the periodic periodic extension extension of of /f whenever s is outside outside of of the the infprval (-i, f — P i). t\ Also, Alsn -rarp writ.p we write interval
f(x-)
= s--+xlim f(s),
f(x+)
= s--+x+ lim f(s).
With this understanding, our our task is to to show show that, for each [—f.,1], With this understanding, task is that, for each x G E [-i,i], lim fN(X) =
N--+oo
~2 [f(x-) + f(x+ )].
To do do this, it suffices suffices to show that To this, it to show that 0
lim N--+oo
1 -l
1
KN(S)f(x - s) ds = - f(x+) 2
(9.19)
430
Chapter 9. More about Fourier series
and and
1
l
lim
N-+oo
1 0
KN(S)f(x - s) ds
= -2 f (x-).
(9.20)
We will that (9.20) is similar. Equation (9.20) is We will prove prove that (9.20) holds; holds; the the proof proof of of (9.19) (9.19) is similar. Equation (9.20) is equivalent eauivalent to
By (9.18), (9.18),
fl
1
'2 f (x-) = f(x-) 10
KN(S) ds
ft
= 10
KN(S)f(x-) ds,
so so
fl KN(S)f(x - s) ds -
10
! f(x-) =
fl KN(S) (f(x - s) - f(x-)) ds
10
2
~ fl f(x - s) ~/(x-) sin ((2N +
=
2i10
sin(u)
l)7rS) ds.
2i
We can recognize this integral integral as as 1/(2i) l/(2£) times the L inner product (on the interval We can recognize this times the L22 inner product (on the interval (0,£)) of the the functions functions (0, £)) of f(x-s)-f(x-) F(x)(s) = . ('IrS) sm 2l and and . ((2N + sm 2i .
l)7rX)
The sequence The sequence .. N - 0" 1, 2 ... } . ((2N+l)11'X) 2l { sln
is an orthogonal orthogonal sequence sequence with the L inner product (see, for for example, example, is an with respect respect to to the L22 inner product (see, Exercise Bessel's inequality Exercise 5.2.2). 5.2.2). Bessel's inequality then then implies implies that that
~
~o
1(
.
F(x),sm
((2N
+ l)7rS)) 12 < 00 2i
and therefore and therefore
~ f1f(x-s)-f(x-). ((2N+1)7rs)d 2£
10
sin (~;)
sm
2l
_(D . ((2N+1)7rS)) 2£
s-
.l'(x),sm
-t
O.
This is the desired result. result. This is the desired However, there is is one problem with (Lemma However, there one problem with this this argument. argument. Bessel's Bessel's inequality inequality (Lemma 9.13) requires F^ and and the the orthogonal sequence belong to aa common 9.13) requires that that F(x) orthogonal sequence belong to common inner inner product space. take this to be of all piecewise continuous product space. We We will will take this space space to be the the space space V of all piecewise continuous functions defined defined on on [0, [0,£|. Certainly the the functions functions functions £J. Certainly
. ((2N + sm 2£
l)7rX) ' N = 0,1,2, ...
431 431
9.4. Pointwise convergence of series of Fourier Fourier series
piecewise continuous). proof, therefore, therefore, belong belong to to V (continuous (continuous functions functions are are piecewise continuous). The The proof, to showing that F(x) E V. reduces reduces to showing that F^ e V. Since has only jump discontinuities, F(x) jump discontinuSince ffper only jump discontinuities, F( also has has only only jump discontinuper has x) also there is is aa zero the denominator. we show show ities, ities, except except possibly possibly at at s == 0, 0, where where there zero in in the denominator. If If we that that lim F(x)(s) s-+o+
exists number, this will show F(x) is is piecewise exists as as aa finite finite number, this will show that that F^ piecewise continuous, continuous, and and hence hence in V. Since Since /f and and df/dx each has at most of jump discontinuities, in df / dx each has at most aa finite finite number number of jump discontinuities, interval (O,E) and there is there is an an interval (0,e) such such that that the the function function s I-t !->• ff(x ( x - s) is is continuous continuous and differentiable E). It follows value theorem differentiate on on (0, (0,e). follows from from the the mean mean value theorem that, that, for for each each s €E (0,e), there exists 7 such that (O,E), there exists ISS Ee (0,1) such that
df f(x - s) - f(x-) = - dx (x - fSS)S. Also, by the the mean mean value value theorem, theorem, there Ass E Also, by there exists exists A € (0,1) such such that that
. (7rS) 7rS sm 2£ = cos (AS7rs) U 2£ .
°
Thus, for for all all s > 0 near zero, we have Thus, near zero, we have F(x)(s) = =
f(x-s)-f(x-)
. (1[8)
sm
2f
-1x(x - ISS)S cos (>'.1[S) 1[S
--"""--':7"'-,---'--
2l
2f
1x(x - ISS) cos (>'o1[S).1!:.. 2l
-+ -
~(x-) dx
1[
2£
as s -+ 0+ .
2l
This shows shows that that lims-+o+ lims_>0+ F( exists, which completes the the proof. This F(:r;)(s) which completes proof. x)(s) exists,
0
Example 9.15. R Example 9.15. We will compute the complex Fourier series of 9g :: [-1,1] [—1,1] -+ -> R defined by g(x) = x. 9.10 shows shows that thatggper is piecewise continuous defined by g(x) = x. Figure Figure 9.10 piecewise smooth, smooth, and and continuous per is except at integral of x. therefore expect expect that the Fourier series of of 9g will x. We therefore except integral values values of At the points of discontinuity, the converge to ggper(x) except when x is an integer. integer. At per(x} except average of of the leftleft- and right-hand limits is 0, 0, which which will be be the limit of of the series at those points. The The Fourier coefficients coefficients of of 9g are Co =
~ ill X dx = 0,
111 .
i(-I)n xe-1[mx dx = - - - , n = ±1, ±2, ....
en = -
2
-1
n7r
432 432
Chapter about Fourier Fourier series Chapter 9. More about
The partial Fourier series N
L
cn e7rin",
n=-N
for N = 10,20,40, are shown in Figure 9.12. for 10,20,40, are 1.5~-----r------r------r------r------r----~
-1 .5 I..-_ _ _ _--L._ _ _ _ _ _.L...-_ _ _ _--L._ _ _ _ _ _.L...-_ _ _ _--L._ _ _ _----l
-3
-2
-1
0
2
3
x
Figure 9.12. The partial Fourier series /4o f40 for Example 9.15. Figure 9.12.
The following results results can be derived the relationship relationship be beThe following can be derived immediately immediately from from the tween the the complex Fourier series various other other forms forms of Fourier series. tween complex Fourier series and and various of Fourier series.
Corollary 9.16. 9.16. Corollary 1. Suppose Suppose f : (-I, I) -t of (—£, i) -> R is piecewise smooth. Then the full Fourier series of j, f,
converges to !per(x) fper(x} if if x is a point continuity of of ffper, point of of continuity and to per, ana
~2 [lim fper(s) + lim jper(s)] s---+"s---+,,+ if jump discontinuity discontinuity at x. if ffper per has a jump atx.
9.4.
Pointwise convergence of Fourier series
433
2. Suppose ff :: (0, (0, £) t) -t —> R R is is piecewise and let let ffodd be the the periodic, 2. Suppose piecewise smooth, smooth, and periodic, odd odd 0dd be extension of of ff to to R (that (that is, is, the the periodic extension to to R of of the the odd odd extension extension extension periodic extension of °f f to t° (-£,£)). (—£•>£))• Then the Fourier sine series of of f,f, 00
Lb
n
sin (n;x),
n=l
converges x is point of converges to to ffOdd(X) if % is aa point of continuity continuity of of ffodd' and to to 0dd(%) if 0dd, and
if fodd has jump discontinuity if fodd has aa jump discontinuity at at x. x.
3. Suppose (0,£) —> R R is is piecewise and let let ffeven be the the periodic, even 3. Suppose ff :: (0, £) -t piecewise smooth, smooth, and periodic, even even be R (that periodic extension extension extension of of ff to toU (that is, is, the the periodic extension to to R of of the the even even extension extension of ff to to (-£, (—£,1)). Then the the Fourier cosine series series of of f,f, of £)}. Then Fourier cosine
converges to to leven(x) feven(x) if if xx is is aa point of continuity continuity of of leven, feven, and and to to converges point of
if leven feven has has aa jump discontinuity at atx. if jump discontinuity x. Proof. See See Exercise Exercise 6. 6. Proof.
0
ExalTIple R be periodic, odd odd Example 9.17. 9.17. Let Let If : (0,1) (0,1) -t —> R be defined defined by by ff(x) ( x ) = 1. 1. Then Then the the periodic, extension extension of of ff,, lodd, f0dd, is is defined defined by by f
() = {1, odd x -1,
if x E (2k, 2k + 1) (k an integer), if x E (2k -1, 2k) (k an integer)
(the so-called "square wave"). wave"). Thus Thus ffodd is discontinuous discontinuous at at every every integer integer value value of of (the so-called "square 0dd is x; at those those points of dicontinuities, dicontinuities, the the average average of of the the left left and and right right endpoints endpoints is is Xi at points of zero. partial sine sine series zero. Figure Figure 9.13 9.13 shows shows lodd f0dd together together with with its its partial series having having 5, 5, 10, 10, 20, 20, and 40 40 terms. terms. As the above above corollary corollary guarantees, guarantees, the the sine sine series converges to to ff at and As the series converges at every point of continuity continuity (every (every nonintegral nonintegral point, in this this case) case) and and to to zero at every every every point of point, in zero at point of discontinuity. discontinuity. point of We can can draw draw some some further further conclusions conclusions from from Theorem Theorem 9.14 9.14 and and Corollary Corollary 9.16: 9.16: We
434
Chapter 9. More Chapter 9. More about about Fourier Fourier series series
2~------------------~
2
- -
- -
6 ........ ...A
06 ......... 06
o -1
A
-1
-2 -2
-1
o
1
2
-2 -2
V ....
-1
A
~
.... V
o
A
A
V .... - .... V
2
x
X
2
2~------------------~
1
1 ....-
0
o
..
-1
-1
-2 -2
-1
o
x
1
2
-2~----------------~ -1 -2 o 1 2
x
Figure 9.13. square-wave function function from Example 9.17, 9.17, together with Figure 9.13. The square-wave its Fourier sine series with 5, 5, 10, 10, 20, and 40 terms. terms. Corollary Corollary 9.18. 9.18.
1. If If f : (-f, ~ C smooth, then ffper (—£,£)f) —> C is is continuous and and piecewise smooth, is continuous per is everywhere except ±3f, . ... It follows that the except {possibly} (possibly) at the points ±f, ±£,±31,— converges to f(x) f(x) for for all x €E (-f, f). Fourier series of of f converges (—i,i). If f : [—t,£\ [-f,f] ->• ~ C and f(—t] f( -f) = 2. If C is is continuous and and piecewise smooth, and = f(f), f(l), then ffper is everywhere, and so the of converges is continuous everywhere, Fourier series of f converges per to f(x] f(x) for for all x E [-f,f] {including € [—•£,•£] (including the endpoints}. endpoints). If f : [0, ~ R R is is continuous and periodic 3. If [0,1]f] —>• and piecewise smooth, then ffodd (the periodic 0dd {the of ff}) is extension of of the odd extension of is continuous everywhere everywhere except except {possi(possibly} 0, ±f, ... It follows that the Fourier sine series of f bly) at the points 0, ±£, ±2£, ±21, .— f(x) for all x E converges to f(x) e (O,f). (0,^).
4· If f :'• [O,f] ~ R R is continuous and f(O) == ff(f) 4- If [0,^] —>• and piecewise smooth, and and /(O) ( i ) == 0, then ffodd is continuous everywhere. of everywhere. It follows that the Fourier sine series of 0dd is converges to to f(x] f(x) for for all all xx €E [0,£] [0,£] (including {including the the endpoints). endpoints}. ff converges
9.4.
435 435
Pointwise Pointwise convergence of Fourier series
5. If If ff : [0, R is continuous and piecewise smooth, then ffeven periodic [0, t]£] -+ —>• R and piecewise even (the periodic extension of the even extension of of ff)) is continuous everywhere. everywhere. It follows that of f converges to f(x) [0,^] (including f(x) for for all x EG [0,£] the Fourier cosine cosine series of the endpoints). Proof. The directly from Corollary 9.16, 9.16, except Proof. The conclusions conclusions all all follow follow directly from Corollary except for for the the [0, £] -+ is following: following: If If /f : [0,1] —> R R is is continuous, continuous, then then ffeven is continuous, continuous, and and ffodd even is 0dd is continuous provided /(O) f(O) = f(£) = = 0.0. The reader is to verify verify these these conclusions conclusions continuous provided — f(i] The reader is asked asked to in D in Exercise 7. 7. D When ffper feven) is continuous everywhere, everywhere, we we can When (or ffodd, or feven) is continuous can draw draw aa stronger stronger per (or 0dd, or conclusion, as as we show in in the the next section. The The reader should note that, from from the the conclusion, we show next section. reader should note that, point of view of approximating approximating aa given given function, function, the series is powerful point of view of the cosine cosine series is more more powerful than everywhere for than the the sine sine series, series, since since ffeven is continuous continuous everywhere for any any continuous continuous /f : even is [0, Therefore, for Gibbs's phenomena phenomena cannot cannot occur with the [Q,£]£] -+ -» R. R. Therefore, for example, example, Gibbs's occur with the cosine function. cosine series series approximating approximating such such aa function.
Exercises 1. [-1f,1f]-+ R be be defined defined by by f(x) f(x) == x33 .. Does Does the the full full Fourier of 1. Let Let /f:: [-7r,7r] ->• R Fourier series series of f/ converge on R? is the the limit of the the series? converge (pointwise) (pointwise) on R? If If so, so, what what is limit of series? 3 2. Define Define f/ : [-2,2]-+ by f(x] f(x) = = x x3 + of 2. [-2,2] ->• R R by + 1. 1. Write Write down down the the limits limits of
(regarded as as aa function function defined defined on on [0,2]), (a) the the Fourier Fourier sine sine series of f/ (regarded (a) series of [0,2]), (b) the Fourier cosine cosine series series of of f/ (regarded (regarded as as aa function defined on on [0,2]), [0,2]), (b) the Fourier function defined and ((c) c) the the full full Fourier Fourier series series of of f./.
3. Find an example example of function f/ : [0, [0,1] —>• R such that that it it is is not the that 3. Find an of aa function 1] -+ R such the case case that the Fourier Fourier cosine cosine series series of of 1 / converges converges to / at at every every xx E € [0, [0,1]. the to 1 1]. 4. Using Using the 4. the original original formula formula for for KKN, N , K
N
(()) =
~ 2£
N
"'" ~
ei1fnO/l
,
n=-N
prove that (9.18) holds. 5. Prove Theorem Theorem 9.8. For simplicity, of the the functions are continuous. 5. Prove 9.8. For simplicity, assume assume all all of functions are continuous. 6. Prove Corollary 6. Prove Corollary 9.16. 9.16. 7. £] -+ R is continuous everyevery7. Suppose Suppose /f : [0, [0,1] —>• R is continuous. continuous. Prove Prove that that feven is is continuous where, and f(£) = where, and that that if if 1(0) /(O) == f(£) — 0, 0, then then lodd f0dd is is continuous continuous everywhere. 8. 8. (a) (a) Extend Extend Corollaries Corollaries 9.16 9.16 and and 9.18 9.18 to the the case case of of the the quarter-wave quarter-wave cosine series. series. (Hint: (Hint: see see Exercise 9.3.6.) 9.3.6.)
Chapter 9. More about Fourier series
436 436
by f(x] f(x) = x. To (b) Define /f :: [0,1] -+ -> R by = 11 + x. To what function does the quarter-wave cosine series of f/ converge? 9. (a) Extend Corollaries 9.16 and 9.18 to the case of the quarter-wave sine Extend Corollaries series. (Hint: (Hint: see Exercise 9.3.5.) (b) Define Define /f :: [0,1] [0,1] -+ —> R by = 11 + To what what function function does does the by f(x] f(x) = + x. x. To the (b) quarter-wave quarter-wave sine sine series series of of f/ converge?
9.5 9.5
Uniform Uniform convergence convergence of of Fourier Fourier series series
In the previous section, we the pointwise convergence of the Fourier series we proved the of of aa piecewise smooth smooth function. function. We We will now consider consider conditions conditions under under which which the the convergence uniform. The property of uniform convergence very dedeconvergence is is actually actually uniform. The property of uniform convergence is is very sirable, sirable, since since it it implies implies that that aa finite finite number number of of terms terms from the Fourier series series can approximate approximate the function accurately accurately on the entire interval; in particular, particular, uniform convergence rules out the possibility possibility of Gibbs's phenomenon, which was introduced in Section Section 5.2.2 5.2.2 and and will will be discussed further further below. in be discussed below. The rapidity with which Fourier series converges, and, and, in in particular, particular, whether The rapidity with which aa Fourier series converges, whether it converges or not, is intimately intimately related related to to the the rate at which which its its coefficients coefficients it converges uniformly uniformly or not, is rate at converge to zero. We We address this question first. first.
9.5.1
Rate of decay of Fourier coefficients coefficients
In we will n = In the following following theorems, theorems, we will show show that that the Fourier Fourier coefficients coefficients Ccnn,, n = 0, ±1, ±2, ... , of satisfy 0,±1,±2,..., o f f/ satisfy (9.21) determined by the degree of smoothness of f. where the exponent exponent kk is determined /. Recall that (9.21) means that there is is a constant constant M M > 0 such that M
Icnl :::; Inlk
for all
n.
The same condition condition that guarantees pointwise pointwise convergence convergence of of Fourier Fourier series series The same that guarantees also ensures that that the Fourier coefficients coefficients decay-converge decay—converge to zero-at zero—at least least as fast as as l/n, 1/n, n n == 1,2,3, 1,2,3, .... — fast Theorem £) -+ piecewise smooth, en, Theorem 9.19. 9.19. Suppose Suppose that that f : (-£, (—£,1) -> C C is is piecewise smooth, and and let let c n, nn = ±1, ±2, ... , be Fourier coefficients = 0, 0, ±1, ±2,..., be the the complex complex Fourier coefficients of of f. f . Then Then
Proof. finite number of discontinuities of of Proof. Since f/ is piecewise piecewise smooth, there are a finite f/ and/or We label points as as and/or dfldx. df/dx. We label these these points -£ <
Xl
< X2 < ... < Xm-l < £
437
9.5. Uniform convergence convergence of Fourier series
and write XQ Xo = xm We then then have have and write — -e, —t, x = e. t. We m =
Cn = ;e [ff !(x)e-i7rnx/f dx =
~ 21!
f= i j=l
X ; f(x)e- i7rnx /£ dx. X;-1
It then suffices to for each each jj = = 1,2, 1,2,..., It then suffices to show show that, that, for ... , m, m, x ; f(x)e-i7rnx/£ dx = 0 (~) . X;-1 Inl
i
Since f/ is is continuously continuously differentiable on (x ( x jj --1 i , X, Xj )j ,), and and the Since differentiable on the limits limits of of both both f/ and and df / dx exist the endpoints of this this interval, we can can apply apply integration integration by by parts parts to df/dx exist at at the endpoints of interval, we to obtain obtain x; X; df 'e [ -i7rnx/£] x; f(x)e- i7rnx /£ dx = f(x) e . __z_ _(x)e- i7rnx /£ dx X;_1 -z7fn/e X;_1 7fn X;-1 dx
i
i
=
!!... (!(x, - )e- i7rnx ;/f n7f J
i
f(x
'-1 J
+ )e- i7rnX ;_l/f)
X ; -df (x )e -i7rnx/f dx. 7fn X;_1 dx
- ie -
Since each of three terms terms is is bounded bounded by by aa constant constant times times l/lnl, Since each of these these three l/|n|, the the result result follows. We have have used used the the fact that! df /dx, being being piecewise piecewise continuous, continuous, are are follows. We fact that / and and df/dx, both bounded e). 0 both bounded on on (-e, (—1,1). When f/ has has some some additional its Fourier Fourier coefficients coefficients can be shown shown When additional smoothness, smoothness, its can be to decay more rapidly. Theorem 9.20. 9.20. Suppose Suppose f : (-e, C has the property property that its its periodic periodic extenTheorem (—(.,£)e) -+ —>• C sion and the first k — 2 derivatives of f are continuous, where kk >2, and the first k 2 derivatives of fper are continuous, where ~ 2, and and sion ffper per per the (k -— l)st derivative of f is piecewise smooth. smooth. If If c Cn, = 0, ±1, ±1, ±2,..., ±2, ... , are the l)st derivative n, n = Fourier coefficients complex Fourier coefficients of f,f, then
continuous and its derivative smooth, then particular, if In particular, if ffper derivative is piecewise smooth, per is continuous
Proof. Suppose / dx is piecewise smooth. smooth. Then, Then, by by inteinteProof. Suppose ffper is continuous continuous and and df df/dx is piecewise per is gration by by parts, parts, we have gration we have
I
t f(x)e-i7rnx/f dx
_£
= [-i7rnX/t]f f(x) e .
-Z7fn/e -t
__ z'e
1£
dlf i7rnx /£ dx _(x)e7fn -f dx
Chapter 9. More about Fourier series
438
iTfn since eel9 iIJ Since fjper -£+) = /(^—), j(£-), and e™ eiTfnn = ee-I7rn is 27r-periodic. per is continuous, fj((—(.+) Therefore, we obtain C
. Ie
n = __z_ 27m
-l
dj _(x)e-iTfnx/l dx dx
--~d n,
-
7rn
where d d n,, n n = 0, 0, ±1, ±I, ±2, ... , are the Fourier coefficients coefficients of dj /dx. By Theorem 9.19, ±2,..., df/dx. 9.19, we have s * \
and so and so
desired. as desired. The proof proof of the general Fourier coefficients coefficients general case is similar; one shows that the Fourier 11 k k1 1 k k2 2 j /dX Fourier coefficients j /dX of - f/dx of d kk~ ~ - are of order order I/Inl, l/|n|, the Fourier coefficients of d kk~- 22f/dx ~ - are of order l/|n| , and so forth forth to the desired to obtain obtain the desired result. result. 0 order 1/lnI2, and so Example 9.21. Example 9.21. 1. Define Define f : (-1,1) = x. Then fjper has jump discontinuities (—1,1) -t —> R R by fj(x) (x) = discontinuities per (at (2k -- 1), ±2, .. .), and, and, by 9.20, the (at x = (2k 1), kk = 0, 0, ±I, ±1,±2,...), by Theorem Theorem 9.20, the Fourier Fourier be of of order I/Inl. In fact, the Fourier coefficients coefficients coefficients of of f must be l/|ri|. In coefficients are Cn
i(-I)n 7rn
= - - - , n = ±1,±2, ... ,
with Co CQ = = 0. 0. with 2. Define Define f : (-1,1) x 22.. Then ffper is continuous, but its (—1,1) -t —>• R R by ff(x) (x) = = x per derivative has jump discontinuities discontinuities (at .. .J. By derivative has jump (at xx = = (2k (2k -— 1), kk = = 0, ±1, ±2, ±2,...). By Theorem Fourier coefficients In fact, Theorem 9.20, 9.20, the the Fourier coefficients of of ff must must be be of of order order 1/lnI2. l/|n|2. In fact, the Fourier coefficients are the Fourier coefficients are Cn
=
2(-I)n 2 2 ' n = ±I, ±2, ... , 7rn
with Co CQ = — 1/3. with 1/3. 3. Define ff :: (-1,1) by ff(x) = xx 55—2x -2x 33+x. are 3. Define (—1,1) -t —>• R by (x) = +x. Then Then ffper and its its derivative derivative are per and continuous, but its its second derivative has has jump discontinuities (at (atxx = (2k -1), —I), continuous, but second derivative jump discontinuities = (2k
Fourier series 9.5. Uniform convergence of Fourier series
439
kk = — 0, ±1, ±1, ±2, ±2,...). By Theorem Theorem 9.20, 9.20, the the Fourier Fourier coefficients coefficients of of ff must must be be of .. .). By of order 1/lnI3. l/|n| 3 . In the Fourier Fourier coefficients coefficients are order In fact, fact, the are Cn
=
-8i(n 2 7f2
15)( _1)n
-
55
'
7fn
n=±1,±2,... ,
with Co CQ =— 0. 0. with
4. Define ff :: (-1, 1) ~ f(x) = and 4- Define (—1,1) —>• R by by f(x] = X4 x4 -— 2X2 2x2 + + 1. 1. Then Then ffper and its its first first two two per jump discontinuities derivatives derivatives are are continuous, continuous, but but its its third third derivative derivative has has jump discontinuities {at (at = (2k (2k — - 1), = 0,±1,±2,...J. 0, ±1, ±2, .. .). By By Theorem Theorem 9.20, the the Fourier Fourier coefficients xx — 1}, kk = coefficients of ff must must be be of of order order 1/lnI4. l/\n 4 . In of In fact, fact, the the Fourier Fourier coefficients coefficients are are Cn
=
-24( -1)n
4 4 ' n=±1,±2,... ,
7fn
with Co CQ == 8/15. 8/15. with In In Figure Figure 9.14 9.14 we we graph graph the the error error in in approximating approximating each each of of the the above above four four functions functions by Fourier series series with with 41 lowest by aa truncated truncated Fourier 41 terms terms (the (the constant constant term term and and the the 20 20 lowest frequencies). The results results are are as as expected; expected; as as fIper gets smoother, the convergence of frequencies). The gets smoother, the convergence of per the Fourier Fourier series to 1 f becomes becomes more more rapid. rapid. the series to
9.5.2 9.5.2
Uniform convergence Uniform convergence
It now now follows follows immediately immediately that, if fIper is sufficiently sufficiently smooth, smooth, then its Fourier Fourier series series It that, if then its per is converges converges uniformly uniformly to to f./. Theorem Suppose piecewise Theorem 9.22. 9.22. Suppose ff :: (-l,l) (—1,1) ~ —> C C is is continuous, continuous, dfldx df/dx is is piecewise smooth, and and f(—i) = 1f ((l). l } . Then Then the the partial sums of of the the complex complex Fourier smooth, f (-l) = partial sums Fourier series series of 01 ff converge on RJ. converge uniformly uniformly to to f1 on on (—i,t) (-l,l) (and (and therefore therefore to to fIper on R). per
Proof. The boundary boundary conditions conditions imply imply that that fIper is continuous, continuous, so so by Theorem Proof. The by Theorem per is 9.14, we know that that the Fourier series series of of 1 / converges converges pointwise point wise to to !per fper on on R. R. We 9.14, we know the Fourier We must therefore therefore show show that that the convergence is is uniform. uniform. Since Since must the convergence 00
fper(x) =
L
cnei1fnx/£,
n=-oo
we we have have N
Iper(x) -
-N-l
L
cnei1fnx/l =
n=-N
L
00
cnei1fnx/£
+
n=-oo
L
cnei1fnx/£.
n=N+l
Therefore, Therefore, by by Theorem Theorem 9.20, 9.20, there there is is aa constant constant M such such that that -N-l
N
Iper(x) -
L n=-N
cnei1fnx/£
L
n=-oo
00
cnei1fnx/£
+
L n=N+l
cnei1fnx/£
440
Chapter 9. More about Fourier series
0.01 r--------------a
0.5
-0.01
-0.5 -1L------------~
-1
-0.5
o
-0.02 .......- - - - - - - - - - - - " -1 -0.5 o 0.5 1
0.5
X
X
10-4
5~X--------------------__,
_2L------------~
-5L-------------~
-1
-0.5
o
0.5
o
-0.5
-1
0.5
1
X
X
Figure 9.14. function from from Example Figure 9.14. The The errors errors in in approximating approximating each each function Example its partial partial Fourier 9.21 9.21 by by its Fourier series series with with 41 terms: terms: ff(x) ( x ) = xx (upper (upper left), left), ff(x) ( x ) = xx22 f(x) = x x44 -- 2X2 (upper (upper right), right), ff(x) ( x ) = xx 55 -— 2x 2x33 + + xx (lower (lower left), left), f(x] 2ar2 + + 11 (lower (lower right). right). -N-l
00
: :; 2:
ICnei1rnx/il
n=-oo
2:
ICnei1rnx/ll
n=N+l 00
:::; 2M
+
2:
1 n2
n=N+l
i1rnx / i I = = 1). This This holds holds for all all xx €E R, R, and so so (using the fact that Ieei7rnx/l N
fper(x) -
2:
00
cnei7rnx/i :::; 2M
n=-N
2: n=N+l
Since the infinite series series 00
1
Ln
n=l
2
1 2" for all x E R.
n
9.5. 9.5.
441 441
Uniform convergence convergence of Fourier series Uniform of Fourier series
is convergent, convergent, the of the series tends tends to zero, which which shows is the tail tail of the series to zero, shows that that N
fper(x) -
L
cnei'lmxll
n=-N
tends to zero at aa rate is independent independent of of xx E 6 R. This proves desired result. result. tends to zero at rate that that is R. This proves the the desired D
As of other As with with pointwise pointwise convergence, convergence, the the uniform uniform convergence convergence of other types types of of Fourier series can can be be deduced from their complex Fourier Fourier series. Fourier series deduced from their relationship relationship to to the the complex series. Corollary 9.23. 9.23. Corollary 1. Suppose (—t,i]I!.) -+ —>• R is continuous df/dx is piece1. Suppose ff :: (-I!., R is continuous and and piecewise piecewise smooth, smooth, elf / dx is piecewise Then the the full of ff converges converges wise smooth, smooth, and and f(—£) f( -I!.) = = /(£)• f(I!.). Then full Fourier Fourier series series of uniformly to ff on (—1,1) (and (and therefore therefore to on R). R,). uniformly to on (-I!.,I!.) to ffper per on 2. Suppose (0,^) -+ -> R is is continuous, = 2. Suppose ff :: (O,I!.) continuous, df/dx df/dx is is piecewise piecewise smooth, smooth, and and /(O) f(O) = f(l!.) = Fourier sine sine series series converges uniformly to to ff on on (-I!., I!.) f(i] = O. 0. Then Then the the Fourier converges uniformly (—£,£} (and hence to the periodic, periodic, odd of f,f, on (and hence to ffodd, odd extension extension of on all all ofR). ofH). 0dd, the 3. Suppose ff :: (0, I!.) —> -+ R is is continuous and df/ is piecewise piecewise smooth. smooth. Then Then 3. Suppose (0,£) continuous and df/dxdx is the Fourier converges uniformly (—i-,K)I!.) (and (and hence to hence to the Fourier cosine cosine series series converges uniformly to to ff on on (-I!., feven, the the periodic, periodic, even extension of on all all ofofH). R). feven, even extension of f,f, on
Proof. Proof· 1. This follows follows immediately from the the equivalence the full Fourier series 1. This immediately from equivalence of of the full Fourier series and and the Fourier series. series. the complex complex Fourier
2. This follows fact that sine series series of of f/ is full Fourier series of 2. This follows from from the the fact that the the sine is the the full Fourier series of fodd and from fact that that the of /f and and the conditions fodd and from the the fact the continuity continuity of the boundary boundary conditions /(O) = f(t] =a 0 guarantee guarantee that f(l!.) = that ffodd is continuous. continuous. f(O) = 0dd is 3. follows from series of series 3. This This follows from the the fact fact that that the the cosine cosine series of f/ is is the the full full Fourier Fourier series of from the the fact of /f guarantees guarantees that of feven feven and and from fact that that the the continuity continuity of that Seven feven is is continuous. continuous. D
The special property cosine series series is important; no no boundary conditions The special property of of the the cosine is important; boundary conditions must satisfied in order for convergence to Indeed, the relevant must be be satisfied in order for the the convergence to be be uniform. uniform. Indeed, the relevant boundary for aa cosine cosine series series are conditions, which boundary conditions conditions for are Neumann Neumann conditions, which involve involve df/dx. The Fourier cosine coefficients of /f are are 0O (1/lnI3) (l/|n| 3 ) or or 0O (1/lnI2) (l/|n| 2 ) according according df /dx. The Fourier cosine coefficients of to or does to whether whether f/ satisfies satisfies or does not not satisfy satisfy homogeneous homogeneous Neumann Neumann conditions conditions (see (see Exercise in either either case, series converges converges uniformly Exercise 4), 4), but but in case, the the Fourier Fourier series uniformly to to f./. Example 9.24. Let ff :: [0,1] -+ R be be defined f(x) = x 22.• Since Since ff does does not Example 9.24. Let —> R defined by by f(x) = x not satisfy the Dirichlet the sine on [0, [0,1]. satisfy the Dirichlet conditions, conditions, the sine series series does does not not converge converge uniformly uniformly on 1].
Chapter 9. More 'about Fourier Chapter 9. More-about Fourier series series
442 442
However, does not the Neumann conditions either, However, even even though though ff does not satisfy satisfy the Neumann conditions either, the the cosine cosine series does converge uniformly on illustrates these these results. results. series does converge uniformly on [0,1]. Figure Figure 9.15 illustrates Odd, periodic extension of x
2
Even, periodic extension of;
=
fi
: :
1\
1\
I
:!
0.8
0.5
ii
0.6 0 0.4 -0.5
0.2
-1
-4
-2
0
2
4
o~-~~-~--~-~
-4
x2 together with partial sine series 1.Sr-----------~
-2
o
2
4
x2 together with partial cosine series
1~--------------------~ 0.8 0.6
0.5 0.4 0 -0.5
0.2 0
0.5
0
0
0.5
Figure 9.15. (x) = — xx 22 by by sine cosine series (40 terms Figure 9.15. Approximating Approximating ff(x) sine and and cosine series (40 terms in each each series). series). in
Example 9.21, we showed several progressively smoother In Example several functions with progressively smoother periodic extensions. The smoother periodic extension, extension, the faster faster the Fourier periodic smoother the periodic Fourier coefficients decay to zero, and the better the partial Fourier Fourier series approximates the coefficients decay original original function. We now give an extreme example example of this. cos 27ra; Example 9.25. Define ff:: (-1,1) -t Then ffper and all 9.25. Define -»• R by ff(x) (x) = = eecos ( (21rJ;). ). Then and per of its derivatives are are continuous. By Theorem 9.20, the the Fourier Fourier coefficients coefficients of of ff of its derivatives continuous. By Theorem 9.20, of l/lnl. It is not possible possible to converge than any any power l/\n\. It is not to compute compute aa converge to to zero zero faster faster than power of formula for for these these coefficients that must be computed computed are are intractable), formula coefficients (the (the integrals integrals that must be intractable), but we we can discussed in 9.2. Figure Figure 9.16 9.16 but can estimate estimate them them using using the the techniques techniques discussed in Section Section 9.2. in estimating terms in in its its Fourier Fourier series. series. This This graph shows the error error in estimating ff with with 41 terms graph should be compared with with Figure Figure 9.14. should be compared 9.14-
9.S. 9.5.
Uniform convergence of Fourier Fourier series
443
2
o
-2
- 1
- 0 .5
o x
0 .5
cos(27ra; Figure 9.16. 9.16. The The errors errors in in approximating approximating f(x) ) by (27rx) Figure f(x) = eecos by its its partial partial Fourier series series with with 41 41 terms terms (see (see Example 9.25). Example 9.25). Fourier
9.5.3 9.5.3
A note about Gibbs's phenomenon
A standard standard theorem theorem in in real real analysis analysis is is the the following: following: If If aa sequence sequence of of continuous continuous A functions converges converges uniformly, uniformly, then then the limit function function is is also also continuous. continuous. Every Every parparfunctions the limit tial Fourier Fourier series series is is aa continuous continuous function, function, so so if if ffper is discontinuous, it is impossible is discontinuous, it is impossible tial per for its its Fourier Fourier series series to to converge converge uniformly. uniformly. Gibbs's Gibbs's phenomenon phenomenon is is the the nonuniform for nonuniform convergence of of the the Fourier Fourier series series near near aa jump discontinuity of of ffper. . Near the end end of jump discontinuity Near the of convergence per near aa jump jump discontinuity, Fourier the the 19th 19th century, century, Gibbs Gibbs showed showed that, that, near discontinuity, the the partial partial Fourier 70 series the jump jump70(cf. series overshoot overshoot the the true true value value of of f/ by by about about 9% 9% of of the (cf. Exercise Exercise 3). 3).
Exercises 1. Consider Consider the following functions functions defined defined on on [-1,1]: [—1,1]: 1. the following f(x) = lxi, g(x) = x - x 3 , h(x)=l+x. Rank f, /, g, g, and and hh in in order order of of the the speed speed of of convergence convergence of of their their Fourier Fourier series series Rank and illustrate illustrate with with graphs. eraohs. and 70
The 70 The
history is is briefly briefly described described by by Kammler Kammler [28], [28], page page 45. history 45.
Chapter 9. 9. More about Fourier Fourier series series Chapter More about
444
2. Find an example of a function -+ R whose Fourier coefficients coefficients are function /f:: [-1,1] [—1,1] —>• are
o
C:14)
but but not not
o C:15). (Hint: to be be a a fifth-degree fifth-degree polynomial.) (Hint: Choose Choose f/ to polynomial.)
3. Consider [— 1,1] —>• defined by Consider the the function function /f : [-1,1] -+ R defined by f(x) =
{O, -1::; x < 0, 1,
0::; x ::; 1.
Verify numerically numerically that that the the overshoot overshoot in in Gibbs's phenomenon is is about about 9% of Verify Gibbs's phenomenon 9% of the at xx = = 0. the jump jump at O.
4. Suppose f/ :: (0,^) is continuous continuous and smooth. 4. Suppose (0, £) -> -+ R R is and df/dx df / dx is is piecewise piecewise smooth. that the the periodic, periodic, even even extension extension of is continuous continuous and and therefore (a) Prove Prove that (a) of /f is therefore that / are 0O (1/lnI2). (l/|n| 2 ). that the the Fourier Fourier cosine cosine coefficients coefficients of of fare
(b) Prove (l/|n| 3 ) if (b) Prove that that the the Fourier Fourier cosine cosine coefficients coefficients of of /f are are 0 (1/lnI3) if and and only only ifif
! =! (0)
9.6 9.6
(£)
= O.
Mean-square convergence convergence of Fourier series Mean-square of Fourier series
We show that, of functions C, the the We now now wish wish to to show that, for for aa large large class class of functions f/ : (—1,1) (-£, £) —> -+ C, complex Fourier series of of I, /, complex Fourier series n=-oo
converges to to f/ in in the the mean-square mean-square sense. Mean-square convergence convergence means means that that ifif converges sense. Mean-square we write we write N
L
IN(X) =
cnei1rnx/f,
n=-N
then then
III - INII£2
-+ 0 as N -+
00.
In contrast contrast to to pointwise pointwise or uniform convergence, convergence, it it turns turns out out that that the the mildest mildest asasIn or uniform mean-square convergence convergence of of the the Fourier Fourier series. sumption about about I/ guarantees sumption guarantees mean-square series. In order order to to discuss discuss mean-square mean-square convergence, convergence, it it had had better better be be the the case that I/ In case that finite L £22 norm: has a finite
iff a
IIIII =
I/(xW dx
< 00.
9.6.
Mean-square convergence of Fourier series Fourier series
445
It turns out that essential assumption assumption is guarIt turns out that this this essential is the the only only assumption assumption required required to to guarantee to f/ in in the sense. To To justify justify antee the the convergence convergence of of the the Fourier Fourier series series to the mean-square mean-square sense. this statement, we some technical technicalities this statement, we must must begin begin with with some technical preliminaries. preliminaries. The The technicalities are subtle as as to have are sufficiently sufficiently subtle to be be beyond beyond the the scope scope of of this this book—the book~the reader reader will will have to accept certain assertions on faith. to accept certain assertions on faith.
9.6.1
The -.e,.e) The space L2( L2(-t,£)
We identify the the space space of functions f/ : (-i, (—(., i) i] —)• C such such that the complex We wish wish to to identify of all all functions -+ C that the complex Fourier series series of of f/ converges converges to mean-square sense. sense. Accepting the truth Fourier to f/ in in the the mean-square Accepting the truth of of the statement statement in define the in the the previous previous paragraph, paragraph, it it would would be be natural natural to to define L2(_£,£)
= {f: (-i,i)
-+ C :
f~l If(x)j2dx < oo}.
(9.22)
There is is more than meets more to to this this definition definition than meets the the eye, eye, however. however. There First of all, all, one one of essential properties norm is is the the following: following: First of of the the essential properties of of aa norm
11/11=0=*1=0.
(9.23)
When / is / = = 00 means / is the zero (x) = —0 for all When 1 is aa function, function, 1 means that that 1 is the zero function: function: fI(x) 0 for all 71 E (—1,1). (-i, i). As long as we restrict restrict ourselves to continuous functions, functions, (9.23) holds. holds.71 xe 2 However, norm equal to However, aa discontinuous discontinuous function function can can be be nonzero nonzero and and yet yet have have I/ L2 norm equal to zero. For example, consider the the function / : (-1, (—1,1) zero. For example, consider function 1 1) -> -+ R R defined defined by by
I(x) = {
I x = 0, '
0,
x
I:- O.
This function is the zero zero function, but This function is not not the function, but
since the zero everywhere everywhere except since the integrand integrand is is zero except aa single single point. point. Therefore, Therefore, in in order order for (9.23) (9.23) to agree that / and regarded as same for to be be satisfied, satisfied, we we have have to to agree that 1 and 9g are are regarded as the the same function provided function provided ill If(x) - g(x)j2 dx = O.
We say about We will will have have more more to to say about this this below. below. There is difficulty with with (9.22). Since our mean-square There is another another difficulty (9.22). Since our interest interest is is mean-square convergence convergence of functions, functions, the the following following property is desirable: If If UN} {/N} is a sequence 71 If f/ is is continuous continuous and and not not the function, then, an interval 71 If the zero zero function, then, by by continuity, continuity, there there must must exist exist an interval (a, 6) (—1,1) on which is nonzero, nonzero, and and so (a, b) C C (-t, t) on which /f is so
i:
must be positive. positive. must be
2
If(x)1 dx
~
lb
2
If(x)1 dx
Chapter 9. 9. More More about Fourier series Chapter about Fourier series
446
of functions in and /AT in the the mean-square sense, then L2((—£,l). offunctions in L L22(—l,l) (-f, f) and IN —>• --+ /I in mean-square sense, then /I 6 E L2 -f, f). Is satisfied by t) a.s as defined defined by (9.22)? The The answer answer is, is, it it depends depends Is this this property property satisfied by L?(-t, L2( -f, f) by (9.22)? on the the definition definition of of the integral used used in (9.22). For example, any any function with an an on the integral in (9.22). For example, function with infinite be Riemann Riemann integrable; integrable; a.s example, consider consider the infinite singularity singularity fails fails to to be as an an example, the function I/ : [-1, [— 1,1] defined by 1] —>• --+ R defined by function 1
I(x)
= IxI 1 / 4 '
This function function is is not on (-1,1) (—1,1) because of the discontiThis not Riemann Riemann integrable integrable on because of the infinite infinite discontinuity at x = 0. \f(x}\2 has has aa finite finite area area under its graph, as the following nuityat O. However, However, I/(x)12 under its graph, a.s the following calculation shows: calculation shows: lim { €---+o+
r-€ I/(xW dx + 1-1
/1 I/(xW dX} f
= lim 4(1 -
-IE)
= 4.
f---+O+
Therefore, we would to include we must Therefore, we would like like to include I/ in in L L22 (—1,1), (-1, 1), which which means means that that we must interpret the integral integral a.s as an an improper improper Riemann integral when has aa finite interpret the Riemann integral when I/ has finite number number of singularities. of singularities. However, allowing allowing improper since it it is is posposHowever, improper Riemann Riemann integrals integrals is is not not enough, enough, since sible to to construct with the sible construct aa sequence sequence {/N} {IN} with the following following properties: properties: 1. IN has has N infinite infinite discontinuities; 1. /jv discontinuities;
2. /TV IN
is square-integrable square-integrable when when the integral is is interpreted as an an improper Rieis the integral interpreted as improper Riemann integral; integral; mann
3. {IN} {/AT} converges converges in in the the mean-square mean-square sense sense to function with with an an infinite infinite number 3. to aa function number of discontinuities. of discontinuities. A function with with an an infinite infinite number of discontinuities discontinuities cannot cannot be Riemann integrable, integrable, A function number of be Riemann even in in the the improper improper sense. sense. even Faced with these these difficulties, difficulties, mathematicians eventually concluded concluded that that aa betbetFaced with mathematicians eventually ter notion notion of of integration integration was which was Lebesgue (the (the "L" ter was needed, needed, which was created created by by Henri Henri Lebesgue "L" 2 L2). integral is beyond in L ). The definition of the Lebesgue Lebesgue integral beyond the scope scope of this book, but we its important begins with with aa measure measure for for but we can can describe describe its important features. features. The The theory theory begins subsets of of R that with our intuition for for simple simple sets sets (for (for example, example, the measure subsets that agrees agrees with our intuition the mea.sure of The Lebesgue Lebesgue measure mea.sure is defined in fa.shion of an an interval interval [a, b] b] is is b-a). b — a). The is defined in aa consistent consistent fashion even for for very very complicated subsets of of R, but not for subsets. Sets Sets whose Lebesgue even complicated subsets but not for all all subsets. whose Lebesgue measure is is defined defined are are called called (Lebesgue) (Lebesgue) measurable. measurable. Any set with measure zero zero is mea.sure Any set with mea.sure is then certain sense. sense. Every set containing containing aa finite number of of points points ha.s has then neglible neglible in in aa certain Every set finite number mea.sure measure zero.72 zero.72 The Lebesgue Lebesgue integral defined for functions that that are the proppropThe integral is is defined for functions are measurable; the erty of of measurability measurability is like continuity continuity or or differentiability, differentiability, but but erty is aa regularity regularity property property like 72 72Some number of also have measure zero. A countable Some sets sets having having an an infinite infinite number of points points also have measure zero. A countable set set (a (a set be put put in in one-to-one with the the integers integers 1,2,3, ... ) has zero. set that that can can be one-to-one correspondence correspondence with 1,2,3,...) has measure measure zero. For example, example, the the set set of of all rational numbers measure zero. zero. Some Some uncountable sets also also have For all rational numbers has has measure uncountable sets have measure occupies aa neglible neglible part part of the real line. measure zero, zero, although, although, obviously, obviously, such such aa set set occupies of the real line.
9.6. 9.6.
Mean-square Mean-square convergence convergence of of Fourier Fourier series series
447
much much weaker-functions weaker—functions with with an an infinite infinite number number of of discontinuities discontinuities can can be be meameaWe cannot the precise these conceptssurable, for example. surable, for example. We cannot give give the precise definitions definitions of of these concepts— measurable measurable function, measurable set, set, measurable function, Lebesgue Lebesgue integral-in integral—in this this text. text. The The definidefinithe following consequences: tions, however, have tions, however, have the following consequences:
1. Two Two measurable measurable functions functions f/ and and 9a satisfy satisfy 1.
if if and and only only if f/ and and 9g differ differ only only on on aa set set of of measure measure zero. zero. It is is in in this this sense sense of that a set set of measure measure zero is negligible: functions differing differing only on aa set set of the same. measure regarded as being the measure zero zero are are regarded as being same. 2. If f/ is 2. is Riemann Riemann integrable, integrable, then then it it is is Lebesgue Lebesgue integrable, integrable, and and the the two two integrals integrals have have the the same same value. value. that whenever whenever we or This property assures us that This last last property assures us we are are dealing dealing with with aa continuous continuous or piecewise continuous function, function, we we can can compute compute its its integral integral using using the the familiar familiar techtechpiecewise continuous niques of caculus. caculus. On On the other hand, hand, the the Lebesgue Lebesgue integral integral is is sufficiently sufficiently powerful powerful the other niques of to handle pathological cases that arise mean-square convergence convergence to handle pathological cases that arise inevitably inevitably when when mean-square is properties of Lebesgue integration L22 ((—£,(.) -f, f) is studied. studied. We We will will discuss discuss other other properties of Lebesgue integration and and L below. below. We can now define L L22(—l,l) ( -f, f) more precisely as the set of all measurable measurable functions tions f/ : (-£, (—t,K)f) --t —> C C satisfying
with with the the understanding that that two two functions functions that that differ differ only only on on aa set set of of measure measure zero represent represent the same same element element of of the the space. space. In understand the we need two more more facts In order order to to understand the L2 L2 theory theory of of Fourier Fourier series, series, we need two facts 2 about L L2(—l.,l}, ( -f, f), facts that we we cannot prove here, as their development would take us too too far work. us far astray. astray. Even Even stating stating the the second second fact fact takes takes aa certain certain amount amount of of work. The The first first fact, fact, Theorem Theorem 9.26, 9.26, allows allows us us to to prove prove that that the the Fourier Fourier series series of of every every L2 L2 function function converges converges to to the the function function in in the the mean-square mean-square sense. sense. 2 Theorem EL L2( -£, e), and Theorem 9.26. 9.26. Let f e (—l,l), and let let Ee be be any any positive real real number (no (no matter matter how function 9g :: [-£, £] --t how small). small). Then Then there there is is an an infinitely infinitely differentiable differentiate function [—•£,•£] —>• C such that that
Moreover, 9g Moreover,
Ilf - gll£2 < E. can satisfy g( -f) = g(f) can be be chosen chosen to to satisfy g(—t] g(i] = O. 0.
This theorem simply says that any L L22(—t, (-£, £) (,} function function can be approximated approximated arusing aa smooth Dirichlet bitrarily well, bitrarily well, in in the the mean-square mean-square sense, sense, using smooth function function satisfying satisfying Dirichlet conditions. conditions.
448 448
9.6.2 9.6.2
Chapter 9. More about Fourier series
Mean-square convergence convergence of Fourier series
2 Accepting L2( -£, f), we now prove desired Accepting the the facts facts presented presented above above about about L (—£,£), we can can now prove the the desired result. result.
Theorem II /I E€ L2(_£,£), Fourier series series converges Theorem 9.27. 9.27. // L2(—l,t), then then its its Fourier converges to to fI in in L2. L2. That is, is, let That let n=-oo
be the the complex complex Fourier of fI,, and and define define be Fourier series series 01 N
IN(X) =
L
cneiomx/l.
n=-N
Then Then
III -
INII£2 --+ 0 as N --+
00.
Proof. We must must show show that for any any e€ > 0, 0, there there exists exists aa positive integer N 7Vfe such Proof. We that for positive integer such that that III - INIIL2 < € for every every N N :::: >N The proof proof is is aa typical argument—we show show that that /N is close close to to for N e•.. The typical e/3 €/3 argument-we IN is I/ by by using be specific, using the the triangle triangle inequality inequality with with two two intermediate intermediate functions. functions. To To be specific, let 9g be be aa smooth smooth function function satisfying satisfying g(—I) = g(i] and let g( -f) = g(£) and €
III - gll£2 < a' We will will show IN is to I/ (for N sufficiently by showing IN is is We show that that /N is close close to (for TV sufficiently large) large) by showing that that fw close gN (where the corresponding gN is close to to QN (where gN QN is is the corresponding partial partial Fourier Fourier series series for for g) and and QN is close to g- we we then then use use the the fact fact that that 9g is is close close to to I/ by by construction. construction. close to g; Let n ==: 0 0,, ±1, ±2, Let ddnn ,, n ±l,± 2 , ... . . . bbee the the Fourier Fourier coefficients coefficients of of g, p, and and define define N
gN(X) =
L
dnei7rnx/l.
n=-N
By Corollary Corollary 9.23, 9.23, QN on [-£, [—1, £], and and therefore positive By gN —>• --+ g9 uniformly uniformly on therefore there there exists exists aa positive integer N such that that integer Nf f such
It It follows follows that that
9.6.
449
Mean-square convergence convergence of Fourier series
and so and so
f
IIg - gNII£2 < 3' Finally, we have that iN gN is the partial the function g, and Finally, we have that /AT -— QN is the partial Fourier Fourier series series of of the function if -— g, and hence that that iN the projection onto the the space hence /AT -— 9N QN is is the projection onto space spanned spanned by by ei7rNx/l . e -i7rNx/l , e-i7r(N-l)x/l , ... , It that It follows follows that
Thus Thus we we obtain obtain
This This completes completes the the proof. proof.
0
we have this fundamental we can draw some Now Now that that we have obtained obtained this fundamental result, result, we can draw some further further conclusions. First, question of of terminology: the above above theorem theorem shows shows that that the the conclusions. First, aa question terminology: the nx 1 i7rnx complex exponentials ee™ = 0, ±1, ±1, ±2,..., ±2, ... , are complete complete in L2( -C, C). //£,, n = I/ 2 (—£,£).
Definition 9.28. 9.28. Let be an an (infinite-dimensional) (infinite-dimensional) inner inner product space. We We say Definition Let V be product space. say }i=l is that that an an orthogonal orthogonal sequence sequence {t/>j {
sense of norm on where where the the convergence convergence is is in in the the sense of the the norm on V. V.
The inner The completeness completeness of of an an orthogonal orthogonal sequence sequence in in an an infinite-dimensional infinite-dimensional inner product thus analogous property of of product space space is is thus analogous to to the the property of spanning spanning for for aa finite finite collection collection of vectors finite-dimensional vector vectors in in aa finite-dimensional vector space. space. Moreover, Moreover, orthogonality orthogonality implies implies linear linear independence, infinite-dimensional vector independence, so so aa complete complete orthogonal orthogonal sequence sequence for for an an infinite-dimensional vector space is analogous to a basis for a finite-dimensional vector space is analogous to a basis for a finite-dimensional vector space. space. A that is useful is A result result that is sometimes sometimes useful is the the following. following.
Theorem 9.29. 9.29. Let Let {t/>j {(f)j : jj = — 1,2, 1,2,...} be aa complete complete orthogonal orthogonal sequence sequence in in an an Theorem ... } be inner product space space V. inner product V. Then Then v E V,
(v,t/>j)v = 0 for all j = 1,2,3, ...
~ v
= O.
(9.24)
Proof. By ... }, we have, for Proof. By the the completeness completeness of of {t/>j {>j : j = 1,2, 1,2,...}, we have, for any any vv E e V, V, v =
f:
(v,t/>j)v t/>j. j=l (t/>j, t/>j)v
It follows follows immediately immediately that that if if (v,t/>j)v (v, 0j)y = = 00 for for all all jj = = 1,2,3, 1,2,3,..., = 0. It ... , then then vv = O.
0
450 450
Chapter 9. More about Fourier series
This result justifies justifies aa fact fact that that we we have have used used constantly constantly in in developing developing Fourier Fourier series This result series they have have the the same methods for for BVPs: BVPs: Two Two functions functions are are equal equal if and only only if if they methods if and same Fourier Fourier coefficients. coefficients. Corollary 9.30. 9.30. Let Let {¢j ... } be complete orthogonal orthogonal sequence sequence in Corollary {fij :: j = 1,2, 1,2,...} be aa complete in an an inner product product space space V. for any any u, u, v v E inner V. Then, Then, for e V, V, u = v {:} (u, ¢j)v = (v,¢j)v for all j = 1,2,3, ....
Proof. if u 0j)y = = (v, 0j)v for for all the other hand, Proof. Obviously, Obviously, if u = = v, v, then then (u, (u, ¢j)v (v, ¢j)v all j. j. On On the other hand, v (u, ¢j)v ¢j)v for for all all j, j, then then w w == uu — - vv satisfies satisfies if (u, if (f)j)v == ((v, > 0j)v (w,¢j)v =
°
for all j = 1,2,3, ....
By the implies that that w 0, that v. By the preceding preceding theorem, theorem, this this implies w = = 0, that is, is, that that u u = = v.
0
Finally, because because all all other Fourier series (sine, cosine, cosine, full, full, quarter-wave quarter-wave sine, sine, Finally, other Fourier series (sine, quarter-wave cases of the complex complex Fourier Fourier series, series, all of the the above quarter-wave cosine) cosine) are are special special cases of the all of above to these these other Fourier series well. For For example, we define define L L22 (0,^) (0, £) results extend extend to results other Fourier series as as well. example, we to be the the space space of of all all measurable measurable functions £) -+ R such such that that to be functions f/ : (0, (0,^) -> R
Then, if if /f e E£ L22(0, (0, £), i), the the Fourier Fourier sine of /f converges to /f in in the the mean-square Then, sine series series of converges to mean-square sense (see Exercise Exercise 6). sense (see 6). We have have now now completed completed the the basic basic theory theory used used in in the earlier chapters chapters of We the earlier of this this the next next section, section, we we discuss point for the sake of tying up aa book. In In the book. discuss one one further further point for the sake of tying up loose loose end. end.
9.6.3 9.6.3
Cauchy Cauchy sequences and completeness
We assume assume that that {¢j }~l is an orthogonal orthogonal sequence sequence in an inner inner product product space We {^j}^! is an in an space V and without loss loss of has norm norm one one (so the sequence sequence is is and also, also, without of generality, generality, that that each each ¢j (f>j has (so the orthonormal). v 6 E V and and orthonormal). If If v ,/,) (v,¢j)v aj= (v,'/'j v= (¢j,¢j)v' j=1,2,3, ... ,
then, by Bessel's Bessel's inequality, then, by inequality, DO
Llajl2 <
00.
j=l
We now now consider consider the converse: If a2, a3, . .. is is any of complex complex We the converse: If al, 01,02,03,... any sequence sequence of numbers satisfying satisfying numbers DO
9.6.
451
Mean-square convergence of of Fourier Fourier series
does does the series series
00
Laj>j
(9.25)
j=1
converge VI To consider this question, we write converge to to aa vector vector in in V? To consider this question, we write n Un
=
Laj>j, j=1
and m > n, then then and note note that, that, if if m m
n Un -
Um
m
= L:aj>j - Laj¢j = L j=1
j=1
aj>j.
j=n+l
It follows that that 2
m
IIUn
-
umll~ =
L
aj>j
j=n+1
v
00
::; L
lajl2
j=n+1
¢3, ... (using the orthogonality orthogonality of {¢1, {0i, ¢2, 02,0s, • • • }})).• Since we are assuming that (9.25) we conclude that holds, we 00
L
lajl2 -+ 0 as n -+ 00.
j=n+1
It follows follows that that
Ilun
-
umllv -+ 0 as m,n -+ 00.
This is is the mark mark of of a sequence sequence that "ought" "ought" to converge. Definition 9.31. Let V normed vector vector space, space, and and suppose suppose {un} sequence Definition 9.31. Let V be be aa normed {un} is is aa sequence in V. We say that that {un} for any any ef > there exists exists aa positive positive integer integer in We say {un} is is Cauchy Cauchy if, if, for > 0, there N such such that that m,n 2: N => Ilun - umllv < f,
or, in in brief, or, brief,
Ilun
-
umllv -+ 0
as m,n -+
00.
The terms of a Cauchy sequence "bunch up," up," as do the terms of a convergent sequence. Indeed, it is easy to show that every convergent sequence is a Cauchy
452 452
Fourier series Chapter 9. More about Fourier
sequence. the other hand, the sequence. On On the other hand, the converse converse (does (does every every Cauchy Cauchy sequence sequence converge?) converge?) depends on the space well as the norm norm of the space. depends on the space as as well as on on the of the space.
Example 9.32. 9.32. Define numbers {xn} {xn} by by the that Xn xn Example Define aa sequence sequence of of rational rational numbers the rule rule that is the the number number obtained obtained by by truncating truncating the the decimal decimal expansion expansion of of 11" IT after after nn digits digits {so (so xi = 3, 3, X2 3.14, and and so on). Then Then {xn} {xn} is is certainly certainly Cauchy Cauchy {ifm (ifm > n, n, Xl = X2 = 3.1, 3.1, #3 X3 = 3.14, so on}. then /x m —x -xnn\/ < lO-n+1}. However, the then \x W~n+1). However, the question question of of whether {xn} {xn} converges converges depends depends on the If the of rational rational numbers, on the space space under under consideration. consideration. If the space space is Q, Q, the the set set of numbers, then then {xn} fails to to converge. hand, if the space R, then then {xn} converges, {xn} fails converge. On On the the other other hand, if the space is R, {xn} converges, and number 11". and the the limit limit is the the irrational irrational number TT. example may seem This last last example seem rather trivial; it it just points out out the fact that that the real number system numbers that not rational, rational, and that without the real number system contains contains numbers that are are not and that without the irrational numbers there are "holes" in the system. The next example is more relevant to our study. relevant Example Define ff :: [0, 1] -+ by Example 9.33. 9.33. Define [0,1] -»• R R by f(x) =
{I, E[~,~) , X
0,
XE[2,1].
Let /AT fN :: [0,1] -+ function defined of Let —>• R R be be the the function defined by by the the partial Fourier sine series series of so with N N terms. terms. Then Then \\f IIf — - /N\\L* fNIIL2 ~* -+ 0 as as nn —> -+ °°j 00, so {fn} {In} isis convergent convergentand and f with hence Cauchy. However, if space under under consideration e[O,I], the the space space of all hence Cauchy. However, if the the space consideration is is (7[0,1], of all and the L22 norm, continuous functions defined defined on continuous functions on the the interval interval [0,1], and the norm norm is the the L norm, then not convergent convergent (since 1]). then {IN} {/AT} is is still Cauchy Cauchy and and yet is is not (since f ¢ 0 C[O, C[0,1]).
°
We see that the second example is analogous analogous to the first. 1], first. The space e[o, (7[0,1], 2 L2(0, 1), has some "holes" in it, at least which is a subspace of L (0,1), least when the norm is L22 norm. taken to be the L We have a name for a space in which every Cauchy sequence converges. Definition 9.34. Let V be normed vector vector space. space. If If every sequence in in V Definition 9.34. Let be aa normed every Cauchy Cauchy sequence converges to then we we say that V is complete. converges to an an element element of of V, then say that We now have two different different (and (and unrelated) uses for the word "complete." An orthogonal sequence in an inner product orthogonal product space can be complete, and a normed vector space can be complete. The above examples 1] under examples show that Q is not complete, and neither is e[O, C[0,1] 73 L22 norm. On the other is complete (as is Rn). the L norm.73 other hand, R is R n ). Also, the space 2 L2(0,1) L (0,1) is complete, the proof of which result is beyond the scope of this book. 73 73A A standard that e[O,I] under aa different different norm, norm, namely, namely, the standard result result from from analysis analysis is is that C[0,1] is complete complete under the norm of norm of uniform uniform convergence: convergence:
11/1100 =
max {If(x)1 : x E [0, In.
This from the if aa sequence sequence of continuous functions functions converges uniformly to to This result result follows follows from the fact fact that that if of continuous converges uniformly aa function, function, the the limit limit function function must must also also be be continuous. continuous.
453
9.6. Mean-square convergence convergence of of Fourier Fourier series 9.6. Mean-square series 2 Theorem Both real real and and complex L2(a, b) are complete spaces. Theorem 9.35. 9.35. Both complex L (a,b) are complete spaces.
We can now answer the the question question we at the of this section: If We can now answer we posed posed at the beginning beginning of this section: If is an an orthonormal sequence in in aa complex complex inner inner product space V and {a,j} is {{0j}
Llajl2 < 00, j=1
does does
00
L aj
converge an element element of of V? VI The The answer answer is if V is complete, the converge to to an is that that if is complete, the convergence convergence is guaranteed. is guaranteed. Theorem 9.36. 9.36. Let V be be aa complete (complex) inner inner product Theorem Let V complete (complex) product space, space, and and let let
then then
V. converges to an an element element of converges to ofV.
Proof. Since V is complete, it it suffices suffices to to show sequence {v {vn} Proof. Since is complete, show that that the the sequence of partial partial n} of sums, sums, n
Vn
=
L
aj
j=1
is Cauchy. Cauchy. If If m then is m > n, n, then m
Vm -
Vn
L
=
aj
j=n+l
and, {
Since the series
m
00
j=n+l
j=n+l
00
454
Chapter 9. More about Fourier series
is must converge which shows is convergent, convergent, its its tail tail must converge to to zero, zero, which shows that that
Ilvm This proof. This completes completes the the proof.
-
vnllv
-t
°as
n,m -t
00.
0
The The conclusion conclusion of of all all this this is is that that if if aa (complex) (complex) inner inner product product space space contains contains complete orthonormal orthonormal sequence sequence {cPj}, {0j}, then then there there is is aa one-to-one one-to-one correspondence correspondence aa complete between between V and and the the space space
The vector v E 6 V corresponds to {(v, cPj)v} (f>j)v} E G f2. ^ 2 - In certain regards, then, V and 2 f2 the same space, with the elements given different different names. We say that I are really the V and and £2 I2 are are isomorphic. isomorphic. In particular, particular, L2( -£, £) and £2 £) is isomorphic to L2(—l,l) I2 are isomorphic, and L2(0, I/ 2 (0,^) real £2.
Exercises 1. 1. Consider Consider the the sine sine series series
1
2: ;;: sin (mfx). 00
n=l 2 (a) L2(0, 1). (a) Explain Explain why why this this series series converges converges to to aa function function f/ E 6L (0,1).
(b) Graph the the partial sine series with N TV terms, for various values of N, TV, and and guess guess the the function function f. /. Then Then verify verify your your guess guess by by calculating calculating the the Fourier Fourier sine coefficients coefficients of of f./. sine
2. Consider Consider the the series series 2.
00
L
cnein7rx,
n=-oo
where Ccnn = lin 1/n for for n i' ^ 0, 0, and and Co CQ = — 0. where 0. 2 (a) this series L2( -1,1). (a) Explain Explain why why this series converges converges to to aa function function f/ in in (complex) (complex) £ (-l, 1).
(b) Graph Graph the the partial partial series series with 2TV + + 11 terms, terms, for for various various values values of of TV, and (b) with 2N N, and guess the the function function f. /. Then Then verify verify your your guess guess by by calculating calculating the the Fourier Fourier guess coefficients coefficients of of f./. 3. Does the sine series series 00
~
1
vn sin (mfx)
2 converge in the mean-square L2(0, I)? Why why mean-square sense to a function f/ E €£ (0,1)? Why or why not?
455 455
9.7. A note about about general general eigenvalue eigenvalue problems 9.7. A note problems
4. f(x) = X1//4(1 4. Consider Consider the the function function /f :: [0,1] [0,1] -t —»• R R defined defined by by /(#) =x (l -— x), and and its its Fourier Fourier sine sine series series 00
L an sin (mrx). n=l
(a) the convergence f? What What (a) Which Which of of the convergence theorems theorems of of this this chapter chapter apply apply to to /? kind of of convergence convergence is is guaranteed: guaranteed: pointwise, mean-square? kind pointwise, uniform, uniform, mean-square? (b) a2, ... ,a63 (One (b) Estimate Estimate aI, 01,02,... , OBS using using some some form form of of numerical numerical integration. integration. (One option to use possioption is is to use the the DST, DST, as as described described in in Section Section 9.2.4. 9.2.4. Another Another possibility is to the formula formula to use use the bility is an =
210
1
Xl/4(1_ x) sin (mrx) dx
and numerical integration. because of and some some form form of of numerical integration. In In this this case, case, because of the the singularity to change singularity at at xx =— 0, 0, it it is is aa good good idea idea to change variables variables so so that that the the integrand is is smooth. smooth. Use Use x = — s8 44.) integrand .) (c) (c) Graph Graph f/ together with with its its partial Fourier Fourier sine sine series. series. Also Also graph graph the the two functions. functions. difference between the difference between the two 5. values of 1]-t by ff(x) 5. (a) (a) For For what what values of k does does the the function function /f :: [0, [0,1] -» R R defined defined by (x) = = xk xk 2 belong L2(0, 1)? (Consider belong to to L (0,1)? (Consider both positive positive and and negative negative values of of k.) 1 4 1 4 (b) X- / . (b) Estimate Estimate the the first 63 63 Fourier sine sine coefficients coefficients of of ff(x) ( x ) = x" (c) Graph /(#) f(x) == x x--11// 44 ,, together together with its partial Fourier sine series (with 63 63 terms). terms). Also Also graph graph the the difference difference between between the the two two functions. functions. 2
6. Prove if f/ E 6L (Q,€), then the the Fourier Fourier sine sine series series of of f/ converges converges to to f/ in 6. Prove that that if L2(0, f), then in the the mean-square mean-square sense. sense. 7. 7. Let {Vj} {vj} be a sequence of vectors in a normed vector space V, and suppose Vj -t -> vv E E V. Prove Prove that that {Vj} {vj} is is Cauchy. Cauchy.
9.7 9.7
A note problems A note about about general general eigenvalue eigenvalue problems
We will will now We now briefly briefly discuss discuss the the general general eigenvalue eigenvalue problem problem -\7. (k(x)\7u) = AU in
u=
n,
(9.26)
°on an.
We assume assume that that n fJ is is aa bounded bounded domain domain in in R2 R2 with with aa smooth smooth boundary, and and that the coefficient kk is smooth function function of of xx satisfying satisfying fc(x) > ko ko > 0 for for all all xx E € n. f). the coefficient is aa smooth k(x) :2: We have have already already seen, seen, for for aa constant constant coefficient coefficient and and the case in in which which £) We the case n isis a rectangular rectangular domain or a disk, that (9.26) (9.26) has an infinite infinite sequence of solutions. solutions. Moreover, the the eigenpairs eigenpairs had certain properties properties that could verify directly: the the that we we could verify directly: Moreover, had certain eigenvalues were positive, forth. eigenvalues were positive, the the eigenfunctions eigenfunctions were were orthogonal, orthogonal, and and so so forth. The to the The properties properties we we observed observed in in Sections Sections 8.2 8.2 and and 8.3 8.3 extend extend to the general general eigenvalue eigenvalue problem (9.26), (9.26), although although they they cannot cannot be verified verified by directly directly computing computing
°
456
Chapter 9. 9. More about Fourier Fourier series Chapter More about series
the eigenpairs. eigenpairs. Instead, Instead, the the results results can can be be deduced deduced from fairly sophisticated the from some some fairly sophisticated that are are beyond beyond the the scope scope of of this this book. book. Therefore, Therefore, we we will will mathematical arguments mathematical arguments that not attempt attempt to to justify justify all of our statements in in this this section. not all of our statements section. KD : e1(n) We define Kr> C&(ti) by KDu
= -\7. (k(x)\7u) ,
(9.26) can be written as simply so that (9.26) KDU = AU.
The following results results hold: hold: The following 1. All eigenvalues eigenvalues of of KD are real and and positive. positive. To To show this, we we assume that 1. All are real show this, assume that KDU (u,u) = 1. I. Then KDU = \u AU and and (u,u) Then A = A(U,U) = (AU,U) = (KDu,u) =
L L
(KDU)U
\7 . (k(x)\7u) U
= -
= = =
rk(x)\7u. \7u - Janr k(x)u~U
Jn
L L
un
k(x)\7u . \7u k(x)
II\7u112 .
(The reader reader should should notice notice that, that, since we cannot cannot assume assume aa priori priori that that A and (The since we and uU are are real, real, we we use use the the complex complex L2 I/2 inner inner product.) product.) This This shows shows that that A A is is aa nonnegative nonnegative real real number. number. Moreover, Moreover, A = 0 =?
L
k(x)
II\7u112 = 0
\7u = 0 (since k(x) > 0) u(x) = constant =? u(x) = 0, =?
=?
boundary conditions. the last last step following from the Dirichlet boundary conditions. Therefore, KD has only only positive positive eigenvalues. has eigenvalues. 2. Eigenfunctions Eigenfunctions of of KD corresponding to distinct distinct eigenvalues are orthogonal. 2. corresponding to eigenvalues are orthogonal. As we we have have seen seen before, before, the the orthogonality depends only only on As orthogonality of of eigenfunctions eigenfunctions depends on the easy to is easy to verify verify using using integration integration by by the symmetry symmetry of of the the operator, operator, which which is parts (see (see Exercise Exercise 1). parts 1). 3. operator KD has has an an infinite infinite sequence sequence {\ {An}~=l of eigenvalues eigenvalues satisfying satisfying 3. The The operator n}^L1 of
457 457
9.7. about general general eigenvalue problems 9.7. A A note note about eigenvalue problems
and and An
-+
00
as n -+
00.
In the the sequence sequence {An}, {An}, each each eigenvalue eigenvalue is according to to the In is repeated repeated according the dimension dimension of of the associated associated eigenspace, eigenspace, that that is, is, according according to the the number of of linearly linearly independent eigenfunctions eigenfunctions associated associated with that eigenvalue. eigenvalue. In In particular, each particular, each dependent with that eigenvalue eigenvalue corresponds corresponds to only only finitely finitely many many linearly linearly independent independent eigenfunctions. tions. It is always possible to replace a basis for for a finite-dimensional subspace by an 74 orthogonal basis. Therefore, all all of of the the eigenfunctions eigenfunctions of of KD KD can taken orthogonal basis. 74 Therefore, can be be taken to We will will assume assume that an orthogonal orthogonal sequence sequence that {^n}^Li {~n}~=l is is an to be be orthogonal. orthogonal. We satisfying satisfying
4. The The set {~n} 4. set of of eigenfunctions eigenfunctions {ip is aa complete complete orthogonal orthogonal sequence sequence in in L2(0): Z/ 2 (fi): n} is 2 For EL L2(0), For each each f/ 6 (ft), the series series (9.27) 2 converges in in the sense to /. The space L (J7) is is defined defined as The space L2(0) as converges the mean-square mean-square sense to f. 2 was (a, &)—informally, it is is the space of square-integrable functions functions defined defined was L L2(a, b)-informally, it the space of square-integrable on 0, il, with with the that if if two functions differ differ only only on on aa set set of on the understanding understanding that two functions of measure measure zero, zero, then then they are are regarded regarded as as the the same. same. The The series series (9.27) (9.27) is is called called aa generalized generalized Fourier Fourier series series for for f./.
For For specific specific domains, it it may may be be more convenient convenient to enumerate enumerate the the eigenvalues and and than aa singly eigenfunctions indexed list list rather eigenfunctions in in aa doubly doubly indexed rather than singly indexed indexed list list as as suggested suggested above. For For example, example, the the eigenvalue/eigenfunction eigenvalue/eigenfunction pairs of the the negative negative Laplacian Laplacian above. pairs of on the unit unit square on the square are are
It is is possible possible (although (although not not necessarily necessarily useful) order the the \Amn and ~mn ^mn in in (singlyIt useful) to to order (singlymn and indexed) sequences. sequences. indexed) The of the the above above facts facts for for many many computational computational tasks tasks is limited, The usefulness usefulness of is limited, since, k(x), it is not possible to since, for for most most domains domains 0f) and and coefficients coefficients fc(x), it is not possible to obtain obtain the the eigenvalues However, as eigenvalues and and eigenfunctions eigenfunctions analytically analytically (that (that is, is, in "closed "closed form"). form"). However, as we have have seen seen before, before, the eigenpairs eigenpairs give some some information information that that can can be be useful in its its useful to own own right. right. It It may may be be useful to expend expend some some effort effort in in computing computing aa few few eigenpairs eigenpairs numerically. We We illustrate numerically. illustrate this this with with an an example. example. Example 9.37. 9.37. Consider Consider aa membrane membrane that that at at rest rest occupies the domain domain 0, tl, and Example occupies the and suppose small transverse of the satisfy the suppose that that the the (unforced) (unforced) small transverse vibrations vibrations of the membrane membrane satisfy the 74 74The technique for the Gram-Schmidt is explained elemenThe technique for doing doing this this is is called called the Gram-Schmidt procedure; procedure; it it is explained in in elementary linear linear algebra algebra texts texts such tary such as as [34].
458 458
Chapter 9. More about about Fourier Fourier series series Chapter 9. More
IBVP IB VP
aat2 u
2
2 -
n, t > 0, x E n,
c Au = 0, x E u(x,O) = ¢(x),
au at (x,O) = ,),(x),
(9.28)
x E n,
u(x, t) = 0, x E an, t
> O.
The question we wish to answer is: What is the lowest frequency at which the membrane will resonate? This could be be an important important consideration in designing a device that contained such a membrane. membrane. The key key point point is that, if if we knew the eigenvalues and eigenvectors of of the negafi (subject (subject to Dirichlet IBVP Dirichlet conditions), then we could solve the IBVP tive Laplacian on n just as in the Fourier series method. Suppose the eigenpairs eigenpairs are An, 'l/Jn(x) , n = 1,2,3, .... Then we can write the solution w(x,£) u(x, t) as 00
u(x, t) =
l: an (t)'l/Jn(x). n=l
Substituting into the PDE PDE yields Substituting
an(t) satisfies satisfies and so an(t)
Therefore, Therefore, an(t)
= bn cos (cAt)
+ Cn sin (cAt),
with the the coefficients and c determined by initial conditions. conditions. Therefore, Therefore, with coefficients bbnn and enn determined by the the initial the fundamental fundamental frequency—the frequency-the smallest smallest natural frequency—of frequency-of the membrane is cx/V^TT). cv'):; / (2n). This example example shows that we gain some useful information computing This shows that we would would gain some useful information by by computing the smallest smallest eigenvalue eigenvalue of of the the operator operator on on n. £). We will revisit revisit this this example example in Section the We will in Section lOA, where we use finite methods to to estimate estimate the the smallest of 10.4, where we use finite element element methods smallest eigenvalue eigenvalue of various various domains. domains.
Exercises Exercises 1. Prove Prove that that the operator K defined defined above above is is symmetric. symmetric. 1. the operator
9.8. Suggestions Suggestions for 9.8. for further further reading reading
459 459
2. Let 2. Let the the eigenvalues eigenvalues and and eigenvectors eigenvectors of of KD KD be be
.An, '¢n(x), n=1,2,3, ... , as the text. text. Suppose E C1(0) represented in as in in the Suppose that that uu € Of,(17) is is represented in aa generalized generalized Fourier Fourier series as as follows: follows: series 00
U(X) =
L an'¢n(x). n=l
Explain generalized Fourier Fourier series series of KDU is equal to to Explain why why the the generalized of KDu is equal 00
L .An an '¢n (x). n=l
3. Consider Consider an an iron iron plate plate occupying occupying aa domain £) in R2. Suppose Suppose that that the the plate 3. domain 0 in R2. plate is heated to degrees Celsius, Celsius, the and bottom bottom of of the the plate is heated to aa constant constant 55 degrees the top top and plate are perfectly insulated, and and the edges of of the the plate are fixed at 00 degrees. degrees. Let are perfectly insulated, the edges plate are fixed at Let u(x, temperature at Using the the first first eigenvalue w(x, t) be be the the temperature at xx E6 0fJ after after t seconds. seconds. Using eigenvalue and the negative negative Laplacian Laplacian on of and eigenfunction eigenfunction of of the on 0, 0, give give aa simple simple estimate estimate of w(x,£) that is valid for for large large t. What What must in order order that that aa single u(x, t) that is valid must be be true true in single eigenpair suffices suffices to good estimate? estimate? (The (The physical physical properties of iron eigenpair to define define aa good properties of iron 3 are p = 7.88g/cm , c = 0.437 J/(gK), AC = 0.836 W/(cmK).) are p = 7.88 g/cm3, c = 0.437 J/(gK), ,.. = 0.836W /(cm K).)
9.8 9.8
Suggestions for further Suggestions for further reading reading
The as dealing with Fourier present the the conconThe books books cited cited in in Section Section 5.8 5.8 as dealing with Fourier series series all all present vergence theory. More specialized specialized books, books, both both with wealth of about vergence theory. More with aa wealth of information information about Fourier series series and and other aspects of of Fourier Fourier analysis, analysis, are are Kammler [28] and and Folland Folland Fourier other aspects Kammler [28) [15]. Folland's Folland's book book is classical in Kammler delves delves into into aa number number of [15]. is classical in nature, nature, while while Kammler of applications applications of modern interest. Briggs and Henson [7] gives comprehensive introduction introduction to to the discrete Briggs and Henson [7] gives aa comprehensive the discrete Fourier transform transform and and covers covers some some applications, applications, while while Van Van Loan Loan [50) [50] provides an provides an Fourier in-depth treatment treatment of of the the fast fast Fourier transform. Other Other texts texts in-depth the mathematics mathematics of of the Fourier transform. that explain the the FFT FFT algorithm algorithm include include Walker Walker [51] [51] and and Brigham Brigham [8]. [8]. that explain
This page intentionally This page intentionally left left blank blank
Chapter 10 Chapter
about finite finite element element More about methods
In this this chapter, chapter, we we will will look look more more deeply deeply into into finite finite element element methods for solving In methods for solving steady-state BVPs. BVPs. Finite Finite element element methods methods form form aa vast vast area, area, and and even even by the end steady-state by the end of this this chapter, chapter, we we will will have have only only scratched scratched the the surface. surface. Our Our goal goal is is modest: modest: We of We wish to give the reader a better idea of how how finite element methods are implemented in in practice, practice, and and also also to to give give an an overview overview of of the the convergence convergence theory. theory. The main tasks involved in applying the finite element method are Defining aa mesh mesh on on the the computational computational domain. domain. •• Defining Computing the the stiffness stiffness matrix matrix K K and and the the load load vector vector f. f. •• Computing Solving the the finite finite element element equation equation Ku Ku == f. f. •• Solving We will mostly ignore the first question, except to provide examples for simple domains. right, and mains. Mesh Mesh generation generation is is an an area area of of study study in in its its own own right, and delving delving into into this this subject begin by by addressing involved subject is is beyond beyond the the scope scope of of this this book. book. We We begin addressing issues issues involved in computing computing the the stiffness stiffness matrix matrix and and load load vector, vector, including including data data structures structures for in for representing and and manipulating manipulating the the mesh. mesh. We will concentrate concentrate on on two-dimensional two-dimensional representing We will problems, triangular triangular meshes, and piecewise piecewise linear finite elements, as these are sufficient Next, in ficient to illustrate illustrate the the main main ideas. ideas. Next, in Section Section 10.2, 10.2, we we discuss discuss methods methods for solving the the finite element equation equation Ku Ku == f, f, specifically, specifically, on on algorithms algorithms for for taking taking solving finite element advantage we provide advantage of of the the sparsity sparsity of of this this system system of of equations. equations. In In Section Section 10.3, 10.3, we provide aa brief brief outline outline of of the the convergence convergence theory theory for for Galerkin Galerkin finite finite element element methods. methods. Finally, Finally, we close the book with a discussion of finite element methods for solving eigenvalue problems, such such as as those those suggested suggested in in Section Section 9.7. 9.7. problems,
10.1 10.1
Implementation of finite element methods
There are several issues that must be resolved in order to efficiently efficiently implement the finite element element method method in in aa computer computer program, program, including finite including
Data structures structures for for representation representation of of the the mesh. mesh. •• Data
461 461
462
Chapter 10. 10. More about finite element methods
•• Efficient Efficient computation computation of of the the various various integrals integrals that that define define the the entries entries in in the the stiffness matrix matrix and and load load vector. vector. stiffness •• Algorithms Algorithms for for assembling assembling the the stiffness stiffness matrix matrix and and the the load load vector. vector.
We discuss these these issues. issues. We will will now now discuss
10.1.1 10.1.1
Describing a a triangulation triangulation Describing
Before we can describe describe data data structures structures and and algorithms, algorithms, we must develop develop notation Before we can we must notation for the the computational computational mesh. First of of all, all, we we will will assume assume that that the domain n 0 on for mesh. First the domain on which the BVP BVP is is posed is aa bounded bounded polygonal polygonal domain domain in in R2, R2, so so that that it it can can be which the posed is be 75 triangulated.75 Let triangulated. Let Th = {Ti : i = 1,2, ... , L} be the collection collection of of triangles triangles in the mesh mesh under under consideration, consideration, and and let let be the in the
Nh
=
{llj :
j = I,2, ... ,M}
be the nodes of triangles in notation in be the set set of of nodes of the the triangles in Th. Th- (Standard (Standard notation in finite finite element element methods labels each mesh h, the the length of the of any any triangle triangle in methods labels each mesh with with /i, length of the longest longest side side of in the mesh. Similarly, the the space space of of piecewise piecewise linear linear functions functions relative to that that mesh mesh is the mesh. Similarly, relative to is denoted Vh, Vh, and and an an arbitrary arbitrary element element of of Vh Vh as as Vh. Vh- We We will will now now adopt adopt this standard denoted this standard notation.) notation.) To use as To make make this this discussion discussion as as concrete concrete as as possible, possible, we we will will use as an an example example aa regular triangular mesh, mesh, defined defined on the unit 32 triangles triangles and regular triangular on the unit square, square, consisting consisting of of 32 and 25 25 nodes. This mesh is shown in Figure IO.1. 10.1. In order order to to perform the necessary calculations, we must know which nodes nodes are are In perform the necessary calculations, we must know which associated with with which which triangles. Of course, course, each each triangle has three three nodes; we need need associated triangles. Of triangle has nodes; we to know these three nodes in ...- ,, llM. We define to know the the indices indices of of these three nodes in the the list list lll, HI, ll2, 112,.. HM- We define the the mapping ee by by the property that of triangle Tj are are lle(i,1),lle(i,2),lle(i,3). ne(i;1), n e (j ;2 ), ne(i,3) • mapping the property that the the nodes nodes of triangle Ti (So ee is is aa function function of of two two variables; the first must take an integral integral value value from from 11 to to (So variables; the first must take an L, the second L, and and the second one one of of the the integers integers 1,2,3.) 1,2,3.) In our our sample sample mesh, mesh, there are 32 32 triangles triangles (L = 32), 32), and and they they are are enumerated enumerated In there are 25 nodes are enumerated as shown which as in Figure 10.2. 10.2. The M == 25 shown in Figure 10.3, which explicitly the indices the nodes nodes belonging to each triangle. For explicitly shows shows the indices of of the belonging to each triangle. For example, example, e(IO, 1) == 6, e(IO,2) == 7, e(1O,3) = 12,
expressing the fact that vertices of of triangle 10 are are nodes 6, 7, 7, and and 12. expressing the fact that the the vertices triangle 10 nodes 6, 12. Each of of the standard basis basis functions functions for for the the space space of of continuous continuous piecewise piecewise Each the standard linear linear functions functions corresponds corresponds to to one one node in in the triangulation. triangulation. The The basis functions functions 75 751f boundaries, then, the context piecewise linear elements, If the the domain domain n fi has has curved curved boundaries, then, in in the context of of piecewise linear finite finite elements, the must be approximated by polygonal curve curve made made up of edges edges of of triangles. triangles. This This the boundary boundary must be approximated by aa polygonal up of introduces using higher-order higher-order finite introduces an an additional additional error error into into the the approximation. approximation. When When using finite elements, elements, for for example, piecewise piecewise quadratic quadratic or or piecewise cubic functions, then it it is is straightforward straightforward to to approximate piecewise cubic functions, then approximate example, the piecewise polynomial polynomial curve finite element element the boundary boundary by by aa piecewise curve of of the the same same degree degree as as is is used used for for the the finite functions. This This technique technique is is called isoparametric method, and it it leads significant reduction reduction called the the isopammetric method, and leads to to aa significant functions. in the error. error. We We will ignore all all such such questions questions here here by by restricting restricting ourselves ourselves to will ignore to polygonal polygonal domains. domains. in the
10.1. Implementation Implementation of finite element methods
Figure 10.1. 10.1. A triangulation of the unit square. Figure square.
Figure 10.2. Enumerating the triangles in the the sample sample mesh. mesh. Figure 10.2. Enumerating the triangles in
463
464
Chapter 10. about finite finite element element methods methods Chapter 10. More More about 25
20
15
10
0.1 5
0.2
0.4
Figure 10.3. Figure 10.3. Enumerating the nodes in the sample mesh.
correspond in the approximation. However, correspond to to the the degrees degrees of of freedom freedom in the finite finite element element approximation. However, not every node in in the triangulation need give rise to a degree of of freedom; freedom; some some may be associated with Dirichlet boundary conditions which determine the weight may be associated with Dirichlet boundary conditions which determine the weight given function. For is not sufficient to to to the the corresponding corresponding basis basis function. For this this reason, reason, it it is not sufficient given to identify the set of the triangulation; we must also determine identify of all nodes in the determine the free free nodes—those do not condition. We free nodes-those that that do not correspond correspond to to aa Dirichlet Dirichlet condition. We will will label label the the free nodes n/ 2 ,..., n/^. ll/l,ll/2, ... ,llfN. nodes as as n^, Referring again to the the sample mesh of Figure 10.1, if we we assume that this mesh will be be used used in in aa Dirichlet Dirichlet problem, problem, only only the the interior nodes correspond to degrees will interior nodes correspond to degrees = 99 and of freedom. Thus N N = and the free free nodes can can be enumerated enumerated in the same same order order as the of all all nodes (left-to-right and as the set set of nodes (left-to-right and bottom-to-top). bottom-to-top). This This yields yields
It = 7, h = 8, h = 9, /4 = 12, 15 = 13, 16 = 14, h = 17, Is = 18,
fg
= 19.
We is aa We now now define define the the standard standard basis basis function function fa ¢>i by by the the conditions conditions that that fa ¢>i is continuous 7ft, and and continuous piecewise piecewise linear linear function function relative relative to to the the mesh mesh 1h, A. ( ) 'l'i lli
= Vii = J:
{I, 0
,
i = j, . ...J.. Z r J.
The finite element space-the space—the space of continuous piecewise linear functions (relative 7ft) that any given Dirichlet conditionsconditions— (relative to to the the mesh mesh 1h) that satisfy satisfy any given homogeneous homogeneous Dirichlet is then is then
10.1. finite element methods 10.1. Implementation Implementation of of finite element methods
10.1.2
465
Computing the stiffness matrix
We We assume assume that that the the weak weak form form of of the the BVP B VP in in question question has has been been written written in in the the form form u E V, a(u,v) = (f,v) for all v E V and that the Galerkin problem takes the form
NxN We We need need to to compute compute the the stiffness stiffness matrix matrix K K E €R R NXN ,, where where
By be zero; fixed ii between between 11 and By design, design, most most of of these these values values will will be zero; let let us us focus focus on on aa fixed and N, and values of nonzero? AT, and ask ask the the question: question: For For which which values of jj will will Kij KIJ be be nonzero? As As an an example, example, consider consider ii =— 55 for for our our sample sample mesh. mesh. The The support support of of CP13 ^13 == cP0/165 is basis functions is shown shown in in Figure Figure lOA. 10.4. The The question question we we must must answer answer is: is: What What other other basis functions CPt; (f>fj have have aa support support that that intersects intersects of of CP13 ^13 (the (the intersection intersection must must have have aa positive positive area; area; if if the the intersection intersection is is just an an edge edge of of aa triangle, triangle, this this will will not not lead lead to to aa nonzero contribution contribution to to K). K). It It is is easy easy to to see see that that the the desired desired basis functions functions correspond correspond to to nodes nodes of of triangles triangles of of which which n13 1113 is is itself itself aa node, node, that that is, is, to to the the nodes nodes of of the the triangles triangles shaded in Figure lOA. 10.4.
Figure CP13. Figure 10.4. 10.4. The The support support of 0/^13.
It is is possible to store store all all of of the the necessary necessary connectivity connectivity information information (that (that is, is, to to It possible to store, along along with with each each node, node, aa list list of of nodes belonging to to aa common common triangle). triangle). With With store, nodes belonging
Chapter More about methods Chapter 10. 10. More about finite finite element element methods
466
this information, information, one one can can compute compute the the matrix K by by rows, according to following this matrix K rows, according to the the following algorithm: algorithm: for ii = = 1,2, 1 , 2 ,... . . . ,, N N for for each each jj = l,2,...,N such that that the the supports supports of of cPlj (f)fj and and cPl. (f>ft overlap, overlap, for = 1,2, ... , N such compute Kij = aa (cPlj, (<j>f., cPl.)· 0^). compute Kij = However, this this is is probably not the the most most common common approach, approach, for for the the following following reason: reason: However, probably not order to to compute compute the the necessary integrals, one one must must know form the the In order necessary integrals, know the the nodes nodes that that form vertices of of each each triangle. out that that the the stiffness stiffness matrix can be formed with It turns turns out matrix can be formed with vertices triangle. It only this without explicitly storing the connectivity information that is, is, without explicitly storing the connectivity information only this information, information, that mentioned above. The integral integral represented represented by (0^., cPf;) <}>f.) is is naturally naturally decomposed decomposed into into the the sum sum The by aa (cP/;, of several several integrals, integrals, one one for for each each triangular triangular element element making making up the domain domain of of inteinteof up the gration. It It is is convenient convenient to to make make this decomposition, as as cPf; <j>f4 and and cPlj 0^. are are given given by this decomposition, by gration. different formulas formulas on on the different elements. elements. It It is then natural to compute, compute, for for each is then natural to each different the different element T Tk, stiffness matrix K. K. k , the contributions to various entries of the stiffness For example, example, consider consider i%==5,5,j j ==11ininour oursample samplemesh. mesh. Then Thenaa(cPlj ((f>f^, cPl;) 0/J isis For the sum sum of of two two integrals, integrals, one one over over triangle triangle T12 Ti2 and and the the other other over over T13: Ti3: the
There is reason that that these these two integrals must be computed computed together, together, as as long long as There is no no reason two integrals must be as both contributions to to K are eventually eventually accumulated. accumulated. both contributions K51 5i are Following the above reasoning, standard algorithm for computing computing K is is to to Following the above reasoning, aa standard algorithm for loop over over the the elements elements (Le. (i.e. the the triangles) in the (rather than than over over the loop triangles) in the mesh mesh (rather the nodes) nodes) and compute compute the contributions to to K K from from each each element element in in turn. Since each each triangle triangle and the contributions turn. Since has three nodes, aa given element contributes to up to 99 entries in K. K. There is one piece of information, information, however, is not available unless unless we make aa point to one piece of however, that that is not available we make point to record it in in the the data data structure: structure: the the "inverse" "inverse" of of the the mapping mapping ii f-+ t-t Ii. fa. In In the record it the course course nj is of assembling the stiffness stiffness matrix, we need to be able to decide if aa given node n^ free node node (that (that is, is, if if jj = = fa for some some i) i) and, and, if if so, so, to to determine determine i. i. So So let let us us define define aa free Ii for mapping jj f-+ •->• gj gj by by aa mapping i, if j 0, if j
= Ii :# Ii for all i =
1,2, ... , N.
The algorithm algorithm then then takes takes the following form: form: The the following 2, ... , L for for A?k = = 1, 1,2,...,L for f o r »i = 1,2,3 for j = 1,2,3 forj=1,2,3 if P = ge(k,i) 9e(k,i) :# ^ 00 and and q ± 00 if p = q = = g ge(k,j) e(kij) :# Add the to Kpq Kpq obtained obtained by integrating over over Tk. Tk. by integrating Add the contribution contribution to
The condition condition that ge(k,i) :# / 00 indicates indicates that the ith ith vertex (i = = 1,2,3) 1,2,3) of of triangle triangle The that ge(k,i) that the vertex (i is aa free free node, node, and and similarly similarly for for ge(k,j).
Tk n
10.1. 10.1. Implementation of finite element methods
467
of this algorithm is the contribution to K Kpq (tPe(k,j) , tPe(k,i)) from = aa (0 fr°m the element pq = e (fc,j)>0e(M)) T TV Also, it should be pointed out that, in the case that K is symmetric (as it is in k . Also, the examples considered considered in in this this book), of the the work work can be eliminated: eliminated: we we just just the examples book), part part of can be compute the the entries entries K with q>p, and then assign the value of K to K . compute Kpq pq with q 2 p, and then assign the value of Kpq pq to Kqp. qp We have described above the information needed to carry out this algorithm. It is easy to store this information use in in aa computer program. A A It is easy to store this information in in arrays arrays for for use computer program. 76 simple data structure would consist of four arrays: arrays:76
1. NodeList: NodeList: An x 22 array; array; the consists of of the the xx and and yy coordinates coordinates 1. An M M x the iih ith row row consists of node ni. of node n^. 2. consists of 2. ElementList: ElementList: An An L xx 33 array; array; the the kth row row consists of e(k,1),e(k,2),e(k,3). e(fc,l),e(fc,2),e(fc,3).
3. FreeNodePtrs: FreeNodePtrs: An An N x 11 array; array; the the ith iih entry entry is is k /j. 3. N x 4. Mx array; the iih entry entry is is gi. 4. NodePtrs: NodePtrs: An An M x 11 array; the ith gi. By By way way of of example, example, Table Table 10.1 10.1 shows shows these these arrays arrays for for the sample sample mesh of Figure Figure 10.1. The information recorded in these arrays will suffice suffice for straightforward finite element problems with homogeneous Dirichlet or conditions element problems with homogeneous Dirichlet or Neumann Neumann boundary boundary conditions (or even even for for inhomogeneous inhomogeneous Dirichlet Dirichlet problems—see Exercise 5). 5). For problems with (or problems-see Exercise For problems with inhomogeneous Neumann conditions, it may also be necessary to record whether a given edge belongs to the boundary. The ElementList ElementList array can be augmented by columns containing the edges edges lie lie on boundary. (Or, (Or, of on the the boundary. of columns containing flags flags indicating indicating whether whether the course, these flags flags can be stored in independent arrays, if desired.) This extension is left left to reader. is to the the reader.
10.1.3
Computing the load vector vector
Computing the load vector ff is similar to computing the stiffness stiffness matrix, only easier. We loop over over the the elements elements and, and, for for each each node of aa given given triangle, compute the the We loop node n/ nt.{ of triangle, compute contribution i . The sum of integrals over or more more contribution to to fIi. The value value fi Ii will will be be the the sum of integrals over one one or we loop triangles, and and this sum sum is is accumulated accumulated as as we loop over over the the triangular triangular elements. elements.
for kk = 1,2, 1 , 2 ,... . . . ,, LL for for ii = 1,2,3 1,2,3 for if p = if P = ge(k,i) 9e(k,i) f:/0 Add the contribution Add the contribution to to fIp obtained by by integrating integrating over over T T^. k· p obtained
10.1.4 Quadrature Quadrature Up to this point, we we have computed all integrals exactly, perhaps with the help of a computer package such as Mathematica Mathematica or Maple. Maple. However, However, this would be difficult difficult to incorporate incorporate into a general-purpose computer program for finite finite elements. Moreover, it to compute be more more it is is not not necessary necessary to compute the the various various integrals integrals exactly, exactly, and and it it may may be 76
76Using modern techniques, such as programming, one one Using modern techniques, such as modular modular programming programming or or object-oriented object-oriented programming, might define define aa structure structure or or aa class class to to represent might represent aa mesh. mesh.
Chapter 10. More about finite element methods Chapter
468
ElementList ElementList 11 66 7 7 2 2 11 2 2 7 7 2 3 3 2 7 7 88 4 2 4 2 33 8 8 55 3 3 8 8 9 9 4 6 4 6 3 3 99 4 77 4 10 99 10 4 10 88 4 55 10 11 12 12 9 9 66 11 12 10 10 66 7 7 12 11 7 12 13 11 13 7 12 12 7 12 7 88 13 13 13 88 13 14 13 14 13 14 14 14 88 99 14 14 15 15 99 14 15 15 16 16 9 9 10 15 10 15 11 16 17 11 16 17 17 17 11 12 12 17 18 11 18 17 12 17 19 12 19 17 18 18 12 12 20 13 20 13 18 18 21 21 13 13 18 18 19 19 22 13 22 14 19 13 14 19 14 19 23 14 23 19 20 20 24 24 14 14 15 15 20 20 22 25 16 16 21 25 21 22 22 26 17 22 16 17 26 16 27 27 17 22 23 23 17 22 28 28 17 17 18 18 23 23 24 29 23 24 29 18 18 23 30 24 18 19 19 24 30 18 31 19 24 25 25 31 19 24 32 32 19 19 20 20 25 25 11
11
2 2 3 3 4 4 5 5 66 7 7 88 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25
NodeList NodeList 0 0 0 0 0.2500 0.2500 0 0 0.5000 0 0.5000 0 0.7500 0.7500 0 0 1.0000 1.0000 0 0 0 0 0.2500 0.2500 0.2500 0.2500 0.5000 0.5000 0.2500 0.7500 0.7500 0.2500 1.0000 1.0000 0.2500 0 0 0.5000 0.2500 0.5000 0.5000 0.5000 0.5000 0.7500 0.5000 0.7500 1.0000 1.0000 0.5000 0 0 0.7500 0.2500 0.2500 0.7500 0.7500 0.5000 0.7500 0.7500 0.7500 0.7500 0.7500 1.0000 1.0000 0.7500 0 1.0000 0 1.0000 0.2500 1.0000 1.0000 1.0000 0.5000 0.5000 1.0000 0.7500 1.0000 0.7500 1.0000 1.0000 1.0000 1.0000 1.0000
NodePtrs NodePtrs 11 0 0 2 2 0 0 3 3 0 0 4 4 0 0 55 0 0 66 0 0 7 7 11 2 88 2 9 9 3 3 10 0 10 0 11 0 11 0 12 12 4 4 13 13 55 14 6 14 6 15 15 0 0 16 16 0 0 17 77 17 18 18 8 8 19 19 9 9 20 0 20 0 21 21 0 0 22 22 0 0 23 0 23 0 24 24 0 0 25 25 0 0
FreeNodePtrs PreeNodePtrs 11 7 7 22 8 8 3 99 3 44 12 12 13 55 13 14 66 14 77 17 17 8 8 18 18 99 19 19
Table 10.1. data structure structure for for the mesh of of Figure Figure 10.1. 10.1. Table 10.1. The The data the mesh
efficient to to use use numerical numerical integration integration (quadrature). (quadrature). It is only necessary to to choose efficient It is only necessary choose aa quadrature quadrature rule rule that that introduces introduces an an error error small small enough enough that that it it does does not not affect affect the the rate solution to rate of of convergence convergence of of the the error error in in the the approximate approximate solution to zero zero as as the the mesh mesh is is refined. refined.
10.1. methods 10.1. Implementation Implementation of of finite finite element element methods
469
A quadrature quadrature rule is an approximation approximation of the form (10.1)
where W1, ... , Wk, the the weights, w\, W2, w?,..., weights, are real numbers and (Sl' (si, t1), £1), (S2' ($2, t2),"" £ 2 ) , . . . , (Sk' (fifc, tk), £&), the nodes, are are points points in in the the domain domain of of integration integration R. R. Equation Equation (10.1) (10.1) defines defines aa kk the point quadrature quadrature rule. Choosing Choosing a a quadrature quadrature rule rule
There are two issues that must be resolved: quadrature rule and its resolved: the choice of a quadrature implementation for for an an arbitrary arbitrary triangle. triangle. We We begin by discussing discussing the quadrature begin by the quadrature implementation rule. rules is by their precision. While While rule. A A useful useful way way to to classify classify quadrature quadrature rules is by their degree of of precision. it may not first, it it may not be be completely completely obvious obvious at at first, it is is possible possible to to define define rules rules of of the the form form (10.1) (10.1) that give the exact value when applied to certain polynomials. A rule has degree of precision d if the the rule is exact exact for all polynomials of degree d or less. Since both integration and and aa quadrature quadrature rule of the the form form (10.1) (10.1) are are linear linear in in f, /, it it suffices suffices both integration rule of to consider only monomials. As aa simple simple example, example, consider consider the the rule As rule
[11 f(x) dx
~ 2f(0).
(10.2)
This This rule rule has has degree degree of of precision 1, 1, since
[11 p(x) dx = 2 = 2p(0), p(x) = x::::} [11 p(x) dx = = 2p(0), p(x)
= 1 ::::}
0
p(x)
f1
2
= x 2 ::::} J_/(x) dx = 3 I=- 2p(O).
Equation (10.2) Equation (10.2) is the one-point Gaussian quadrature quadrature rule. For one-dimensional one-dimensional integrals, the n-point Gaussian quadrature quadrature rule is exact for polynomials of degree degree 2n 2n -— 1 or less. For example, the two-point Gauss quadrature rule, which has degree degree of of precision 3, 3, is is
The Gaussian quadrature 1]; to apply quadrature rules are defined on the reference reference interval [-1, [-1,1]; the rules rules on requires aa simple variables. the on aa different different interval interval requires simple change change of of variables. In multiple dimensions, In multiple dimensions, it it is is also also possible possible to to define define quadrature quadrature rules rules with with aa given given degree degree of of precision. precision. Of Of course, course, things things are are more more complicated complicated because because of of the the variety possible. We will exhibit triangles with with variety of of geometries geometries that that are are possible. We will exhibit rules rules for for triangles degree triangle degree of of precision 11 and and 2. 2. These These rules rules will will be be defined defined for for the the reference reference triangle
Chapter 10. 10. More More about about finite finite element element methods Chapter methods
470
TR TR with with vertices vertices (0,0), (0,0), (1,0), (1,0), and and (0,1) (0,1) (see (see Figure Figure 10.5). 10.5). The The following following one-point one-point rule has degree of precision 1: (10.3)
(see Exercise Exercise 1), 1), while the following following two-point two-point rule rule has has degree degree of of precision (see while the precision 2: 2: (lOA)
(see Exercise 2). (0,1)
(1,0)
(0,0)
Figure 10.5. 10.5. The The reference reference triangle triangle TR. TR. Figure What is necessary the finite finite element What degree degree of of precision precision is necessary in in applying applying the element method? method? Here Here is is aa rule rule of of thumb: thumb: The The quadrature quadrature rule rule should should compute compute the the exact exact entries entries in in the the stiffness matrix in the case of a PDE with constant coefficients. Such a quadrature stiffness constant quadrature rule will will then be accurate accurate enough, enough, even even in in aa problem problem with with (smooth) nonconstant rule then be (smooth) nonconstant coefficients, that that the the accuracy accuracy of of the the finite element method not be coefficients, finite element method will will not be significantly significantly degraded. When using using piecewise linear functions, functions, the the stiffness stiffness matrix matrix is is assembled assembled from from When piecewise linear integrals of of the the form form integrals
L
k"VrPj . "VrPi,
and the integrand is is constant constant when is constant constant (a (a linear linear function function has has aa conand the integrand when k is constant gradient). gradient). Therefore, Therefore, the the one-point one-point rule rule will give exact exact results results for for aa constant constant stant will give coefficient coefficient problem,77 problem,77 and, and, by our our rule of of thumb, thumb, the the same same rule rule is is adequate adequate for nonconstant coefficient coefficient problems. nonconstant problems. If use piecewise piecewise quadratic then "V rPj .• "V rPi would If we we were were to to use quadratic functions, functions, then V0j V0j would be be piecewise quadratic would need need aa quadrature of piecewise quadratic as as well, well, and and so so we we would quadrature rule rule with with degree degree of precision 2. 2. The The three-point three-point rule rule (lOA) (10.4) would be be appropriate appropriate in in that that case. case. 77
77Actually, Actually,
rule with degree of of precision would suffice; suffice; however, however, aa rule rule cannot cannot use use less less than aa rule with degree precision 00 would than one quadrature quadrature node, node, and and so so we we use above one-point one-point rule, rule, which which has degree of of precision precision 1. one use the the above has degree 1.
471 471
10.1. element methods 10.1. Implementation of finite element methods Integrating over over an arbitrary triangle
There is still still the quadraThere is the following following technical technical detail detail to to discuss: discuss: How How can can we we apply apply aa quadrature TR to an integral triangle ture rule rule defined defined on on the the reference reference triangle triangle TR to an integral over over an an arbitrary arbitrary triangle T? We assume that T has has vertices vertices (PI,P2), (ql, q2), and (rl, r2). We We can can then then map map T? We assume that (pi,p2), (tfi^), and (ri,r2). R (ZI,Z2) E TR to (XI,X2) E T by the linear mapping (^1,^2) G T to (xi,#2) € by the linear mapping Xl = PI X2 = P2
+ (ql - pt}ZI + (rl - PI)Z2, + (q2 - P2)ZI + (r2 - P2)Z2.
(10.5)
The mapping mapping (10.5) sends (0,0), to (PI,P2), (ql,q2), and and (rl,r2), The (10.5) sends (0,0), (1,0), (1,0), and and (0,1) (0,1) to (pi,p2), (tfi,2), (ri,r 2 ), respectively. = F(y), the respectively. We We will will denote denote this this mapping mapping by by x x = F(y), and and we we note note that that the Jacobian matrix matrix of of F F is is Jacobian
J = [ qi - PI q2 - P2
rl - PI ] . r2 - P2
78 We can now apply the rule rule for for aa change change of of variables variables in in aa multiple multiple integral: integral: 78 We can now aonlv the
{ f(F(y))ldet(J)1 dy. iTr f(x)dx= iTR As the the determinant determinant of of JJ is is the the constant As constant
it is easy to apply apply the the change change of of variables variables and and then then any any desired desired quadrature quadrature rule. it is easy to rule. For example, the three-point three-point rule rule (10.4) (10.4) would would be be applied as follows: For example, the applied as follows:
h
f ==
I~I
(! (X~l), X~I)) + f (X~2) , X~2)) + f
(X~3) , X~3)))
,
(X~I), X~I)) = (PI + (qi - PI)/6 + (ri - PI)/6,P2 + (q2 - P2)/6 + (r2 - P2)/6), (x~2), x~2)) = (PI + 2(ql - pt}/3 + (ri - PI)/6,P2 + 2(q2 - P2)/3 + (r2 - P2)/6), (X~3), X~3))
= (PI + (ql
- pd/6 + 2(rl - Pt}/3,P2 + (q2 - P2)/6 + 2(r2 - P2)/3).
Exercises 1. Verify that that (10.3) (10.3) produces produces the the exact the monomials monomials 1, X, y. 1. Verify exact integral integral for for the 1, x, y. 2 2. Verify Verify that that (10.4) (10.4) produces produces the the exact exact integral integral for for the the monomials monomials 1, X, ?/, y, x x2, 2. 1, x, , 2 xy, y2. xy, y.
3. (1,0), (2,0), (2,0), and (3/2,1), and and let 3. Let Let T T be be the the triangular triangular region region with with vertices vertices (1,0), and (3/2,1), let /f :: TT -> -+ R R be be defined defined by by /(x) f(x) = = x\x\. XIX~. Compute Compute
78 78This rule is is explained explained in calculus texts texts such as Gillett Gillett [17], or more more fully fully in in advanced This rule in calculus such as [17], or advanced calculus calculus texts such such as as Kaplan Kaplan [29]. texts [29].
472 472
Chapter 10. More about finite element methods Chapter R directly, and and also also by by transforming transforming the the integral to an an integral over T TR, as directly, integral to integral over , as suggested in in the result. that you you obtain obtain the the same same result. suggested the text. text. Verify Verify that
4. domain n il is coarse 4. A A common common way way to to create create aa mesh mesh on on aa domain is to to establish establish aa coarse mesh, suitable. A simple way it is is suitable. A simple way to to refine refine aa mesh, and and then then to to refine refine it it until until it triangular each triangle connecting is to to replace replace each triangle with with four four triangles triangles by by connecting triangular mesh mesh is the midpoints midpoints of of the the three three edges edges of the original original triangle. triangle. An An example example is shown the of the is shown in Figure 10.6, in which which aa mesh mesh with with two two triangles triangles is is refined refined to to aa mesh mesh with with in Figure 10.6, in triangle with eight triangles by this method. This technique of of replacing a triangle with four triangles can be enough. is fine fine enough. four triangles can be repeated repeated several several times times until until the the mesh mesh is (a) Consider the the coarsest coarsest mesh mesh in in Figure Figure 10.6. Describe the the mesh mesh using using (a) Consider 10.6. Describe the NodeList, EleElethe notation notation in in the the text, text, and and also also compute compute the the arrays arrays NodeList, mentList, FreeNodePtrs, mentList, FreeNodePtrs, NodePtrs. NodePtrs. Assume Assume that that the the mesh mesh will will be be used for a Dirichlet problem. used for a Dirichlet problem. (b) Repeat Repeat for for the the finer finer mesh mesh in in Figure Figure 10.6. (b) 10.6.
(c) 10.6 one one more (c) Refine Refine the the (right-hand) (right-hand) mesh mesh from from Figure Figure 10.6 more time, time, and and comcompute the the arrays arrays describing describing the the refined refined mesh. mesh. pute Note: since the is not not aa unique unique right right answer answer to to this this exercise, exercise, since the nodes nodes and and Note: There There is elements can elements can be be ordered ordered in in various various ways. ways.
Figure 10.6. A A coarse coarse mesh mesh (left), refined in the standard standard fashion fashion (right). Figure 10.6. (left), refined in the (right). (Note: mesh is is aa triangulation of the the rhombus rhombus in both figures; the circumscribed circumscribed (Note: The The mesh triangulation of in both figures; the box just box just indicates indicates the the axes.) axes.)
10.2. 10.2. Solving sparse linear systems
473
Explain how how to use the information stored in the data structure suggested 5. Explain suggested in the text text to to solve inhomogeneous Dirichlet the solve an an inhomogeneous Dirichlet problem. problem. 6. What information 6. Consider Consider the data structure structure suggested suggested in in the the text. What information is is lacking that is needed to solve an inhomogeneous Neumann problem?
10.2 10.2
Solving sparse sparse linear systems Solving linear systems
As we we have mentioned several times, the finite element method is a practical practical numerical method, method, even even for two- and and three-dimensional three-dimensional problems, problems, because because the merical for large large twothe matrices that it it produces produces have have mostly zero entries. matrix is is called called sparse sparse if matrices that mostly zero entries. A A matrix if aa we wish to large percentage of its entries are known to be zero. In this section, we briefly survey the subject of solving sparse linear systems. Methods for for solving linear systems systems can be divided into into two categories. A method that will produce the exact exact solution in a finite number of steps is called a direct method. (Actually, (Actually, when implemented on a computer, even a direct method round-off error. To be will not compute the the exact exact solution solution because of unavoidable round-off be precise, a direct method will compute the exact solution in a finite number of steps, provided it is implemented in exact arithmetic.) The most common direct methods we discuss modifications of of Gaussian are variants variants of of Gaussian are Gaussian elimination. elimination. Below, Below, we discuss modifications Gaussian elimination for sparse matrices. linear system only as An algorithm that computes computes the exact solution solution to a linear the limit of an infinite sequence of approximations is called an iterative method. the approximations we will will discuss the most most popular: popular: the There many iterative iterative methods methods in in use; use; we There are are many discuss the the conjugate gradient gradient algorithm. We also touch on the the topic of preconditioning, the conjugate the art of of transforming transforming a linear system system so as as to to obtain obtain faster convergence convergence with an an iterative method. iterative
10.2.1 10.2.1
Gaussian elimination for dense systems Gaussian elimination for dense systems
In order to have some standard of comparison, we first briefly discuss the standard Gaussian elimination elimination algorithm algorithm for the solution of dense systems. Our interest is Gaussian in the operation operation count—the count-the number of arithmetic necessary to to solve in the number of arithmetic operations operations necessary solve an an n x n x nn dense dense system. system. The The basic basic algorithm algorithm is is simple simple to to write write down. down. In In the the following following description, we we assume that no row interchanges are required, as these do not use 79 anyway. 79 any arithmetic arithmetic operations anyway. The following pseudo-code solves Ax = = b, nxn n E Rnxn and b bERn, where A € R 6 R , overwriting overwriting the values of A and b: b: for i = 1,2, ... , n - 1 for j = i + 1, i + 2, ... , n k· t- ~ ______ 3'_ Aii 79 79In general, Gaussian elimination is is numerically numerically unstable unstable unless unless partial pivoting is is used. used. Partial In general, Gaussian elimination Partial pivoting pivoting is is the the technique technique of of interchanging interchanging rows rows to to get get the the largest largest possible possible pivot pivot entry. entry. This This ensures ensures that all all of of the the multipliers multipliers appearing appearing in in the algorithm are are bounded bounded above above by by one, and in in virtually virtually that the algorithm one, and every case, case, that that roundoff roundoff error error does increase unduly. unduly. There There are classes of matrices, every does not not increase are special special classes of matrices, most notably notably the the class class of positive definite definite matrices, matrices, for which Gaussian elimination is is most of symmetric symmetric positive for which Gaussian elimination provably stable stable with with no no row interchanges.
Chapter 10. 10. More about finite element methods
474
bj
+- bj - Ajibi
for k = i Ajk
+ 1, i + 2, ... , n
+- Ajk - AjiAik
for i
= n, n -
1, ... ,1
bi
+- (bi -
E7=i+1 Aijb j ) /Aii
The first (nested) (nested) loop loop is is properly Gaussian elimination; systematiThe first properly called called Gaussian elimination; it it systematically eliminates variables to produce an upper triangular triangular system that is equivalent to back substitution; substitution; it to the original system. system. The second second loop is called back it solves solves the the last equation, for # last equation, which which now now has has only only one one variable, variable, for X n ,, substitutes substitutes this this value value in in the preceding solves for _i, and so forth. The pseudo-code above the preceding equation equation and and solves for or X nn-1, and so forth. The pseudo-code above overwrites the solution x. x. overwrites the right-hand-side right-hand-side vector vector b b with with the the solution The Gaussian Gaussian elimination part of of the the algorithm algorithm is equivalent (when, (when, as we The elimination part is equivalent as we have assumed, are required) have assumed, no no row row interchanges interchanges are required) to to factoring factoring A into into the the product product of of an upper unit lower lower triangular triangular matrix matrix (that (that is, is, aa lower lower an upper triangular triangular matrix matrix U U and and aa unit triangular matrix all ones L: A = LU. LU. As algorithm triangular matrix with with all ones on on the the diagonal) diagonal) L: A = As the the algorithm is written is overwritten above is written above, above, the the matrix matrix A A is overwritten with with the the value value of of U U (on (on and and above the of the diagonal) and L (below the diagonal-there diagonal—there is no need to store the diagonal of known to consist of all ones). At the same time, the first loop above L, since it is known -1 effectively replaces b by L L -1 b. The back substitution phase is then equivalent to effectively b. x 1 1 -1 1 1 replacing L=A A -lb. A = = LU is simply L~ b by U-1LU~ L~ b = b. The factorization A simply called the the LU factorization. factorization. It is is not not difficult difficult to to count count the the number number of arithmetic operations operations required required by by It of arithmetic Gaussian elimination elimination and and back back substitution. substitution. It turns turns out out to to be be Gaussian
L U (the computation of L -1x b most of the operations used to factor with most factor A into LU 11 1 2 L -1 bb requires only O(2n2) and then UU~ L~ O(2n ) operations). (Exercise 1 asks the reader to results.) to verify verify these these results.) 80 (SPD), then one can When symmetric and When the the matrix matrix A A is is symmetric and positive positive definite definite80 (SPD), then one can take factor the LLTT,, where to factor the matrix matrix as as A A = = LL where L L is is lower lower take advantage advantage of of symmetry symmetry to triangular. This This factorization factorization is is called called the the Cholesky Cholesky factorization. factorization. (The (The Cholesky triangular. Cholesky factorization-in particular, factor L is not the same matrix L appearing in the LU factorization—in particular, it does not have have all all ones ones on on the the diagonal—but diagonal-but it it is closely related.) related.) The symmetry it does not is closely The symmetry of LU factorization; of A makes makes the the Cholesky Cholesky factorization factorization less less expensive expensive than than the the LU factorization; the count is O(n33/3). For the operation operation count is O(n For simplicity simplicity (because (because the the Cholesky Cholesky factorization factorization harder to describe than the LU we will discuss is less familiar and harder LU factorization), we the direct direct solution solution of of linear terms of of Gaussian elimination and and the the LU the linear systems systems in in terms Gaussian elimination factorization. However, should bear in mind stiffness matrix K factorization. However, the the reader reader should bear in mind that that the the stiffness matrix K is SPD, and so so the the Cholesky Cholesky factorization factorization is is preferred preferred in in practice. is SPD, and practice. 80 80The The
nXn reader should should recall recall that that aa symmetric symmetric matrix matrix A A e ER Rnxn is called called positive positive definite reader is definite ifif
x G Rn,, x ^ 0 =» x • Ax > 0. xER x,tO=}x·Ax>O. The matrix matrix A A is positive definite definite if if and and only only if if all of its its eigenvalues eigenvalues are are positive. positive. The is positive all of
475
10.2. Solving Solving sparse sparse linear linear systems 10.2. systems
n n 100 200 200 400 400 800 800 1600
time (s) (s) 0.0116 0.107 0.107 1.57 12.7 102
Table 10.2. Time required required to to solve solve an an nn xx nn dense dense linear linear system on aa Table 10.2. Time system on personal computer. computer. personal The size The operation operation counts counts shows shows how how the the computation computation time time increases increases as as the the size of the the system system increases--doubling increases—doubling the the size size of of the system causes causes an an 8-fold 8-fold increase increase of the system in computation computation time. time. As As aa frame frame of of reference, Table 10.2 10.2 gives gives the the time time required required to to in reference, Table solve an an nn x linear system system on on aa reasonably good personal computer at at the the time time solve x nn linear reasonably good personal computer 81 of this this writing. writing.81 of With the rapid improvements hardware of two decades, With the rapid improvements in in computer computer hardware of the the last last two decades, it might might seem seem that that concerns concerns about about algorithmic algorithmic efficiency efficiency are are less less significant significant than than it they used used to to be. be. Indeed, Indeed, many mainframe computers computers 25 they many problems problems that that required required mainframe 25 years ago ago can can now now easily easily be be solved solved on on inexpensive inexpensive personal personal computers. computers. However, years However, 3 with not difficult to encounter problems that that with an an operation operation count count of of O(2 0(2n /3), it it is is not difficult to encounter problems n 3/3), exceed available computing power. power. For For example, example, consider consider the the discretization discretization of of aa exceed available computing three-dimensional N divisions then the of three-dimensional cube. cube. If If there there are are N divisions in in each each dimension, dimension, then the size size of 3 the the order N33 x N3, the system system will will be be on on the order of of N xN , and, and, if if aa dense dense linear linear system system of of this this order order is be solved by aa dense method, that is to to be solved (or (or even even if if aa sparse sparse linear linear system system is is solved solved by dense method, that is, not take then the is, aa method method that that does does not take advantage advantage of of sparsity), sparsity), then the operation operation count count will be be O(N9). to refine refine the the mesh mesh by by aa factor will O(N9). Merely Merely to factor of of 22 in in each each dimension dimension will will increase the the computation computation time time by factor of of 512. 512. (We (We are are not even considering considering the the increase by aa factor not even memory requirements.) Thus, Thus, given given the times in in Table Table 10.2, 10.2, to to solve solve aa problem problem on memory requirements.) the times on 10 xx 10 10 xx 10 10 grid grid might might take take aa minute; minute; to to solve solve the the same same problem problem on on aa 20 20 xx 20 20 xx 20 aa 10 20 grid would would take more than than 88 hours! hours! grid take more that algorithmic is critical This This discussion discussion should should convince convince the the reader reader that algorithmic efficiency efficiency is critical for solving solving some some realistic We now now discuss discuss the the solution solution of of sparse sparse systems; systems; for realistic problems. problems. We aa comparison comparison of of operation operation counts counts will will show show the the advantages advantages of of aa method, method, such such as as finite finite elements, elements, that that leads leads to to sparse sparse linear linear systems. systems.
10.2.2
Direct solution of banded systems
When the employed in element method has aa regular structure, the the When the mesh mesh employed in the the finite finite element method has regular structure, resulting stiffness matrix tends to to be be banded. The entries entries of of aa banded matrix are are resulting stiffness matrix tends banded. The banded matrix zero except for for those those in in aa band band close close to the main diagonal. The The precise precise definition definition zero except to the main diagonal: is the following. is the following. Definition Definition 10.1. 10.1.
nxn We say that A A is is banded banded with with half-bandwidth Let A A e ER Rnxn.. We say that half-bandwidth Let
81 81The MHz Pentium rate of improvement of The CPU CPU is is aa 450 450 MHz Pentium II. II. Of Of course, course, the the rate of improvement of CPUs CPUs being being what what it this will will no no longer good CPU by the the time time this this book book is it is, is, this longer be be considered considered aa reasonably reasonably good CPU by is published! published!
Chapter 10. 10. More about finite element methods
476
Pp ifif li-jl >p=>Aij =0.
the stiffness arising from from solving Poisson's As an an example, example, consider consider the stiffness matrix matrix arising solving Poisson's equation: equation: -~u
= f(x)
u = 0 on
in
n,
(10.6)
an.
2 Suppose is the unit square ER R2 :: 0 0 < x\ Xl < 1,0 X2 < I}), we Suppose n £7 is the unit square (n (J7 = = {x {x € 1,0 < #2 l})> and and we method with a regular triangulation of n apply the the finite element method f) and piecewise linear finite element functions. Dividing the xX and y intervals, [0,1], [0,1], into n subin2 2 2 tervals and (n + 1)2 I) nodes. Only the interior nodes nodes we obtain obtain 2n elements elements and nodes. Only the interior tervals each, each, we the stiffness - 1) - 1)2. are free, so the stiffness matrix matrix is (n — I) 22 xX (n — I) 2 . As we showed in Example 8.10, aa typical typical free rifi iteracts with nodes 8.10, free node node n/; iteracts with nodes
(also with n//;-n coefficients, the corresponding and n/ n /;+n' but, with with constant constant coefficients, the corresponding (also with nodes nodes n i-n and i+n, but, entries of of K to be zero due due to cancellation), so so that subdiagonals entries K turn turn out out to be zero to cancellation), that the the sub diagonals of of A —n + + 1, 1, -1 — 1 and and the superdiagonals indexed indexed by by 1, 1, n -— 1, 1, along along with A indexed indexed by by -n the superdiagonals with banded with half-bandwidth the main diagonal, contain nonzero entries. Thus A is banded n n -- 1. 1. See See Figure Figure 10.7 10.7 for for the the sparsity sparsity pattern pattern of of A. A. It is completely straightforward to apply elimination with with back back subis completely straightforward to apply Gaussian Gaussian elimination substitution banded system. stitution to to aa banded system. Indeed, the typical step of the algorithm algorithm is just as in in the the dense dense case, case, except that the inner inner loops run over a limited limited range of of indicesindices— keeping within the the band. band. Here Here is is the the algorithm: keeping the the computation computation within algorithm: for i = 1,2, ... , n - 1 for j = i + 1, i + 2, ... , mini i k· t- ~ J~ Ai;
+ p, n}
bj t- bj - Ajibi
for k = i + 1,i + 2, ... ,min{i + p,n} Ajk t- Ajk - AjiAik
for i = n, n - 1, ... ,1 bi t- (bi -
Ej=i+l Aijbj )
jAii
we assume that no row interchanges interchanges are required.) (Here, again, we It is easy to show that the above algorithm requires O(2p22n) n) operations operations (see Exercise 2)—a considerable considerable savings if pp «n. <£ n. For For example, example, consider consider solving savings if solving PoisPoisExercise 2)-a son's equation in two dimensions, as discussed above. The discrete Laplacian (under son's equation in two dimensions, as discussed above. The discrete Laplacian (under Dirichlet conditions), is an (n - 1)2 (n — I) 2 x (n -— 1)2 I) 2 banded matrix with half-bandwidth n -— 1. 1. The cost of solving such a banded system is O(2(n -— 1)4), I) 4 ), as opposed to a cost cost of of
10.2. 10.2. Solving sparse linear systems
477
..••
..
10 _.
,
-.••••
••••••
_.
20 30
e. _.
.....•
,,
-.••••
e.
,
_. e.
-..•...
40
..••..
_.
50
,,
-....•. -.-. -...•... -.-.-.•..•..
60 70 80~
o
______
~
______
~
nz
, _.
•• __ _____________
40
20
e.
.... -.-. -. ...-. -....-. -.-.-. -.-.-. ....
....e.
= 369
~~.
~
60
80
Figure pattern of Laplacian (200 triangular Figure 10.7. 10.7. The The sparsity sparsity pattern of the the discrete discrete Laplacian (200 triangular elements). elements). if Gaussian elimination used. (For these if the the standard standard Gaussian elimination algorithm algorithm is is used. (For SPD SPD matrices, matrices, these operation be divided by two.) two.) operation counts counts can can be divided by The cost cost of performed on The of aa direct direct method method performed on aa sparse sparse matrix matrix is is controlled, controlled, not not merely by the in the the matrix, matrix, but but by by the the fill-in fill-in that merely by the number number of of nonzeros nonzeros in that occurs occurs during during the course course of of the algorithm. Fill-in is said said to to have occurred whenever an entry entry that the the algorithm. Fill-in is have occurred whenever an that is originally zero becomes nonzero during the course of the algorithm. In factoring aa banded fill-in occurs banded matrix, matrix, fill-in occurs within within the the bands, bands, as as can can be be seen seen by by inspecting inspecting the the Land L and U U factors factors (see (see Figure Figure 10.8). 10.8). Entries Entries that that become become nonzero nonzero during during the the course course of the algorithm be included included in the cost. of the algorithm must must be in subsequent subsequent calculations, calculations, increasing increasing the cost.
10.2.3
Direct solution of general sparse systems
When A is but not more difficult the cost When A is sparse sparse but not banded, banded, it it is is more difficult to to predict predict the cost of of aa direct direct matrix is method. The cost cost is governed governed by the degree of of fill-in, fill-in, and and when the the matrix is not not banded, the the fill-in fill-in is unpredictable. Figure banded, is unpredictable. Figure 10.9 10.9 shows shows aa symmetric symmetric sparse sparse matrix matrix A with with the the nonzeros nonzeros placed placed randomly, randomly, and and also also the the resulting fill-in. fill-in. The The original original matrix triangular factor matrix has has aa density density of of 9.46%, 9.46%, while the lower lower triangular factor of of A has has aa density density of 61%. of over over 61%. Sparse matrices matrices whose whose sparsity sparsity pattern unstructured are are particularly suited pattern is is unstructured particularly suited Sparse to iterative methods. methods only only require require the the ability to compute to iterative methods. Iterative Iterative methods ability to compute matrixmatrixvector products, products, such possibly, for nonsymmetric matrices, vector such as as Ap Ap (and (and possibly, for nonsymmetric matrices, the the product product T AT p). Therefore, the particular sparsity pattern is relatively unimportant; the A p). Therefore, the particular sparsity pattern is relatively unimportant; the cost cost
Chapter 10. 10. More about finite element element methods
478
20 40
40
60
60
80"'-_ _ _ __
80"'-_ _ _ _ __
o
20
40 nz = 737
60
80
o
20
40
60
80
nz =737
Figure sparsity pattern pattern of and U U {right} factors of of Figure 10.8. 10.8. The The sparsity of the the L L {left} (left) and (right) factors the discrete Laplacian (200 triangular elements). the discrete Laplacian {200 triangular elements}.
of the the matrix-vector is mostly mostly governed governed by density of of the matrix (the matrix-vector product product is by the the density the matrix (the of percentage of of nonzero nonzero entries). entries). percentage 10.2.4 10.2.4
Iterative solution sparse linear linear systems Iterative solution of of sparse systems
Even when A A is be too in terms or Even when is sparse, sparse, it it may may be too costly, costly, in terms of of arithemtic arithemtic operations operations or memory (or (or both), both), to solve Ax Ax = directly. An An alternative alternative is is to to use use an an iterative memory to solve = bb directly. iterative algorithm, which which produces sequence of of increasingly increasingly accurate accurate approximations approximations to to the the algorithm, produces aa sequence true Although the the exact be obtained in true solution. solution. Although exact solution solution can can generally generally not not be obtained except except in the number of get the the limit limit (that (that is, is, an an infinite infinite number of steps steps is is required required to to get the exact exact solution), solution), in many cases that in many cases aa relatively relatively few few steps steps can can produce produce an an approximate approximate solution solution that is we should keep in that, in of is sufficiently sufficiently accurate. accurate. Indeed, Indeed, we should keep in mind mind that, in the the context context of the "exact" Ax = b b is not really solving solving differential differential equations, equations, the "exact" solution solution to to Ax is not really the the exact the true exact solution-it solution—it is is only only an an approximation approximation to to the true solution solution of of the the differential differential iterative algorithm no larger equation. equation. Therefore, Therefore, as long long as the the iterative algorithm introduces introduces errors errors no larger than the discretization perfectly satisfactory. than the discretization errors, errors, it it is is perfectly satisfactory. beyond the of Many Many iterative iterative algorithms algorithms have have been been developed, developed, and and it it is is beyond the scope scope of to survey them. We will content ourselves with outlining the conjugate this book this book to survey them. We will content ourselves with outlining the conjugate gradient (CG) (CG) method, most popular algorithm for for solving solving SPD SPD systems. systems. (The the most popular algorithm (The gradient method, the stiffness matrix from aa finite element problem, being aa Gram Gram matrix, matrix, is is SPD-see SPD—see stiffness matrix K K from finite element problem, being Exercise 6.) 6.) We We will will also also briefly briefly discuss discuss preconditioning, method for for accelerating accelerating Exercise preconditioning, aa method convergence. convergence.
479
10.2. 10.2. Solving Solving sparse linear systems
o
50
100
nz =3096
nz =946
Figure A random sparse matrix its lower triangular factor factor Figure 10.9. 10.9. A random sparse matrix (left) (left) and and its lower triangular
(right). (right). The method is is actually actually an an algorithm algorithm for for minimizing quadratic form. If The CG CG method minimizing aa quadratic form. If n nxn igisSPD A eE RRnxn SPDand and0¢: :RRn-»--tRRisisdenned definedbyby 1 ¢(x) = "2x. Ax - b· x,
(10.7)
then calculation (see (see Exercise Exercise 3) that then aa direct direct calculation 3) shows shows that "\l¢(x) = Ax - h.
(10.8)
Therefore, the the unique unique stationary stationary point point of of ¢ is Therefore, 0 is
x = A-lb.
Moreover, aa consideration of the second derivative shows that that this stationary Moreover, consideration of the second derivative matrix matrix shows this stationary point is is the the global global minimizer minimizer of quadratic form defined by by an matrix is is point of ¢0 (a (a quadratic form defined an SPD SPD matrix analogous to scalar quadratic quadratic ax > 0—see 10.10). Therefore, to aa scalar ax22+bx+c +bx+c with with a a> O-see Figure Figure 10.10). Therefore, analogous solving minimizing ¢ are equivalent. equivalent. solving Ax = =b b and and minimizing 0 are We can can thus thus apply apply any minimization algorithm algorithm to to ¢, and, assuming assuming We any iterative iterative minimization 0, and, it works, converge to desired value x. A class of it works, it it will will converge to the the desired value of of x. A large large class of minimization minimization algorithms are Such algorithms are based based algorithms are descent descent methods methods based based on on aa line line search. search. Such algorithms are idea of of aa descent direction: Given an estimate estimate x^ x(i) of the solution, solution, aa descent on on the the idea Given an of the descent from x^, x(i), ¢ in the the direction direction p is is aa direction direction p direction such such that, that, starting starting from 0 decreases decreases in direction p. This means that, that, for for all a > 00 sufficiently sufficiently small, small, of of p. This means all a ¢(x(i)
+ ap) < ¢(x(i))
Chapter 10. methods 10. More about finite element methods
480
6
y
x
Figure graph of form defined positive definite Figure 10.10. 10.10. The The graph of aa quadratic quadratic form defined by aa positive definite matrix. The The contours contours of of the the function are also also shown. junction are shown. matrix. holds. this means means that that the holds. Equivalently, Equivalently, this the directional directional derivative derivative of of ¢0 at at x(i) xW in in the the direction of of pp is is negative, that is, direction negative, that is, V'¢(x(i)) . p
< O.
Given to minimize Given aa descent descent direction, direction, aa line line search search algorithm algorithm will will seek seek to minimize ¢0 along along the the ray 20} which is ray {x(i) (x^ + ap ap :: aa > 0} (that (that is, is, it it will will search search along along this this "line," "line," which is really really aa ray). ray). Since ¢0 is is quadratic, quadratic, it it is is particularly easy to the line line search-along search—along Since particularly easy to perform perform the one-dimensional subset, subset, ¢(j> reduces reduces to to aa scalar scalar quadratic. quadratic. Indeed, Indeed, aa one-dimensional ¢(x(i)
+ ap)
=
~(x(i) + ap) . A(x(i) + ap) 2
- b· (x (i)
= ~x(i) . Ax(i) + ap' Ax(i) + a 2
2
2
2
=
~
=
~2 p.Ap-ap. (b-Ax(i))
p. Ap
+a
+ ap)
p. Ap - b· x(i) - ab· p
(p. Ax(i) - P . b)
+ ¢(x(i))
(the symmetry of A Ap/2 and p. Ax(i) /2). A was used to combine the terms x(i) x^ .• Ap/2 p • Ax^/2)The minimum is easily easily seen seen to occur at at The minimum is to occur p. (b - Ax(i)) p·Ap .
a- --'----.:....
(10.9)
481 481
10.2. 10.2. Solving sparse linear systems
How should the descent direction is the steepest How should the descent direction be be chosen? chosen? The The obvious obvious choice choice is the steepest descent direction descent direction the directional derivative of ¢ x(i) is as negative as possible in this direction. since the > at x^ The resulting algorithm (choose in the the The resulting algorithm (choose aa starting starting point, point, move move to to the the minimum minimum in steepest descent descent direction, calculate the steepest descent at that point, steepest direction, calculate the steepest descent direction direction at that new new point, and is called algorithm. It is guaranteed converge to to and repeat) repeat) is called the the steepest steepest descent descent algorithm. It is guaranteed to to converge the the minimizer minimizer x x of of 0, ¢, that that is, is, to to the the solution solution of of Ax Ax = = b. h. However, However, it it can can be be shown shown that the the steepest descent method method converges converges slowly, especially when when the the eigenvalues eigenvalues that steepest descent slowly, especially differ greatly in of A differ in magnitude (when (when this is is true, the matrix A is said said to be ill-conditioned).. ill-conditioned) For an example of search in steepest descent see Figure For an example of aa line line search in the the steepest descent direction, direction, see Figure 10.11 7. 10.11 and and Exercise Exercise 7. 5~--~----------~--~----~--~
4
3
o -10~--~----~2----~3~---4~--~5----~6
x
Figure 10.11. contours of 10.10. The Figure 10.11. The contours of the the quadratic form from Figure 10.10. The steepest direction from (marked by the "0") "o") is is indicated, along steepest descent descent direction from xx = = (4,2) (4,2) (marked by the indicated, along with the the steepest descent direction direction (marked (marked by "o"). desired with the minimizer minimizer in in the steepest descent by "<:> "). The The desired (global) minimizer is marked by "x." (global) minimizer is marked by
Example 10.2. test the the algorithms described in in this section, we we will will use use the the Example 10.2. To To test algorithms described this section, BVP BVP -~u
= f(x)
u = 0 on
in
n,
an,
(10.10)
482
Chapter 10. methods 10. More about finite element methods
where fi is is the the unit unit square where n square and and f(x) = -2
(-xi + x~
- (-1
+ X2)X2 + 3X1(-1 + X2)X2).
The exact solution solution is is The exact u(x) = xix2(1- x1)(1- X2). We mesh on dividing the Xl and X2 intervals subinWe establish establish aa regular regular mesh on n £7 by by dividing the x\ and #2 intervals into into 64 subintervals each. each. This in 22 .• 64 triangles and = 3969 3969 free free nodes. nodes. The tervals This results results in 6422 triangles and 63 6322 = The finite finite = f, isis therefore therefore 3969 3969 x 3969 3969 (a (a fairly fairly large large system, system, but but very element equation, equation, K element Kuu = very sparse). sparse). We apply apply the the steepest to solve Ku = f. f. One One hundred hundred steps, steps, We steepest descent descent algorithm algorithm to solve Ku starting with the the zero as the the initial estimate, produces estimate of starting with zero vector vector as initial estimate, produces an an estimate of u u that that by about in the Euclidean norm. error in differs from the exact value value uu by differs from the exact about 76% in the Euclidean norm. The The error in the corresponding linear function, to the the exact exact solution u, is is the corresponding piecewise piecewise linear function, compared compared to solution u, about 72% in in the the energy energy norm. norm. By comparison, the the exact Ku = By comparison, exact solution solution uu of of Ku = ff about 72% corresponds corresponds to to aa piecewise linear linear function that that has has an an error of about 3% in in the the energy energy norm. If we take 1000 Clearly Clearly these results results are not not very good. If 1000 steps instead of of 100, 25% in the Euclidean Euclidean norm and 23% 23% in the energy the errors become about 25% energy norm. It appears accurate answer answer using steepest descent, descent, but but only It appears that that we we can can obtain obtain an an accurate using steepest only by of steps. steps. by taking taking aa large large number number of
10.2.5
The conjugate gradient algorithm
The conjugate gradient gradient (CG) another descent algorithm that is usually usually aa The conjugate (CG) algorithm algorithm is is another descent algorithm that is method. The problem with with the the steepest great great improvement improvement over over the the steepest steepest descent descent method. The problem steepest descent while the steepest descent method is that, that, while steepest descent direction direction is locally optimal, optimal, from from aa global global point point of of view, view, the the search search directions directions are are poorly poorly chosen. chosen. Indeed, Indeed, it it can can be be shown that successive are orthogonal orthogonal (see (see Exercise Exercise 4). shown that successive search search directions directions are 4). It It is is not not efficient to approach the desired via orthogonal all, the the shortest efficient to approach the desired solution solution via orthogonal steps steps (after (after all, shortest path between two two points points follows straight line). path between follows aa straight line). The defines the successive search search directions pleasThe CG CG algorithm algorithm defines the successive directions to to satisfy satisfy aa pleasing global property—basically property-basically that that each step preserves preserves the the optimality property of of ing global each step optimality property previous steps. To To be after kk steps steps of estimated solutions solutions is the of CG, CG, the the estimated is the previous steps. be precise, precise, after minimizer the /^-dimensional k-dimensional subset by the the first direcminimizer of of ¢0 over over the subset spanned spanned by first k search search directions. tions. It is rather rather difficult difficult to algorithm-the final final form It is to derive derive the the CG CG algorithm—the form results results from from several nonobvious simplifications. We will content ourselves ourselves with with showing several nonobvious simplifications. We will content showing the the critical the computation the search direction. We We will will assume critical step: step: the computation of of the search direction. assume that that the the x(O) = 0, that the first kk search directions are initial estimate estimate of the solution is x^°^ p(i) ? p(2) p(fc) ^ ^d • • ,,ak &k so p(l), p(2),^ ... ^,p(k), and tthat after kk steps steps we we have have determined determined ai, a1, 0:2, 0:2, •... so that that nat after k
x(k)
=L
aiP(i)
i=l
solves
min {¢(x)
x E span{p(1), ... ,p(k)}} .
Solving sparse linear systems 10.2. Solving
483
fe+11 p(k+ If We now wish to find a new search direction p( )) with the following property: If
x(k+1) = x(k)
+ ak+lp(k+1) ,
where ak+l ctk+i solves fc+11 then x( x(k+ )) solves
min {¢>(x) : x E span{p(1), ... ,p(k+1)}} .
(10.11)
fc+1 It is not clear that such a p( p(k+1) however, it can be, as we we now now show. ) can be found; however, To (10.11), we /?i, /92, ... • • • ,,f3k+1 0k+i such that To solve (1O.11), we must must find f31,/h that
is as small as possible. (We (We separate the last term, f3k+1p(k+ 0k+ip(k+11)\ , from the sum because we already because already know how to make
algebra shows that as small as possible.) Some straightforward straightforward algebra ¢>
(t,
f3iP(i)
+ f3k+lP(k+1))
= ¢>
(t,
f3iP(i))
1 +f3k+lP(k+ ) . A
(t,
f3iP(i))
+ ¢> (f3k+ 1P(k+1))
.
fc+1 the crucial observation: observation: If p(k+1)) so that Here is the If we can choose p(
is zero, then
minimization problem problem is then "decoupled." The minimization "decoupled." That is, we can independently choose 8-1. 8<> 81. to minimize choose f31, f32, ... ,f3k to minimize
(10.12)
484
10. More about finite element methods Chapter 10.
and minimize and Pk+I @k+i to minimize
¢' (Pk+ I P(k+1))
,
and the resulting resulting PI,P2, ,Pk+1 will will be be the the solution This is is what what we we and the /?i,$2, ... • • • ,flk+i solution of of (10.11). (10.11). This want, since we of (10.12). want, since we already already have have computed computed the the minimizer minimizer of (10.12). Our problem then then reduces reduces to to finding finding p(k+ to satisfy Our problem p(fe+1I )) to satisfy k
L
(PiP(k+1) . Ap(i))
= O.
i=1
It is It is certainly certainly sufficient sufficient to to satisfy satisfy p(k+1) . Ap(i)
= 0, i = 1,2, ... , k.
We can assume by induction that p(j) . Ap(i)
= 0,
i,j
= 1,2, ... ,k,
i ¥-j.
(10.13)
p(1), p(2), ... ,, p(k) We can can recognize condition (10.13) as stating stating that the vectors p^,p^,... p^ 82 respect to the inner product82 are orthogonal with respect
(X,Y)A = X· Ay. search direction ), then, we we just take aa descent To compute the search direction p(k+ p( fc+1I ), descent direction direction and subtract subtract off off its component lying lying in in the the subspace and its component subspace Sk =
span {p(1), p(2), ... , p(k) }
;
the vectors p(1), p(2), ... the result will be orthogonal to each of the p^\p^,. - - ,p(k). , p^- We will use steepest descent direction r = = — -\7¢,(x(k)) the steepest V^(x( fc )) to generate the new search direction. To achieve achieve the the desired orthogonality, we To desired orthogonality, we must must compute compute the the component component of of rr in in SSkfc projecting r onto Sk Sk in the inner product product defined by A. We We therefore take by projecting P
(k+1) _ _ ~ r· Ap(i) (i) - r ~ p(i) . Ap(i) P . • =1
For reasons that that we we cannot cannot explain explain here, here, most most of of the the inner inner products products rr·• ApW Ap(i) are For reasons are zero, and the result is (k+I) _
P
- r
_
r· Ap(k) p(k). Ap(k)
(k)
P
(10.14)
We can then formula from from (10.9) direction We can then use use the the formula (10.9) to to find find the the minimizer minimizer ak+i Ctk+1 in in the the direction fe+1 ) , and p(k+ I ), and we will have found x(k+ ). of p( x(fe+1I ). By taking taking advantage of the the common By advantage of common features features ofthe of the formulas formulas (10.9) (10.9) and and (10.14) (10.14) (and simplifications), we can express express the in the the (and using using some some other other simplifications), we can the CG CG algorithm algorithm in fc efficient form. (The vector b -— Ax( Ax(k)) is called the the residual in the the equation following efficient Ax Ax = = b—it b-it is is the the amount amount by by which which the the equation equation fails fails to to be be satisfied.) satisfied.) 82 82It be shown shown that, that, since A is positive definite, definite, x X·• Ay Ay defines defines an an inner inner product product on see It can can be since A is positive on Rnj R n ; see Exercise 5. Exercise 5.
10.2. Solving sparse sparse linear systems 10.2.
485 485
= bb -— Ax Ax (* (* Compute Compute the the initial initial residual residual *) rr = *) pp «— r (* Compute the initial search direction *) +- r (* Compute the initial search direction Ci <- r • r Cl+-r·r for k = for fc = 1,2, l , 2 , ... ... v «— Ap Ap v+c2 <- p • v C2+-P'V o: +<— ~ ^ (* (* Solve Solve the the one-dimensional one-dimensional minimization minimization problem problem *) 0: *) xx +-f- xx + o:p ap (* (* Update Update the the estimate estimate of of the the solution solution *) rr +«— rr -—o:v CKV (* Compute Compute the the new new residual residual *) c3 «- rr ·• rr c3+f3 +- ~ £<-S Cl p -fftp + rr (* (* Compute Compute the the new new search search direction direction *) P +- f3p *) Ci <-C Cl +- C33 The reader reader should should note that only only aa single single matrix-vector matrix-vector product product is is required required at at each each The note that step making it step of of the the algorithm, algorithm, making it very very efficient. efficient. We We emphasize emphasize that that we we have have not not 83 derived all all of of the the steps steps in in the the CG CG algorithm. algorithm.83 derived The name "conjugate gradients" gradients" is is derived derived from from the the fact fact that that many many authors authors The name "conjugate refer the orthogonality the inner refer to to the orthogonality of of the the search search directions, directions, in in the inner product product defined defined by A, as as A-conjugacy. A-conjugacy. Therefore, Therefore, the the key key step step is is to to make make the the (negative) (negative) gradient gradient by A, direction conjugate conjugate to to the the previous previous search search directions. directions. direction Example 10.3. 10.3. We We apply apply 100 100 steps steps of of the the CG CG method method to to the the system system Ku Ku == ff from from Example Example 10.2. The The result result differs differs from the exact exact solution by about about 0.001% 0.001% in in the the Example 10.2. from the solution uu by Euclidean norm, piecewise linear function is just as Euclidean norm, and and the the corresponding corresponding piecewise linear function is just as accurate accurate from solving (error (error of of about about 3% in in the the energy energy norm) norm) as as that that obtained obtained from solving Ku Ku = f exactly. exactly.
10.2.6
CG algorithm Convergence of the CG
The kth estimate, The CG CG algorithm algorithm was was constructed constructed so so that that the the fcth estimate, x(k), x( fc ), of of the the solution solution 2 k-dimensional subspace p(2), ... ,p(k)}. xx minimizes minimizes 4> (j> over over the the fc-dimensional subspace Sk == span{p(1), spanjp^^p^ ),... ,p^}. minimizes 4> all Therefore, Therefore, x(n) x^ n ) minimizes 0 over over an an n-dimensional n-dimensional subspace subspace of of Rn, R n , that that is, is, over over all of of Rn. Rn. It It follows follows that that x(n) x(n) must must be be the the desired desired solution: solution: x(n) x(n) == x. x. Because of of this this observation, observation, the the CG CG algorithm algorithm can can be be regarded regarded as as aa direct direct Because method-it method—it computes computes the the exact exact solution solution after after aa finite finite number number of of steps steps (at (at least least when performed in point arithmetic). why when performed in floating floating point arithmetic). There There are are two two reasons, reasons, though, though, why this property is this property is irrelevant: irrelevant: 1. point arithmetic, 1. In In floating floating point arithmetic, the the computed computed search search directions directions will will not not actually actually
round-off errors), fact, be be A-conjugate A-conjugate (due (due to to the the accumulation accumulation of of round-off errors), and and so, so, in in fact, x(n) x^ n ) may may differ differ significantly significantly from from x. x. 2. used as 2. Even Even apart apart from from the the issue issue of of round-off round-off errors, errors, CG CG is is not not used as aa direct direct method for the the simple simple reason reason that that nn steps steps is is too too many! many! We We look look to to iterative iterative method for 83 83For For aa complete complete derivation derivation and and discussion discussion of of the the CG CG algorithm, algorithm, see see [19], [19], for for example. example.
Chapter More about finite element element methods methods Chapter 10. 10. More about finite
486
methods elimination too expensive. methods when n is very large, making Gaussian elimination In such aa case, iterative method method must must give reasonable approximation in In such case, an an iterative give aa reasonable approximation in much less than n iterations, or it also is too expensive. The CG algorithm much less than n iterations, or it also is too expensive. The CG algorithm useful precisely because it can give very good results in a relatively small is useful number of iterations. iterations. The rate rate of of convergence is related related to to the the condition number of which The convergence of of CG CG is condition number of A, which is defined as as the the ratio ratio of of the the largest largest eigenvalue of A to is denned eigenvalue of to the the smallest. smallest. When When the the condition number number is is relatively relatively small (that is, is, when when A is is well-conditioned), well-conditioned), CG CG will will condition small (that converge rapidly. rapidly. The algorithm also works well well when when the the eigenvalues eigenvalues of converge The algorithm also works of A are are clustered into aa few groups. In In this case, even the largest largest eigenvalue is much much clustered into few groups. this case, even if if the eigenvalue is larger than the the smallest, will perform perform well. well. The The worst worst case case for for CG CG is larger than smallest, CG CG will is aa matrix matrix A whose eigenvalues eigenvalues are out over wide range. A whose are spread spread out over aa wide range.
10.2.7 10.2.7
Preconditioned CG Preconditioned CG
It is is often It often possible possible to to replace replace aa matrix matrix A A with with aa related related matrix matrix whose whose eigenvalues eigenvalues are quickly. This technique is called are clustered, and and for for which CG CG will converge converge quickly. called preconditioning, it requires find aa matrix that is preconditioning, and and it requires that that one one find matrix M M (the (the preconditioned preconditioner) that is somehow similar to A (in of its its eigenvalues) eigenvalues) but simpler to somehow similar to (in terms terms of but is is much much simpler to invert. invert. At At each step gradient (PCG) it is is necessary each step of of the the preconditioned preconditioned conjugate conjugate gradient (PCG) algorithm, algorithm, it necessary to solve an an equation equation of form Mq r. to solve of the the form Mq == r. Preconditioners can be in many Preconditioners can be found found in many different different ways, ways, but but most most require require an an intimate knowledge of the there are are few few general-purpose general-purpose intimate knowledge of the matrix matrix A. A. For For this this reason, reason, there methods. One One method method that that is used is is to to define preconditioner from from an methods. is often often used define aa preconditioner an incomplete factorization of A. An An incomplete factorization (like (like incomplete factorization of A. incomplete factorization factorization is is aa factorization fill-in is preCholesky) in in which fill-in is limited by fiat. fiat. Another method for constructing preconditioners replace A by aa simpler simpler matrix matrix (perhaps (perhaps arising from aa simpler simpler conditioners is is to to replace A by arising from PDE) inverted by methods. PDE) that that can can be be inverted by FFT FFT methods.
Exercises nxn 1. A E Rnxn. Determine the number of 1. Suppose Suppose A 6 R . Determine the exact exact number of arithmetic arithmetic operations operations = LU required for the computation of of A = LU via via Gaussian elimination. elimination. Further operations required to compute L-1b count the number of operations L-1b and U-1L-1b. U~ 1 L~ 1 b.
Verify the text. formulas will useful: Verify the the results results given given in in the text. The The following following formulas will be be useful:
ti = ti i=l
2
i=l
n(n + 1), 2
= n(n+1)(2n+1).
6
nxn 2. Suppose A A E Rnxn is banded with half-bandwidth half-bandwidth p. p. Determine Determine the exact € R number of arithmetic arithmetic operations operations required into L LU. to factor factor A A into U. number of required to
487
10.2. 10.2. Solving sparse linear systems
nxn Rnxn 3. Let A E 6 R be symmetric, and suppose bbERn. € R n . Define ¢(f> as in (10.7). holds. (Hint: method is write out Show Show that that (10.8) (10.8) holds. (Hint: One One method is to to write out
and then show that and then show that
8¢ n -8 (x) = "L...J AijXj X· Z j=i
bi ·
-
Another method is to show that ¢(x + y)
= ¢(x) + (Ax -
+ 0 (1IYI12) .
b) . y
In either case, the symmetry symmetry of A is essential.) nxn Rnn be given, 4. Let ER Rnxn be SPD, let b,y eE R Let A e given, and suppose a* a* solves
min¢(y - aV'¢(y)),
'" where ¢(x)
1 = -x· Ax 2
b . x.
Show that Show that V'¢(y - a*V'¢(y)) is orthogonal to V' ¢(y ). V0(y). nxn 5. Suppose A eE R Rnxn is SPD. Show that
(X,y)A = X· Ay defines an inner product on R R nn.. 6. V2, 6. Let {Vi, {vi, v . . . ,, vvnn}} be be aa linearly linearly independent set set of of vectors in an an inner inner prodprod2 , ... uct space, and let G E Rnxn R n x n be the corresponding Gram matrix:
Prove G is SPD. (See (See the the hint for Exercise 3.4.6.) Prove that that G is SPD. hint for Exercise 3.4.6.) 7. The quadratic quadratic form shown in Figures 10.10 10.10and and 10.11 10.11is is ¢(x)
where where
1 = 2'x, Ax -
A=[i
b .x
+ 20,
~],b=[~].
Chapter 10. 10. More about finite element methods
488
x(O) = = beginning at x(°) (a) Perform one step step of the steepest descent algorithm, beginning x(O) and the minimizer minimizer (4,2). Compute the steepest descent direction at x(°) along the line defined by the steepest steepest descent direction. Compare your results to Figure 10.1I. 10.11. (b) the second steepest descent algorithm. Do you (b) Now compute the second step of the steepest arrive solution of b? arrive at at the the exact exact solution of Ax Ax = = b? (c) Perform two steps of CG, beginning with x(°) x(O) = = o. 0. Do you obtain the exact solution? exact solution? iterative method, a stopping stopping criterion is essential: essential: One 8. When applying an iterative must decide, on the the basis basis of of some some computable quantity, when when the the computed must decide, on computable quantity, computed solution is is accurate accurate enough enough that that one one can can stop stop the the iteration. iteration. A common common stopsolution stopis to to stop when the the relative relative residual, ping criterion criterion is ping stop when residual, iiAx(k) -
bii
Ilbll E. falls below some some predetermined tolerance e.
(a) Write a program implementing the CG algorithm with the above stopstopping criterion. ping criterion. (b) Use Use your your program program to to solve the finite element equation equation Ku = = f arising (b) solve the finite element arising the BVP (10.10) for meshes of various sizes. For a fixed value of of from the E, how how does the number number of of iterations iterations required required depend the number number of of e, does the depend on on the unknowns (free nodes)? Explain how the CG algorithm algorithm must be modified if the initial estimate estimate x(°) x(O) 9. Explain Think of using the CG algorithm to compute is not the zero vector. (Hint: Think compute - x(°). x(O). What linear linear system does y satisfy?) y =x —
10.3 10.3
An outline the convergence for finite finite An outline of of the convergence theory theory for element methods element methods
present an overview the convergence theory for Galerkin finite eleWe will now present overview of the ment for BVPs. describing ment methods methods for BVPs. Our Our discussion discussion is is little little more more than than an an outline, outline, describing the kinds of analysis that are required to prove that the finite element method method converges to the true solution as the mesh is refined. We will use the Dirichlet problem problem
-V'. (k(x)V'u) = f(x) in 0, u = 0 on ao as our our model model problem. as problem.
(10.15)
10.3. 10.3. An outline of the convergence theory for finite element methods
489
10.3.1 The Sobolev space space H~(n) H*(n) 10.3.1 The Sobolev We begin addressing the the proper for the the weak form of the We begin by by addressing the question question of of the proper setting setting for weak form of the the weak form as BVP. In Section Section 8.4, 8.4, we derived derived the as find
U
E eben) such that a(u,v) = (f,v) for all v E eben).
(10.16)
However, as we pointed out in Section 5.6 (for (for the one-dimensional case), the choice (n) for the space of of eb Cf^rj) space of of test functions is not really appropriate for for our purposes, since the finite element method uses functions functions that are not smooth enough to belong Moreover, the the statement of the weak form does not require that the the test to Cb(n). £>(£)) • Moreover, functions be so so smooth. smooth. We can define the appropriate space of test functions by posing the following question: the test test functions functions have variational question: What What properties properties must must the have in in order order that that the the variational equation equation a(u,v) = (f,v)
L22 inner product of of be well-defined? The energy inner product is essentially the L OU OV OXl OXl
ou
OV
+ OX2 OX2 .
(The the PDE, PDE, fc(x), k(x), is is also involved. However, we assume assume that that kk (The coefficient coefficient of of the also involved. However, if if we is smooth and bounded, bounded, then, then, for the purposes purposes of this discussion, discussion, it it may may as well is smooth and for the of this as well ignored.) It be constant and therefore can be ignored.) It suffices, therefore, therefore, that the partial 2 derivatives of of u and belong to L2(O), is natural natural to derivatives and v belong to L (t)}, and and it it is to define define the the space space (10.17)
An immediately arises arises is definition of derivatives of u. An issue issue that that immediately is the the definition of the the partial partial derivatives of u. Need at every every point If so, so, then Need du/dxi, OU/OX1, du/dx^ OU/OX2 exist exist at point of of £)? O? If then the the use use of of piecewise piecewise linear functions functions is still ruled out. The of partial partial derivatives derivatives (as (as presented presented in in calculus calculus books books The classical classical definition definition of and courses), in terms of limits of difference difference quotients, is purely local. There is another way to define derivatives that is more global in nature, and therefore more another tolerant of certain kinds of singularities. We begin by defining the the space C8"(O) Co°(tl) to 84 be the set of all infinitely differentiable differentiable functions whose support84 does not intersect O. (That the boundary of of fi. (That is, the support of of a e8"CO) (70°(fJ) function function is strictly in in the the any smooth function defined on fK 0 and interior of 0.) fi.) If If f/ is any and ¢ (f> E G C8"(O), (70° (fJ), then, by integration by by parts, integration parts, (10.18)
(the boundary integral must vanish since ¢ 0 and all of its derivatives are zero on the 2 boundary). We can define define aa derivative derivative of f/ E G LL2(O) (f2) by this equation: equation: If If there is is aa 2 L2(O) function g E €L (17) such that
r
in
g¢ = -
rf ~¢ for all ¢ E ego(o),
in
UXl
84 84The reader will will recall recall that that the the support support of is the the closure closure of of the the set set on on which The reader of aa function function is which the the function is nonzero. function is nonzero.
Chapter 10. More about finite element methods
490
respect to x\, Xl, and denoted then 9g is called the (weak) (weak) partial derivative of of 1 / with respect denoted a 1/ aXI. The definition of 1/ aX2 in df/dxi. The definition of a df/dx2 in the weak sense sense is entirely analogous. analogous. notation for we do for the We use the same notation for the weak partial derivatives derivatives as as we the classical classical partial derivatives classical partial derivatives; derivatives; it can be proved that if if the classical derivatives of / exist, so do the weak the same. same. The exist, then then so do the weak partial partial derivatives, derivatives, and and the the two two are are the The of 1 interpreted in terms of weak derivatives. The space HI (0) definition (10.17) is to be interpreted Hl(tl) is Sobolev space. is an example of of aa Sobolev space. It (0), It can can be shown shown that continuous continuous piecewise linear functions functions belong to HI /f1(J7), while, for example, discontinuous piecewise linear functions do not. Exercise 2 explores question in one dimension; complete justification the explores this this question in one dimension; aa more more complete justification is is beyond beyond the scope of scope of this this book. book. The standard product for for HI(O) is The standard inner inner product Hl(tl) is (f,g)Hl
=
i( n
Ig
a 1 ag a 1 ag ) + -a -a + -a -a Xl Xl X2 X2
'
and induced norm and the the induced norm is is
A g is is aa good good approximation / in in the H1 sense sense if if and and only only if g is is aa A function function 9 approximation to to 1 the HI if 9 good approximation to / and to V#. If we to good approximation to 1 and Vg \7 9 is is aa good good approximation approximation to \7 g. If we were were to L22 norm, on \7 9 need not be close measure closeness in the L on the other hand, V# close to to \71. V/. For an (in one is easier For an example example of of the the distinction distinction (in one dimension, dimension, which which is easier to to visualize), visualize), see Figure 10.12. see Figure 10.12. l Just as makes sense as long long as as u and vv belong belong to to H HI(O), Just as the the expression expression a(u, a(u, v) v) makes sense as u and (0), the right-hand right-hand side (/, (f, v) of the variational equation well-defined as long as 1/ equation is well-defined belongs L 2 (f2). It in this that the = (f'v) (f,v) is belongs to to L2(0). It is is in this sense sense that the variational variational equation equation a(u,v) a(u,v) = is under relatively relatively weak called the weak form of the BVP: the equation makes sense under assumptions on functions involved. assumptions on the the functions involved. l We now now define the subspace of H HI(O) by We define the subspace HJ(O) #o(fJ) of (ft) by HJ(O)={uEHI(O): u=OonaO}.
Then, so-called trace trace theorem, HQ (17) is is aa well-defined subspace Then, by by the the so-called theorem, HJ(O) well-defined and and closed closed subspace 1 HI(O). of H ^). Moreover, it can be shown that HI(O) Hl(fl) (and hence HJ(O)) #Q(^)) is complete under the HI Hl norm. (The notion of completeness was defined in Section 9.6.) equivalent to the HI Moreover, the energy inner product is equivalent H1 norm on the subspace HQ($I), which implies that that HJ(O) HQ(O,) is is complete energy norm It HJ(O), which implies complete under under the the energy norm as as well. well. It Riesz representation representation theorem theorem that the weak form of then follows from the the Riesz of the BVP, which as which we we now now pose pose as find u E HJ(O) such that a(u,v) = (f,v) for all v E HJ(O),
(10.19)
2 for each each 1 L2(0). and there is has aa unique solution solution for / E e L (f2). When When /f is is continuous continuous and is a classical solution classical solution uu to the the BVP, then uu is also the unique solution solution to to the weak form form of the the BVP.
10.3. An outline of the convergence theory for finite element element methods
1.5,....------"""1
491
5-------"""1
), 0
-0.5'---------' o 0.5
-5'"-------
o
0.5
X
X
Figure Figure 10.12. 10.12. Two functions belonging to to HI(O, Hl(Q, 1) 1) (left) (left) and their derivatives (right). The difference difference in the two functions is less than 5% in the L2 L2 norm, norm, 1 but it % in the HI it is more than 91 91% H norm. norm.
The various analytical analytical results mentioned in this section, such as the trace l theorem, completeness of the Sobolev space H HI(O), (£t), and the Riesz representation representation theorem, books on theorem, are are discussed discussed in in advanced advanced books on finite finite elements, elements, such such as as [6]. [6].
10.3.2 10.3.2
Best norm Best approximation approximation in in the the energy energy norm
We now We now know know that that the the weak weak form form of of the the BVP BVP (10.15) (10.15) has has aa unique unique solution solution uu E € HQ($}) for for each each f/ E e L2(0). L 2 (f)). Moreover, Moreover, given given aa triangulation triangulation T of of fl, fi, the the space space HJ(fl) Vh of of continuous continuous piecewise linear functions functions relative to T, satisfying satisfying the the Dirichlet Vh piecewise linear relative to Dirichlet HJ(O). We can therefore boundary conditions, is a finite-dimensional finite-dimensional subspace of -ffg(fl). apply the Galerkin method to compute the best approximation approximation from V Vh, h , in the energy energy norm, norm, to to the the true true solution solution u. u.
10.3.3
Approximation polynomials Approximation by by piecewise piecewise polynomials
We We have have seen seen (at (at least least in in outline) outline) that that the weak form form (10.19) (10.19) has has aa unique solution solution u, and and that that we we can can compute compute the the best best approximation approximation to to u from from the finite element element space Vh. Vh. The The next question is: is: How How good good is is the the best best approximation approximation from from Vh? V/j,? next question space This is a question of piecewise polynomial approximation, approximation, and the simplest way way to answer answer it it is is to to consider consider the the piecewise linear linear interpolant interpolant of of the the true true solution, solution, which
492
Chapter 10. 10. More about finite element methods
is is (using (using the the usual usual notation) notation) N
UI(X) =
L
U(XfJ¢i(X),
i=l
where x^, X/I, X/2,' XfN mesh. If where x / 2 , . .. . . ,, ~x.f are the the free free nodes nodes of of the the mesh. If we we can can determine determine how how well well N are approximates approximates Uu in in the the energy energy norm, norm, then, then, since since UI uj E € Vh Vh and and the the finite finite element element approximation approximation Uh Uh is is the the best best approximation approximation to to U u from from Vh, Vh, we we know know that that the the error error in Uh Uh is is no no greater. greater. in It can can be be shown shown that, that, if if Uu has has some some extra extra smoothness smoothness (in (in particular, particular, if if Uu is is aa solution lution of of the the strong strong form form of of the the BVP, BVP, so so that that it it is is twice twice continuously continuously differentiable), differentiable), then then UI HI
where h is is the the length length of of the the largest largest side side of of any any triangle triangle in in the the mesh mesh 1h Th and and C is is aa where 85 constant constant that depends on the particular particular solution Uu but is independent of the mesh. mesh.85 It follows that (10.20) also holds, holds, since since \\u - Uh\\E ~ \\u - UI\\E' also This completes the outline of the basic convergence theory for piecewise piecewise linear Galerkin finite finite elements. elements. Galerkin
10.3.4 10.3.4
Elliptic estimates Elliptic regularity regularity and and L2 L2 estimates
It would L22 norm. This can would be desirable to have an estimate estimate on the error in the L be obtained obtained by by aa standard standard "duality" "duality" argument, argument, provided provided "elliptic "elliptic regularity" regularity" holds. holds. be Assuming that the the coefficient coefficient kk is is smooth, smooth, when when the the domain domain 0£) has has aa smooth smooth boundboundAssuming that 86 ary, or or when when 0£) is is convex convex86 with aa piecewise smooth boundary, boundary, then solution of ary, with piecewise smooth then the the solution of (10.15) is smoother than the right-hand side f/ by two differentiability. two degrees of differentiability. 2 Thus, L2, Thus, if if f/ lies lies in in L , then Uu and and its its partial derivatives derivatives up up to to order order two two lie lie in in L2. L2. This property (that the solution is smoother than the right-hand side) referred side) is referred to as elliptic regularity. As As long as elliptic regularity holds, it can be shown (by the duality argument mentioned above) that
so so that that In In each each of of the the three three previous previous inequalities, inequalities, the the constant constant C represents represents aa generic generic conconstant stant (not (not necessarily necessarily the the same same in in each each inequality) inequality) that that can can depend depend on on the the particular particular solution solution Uu and and the the domain domain 0f) but but is is independent independent of of h. h. 85 85There that the There are are some some restrictions restrictions on on the the nature nature of of the the meshes meshes Th TH as as hh -+ —>• 0, 0, basically basically that the triangles become arbitrarily "skinny." triangles do do not not become arbitrarily "skinny." 86 86 A the endpoints then the the entire entire A set set 0fi is is called called convex convex if, if, whenever whenever the endpoints of of aa line line segment segment lie lie in in 0, J7, then line line segment segment lies lies in in O. fi.
10.3. An An outline outline of of the theory for for finite finite element element methods methods 10.3. the convergence convergence theory
493
Exercises 1. Suppose Suppose ¢> 0E € CoCO) Co*(ti) and and I/ : n fi -+ ->• R R is is smooth. smooth. Prove 1. Prove that that
for = 1,2. What would the boundary integral be be in by parts for i = 1,2. What would the boundary integral in this this integration integration by parts formula if it were not not assumed that ¢> is zero zero on formula if it were assumed that 0 is on aO? dfi?
2. The The purpose of this this exercise exercise is is to why continuous continuous piecewise linear 2. purpose of to illustrate illustrate why piecewise linear functions to HI (0,1), but piecewise linear do functions belong belong to /^(O,!), but discontinuous discontinuous piecewise linear functions functions do not. (a) by (a) Define Define I/ : [0,1] [0,1] -+ -» R R by
x, I(x) = { I-x,
°: ;
x ::;
~,
~<x::;1.
Then is differentiable differentiate (in (in the the classical classical sense) sense) everywhere everywhere except except at at Then I/ is xx = = 1/2, 1/2, and and dl (x) = ~ < x < ~, dx -1, 2' < x < 1.
{I,
Show that that I/ belongs belongs to to HI H1 (0,1) (0,1) and and that that its its weak derivative is as defined defined Show weak derivative is as above above by by verifying verifying that that
{I dl
io
(I
dx (x)¢>(x) dx = -
io
d¢> I(x) dx (x) dx
for ¢> E with the for every every 0 6 Co(O, C™(Q, 1). 1). (Hint: (Hint: Start Start with the integral integral on on the the right, right, rewrite the sum integration by rewrite it it aB as the sum of of two two integrals, integrals, and and apply apply integration by parts parts to to each.) each.)
(b) Define Define 9g :: [0,1] [0,1] -+ ->• R by R by (b) g(x)
={
x, 2-x,
°: ;
x ::; ~,
~<x::;1.
Then g, like /, differentiate (in (in the the claBsical classical sense) sense) except except at at Then g, just just like I, isis differentiable xx = 1/2, and = 1/2, and 0< x < ~, dg (x) = { 1, dx -1, ~<x<1. However, 1). Show that However, 9g ¢£ HI(O, ^1(0,1). Show that that it it is is not the the CaBe case that
{I dg
io
dx (x)¢>(x) dx = -
for every every ¢> 0e C^°(0,l). for E CoCO, 1).
(I
io
d¢> g(x) dx (x) dx
494
Chapter 10. 10. More about finite element element methods
l 3. Let Let 0f] be the unit square and and define define /, €H (ty by 3. be the unit square I,gg E HI(O) by
I(x) = 1 + Xl + X2, g(x) = I(x) + sin (m1fXI) sin (n1fX2). Compute L22 and HI1 norms. Compute the the relative relative difference difference in in 1 / and and 9 g in in the the L and H norms. 4. 4. The The exact exact solution solution of of the the BVP BVP
-cPu - = 12x2 dx 2 u(O) = 0, u(l) = 0
6x 0 '
< X < 1,
is u(x) u(x) = xx33(l x). Consider Consider the mesh with three elements, elements, the the is (1 -— x). the regular regular mesh with three subintervals [0,1/3]' [0,1/3], [1/3,2/3], [1/3,2/3], and and [2/3,1]. [2/3,1]. subintervals (a) Compute Compute the the piecewise piecewise linear linear finite element approximation approximation to to u, u, and and call call (a) finite element it it v. v. (b) piecewise linear (b) Compute Compute the the piecewise linear interpolant interpolant of of u, w, and and call call it it w. w. (c) Compute the error in v and w (as approximations approximations to u) in the energy norm. Which is is smaller? smaller? norm. Which
10.4 10.4
Finite element element methods methods for for eigenvalue eigenvalue problems Finite problems
In we described In Section Section 9.7, 9.7, we described how how eigenvalues eigenvalues and and eigenfunctions eigenfunctions exist exist for for nonconnonconstant coefficients coefficients problems problems on on (more (more or or less) less) arbitrary arbitrary domains, domains, but but we we gave gave no no stant We will will now now show how finite techniques them. We techniques for for finding finding them. show how finite element element methods methods can can be be used used to estimate estimate eigenpairs. eigenpairs. This This will will be be aa fitting fitting topic topic to to end end this this book, book, as it it ties together together our our two two main main themes: (generalized) Fourier Fourier series series methods methods and and finite ties themes: (generalized) finite element element methods. methods. We consider the following model model problem: problem: We will will consider the following
= Au in 0, u = 0 on ao.
-V'. (k(x)V'u)
(10.21)
We We follow follow the the usual usual procedure to to derive derive the the weak weak form: form: multiply multiply by by aa test test function, function, and integrate integrate by parts: -V'. (k(x)V'u) = AU, x E 0 ~ -V'. (k(x)V'u) v
= AUV,
x E 0, v E H6(O)
-In V' . (k(x)V'u) v AIn uv, v H6(O) ~ In k(x)V'u· V'v = AIn uv, v HJ(O). ~
=
E
E
10.4. 10.4. Finite element element methods for eigenvalue problems
495
In In the the last last step, step, the boundary term term vanishes vanishes because of of the boundary conditions conditions satisfied satisfied by the the test function function v. The The weak form form of of the eigenvalue eigenvalue problem is is therefore
U E HJ(O), a(u,v) = A(U,V) for all v
E HJ(O).
(10.22)
We We now now apply apply Galerkin's Galerkin's method method with with piecewise piecewise linear linear finite finite elements. elements. We We write of continuous piecewise linear functions, satisfying write V Vhh for for the the space space of continuous piecewise linear functions, satisfying Dirichlet Dirichlet conditions, to a given conditions, relative relative to given mesh mesh 'Th. 7ft. As usual, {n} will will represent represent the basis for now reduces the standard standard basis for Vh. Vh- Galerkin's Galerkin's method method now reduces to to
or or to to
n
Uh =
2:
Clj¢j,
a(uh' ¢i) = A(Uh' ¢i), i = 1,2, ... , n.
j=l
Substituting for Uh, we we obtain Substituting the the formula formula for obtain
=>
n
n
j=l
j=l
2: a(¢j, ¢i)CXj = A 2:(¢j, ¢i)CXj, i = 1,2, ... , n
=> Ku= AMu, nxn where K E Rnxn are and mass matrices, respectively, 6 Rnxn R n x n and ME M eR are the stiffness stiffness and u satisfying = AMu, then then A and encountered before. before. If encountered If we we find find A and and u satisfying Ku Ku = and the the corresponding piecewise piecewise linear corresponding linear function function Uh Uh will will approximate approximate an an eigenpair eigenpair of of the the differential operator. differential operator. We not have the space to discuss discuss the the accuracy We do do not have the space here here to accuracy of of eigenvalues eigenvalues and and eigenfunctions approximated approximated by this method; the analysis depends on the theory that was previous section. eigenvalues comcomthat was only only sketched sketched in in the the previous section. Only Only the the smaller smaller eigenvalues estimates of the true eigenvalues. To puted by the above method will be reliable estimates keep discussion on on an an elementary elementary level, level, we restrict our attention to to the the keep our our discussion we will will restrict our attention computation of (The reader will recall that computation of the the smallest smallest eigenvalue. (The that this this smallest smallest eigenvalue can be quite important, for example, in mechanical vibrations. It defines the fundamental frequency of of aa system by the the fundamental frequency system modeled modeled by the wave wave equation.) equation.) nxn nxn Given R nxn and M M E the problem problem Given two two matrices matrices K K Ee R and eR Rnxn ,, the
u ERn,
U
1:- 0, A E C, Ku = AMu
generalized eigenvalue eigenvalue problem. problem. It can be converted to an ordinary eigenis called a generalized is invertible, invertible, then then multivalue problem problem in example, when when M value in aa couple couple of of ways. ways. For For example, M is multiplying both both sides of the the equation by Myields plying sides of equation by M""11 yields
496
Chapter 10. More about about finite methods Chapter 10. More finite element element methods
1 which is the ordinary ordinary eigenvalue problem for for the the matrix matrix M M-1K. However, this this which is the eigenvalue problem K. However, -11 that MK will transformation has has several several drawbacks, drawbacks, not not the the least least of of which which is transformation is that M K will usually not not be be symmetric symmetric even both K K and and M (The reader reader should usually even if if both M are are symmetric. symmetric. (The should recall that symmetric matrices matrices have have many properties with with respect respect to recall that symmetric many special special properties to the the eigenvalue orthogonal eigenvectors, etc.) eigenvalue problem: problem: real real eigenvalues, eigenvalues, orthogonal eigenvectors, etc.) The preferred method for for converting converting Ku AMu into eigenvalue The preferred method Ku = = .AMu into an an ordinary ordinary eigenvalue problem uses uses the the Cholesky Cholesky factorization factorization.. Every Every SPD matrix can be written written as as problem SPD matrix can be the product of of aa nonsingular nonsingular lower triangular matrix times its its transpose. transpose. The the product lower triangular matrix times The mass matrix, SPD (see Exercise 10.2.6), 10.2.6), so so there exists aa mass matrix, being being aa Gram Gram matrix, matrix, is is SPD (see Exercise there exists T nonsingular lower lower triangular triangular matrix matrix L L such that M = LL LLT. can then then rewrite rewrite nonsingular such that M = . We We can the as follows: follows: the problem problem as
Ku=.AMu :::} Ku = .ALLT U :::} L -lKu = .ALT u :::} L -lKL -T (LT u) = .A (LT u) :::} Ax = .Ax, A = L -lKL -T, x = LT u.
This is is an an ordinary ordinary eigenvalue problem for A, and because K K is. is. This eigenvalue problem for A, and A A is is symmetric symmetric because This shows that the the generalized generalized eigenvalue eigenvalue problem problem Ku Ku = = .AMu has real real eigenvaleigenvalThis shows that AMu has ues. The The eigenvectors corresponding to to distinct distinct eigenvalues when ues. eigenvectors corresponding eigenvalues are are orthogonal orthogonal when x, but but not necessarily in the original expressed in in the not necessarily in the original variable variable expressed the transformed transformed variable variable x, u. given distinct eigenvectors uu u. However, However, given distinct eigenvalues eigenvalues A .A and and // J.1. and and corresponding corresponding eigenvectors and v, v, the the piecewise piecewise linear linear function function Uh with nodal values given by u u and and vv and Uh and and Vh Vh with nodal values given by are orthogonal orthogonal in the L L22 norm are in the norm (see (see Exercise Exercise 1). 1). There is drawback to to using using the the above above method method for for converting the generalized There is aa drawback converting the generalized eigenvalue problem to an ordinary is no reason why why A A should should be be sparse, eigenvalue problem to an ordinary one: one: There There is no reason sparse, even though K K and M are are sparse. For this reason, the the most most efficient efficient algorithms algorithms for for even though and M sparse. For this reason, the generalized instead of of using the the generalized eigenvalue eigenvalue problem problem treat treat the the problem problem directly directly instead using the above is useful one has above transformation. transformation. However, However, the the transformation transformation is useful if if one has access access only only to software for problem. to software for the the ordinary ordinary eigenvalue eigenvalue problem. Example 10.4. will estimate the smallest smallest eigenvalue the corresponding Example 10.4. We We will estimate the eigenvalue and and the corresponding eigenfunction of the negative Laplacian (subject to unit the negative Laplacian (subject to Dirichlet Dirichlet conditions) conditions) on on the the unit eigenfunction of square n. reader will will recall recall that the exact eigenpair is square fi. The The reader that the exact eigenpair is
We establish aa regular regular mesh on n, with 2n 2n22 triangles, nodes, and and (n-1)2 We establish mesh on £), with triangles, (n+1)2 (n+1)2 nodes, (n—I)2 free free matrix K K and and the the mass mass matrix matrix M, and solve solve the the nodes. We compute the stiffness M, and nodes. We compute the stiffness matrix function eig eig from from MATLAB. MATLAB. The results, generalized eigenvalue problem using the the function The results, genemlized eigenvalue problem using of n, are shown in 10.B. The reader should should notice notice that that the for various various values for values ofn, are shown in Table Table 10.3. The reader the eigenvalue estimate estimate is is converging faster than eigenfunction estimate. is eigenvalue converging faster than the the eigenfunction estimate. This This is typical. As the error in the is O(h O(h22),), while the error As the the results results suggest, suggest, the error in the eigenvalue eigenvalue is while the error typical. in eigenfunction is in the the energy in the the eigenfunction is O(h) O(h) (measured (measured in energy norm). norm).
10.4. 10.4. Finite element methods for eigenvalue problems
n n 22 44 88 16 16 32 32
Error in in AH Error Au 12.261 3.1266 3.1266 0.76634 0.76634 0.19058 0.19058 0.047583 0.047583
497
Error in '¢u t/>n Error in 1.5528 1.5528 0.84754 0.84754 0.43315 0.21772 0.21772 0.10900 0.10900
Table Table 10.3. 10.3. Errors in the finite finite element estimates of the smallest eigensquare. value and corresponding corresponding eigenfunction eigenfunction of of the negative negative Laplacian on the unit unit square. The eigenfunction are computed The errors errors in in the the eigenfunction computed in the the energy energy norm.
The The reader will recall recall from from Section Section 9.7 9.7 that that the the fundamental fundamental frequency of aa membrane occupying occupying aa domain domain n 17isisc";>::;/(27r), ci/A7/(27r),where whereAlAI isisthe the smallest smallesteigenvalue eigenvalue membrane of the the negative Laplacian on n 17(under (underDirichlet Dirichletconditions) conditions)and andccisisthe the wave wavespeed. speed. Therefore, Therefore, the fundamental fundamental frequency frequency of aa square square membrane of of area area 11 is cv'27r = .~ == 0.7071c. 27r v2 2
Using finite elements, we can compute the fundamental frequency frequency for membranes of we consider an equilateral of other other shapes. shapes. In In the the next example, example, we equilateral triangle with area area 1. 1. Example Example 10.5. 10.5. Consider the triangle n 17 whose vertices are
This triangle triangle is equilateral and has area 1. We use the finite finite element method to estimate the smallest eigenvalue domain, using eigenvalue of the negative negative Laplacian on this domain, 5 successive successive regular grids. The coarsest has 16 16 triangles, triangles, and is shown shown in Figure 10.13. The The remaining are obtaining obtaining by refining the the original original grid the standard 10.13. remaining grids grids are by refining grid in in the standard fashion (see (see Exercise 10.1.4). 10.1.4). The The finest finest mesh has has 4096 triangles. triangles. The The estimates estimates of of the smallest eigenvalue, as obtained on the successively successively finer meshes, are 27.7128, 23.9869, 23.0873, 22.8662, 22.8662, 22.8112. 27.7128, 23.9869, 23.0873, 22.8112. We conclude that the smallest eigenvalue fundamental freeigenvalue is Al AI == = 22.8, and the fundamental quency is quency is cA27r == 0.7601c.
In In Exercise Exercise 3, 3, the the reader reader is is asked asked to to study study the the fundamental fundamental frequency frequency of of aa membrane in membrane in the the shape shape of of aa regular area 1. regular n-gon n-gon having having area 1.
Chapter 10. about finite finite element methods Chapter 10. More More about element methods
498
1.4.-------,------r-----.----....., 1.2
0.8 x'" 0.6
0.4 0.2 0
-1
-0.5
0
0.5
x1
Figure 10.13. Example 10.5. Figure 10.13. The The coarsest mesh from Example
Exercises 1. 1.
(a) Suppose Suppose u, e Rn contain of piecewise functions (a) u, v v ERn contain the the nodal nodal values values of piecewise linear linear functions 2 Uh, Vh E how to to compute the L L2 inner inner product Uh,Vh € Vh, Vh, respectively. respectively. Explain Explain how compute the product of Uh and and Vh Vh from from u v. u and and v. of Uh (b) Show Show that that if (b) if u u and and v v satisfy satisfy Ku
= AMu,
Kv
= p,Mv,
where // and and M M are are the stiffness and and mass respecwhere A A/ =I- JL and K K and the stiffness mass matrices, matrices, respectively, the corresponding functions Uh, Uh,Vh Vh are are then the corresponding piecewise piecewise linear linear functions Vh € E Vh tively, then 2 orthogonal in the the I/ inner product. product. orthogonal in L2 inner 2. The results of this section to one-dimensional one-dimensional problems. 2. The results of this section are are easily easily specialized specialized to problems. Consider the eigenvalue eigenvalue problem problem Consider the
d (k(x) dx dU) = AU, 0 < x < 1,
- dx
u(O) = 0, u(1) = 0,
where k(x] = = 11 + + x. Use finite elements elements to smallest eigenvalue A. where k(x) Use finite to estimate estimate the the smallest eigenvalue A. 3. (Hard) (Hard) This exercise requires that you to assemble stiff3. This exercise requires that you write write aa program program to assemble the the stiffness and mass for -..6. —A on on an arbitrary triangulation of aa polygonal polygonal ness and mass matrix matrix for an arbitrary triangulation of
10.5. Suggestions Suggestions for for further further reading 10.5. reading
499
domain fJ. D. You You will also need access to a routine to solve the generalized eigenvalue problem.
(a) Repeat Repeat Example 10.5, replacing replacing the the triangular domain by domain (a) Example 10.5, triangular domain by aa domain bounded by area 1. 1. bounded by aa regular regular pentagon pentagon with with area (b) Let A~n) -~ on a region having area 1 and AI be the smallest eigenvalue of —A bounded by a regular n-gon. Form a conjecture about
· 11m
n-+oo
dn)
Al
.
(c) Test your hypothesis by repeating Example 10.5 for a regular n-gon, choosing nn to to be the largest largest integer is practical. (Whatever value choosing be the integer that that is practical. (Whatever value of of nn you choose, you have to create one or more meshes on the corresponding n-gon.) n-gon.) _1)2. 4. Repeat Repeat Exercise 2 using k(x) = = 1+ + (x — I) 2 .
10.5 10.5
Suggestions for further Suggestions for further reading reading
An excellent to the the theory of finite finite element element methods is the An excellent introduction introduction to theory of methods is the book book by by Brenner and Scott [6] [6] mentioned mentioned earlier. earlier. Strang Strang and Fix [45] [45] also also discusses discusses the and Fix the conconBrenner and Scott time-dependent PDEs and eigenvalue vergence theory for for finite elements applied to time-dependent problems. Most finite element element references references discuss discuss the computer implementation implementation of of finite finite Most finite the computer elements in only general terms. Readers wishing to learn more about this issue can consult the the Texas Finite Element Series [3] [3] and and Kwon Kwon and and Bang Bang [32]. [32]. consult As early in in this chapter, mesh mesh generation generation is is an an important important area As mentioned mentioned early this chapter, area of of study in its own right; it is treated by Knupp and Steinberg [31].
This page intentionally This page intentionally left left blank blank
Appendix A
of Theorem 3.47 3.47 Proof of
Theorem A.I. A.I. Let A E be symmetric, and suppose suppose A has has an eigenvalue Theorem 6 Rnxn R n x n be of (algebraic) (algebraic) multiplicity multiplicity kk (meaning (meaning that that A A is is aa root root of of multiplicity multiplicity kk of of the XA of the characteristic polynomial polynomial of of A). Then has kk linearly linearly independent independent eigenvectors characteristic Then A has eigenvectors corresponding to A. corresponding to A.
Proof. We We argue by induction on n. n = = 1. We Proof. n. The The result holds trivially trivially for for n 1. We nxn ER Rnxn assume it holds for symmetric (n -— 1) x (n -— 1) matrices, and and suppose A e is symmetric symmetric and and has an eigenvalue eigenvalue A of (algebraic) multiplicity k. There exists exists xi ^ 00 such such that = Axi. We can can assume assume that that Ilxlll ||xi|| = = 11 (since Xi/||xi|| is is also also Xl ::fthat Axi AXl = AXl. We (since xdlixlil an eigenvector of of A), A), and and we extend xi Xl to an orthonormal basis {Xl,X2, •.. ,x ,Xn}. }. an eigenvector we extend to an orthonormal basis {xi,x 2 ,... Then Then
XTAX=
[ Xl Ax, xfAxl
xf Ax 2 xf Ax 2
x[Axn xfAxn
X;AXl
X;AX2
x;Axn
.
.
1
nxn where X e ER Rnxn is X = = [xllx21·· ]. We have where X is defined by X [xi|x2| • • ·Ix • |xn].
and and xi AXi
= (AXlf Xi
(since A is symmetric)
= Axi Xi = AJil .
501 501
,
502
Theorem 3.47 Appendix A. Proof of Theorem
(The j.) Therefore, (The symbol symbol 8ij <% is is 11 if if ii == jj and and 00 if if ii ¥^ j.) Therefore,
~ XTAX=
xI
~X2
xIAxn
o
0:
[ X;AX2
:::
x nT
lx
1
n
=[~ ~], where BE B <E R(n-1)x(n-1) RCn-1)*^-1) is [s defined by
The matrix matrix B is symmetric. Also, det (..xl - XT AX)
= det (XT (..xl - A)X) = det (XT) det (..xl - A) det (X) = det (..xl - A),
l since X X TT == X" X- 11 and det (X) Itfollows follows that that and therefore det det (XT) (XT) = = det (X)-1. . It
det (..xl - A)
=
l
..x-..x 0 ..xl 0_ B I
= (..x -..x) det (,\1 - B).
Since B of of Since ,\ A is is an an eigenvalue eigenvalue of of A of of multiplicity multiplicity k, Ar, it it must must be be an an eigenvalue eigenvalue of of B multiplicity kk -- 1, therefore, by by the the induction induction hypothesis, multiplicity 1, and and therefore, hypothesis, B B has has kk -— 11 linearly linearly Y2, Y3, ... independent eigenvectors y2,ys, independent • • • ,,Yk yfc corresponding to to A. We We define
for ii = = 2,3, 2,3,..., k, and and define define Ui Uj == XYi' XyV Then Then ... , k, for AUi
= X [
~
= X [
~
Appendix A. Proof of Theorem Theorem 3.47 3.47
503 503
T T XTX XTX dis(the columns of X are orthonormal, so X X= = I; this is why the factor of X X disappeared U2, U3, ... , Uk eigenvectors appeared in the above calculation). This shows shows that u ,113,..., u/t are 2 of A to >.. Moreover, of A corresponding corresponding to A. Moreover,
(0 the zero from which which we we can can deduce deduce that that {ui, {Ul,U2, ... ,Uk} is (0 is is the zero vector vector in in Rn-l), Rn 1 ] , from 112,..., u^} is linearly independent independent set set of of eigenvectors eigenvectors of of A A corresponding corresponding to to >.. A. This This completes completes aa linearly the proof. D
This page intentionally This page intentionally left left blank blank
Appendix B Appendix
eng the data in two Shifting dmensionss
B.O.l B.O.I
Inhomogeneous Inhomogeneous Dirichlet Dirichlet conditions conditions on on a a rectangle rectangle
The method of shifting the data can be used to transform an inhomogeneous Dirichlet problem to a homogeneous Dirichlet problem. This technique works just as it did for a one-dimensional problem, although although in two dimensions it is more difficult difficult to function satisfying satisfying the the boundary boundary conditions. conditions. We We consider consider the the BVP BVP to find find aa function -~u =
f(x), x
En,
gl(xd, u(x) = g2(X2), { g3(xd, g4(X2),
r 1, E r 2, E r 3, E r 4,
x E
x x x
(B.1)
the rectangle rectangle defined in (8.10) and r 1U Tr 22 U Tr33 U rT4,4, as in (8.13). where n Q, is the and an dtt = = TI We will assume that the so We will assume that the boundary boundary data data are are continuous, continuous, so gl(fd = g2(O), g2(f 2) = g3(fI), g3(O) = g4(f2), g4(O) = gl(O).
Suppose Suppose we we find find aa function p defined defined on n J7 and and satisfying satisfying p(x) == g(x) #(x) for for all xE e an. dfL We We then then define define vv == uu -— pp and and note note that that -~v
and and
= -~u + ~p = f(x) + ~p(x)
v(x) = u(x) - p(x) = 0 for all x E an
(since p satisfies the same Dirichlet conditions that uu is to satisfy). We We can then solve -~v
= j(x),
v(x) = 0, x
n, E an,
j(x) = f(x)
+ ~p(x).
where
RDR 505
xE
506
Appendix B. Shifting the data in two dimensions
The result result will will be converging series series for for v, v, and The be aa rapidly rapidly converging and then then uu will will be be given given by by u = v + p. u v +p. We describe aa method tedious) for for computing funcWe now now describe method (admittedly (admittedly rather rather tedious) computing aa function p that satisfies the given Dirichlet conditions. We We first first note that there is a polynomial of the form polynomial of the form q(X1, X2) = a + bX1 + CX2 + dx1X2
which corners: which assumes assumes the the desired desired boundary boundary values values at at the the corners: q(O,O) = 91(0) = 94(0), q(£l,O) = 91(£t) = 92(0), q(£1,£2) = 92(£2) = 93(£t), q(0'£2) = 93(0) = 94(£2).
A direct calculation calculation shows shows that that a=91(0), b = 91(£1) - 91(0) £1 ' 94(£2) - 94(0) c= , £2 d = 92(£2) + 91(0) - 91(£t} - 94(£2). £1£2
We then define h 1(X1)=91(Xl)- ( 91(0)+ h 2(X2)
= 92(X2) -
( 92(0)
+
91(£d - 91(0) ) £1 Xl, 92(£2) - 92(0) ) £2 X2,
h3(Xt} = 93(Xt} - ( 93(0)
) + 93(it) i1- 93(0) Xl,
h 4(X2) = 94(X2) - ( 94(0)
+
94(i2) - 94(0) ) £2 X2·
We replaced each function hi differs from from gi linear We have have thus thus replaced each gi 9i by by aa function hi which which differs 9i by by aa linear function, and which has value zero at the two endpoints:
Finally, we define we define Finally,
Appendix B. in two Appendix B. Shifting Shifting the the data data in two dimensions dimensions
507
The should notice notice how how the the second second term interpolates between between the the boundary boundary The reader reader should term interpolates values on rFI1 and F , while the third term interpolates between the boundary values on and r 3, values 3 while the third term interpolates between the boundary values on and rIT^. 4. In order for these two two terms terms not interfere with with each is on rF22 and In order for these not to to interfere each other, other, it it is necessary necessary that the the boundary data data be zero at at the corners. It It was was for for this this reason that that we transformed transformed the into the term in in the the formula formula for we the g^s gi's into the h^s. hi'S. The The first first term for pp undoes undoes this transformation. transformation. It is straightforward that p satisfies the desired boundary conditions. It is straightforward to to verify verify that satisfies the desired boundary conditions. For example, example, For P(X1'0)
= a + bX1 + cO + dx 10 + h1(xd +
h3(xd - h1(xd £2 0
h2(0)-h4(0)
= =
+h4 (0) + £1 Xl a + bX1 + h1(xd (since h4(0) = h2(0) gl(O) + bX1 + gl(xd - (gl(O) + bX1)
= 0)
=gl(xd· Thus the boundary is satisfied. calculations show Thus the boundary condition condition on on rFI1 is satisfied. Similar Similar calculations show that that pp satisfies the the desired desired boundary conditions on on the the other other parts of the satisfies boundary conditions parts of the boundary. boundary. Example Example B.1. B.I. We will solve the BVP BVP
x x x x
E r 1, E r 2, E r 3, E f4
by the the above above method, where n fJ is is the the unit unit square: by method, where square:
To compute p, we define define a=91(0)=0, b = 91(1) - gl(O) = 1 1
'
c = 94(1) - 94(0) = 1 1
d = g2(1) h1 (Xl) h2(X2) h3(xd h4(X2)
+ gl(O) -
'
gl(l) - g4(1) = -2 1·1 ' = xi - (0 + xd = xi - Xl, = 1- x~ - (1 + (-I)x2) = X2 - x~, = (1- X1)2 - (1 + (-I)X1) = xi - Xl, = X2 - (0 + X2) = o.
(B.2)
B. Shifting the data in in two dimensions Appendix B.
508 We can can then then define define We P(XI,X2)
= Xl + X2 =
X2 -
XIX2
2XIX2
2
+ Xl
+ xi -
Xl
+ o· X2 + 0 + (X2
-
X~)XI
2
- XIX2·
Having computed computedp, we define define vv = uu—p, so that that Having p, we - p, so -Llv = -Llu + Llp = 0 + Llp = 2 - 2XI, X En
and and v(x)
= 0,
xE
an.
We then then see see that that We
where where
We then then obtain obtain the the following u: We following formula formula for for u:
The solution B.I. in Figure Figure B.1. The solution is is shown shown in B.0.2 8.0.2
Inhomogeneous Inhomogeneous Neumann Neumann conditions on on a rectangle
We We can can also also apply apply the the technique technique of of shifting shifting the the data data to to transform transform aa BVP BVP with with inhomogeneous inhomogeneous Neumann Neumann conditions conditions to to aa related related BVP BVP with with homogeneous homogeneous Neumann Neumann conditions. Dirichlet the details details are are somewhat somewhat more more involved involved than than in in the the Dirichlet conditions. However, However, the case. case. Suppose Suppose the the Neumann Neumann conditions conditions are are x x x x
We We first first note note that that this this is is equivalent equivalent to to
rl , r 2, r 3, E r 4. E
E E
Appendix B. B. Shifting Shifting the the data data in in two two dimensions Appendix dimensions
o
509
0
Figure B.t. B.I. The The solution to the the BVP BVP (B.2), (B.2), approximated approximated by by aa Fourier Figure solution to Fourier series with 400 terms. series with 400 terms.
We make following observation: observation: If If there is aa twice-continuously twice-continuously differentiable differentiable We make the the following there is function uu satisfying satisfying the given Neumann Neumann conditions, conditions, then, then, since since the given function
we have have we
82 u
82 u
8:lh 8X2
8X28xl '
510
Appendix B. B. Shifting the data two dimensions dimensions Appendix Shifting the data in in two
and and
which together which together imply imply that that dg 1 (0) dx 1
= dg4 (0). dx 2
the following conditions: By similar similar reasoning, we have all of the conditions: dg 1 (0) = dg4 (0), dX1 dX2 1 _ dg (£1) = dg2 (0), dx 1 dX2 dg 2 (£ ) = dg 3 (£ ) 2 d 1, dx 2
Xl
_ dg 4 (£2)
= dg3 (0).
dx 2
(B.3)
dx 1
We will will assume We assume that that (B.3) (B.3) holds. holds. now explain how to compute a function pp that satisfies We now explain how to compute satisfies the desired desired Neumann conditions. conditions. The method is is similar similar to that used to shift shift the data in aa Dirichlet problem: we will "interpolate" "interpolate" between the the Neumann conditions conditions in in each dimension and so that that the two interpolations not interfere other. and arrange arrange things things so the two interpolations do do not interfere with with each each other. We use use the that We the fact fact that (BA)
satisfies satisfies (B.5)
The step is is to data g\ function h\ The first first step to transform transform the the boundary boundary data gl to to aa function h1 satisfying satisfying dh1 (0) = dh1 (£1) = 0, dX1 dX1
and similarly similarly for for 92,93,94 and h/i2,/is,/i4. Since these these derivatives of the and g2, g3, g4 and derivatives of the boundary boundary 2, h3, h4. Since data the corners corners are are (plus or minus) minus) the of the data at at the (plus or the mixed mixed partial partial derivatives derivatives of the dedesired function function at it suffices suffices to to find function Q(X1, q(xi,xz) the at the the corners, corners, it find aa function X2) satisfying satisfying the sired conditions
511 511
Appendix B. B. Shifting the data data in two dimensions Appendix Shifting the in two dimensions
We can can satisfy satisfy these conditions with with aa function of the the form We these conditions function of form
The reader can verify verify that the necessary coefficients coefficients are are
If is to to satisfy satisfy the the desired Neumann conditions, conditions, then If pp is desired Neumann then
where where
hl(xd = gl(Xl) + aXl + bxi, h2(X2) = g2(X2) - (a + 2i1 b)X2 - (c + 2ild)x~, ha(xd = ga(xd - (a + 2i2C)Xl - (b + 2i2d)xi, h4(X2) = g4(X2) + aX2 + cx~. We can now define define pp — - q q by by the the interpolation described by by (BA), (B.5): We can now interpolation described (B.4), (B.5):
Then the original Neumann conditions, conditions, as reader can can verify Then pp satisfies satisfies the original Neumann as the the interested interested reader verify We will directly. We will illustrate this this computation computation with with an example. example.
Example B.2. B.2. We will solve the BVP Example BVP
x E fl' X E f2' X E fa,
x E f4
by the above method, where f) is is the the unit unit square: by the above method, where n square:
(B.6)
512
Appendix B. Shifting the data in two dimensions
To compute p, p, we define define dg l a= --(0) = 0, dx l b = ! (d9l (0) _ dg l (1)) = 0, 2 dXl dXl ga l C = ! (d (0) + dg (0)) = 0, 2 dXl dXl d = ! (d92 (1) + dg l (1) _ dga (0) _ dg l (0)) 4 dX2 dXl dXl dXl hI (xd = gl(Xl) = -1, h2(X2) = g2(X2) - x~ = 0, ha(Xl) = ga(Xl) = 1,
= !, 2
xr 2 h4(X2) = g4(X2) = -a' We can can then then define define We P(Xl,X2)
= q(Xl,X2) 1
hl (Xl)X2
+
2
2 2
ha(xd
1
= 2XlX2 + X2 + aXl -
+ hl(xl)
2£2
2
X2 - h4(X2)Xl
+
h2(X2)
2
aXl'
define v == U Having computed computed p, we define u -— p, so that 2 3
-Av=-Au+Ap=O+Ap=xr+x~--, XEO
.
and and
ov on (x) =
0, x E 80.
We can can write write the the solution solution V(Xl,X2) v(x\,xi} in in the the form form We 00
U(Xl, X2) =
aOO
+L
00
amo
cos (mnxd
+L
m=l 00
+
aO n
cos ( nnx2)
n=l
00
L La
mn
cos (mnxl) cos (nnx2).
m=ln=l
With With we have we have 00
f(xl,x2)
= Coo + L
00
CmO
m=l 00
+L
cos (mnxd
+
L
Con
cos (nnx 2)
n=l
00
L
m=l n=l
Cmn
cos (mnxd cos (nnx2),
+ h4(x2)
2£1
2
Xl
Appendix B. Shifting the data in two dimensions
513
where where 1
Coo =
10 10
1 f(X1,X2)dx2dx1 =0,
111 4(-1)m f(x1,x2) cos (m1fx1)dx2 dx1 = 2 2 ' m = 1,2,3, ... , m 1f 1o 0 111 4(-1)n Con = 2 f(x1,x2) cos (n1fX2) dX2dx1 = 2 2 ' n = 1,2,3, ... , n 1f 1o 0 1 1 Cmn = f(x1, X2) COS (m1fxd COS (mrX2) dX2 dX1 = 0, m, n = 1,2,3, .... CmO
=2
410 10
It then follows It then follows that that
X2) = X2) + P(X1' X2). -^ A graph of the solution u, and U(X1' u(xi,X2) = V(X1, ^(^1,^2) + p(a?i,#2)u, with aOO aoo == 0, is B.2. shown in Figure B.2. shown in Figure
2 1.5
0 .5
o - 0 .5 1
o
0
Figure B.2. The solution to BVP in Example B.2. B.2. This graph was was Figure B.2. The solution to the the BVP in Example This graph produced using of the Fourier cosine produced using aa total total of of 40 terms terms of the (double) (double) Fourier cosine series. series.
This page intentionally This page intentionally left left blank blank
Appendix C Appendix
Solutions ions to to
• odd-numbered exercises bered exercises
Chapter 1 1 1. 1.
(a) (a) First-order, First-order, homogeneous, homogeneous, linear, linear, nonconstant-coefficient, nonconstant-coefficient, scalar scalar ODE. ODE. (b) (b) Second-order, Second-order, inhomogeneous, inhomogeneous, linear, linear, constant-coefficient, constant-coefficient, scalar scalar PDE. PDE. (c) (c) First-order, First-order, nonlinear, nonlinear, scalar scalar PDE. PDE.
3. 3.
(a) (a) Second-order, Second-order, nonlinear, nonlinear, scalar scalar ODE. ODE. (b) (b) First-order, First-order, inhomogeneous, inhomogeneous, linear, linear, constant-coefficient, constant-coefficient, scalar scalar PDE. PDE. (c) (c) Second-order, Second-order, inhomogeneous, inhomogeneous, linear, linear, nonconstant-coefficient, nonconstant-coefficient, scalar scalar PDE. PDE.
5. 5.
(a) No. No. (a) (b) Yes. (b) Yes. (c) (c) No. No.
7. f: ff(t) cos (t). 7. There There is is only only one one such such /: ( t ) = ttcos (t).
9. w(t) = Cu(t) 9. For For any any constant constant C f:. ^ 1, 1, the the function function w(t) Cu(t) is is aa different different solution solution of of the the differential differential equation. equation.
2.1 Section 2.1 1. per temperature, temperature, for J / (cm ss K) 1. The The units units of of '"K are are energy energy per per length length per per time time per for example, example, J/(cm K) == W/(cmK). W/(cmK).
3. Apcu~x are 3. The The units units of of Apcu&x are cm
2
g J cm gK
- - 3 -Kcm
= J.
5. ~~(f,t)=ll<,t>to. 5- &&*) = £ , « > *>. 7. Measuring xx in 7. Measuring in centimeters, centimeters, the the steady-state steady-state temperature temperature distribution distribution is is u(x) u(x] = O.lx + + 20, 20, the the solution solution of 0.1x of
d2 u - dx 2
= 0,
u(O) 515 515
= 20,
u(100)
= 30.
516
Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises Appendix The heat heat flux The flux is is -K,
du dx (x)
= -0.802 ·0.1 = -0.0802 W /cm 2 .
Since the the area area of of the the bar's bar's cross-section cross-section is is 1r vr cm cm22,, the the rate rate at at which which energy energy is is flowing Since flowing through the bar W (in direction). through the bar is is 0.08021r 0.08027T ~ = 0.252 0.252 W (in the the negative negative direction). 9. Consider Consider the the right right endpoint endpoint (x = f). I). Let Let the temperature of of the the bath bath be be Ul, ue, so so that that 9. the temperature the difference difference in in temperature between the the bath bath and and the end of of the the bar bar is is u(f, u(i, t} ut. the temperature between the end t) -—Ul. The heat heat flux at xx = fi is, is, according according to Fourier's law, The flux at to Fourier's law,
so the the statement statement that that the heat flux is proportional proportional to to the is written so the heat flux is the temperature temperature flow flow is written
where aa > 00 is is aa constant constant of of proportionality. proportionality. This This can can be be simplified simplified to to where
The condition condition at at the end is is similar: The the right right end similar: au(O, t) -
K,
au ax (0, t) = auo·
(The sign sign change change appears appears because, because, at at the the left left end, end, aa positive positive heat heat flux that (The flux means means that heat flows into the bar, bar, while heat flows into the while at at the the right right end end the the opposite opposite is is true.) true.) 11. 11. The IBVP IBVP is
au au at - D ax = lex, t), 2
2
u(x, to) = tf;(x),
< x < f, < x < f,
0
°
t
> to,
au ax (0, t) = 0, t > to, au ax (f, t) = 0, t > to. 13. 13.
(a) The The rate rate is (a) is o) - f u-. -1rT 2D (Ul
(b) (b) The The rate rate of of mass mass transfer transfer varies varies inversely inversely with with ft and and directly directly with with the the square square of of T. r.
15. We We have 15. have
1
1 cos (xy)dy = o
and and
.!:... [SinX] dx
x
[sin~Xy)]1
= xcosx - sin x x2
y=O
= cosx X
sin x x _ sinx x2 •
517 517
Appendix C. Solutions Solutions to to odd-numbered exercises Appendix C. odd-numbered exercises On the the other other hand, hand, On
11
d o dx [cos (xy)] dy= -
11 0
ysin(xy)dy
1-11
= [YCOS (X Y)] x y=o
0
cos (xy) dy x
[Sin (X y )] 1
_ cosx
- -x- -
-x-2-
cos x
y=o
sinx
= -x--7·
Section 2.2 1. The The sum sum of of the forces on cross-section originally originally at 1. the forces on the the cross-section at x = t£ must must be be zero. zero. As As derived in in the the text, text, the (elastic) force force acting acting on on this derived the internal internal (elastic) this cross-section cross-section is is -Ak(£) ~: (£),
while the external traction traction results results in total force pA (force per unit unit area area times while the external in aa total force of of pA (force per times area). Therefore, Therefore, we we obtain area). obtain du -Ak(£) dx (£)
or or
+ pA = 0,
du k(£) dx (£)
= p.
The other boundary condition, of of course, course, is u(Q) = — 0. The other boundary condition, is u(O) O. 3. 3.
(a) The stiffness stiffness is the ratio internal restoring restoring force relative change (a) The is the ratio of of the the internal force to to the the relative change in length. length. Therefore, bar of of length length £ t and is stretched stretched in Therefore, if if aa bar and cross-sectional cross-sectional area area A A is to aa length length of +p (0 (0 < pp < 1) 1) times I, then the bar with aa force force to of 11 +p times f, then the bar will will pull pull back back with of this is is the the force that must must be be applied of 195pA 195pA gigaNewtons. gigaNewtons. Equivalently, Equivalently, this force that applied to to the of the the bar bar to bar to length of p)£. the end end of to stretch stretch the the bar to aa length of (1 (1 + +p)i. (b) 196/195 196/195 m, or approximately approximately 1.005 1.005 m. m. (b) m, or (c) BVP is is (c) The The BVP 2
-195 . 10 9 d u2 = 0 0 ' dx u(O) = 0,
< x < 1,
195. 10 9 du (1) = 109 . dx It by direct direct integration the solution is u(x) x/195, It is is easy easy to to show show by integration that that the solution is u(x] = o;/195, and therefore u(l) = 1/195. Since Since u is is the the displacement displacement (in (in meters), and therefore u(l) = 1/195. meters), the the final final position 1/195 m, is, the stretched bar position of of the the end end of of the the bar bar is is 11 + + 1/195 m, that that is, the stretched bar is is 196/195 m. 196/195 m.
5. The The wave wave equation equation is 5. is 2 (7.9 . 103) a 8tu2
-
(
a2 = !(x, t),
1.95· 10 11) axu2
0<x
< 1.
518 bib
Appendix C. C. Solutions to odd-numbered exercises
The units units of of 1 are N/m N/m33 (force (force per per unit unit volume). volume). The The units units of the first first term term on on the The / are of the the left are left are kg m kgm/s2 N m 3 - m3 ' m 3 S2 and the the units units of the second on the the left left are and of the second term term on are N 1
m2 m
7. 7.
(a) (a) We We have have
a{)t22 u (x, t) = -c2 () 2 u(x, t),
while while Therefore, Therefore,
N
= m3 ·
2 aax2 u 2 (x, t) = -f} u(x, t).
a{)t22 u -
2 C
aax2 u = -c2 f} 2 u + c2 () 2 u = o. 2
(b) Regardless of of 0, f}, u(O, for all all t. The way that that (b) Regardless of the the value value of u(Q, t) = = 00 holds holds for The only only way u(l, can hold all tt is u(l, t) t) — = 00 can hold for for all is if if sin «(}l)
= 0,
so f}9 must one of of the so must be be one the values values
() = ~7r,
n
= 0, ±1, ±2, ....
Section Section 2.3 2.3 1. Units acceleration (length (length per squared). 1. Units of of acceleration per time time squared). 3. Units (length per time). 3. Units of of velocity velocity (length per time). 5. The The internal internal force on the end of the string string at, 5. force acting acting on the end of the at, say, say, xx = = Il,, isis au
T ax (l, t).
(C.1)
If this end can can move the vertical vertical direction, (C.I) If this end move freely freely in in the direction, force force balance balance implies implies that that (C.1) must be zero. zero. must be
Section Section 3.1 3.1 1. the form form f(x) I(x) = linear if and only only if if b = = 0. O. Indeed, Indeed, if if 1. A A function function of of the = ax ax + + b is is linear if and
/I:: R —» R linear, then a= /(I). R -t R is is linear, then f(x) I(x) — = ax, ax, where where a = 1(1). 3. (a) Vector Vector space e[O, 1)). 3. (a) space (subspace (subspace of of C[0,1]). (b) Not space; does contain the the zero zero function. function. (Subset (Subset of of e[O, C[0,1], but (b) Not aa vector vector space; does not not contain 1], but not aa subspace.) subspace.) not
(c) space (subspace (subspace of of e[O, C[Q, 1]). (c) Vector Vector space (d) Vector space. (d) Vector space. (e) Not Not aa vector vector space; space; does does not not contain contain the zero polynomial. polynomial. (Subset P nn,, but (e) the zero (Subsei of of P but not aa sub subspace.) not space.)
519 519
Appendix C. C. Solutions to odd-numbered odd-numbered exercises Appendix Solutions to exercises
€ Cl1[a,b] 5. Suppose u E [a, b] is any nonzero nonzero function. Then
L(2u)
3 du 3 = 2 du dx + (2u) = 2 dx + 8u ,
while
2Lu 7.
du
= 2 dx + 2u
3
.
L(2u) =1= Since L(1u) ^ 2Lu, 2Lu, L is not linear. (a) The proof is a direct calculation:
A(ax + ,Bz)
=
= [:~~
:~~] [ ~:~! ~~~ ]
all (axl + ,BZl) + a12(ax2 + ,BZ2) ] [ a21(axl + ,Bzl) + a22(ax2 + ,Bz2) a(allxl + a12x2) + ,B(allzl + a12z2) ] [ a(a21xl + a22x2) + ,B(a21z1 + a22z2)
=a
[ allXl a21Xl
+ a12X2 + a22X2
] +,B [ allZl a21Z1
+ a12Z2 + a22Z2
]
= aAx+,BAz. This shows that the operator defined by A is linear. (b) We have n
(A(ax+,BY))i
= La;j(axj +,BYj) j=l
and
n
(aAx + ,BAY)i
=a L j=l
aijXj +,B L a;jYj· j=l
Now, Now, n
(A(ax+,By)); = Laij(aXj +,BYj) j=l n
=L
(aaijXj
j=l n
n
= Laaijxj j=l n
=a L
+ ,BaijYj) + L,BaijYj j=l
n
aijXj
+ ,B L
aijYj
j=l j=l = (a Ax + ,BAy);, as desired. The third equality follows from the the commutative and associative the fourth equality follows from the the distributive while the properties of addition, while property of multiplication multiplication over addition.
Appendix odd-numbered exercises Appendix C. C. Solutions Solutions to to odd-numbered exercises
520
Section 3.2 1. The range A is is 1. The range of of A
{o:(l,-l) {a(l,-l) : O:ER}, a€R}, which is the plane. plane. See Figure C.I. C.l. which is aa line line in in the See Figure 3~--~----~----r---~~--~----~-----r--~
2
)(N
0
-1
-2 -3~--~----~----~--~~--~----~----~--~
-3
-2
-1
0
2
3
Xl
Figure C.l. range of Figure C.I. The The range of A A (Exercise (Exercise 3.2.1). 3.2.1). 3. 3.
(a) A is nonsingular. (a) A is nonsingular. (b) A is nonsingular. (b) A is nonsingular. (c) A is is singular. in the the range (c) A singular. Every Every vector vector in range is is of of the the form form
Ax
= [~
~]
= [ ~~!~:
[ :: ]
].
That is, y E whose first That is, every every y €R R22 whose first and and second second components components are are equal equal lies lies in in the the range of Thus, for is solvable for range of A. A. Thus, for example, example, Ax Ax = = bb is solvable for
b=[~], but not for but not for
b=[;].
5. The The solution solution set set is is not subspace, since since it it cannot contain the the zero zero vector vector (AO (AO = 5. not aa subspace, cannot contain =
). oOi=^ bb).
521
Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises Appendix exercises
The null space of L the set of all first-degree polynomials: 7. The L is the
N(L) 9.
= {u: [a,b]-+ R
: u(x) = mx + c for some m,c E R}.
The only functions functions in CZ[a, b] that satisfy (a) The C2[a, 6]
dZu dx
--= z 0
are functions Cix + C C?. condition are functions of of the the form form u(x) u(x) = C1x The Neumann Neumann boundary boundary condition z . The at the left left endpoint implies that C\ Cl = = 0, 0, and the Dirichlet boundary condition at the right endpoint implies that €2 C2 = = O.0. Therefore, only the zero function is u = 0, a solution to Lin L^u 0, and so so the null space of Lin Z/m is trivial.
E C[a, b] is given and u € E C^[a, C~ [a, b] b] satisfies (b) Suppose /f G C[a,6] d2 u - dx 2 (x)
= f(x),
a < x < b.
Integrating Integrating once yields, by the the fundamental theorem of calculus,
- iar dx~ (s) ds = iar f(s) ds d2
du
du
=> d:(x) = -
iar
=> - dx (x) + dx (a) d
(X
= ia
f(s) ds
f(s)ds.
The integrate The last last step follows from from the the Neumann Neumann condition condition at at x = a. a. We We now now integrate again:
d
d: (x)
=>
l
X
=-
bd
iar
d:(z)dz
f(s) ds
=-
Ibx iar f(s)dsdz
-lb 1 i1 z
=> u(b) - u(x) = a
=> u(x) =
f(s) ds dz
Z
f(s)dsdz.
This shows shows that solution for This that L/mU Linu = = f has has aa unique unique solution for each each /f € E C[a, b].
11. By the the fundamental theorem of calculus,
u(x)
= IX f(s)ds
Du == ff.. However, However, this solution is not unique; unique; for C, satisfies Du for any constant constant (7, u(x) is is another another solution. solution.
= IX f(s) ds + C
Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises Appendix exercises
522
Section 3.3 1. 1.
(a) Both Both equal (14,4, -5). (a) equal (14,4, -5).
(b) Both equal (b) Both equal
2:7=1 (Vj)iXj.
3. The The given given set not aa basis. basis. If A is the matrix matrix whose whose columns columns are the given given vectors, vectors, 3. set is is not If A is the are the then N(A) is not not trivial. then A/"(A) is trivial. 5. We know that P% P2 has has dimension dimension 3, 3, and therefore it suffices to to show show either either that that the 5. We know that and therefore it suffices the given set set of three vectors vectors spans P2 or or that that it linearly independent. E Pz, P2, then given of three spans Ti it is is linearly independent. If If pp e then we write write we Cl = p(Xl), C3 = P(X3), C3 = p(X3) and define define the the polynomial polynomial and
Then Then
and, similarly, q(X2) = pp(X2), q(X3) = p(%s)p(X3)' But But then and, similarly, q(x-z) ( x z ) , q(xz) then p and and q are are secondseconddegree polynomials polynomials that that agree distinct points, points, and three points points determine degree agree at at three three distinct and three determine Therefore, aa quadratic quadratic (just (just as as two two points points determine determine aa line). line). Therefore,
and we have that every every pp € E Pi P2 can be written combination of of and we have shown shown that can be written as as aa linear linear combination L 1 , 1/2,£3. L 2 , L 3 • This the proof. proof. LI, This completes completes the
Section 3.4 1. 1.
(a) The verification is is aa direct direct calculation of Vi Vi •• Vj for the combinations of i, j.j. (a) The verification calculation of Vj for the 66 combinations of i, For example, example, For 1
1
1
1
1
1
Vl'Vl=--+--+--
V3 V3
V3 V3 3" + 3" + 3" = 1,
V3 V3
111
=
Vl'V2 =
~ ~ ~O ~ +
1
=
+
( -
~)
1
v'6 - v'6
= 0,
and so so forth. forth, and
(b) x
= (VI' X)Vl + =
~
(V2 . X)V2 + (V3 . X)V3
VI + OV2 +
( -
~)
V3.
Appendix to odd-numbered odd-numbered exercises exercises Appendix C. C. Solutions Solutions to
523
3. We have have
Ilx+yl12
= (x+y,x+y)
= (x, x + y) + (y, x + y) = (x,x) + (x,y) + (y,x) + (y,y) = (x,x) + 2(x,y) + (y,y) = IIxll 2 + 2(x,y) + Ilyll2. Therefore, Therefore,
if and and only if (x,y) (x, y) = = 0. only if O. if 5. First all, if if 5. First of of all,
(y, z) = 0 for all z E W, then since since Wi each i, i, we we have, have, in in particular, then vn E e W for for each particular,
(y, Wi)
= 0, i = 1,2, ... , n.
Suppose, the other that Suppose, on on the other hand, hand, that
(y, Wi)
= 0, i = 1,2, ... ,n.
If zz is any vector vector in in W, then, since since {Wi, for W, If is any W, then, {wi, W2, W 2 ,... . . . ,, w wnn }} is is aa basis basis for W', there there exist exist a2, ... such that that scalars scalars ai, 0:2, • • • ,,an otn such n Z
= Laiwi. i=l
We then then have We have
n
= Lai (y,Wi) i=l
i=l
=0.
This proof. This completes completes the the proof. 7. best approximation approximation to to the the given given data - 0.0018984. 7. The The best data is is y = — 2.0111x 2.0111x — 0.0018984. See See Figure Figure C.2. 9. The onto 7*2 P2 is 9. The projection projection of of g9 onto is
2 -Ql(X) 7r or or See C.3. See Figure Figure C.3.
+ OQ2(X) +
2V5(7r 2 - 12) 3 Q3(X) 7r
524 524
Appendix C. exercises Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises
Figure data from from Exercise Exercise 3.4.7 Figure C.2. C.2. The The data 3-4-7 and and the the best best linear linear approximation. approximation.
Figure function g(x] g(x) = Figure C.3. C.3. The The function = sin sin (1fx) (TTX) and and its its best best quadratic quadratic approxiapproximation over mation over the the interval interval [0,1].
Appendix C. Solutions Solutions to to odd-numbered Appendix C. odd-numbered exercises exercises
525
Section 3.5 1. The The eigenvalues of A 200 and and >'2 A2 = 100, and and the corresponding (normalized) 1. eigenvalues of A are are AI >'1 = = 200 = 100, the corresponding (normalized) eigenvectors are are eigenvectors U1 =
[
-0.8 ] 0.6'
U2 =
[ 0.6 ] 0.8 '
respectively. is respectively. The The solution solution is b . U1
b . U2
X=~U1+~U2=
[
1 ] 1
.
3. The and eigenvectors eigenvectors of 1, >'3 AS == —1 and 3. The eigenvalues eigenvalues and of A A are are AI >'1 = = 2, 2, A2 >'2 = = 1, -1 and
The of the The solution solution of the Ax Ax = b b is is
[
-3/2] 1/2 .
5/2
5. of u^ operations, so computing all ra5. The The computation computation of Ui .• b/Aj b/>.; costs costs 2n 2n operations, so computing all nn of of these these ra2n22 operations. tios costs costs 2n operations. Computing Computing the linear linear combination is is then equivalent equivalent to to another so the the total total cost cost is another n dot dot products, products, so is 2n 2 7. 7.
+ n * (2n -1) = 4n 2 -
n
= O(4n 2 ).
(a) For For k = -1, have (a) = 22,3, , 3 ,... . . . ,,n n— 1, we we have (Ls(j)) k
;2 (+ = ;2 (= ;2 = ;2 (2-2cos(j7rh))s~). =
sin ((k - l)j7rh)
2 sin (kj7rh) - sin ((k
sin (kj7rh) cos (j7rh)
+ l)j7rh))
+ cos (kj7rh) sin (j7rh) + 2 sin (kj7rh)
- sin (kj7rh) cos (j7rh) - cos (kj7rh) sin (j7rh)) (2 - 2 cos (j7rh)) sin (kj7rh)
Thus Thus (Ls(j)) k
=
;2
(2 - 2 cos (j7rh)) s~), k
= 2,3, ... , n -
l.
Similar Similar calculations show show that this formula holds holds for for kk = = 1I and and k = = nn also. also. Therefore, s(j) s^' is an eigenvector of L with eigenvalue \. _ 2 - 2 cos (j7rh) h2 •
AJ -
(b) The eigenvalues \j >.j are all positive and are increasing with the frequency j. j.
Appendix to odd-numbered Appendix C. C. Solutions Solutions to odd-numbered exercises exercises
526
(c) as (c) The The right-hand right-hand side side bb can can be be expressed expressed as
b = (8{1) . b) 8(1) + (8(2). b) 8(2) + ... + (8(n). b) 8(n), while the the solution solution xx of of Lx Lx = =b while b is is X
=
8(1) . x (1) ---8
Al
8(n) . X (n) + -8(2)- -. x8 (2) + ... + --8
A2
An
Since with j, j, this frequency Since Aj Xj increases increases with this shows shows that, that, in in producing producing x, x, the the higher higher frequency b are components of of b are dampened dampened more more than than are are the the lower lower frequency frequency components components components of b. Thus x is smoother smoother than than b. b. of b. Thus x is
4.1 Section 4.1 1. Define Define 1. Xl
= U,
du
X2
= dt'
Then Then dXl
dt
=X2,
dX2
dt
=
1
-2" X l.
3. Define Define
Then Then dXl
dt
=X2,
dX2 --a.:;:=X3, dX3 --a.:;:=X4, dX4
Tt
5. 5. Define Define
= 2X3 dp
Xl
. + sm t.
Xl = p, X2 = dt' X3 = q, X4
Then the the first-order first-order system system is Then is dXl
Tt =X2, dX2
mITt
= /!(Xl,X3,X2,X4),
dX3
dt dX4 m2Tt
dq
= dt'
=X4,
= h(Xl,X3,X2,X4).
Appendix C. C. Solutions Appendix Solutions to to odd-numbered odd-numbered exercises exercises
527
Section 4.2 1. 1.
(a) We first zero function so Sis nonempty. If If (a) We first note note that that the the zero function is is aa solution solution of of (4.4), (4.4), so S is nonempty. u, € S and and a, a, /3fJ E G R, satisfies u, v E R, then then w = au + /3v fJv satisfies
d2w a dt 2
d2
dw
d
+ bdt + cw = a dt 2 [au + fJv] + b dt
[au + fJv]
+ c(au + fJv)
=a ( a ~:: + fJ ~:~) + b ( a ~~ + fJ ~:) + c( au + fJv)
~:: + b~~ + cu) + fJ (a ~:~ + b ~: + cv)
=a
(a
=a
. 0 + fJ . 0
= O.
Thus w is is also (4.4), which shows that that S S is Thus w also aa solution solution of of (4.4), which shows is aa subspace. subspace. text, no matter what what the the values of a, b, c (a (b) explained in in the (b) As As explained the text, no matter values of a, 6, (a ::j:. ^ 0), 0), the the solution by two two functions. solution space space is is spanned spanned by functions. Thus Thus S S is is finite-dimensional finite-dimensional and and it has dimension at most 2. Moreover, it is to see each of the sets it has dimension at most 2. Moreover, it is easy easy to see that that each of the sets {eTlt,eT2t} } isislinearly {e rit ,e r2 *} (rl::j:. (n / rr2), {e"* cos cos (At),el£tsin(At)}, (A*), eM* sin (At)}, and and {eTt,te {er\tertrt} linearly inin2 ), {el£t two functions is linearly and only dependent, since aa set dependent, since set of of two functions is linearly dependent dependent if if and only if if one one of multiple of the other. Thus, in has aa basis of the the functions functions is is aa multiple of the other. Thus, in every every case, case, S S has basis with two two functions, functions, and with and so so S is is two-dimensional. two-dimensional. that the the characteristic polynomial of has aa single, repeated root root rr = 3. 3. Suppose Suppose that characteristic polynomial of (4.4) (4.4) has single, repeated = —6/(2a) (so b62 -— 4ac = 0). Then, shown in in the -b/(2a) (so = 0). Then, as as shown the text, text,
u(t)
= Clert + c2te Tt
is aa solution solution of of (4.4) for each each choice choice of of Cl, ci, C2. 02- We We wish show that, given fci, ki € R, is (4.4) for wish to to show that, given kl, k2 E R, there is is aa unique choice of of CI, ci, ci such that -u(O) = = ki, du/dt(0) = k^. We have have there unique choice C2 such that u(O) kl, du/dt(O) k2. We
du dt (t ) = rCle Tt
+ C2e Tt + rC2te Tt .
Therefore, the equations •u(O) simplify to to Therefore, the equations u(O) == ki, kl' du/dt(0) du/dt(O) — = k<2 k2 simplify
~]
[;
C
= k.
Since coefficient matrix matrix is is obviously nonsingular (regardless the value of r), Since the the coefficient obviously nonsingular (regardless of of the value of r), there is aa unique unique solution CI, C2 for k2• there is solution Ci,C2 for each each kl, ki,kz. 5. 5.
(a) The only solution is is u(x) O. (a) The only solution u(x) = 0.
(b) The The only only solution solution is is u( u(x) (b) x) = = 0.O. (c) The The function function u( u(x) sin (-KX) is aa nonzero solution. It It is any (c) x) = sin (7rx) is nonzero solution. is not not unique, unique, since since any multiple of it another solution. solution. multiple of it is is another 7. By By the the product product rule rule and the fundamental theorem of calculus, 7. and the fundamental theorem of calculus,
:t
[1:
1: = it = it
ea(t-S)f(S)dS] = :t [eat ae at
e-asf(S)dS]
e -as f(s) ds
+ eate- at f(t)
to
ea(t-s) f(s) ds + J(t).
a
to
Appendix C. Solutions exercises Appendix C. Solutions to to odd-numbered odd-numbered exercises
528 Therefore, with
u(t)
= uoeu(t-t o) +
[t
eu(t-.) f(s) ds,
to
we have
du (t) dt
= auoeu(t-to) + a [t eu(t-.) f(s) ds + f(t) to
= f(t). = au(t) au(t) + /(*)• Thus uu satisfies the differential differential equation. We also have
u(to)
= uoeu(to-t o) + [
to
eu(t-s) f(s) ds
to
=Uo +0 =uo, so the the initial condition holds as well.
= ~ sin 2 (t) u(t) = ~ (e- t + cos (t) + sin (t))
9. u(t) 11.
Section 4.3 1. The solution is 1. The solution is X
(t )
= -1U l v'3
1 -t - e U2
V2
+ -1e -2t ll.3
v'6
3. The general solution is
5. the vector vector (1, —1). 5. XQ Xo must must be be aa multiple multiple of of the (1, -1). 7. 7.
x(t) 9.
=
t 2t 1 [ 55 - 3e- - 45e- + 20t - 7 cos (t) - 11 sin (t) 2t 60 10 + 6e- + 20t - 16 cos (t) - 8 sin (t) -5 - 3e- 2t + 45e- t + 20t - 37 cos (t) + 19 sin (t)
1
(a) The solution is
3 -t 1 M 3 -t 1 M x(t) ="2 e +"2 e , y(t) ="2 e -"2e. the first species (x (x(t)) The population of the (t)) increases exponentially, while the the second species (y( t)) goes to zero in finite time (y( t) = 0 at population of the (y(t)) (y(t) t = In ln(3)/4). while the first first species species (3)/4). Thus the second species becomes extinct, while increases without bound.
C. Solutions to odd-numbered exercises Appendix C. to odd-numbered exercises
529
(b) If If the the initial initial populations populations are x(0) = r, y(0) = s, s, then the solution solution to to the the IVP IVP (b) are x(O) r, yeO) then the is is x(t) =
~ (r + s)e- t +
(r - s)e 3t ) , yet) =
~
((r + s)e- t + (s - r)e 3t ) .
Therefore, if rr = s, both both populations Therefore, if = s, populations decay decay to to zero zero exponentially; exponentially; that that is, is, both both species species die die out. out.
Section 4.4 4.4 Section 1. 1.
(a) Four Four steps steps of yield an an estimate of 0.71969. (a) of Euler's Euler's method method yield estimate of 0.71969. (b) Two Two steps steps of of the the improved improved Euler Euler method yield an estimate of 0.80687. (b) method yield an estimate of 0.80687. (c) the RK4 RK4 method 0.82380. (c) One One step step of of the method yields yields an an estimate estimate of of 0.82380. Euler's method gives no correct digits, digits, the the improved Euler method method gives gives one one correct correct Euler's method gives no correct improved Euler gives three three correct digits. Each methods evaluated evaluated ff(t, digit, digit, and and RK4 RK4 gives correct digits. Each of of the the methods ( t , u) u) four four times. times.
3.
(a) Let
Ul
= X, U2 = dx/dt, U3 = y, U4 = dy/dt. dUl
dt
Then the system is
=U2,
duz _ Ul + 2U4 _ 1-'2(Ul + I-'d _ 1-'1(Ul - 1-'2) dt rl (Ul, U3)3 r2( Ul, U3)3 ' dU3 dt =U4, dU4 = - 2U2 dt
-
+ U3 -
I-'zU3 ----:'-------'----::-::rl(Ul,U3)3
(b) routine ode45 421 steps (b) The The routine ode45 from from MATLAB MATLAB (version (version 5.3) 5.3) required required 421 steps to to produce produce aa graph graph with with the the ending ending point point apparently apparently coinciding coinciding with with the the initial initial value. value. The of y(t) yet) versus x(t) is in Figure Figure C.4. The graph graph of versus x(t) is given given in C.4. The The graphs graphs of of x(t) x(t) and the times show, and yet), y ( t ) , together together with with the times steps, steps, are are given given in in Figure Figure C.5. C.5. They They show, not surprisingly, that that the time step step is is forced forced to to be small precisely when the the not surprisingly, the time be small precisely when coordinates are rapidly. coordinates are changing changing rapidly. minimum step taken by was 3.28.10(c) (c) The The minimum step size size taken by ode45 ode45 was 3.28 • 10~44,, and and using using this this step step entire interval interval of require almost length over over the length the entire of [0, [0,T] would would require almost 19000 19000 steps. steps. This This is to to be to the the 421 the adaptive is be compared compared to 421 steps steps taken taken by by the adaptive algorithm. algorithm. (Note: (Note: The The exact for minimum step size, size, etc., etc., will will differ differ according according to the algorithm algorithm exact results results for minimum step to the and tolerances used.) and tolerances used.)
5. 5.
(a) We first note that a+(tl-tO) a+(ti— to) < b+(ti — to) if if and and only a < t-(lI t—(t\ — to) S
(just replace replace tt — (ti -— to) to) by in the last step). step). Gust - (tl by tt in the last
530 530
Appendix C. Solutions to odd-numbered exercises exercises
0.8 0.6 0.4 0.2 >.
0 -0.2 -0.4 -0.6 -0.8 =t5
-1
-0.5
0
0.5
x
1.5
Figure satellite in Figure C.4. C.4. The The orbit orbit of of the the satellite in Exercise Exercise 4.4.3. 4-4-3-
~JS;;:~ 1 ~_:~l f:~~:;; 1 o
1
2
3
4
5
6
7
o
1
2
3
4
5
6
7
o
1
2
3 4 Step index
5
6
7
Figure Figure C.5. C.5. The The coordinates coordinates of of the the satellite satellite in in Exercise Exercise 4.4.3 4-4-3 (top (top two two graphs) with graphs) with the the step step lengths lengths taken taken (bottom (bottom graph). graph).
531
Appendix C. C. Solutions Solutions to odd-numbered exercises We have We have dv -(t)
dt
= -dtd [u(t -
(fI - to))]
du = -(t - (h dt =f(u(t - (t1 = f(v(t)),
to)) to)))
so the ODE. so vv satisfies satisfies the ODE. Finally, Finally, V(t1)
= u(h -
(t1 - to))
= u(to) = Uo.
Therefore v is is aa solution the given given IVP. Therefore v solution to to the IVP. (b) (b) Consider the the IVP IVP
du
dt u(O)
=t
'
= 1,
which has /2 + 1. IVP which has solution solution u(t) u(t) = e t2/2 l. The The IVP
dv =t
dt
'
v(1)
=1
which is is not equal to has solution has solution v(t) = tt 22 /2 + + 1/2, 1/2, which not equal to 2 1 u(t - (1 - 0)) = u(t - 1) = -(t -1) + 1.
2
7. is 7. The The exact exact solution solution is x(t)
={
2-
2~-:'
2e,
0
< In 2,
t > In 2.
(a) = 0.5: (a) The The following following errors errors were were obtained obtained at at t =
At 6.t 1/4 1/4 1/8 1/8 1/16 1/16 1/32 1/32 1/64 1/64 1/128 1/128
Error 2.4332e-05 1.3697e-06 8.1251e-08 4.9475e-09 3.0522e-10 1.8952e-ll
By that as as 6.t in half, half, the error is reduced by by aa factor factor By inspection, inspection, we we see see that At is is cut cut in the error is reduced of of approximately approximately 16, as expected expected for 0(6.t4) O(At 4 ) convergence. errors were 2.0: (b) The (b) The following following errors were obtained obtained at at tt = 2.0:
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
532
I:l.t At
1/4 1/4 1/8 1/8 1/16 1/16 1/32 1/32 1/64 1/64 1/128 1/128
Error 5.0774e-03 3.2345e-03 3.1896e-04 3.1896e-04 1.0063e-04 1.0063e-04 8.9026e-06 3.4808e-06
The The error error definitely definitely does does not not exhibit exhibit O(l:l.t4) O(At 4 ) convergence convergence to to zero. zero. The The reason reason is is the the lack lack of of smoothness smoothness of of the the function function 11 + + Ix \x -11; — 1|; the rate rate of of convergence given in in the the text text only only applies applies to to ODEs ODEs defined defined by by smooth smooth functions. functions. When When given integrating integrating from from t = = 00 ttoo t = = 0.5, 0.5, the the nonsmoothness nonsmoothness of of the the right-hand right-hand side side is why we observed not not encountered encountered since since x(t) x(t) < 11 on on this this interval. interval. This This explains explains why we observed problem. good good convergence convergence in in the the first first part part of of this this problem.
Section 4.5 1. 1.
(a) is (a) The The exact exact solution solution is
(b) norm of 0.089103. (b) The The norm of the the error error is is approximately approximately 0.089103. (c) norm of the error 0.10658. (c) The The norm of the error is is approximately approximately 0.10658. 3. 0.04. 3. The The largest largest value value is is I:l.t At == 0.04. 5. 5.
Ca) Applying the the methods we find (a) Applying methods of of Section Section 4.3, 4.3, we find the the solution solution xCt)
t
lOOt
3e- t
+ e- lOOt
1 [ 3e- _ e-
= 2"
] .
(b) By By trial trial and and error, error, we find that that I:l.t At $< 0.02 0.02 is is necessary necessary for for stability. stability. Specifically, (b) we find Specifically, integrating from from tt = = 00 ttoo tt = = 1, l,n = 49 49 (i.e. (i.e. I:l.t At = = 1/49) 1/49) yields yields n= integrating
yields while while n ::::: > 50 50 yields l) (c) With With Xj+i = Xi + I:l.tAXi AtAxi and and y[ ui .• Xi, Xj, we we have Xi+l = Xi + yii) = Ul have (c)
=
Ul . Xi+l Ul . Xi + I:l.tUl . AXi 1 yii+ ) = yii) + I:l.t(Aut) . Xi 1 yii+ ) yii) + I:l.tAIUl . Xi 1 yii+ ) = yii) + I:l.tAlyii)
=> => = => => yii+ 1) = (1 + I:l.tAt)yii). A A similar similar calculation calculation shows shows that that
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
533
For For stability, stability, we we need need 11+~t'\11::;
1, 11+~t'\21::; 1.
Since the the eigenvalues eigenvalues of of A A are are -1, —1, -100, —100, it it is is not hard to to see see that that the the upper upper Since not hard bound for for ~t At is ~t At ::; < 0.02, 0.02, just as was was determined determined by experiment. (d) For the backward Euler method, a similar calculation calculation shows that y~i+l) y~i+l)
= (1- ~t,\l)-ly~i), = (1 _ ~t,\2)-ly~i).
Stability is is guaranteed for any any ~t, At, since since Stability guaranteed for
for every every ~t At > 0. for O.
Section Section 4.6 4.6 1. G(t; s) = e- 2 (t-s).
3. The IVP is
dm - + km
dt
= 0.1,
k
m(O)
= 10.
s
The Green's function is G(t; s) = and the the solution solutionisis — e-k(t-s), e ^ \ and 0.1) -kt ( ) -_ (10 -T mt e
0.1 +T·
The The mass converges, as tt -t —>• 00, oo, to
0~1 ~ 0.289 g. 5. The solution is u(t)
.2(t) = 3"2 (1 + 2 cos (t)) sm "2 = 3"1 (cos (t) -
cos (2t» .
Section Section 5.1 5.1 1. 1.
(a) the null If (a) Since Since Mn MD is is linear, linear, it it suffices suffices to to show show that that the null space space of of Mn MD is is trivial. trivial. If Mnu then, du/dx MDU = = 0, 0, then, du/dx = — 0, 0, that that is, is, u is is aa constant constant function: function: u(x) u(x) = — c. c. But But then the condition u(O) u(0) = 00 implies implies that that cc = 0, 0, and and so so u is is the the zero zero function. function. then the condition Thus N(Mn) M(MD] = {O}. {0}. Thus
(b) If If uu E € c1[o, CofO, f] f] and and Mnu MDU = — f, /, then then we we have have (b)
du dx(x)=f(x), O<x
u(x)
=
1"
f(s)ds.
Solutions to to odd-numbered odd-numbered exercises Appendix C. Appendix C. Solutions exercises
534 534
But have u(i) — 0, But we we also also must must have u(f) = 0, which which implies implies that that
it
I(s) ds
= o.
=
If 1 / €E C[O, C[Q, f] I] does does not satisfy this condition, then is impossible for MDU f If not satisfy this condition, then it it is impossible for MDU = 1 to have solution. to have aa solution.
3. 3.
(a) If v,w are both solutions of of Lu linearity) (a) If v, w G E S S are both solutions Lu = /, I, then then Lv Lv = Lw, Lw, or or (by (by linearity) L(v Therefore vv — € A/"(Z>). But, since since S is is aa subspace, subspace, vv — L(v -— w) w) = = 0. O. Therefore - w wE N(L). But, - w w is is also in If the only function and SS is is the then also in S. S. If the only function in in both both Af(L) N (L) and the zero zero function, function, then v -— w be the function. w must must be the zero zero function, function, that that is, is, v and and w w must must be be the the same same function. Therefore, if if J\f(L) {0}, then at most one solution N(L) n n S = {O}, then Lu Lu = = 1f can can have have at most one solution for for Therefore, any/. f. any (b) We have that Lu f has has aa solution solution for for any any 1 / € C[0, f] f\ (see the (b) We have already already seen seen that Lu = 1 E C[O, (see the discussion immediately immediately preceding We will from discussion preceding Example Example 5.2). 5.2). We will use use the the result result from the the first part of of this this exercise exercise to show show that the the solution solution is unique. unique. The L is the the space The null space of of L space of of all first first degree degree polynomials: N(L)={u:[O,f]--tR: u(x)=ax+bforsomea,bER}.
i. Suppose Suppose u — ax for some €R and i. u€ E Af(L) N(L) n S. S. Then Then u(x) u(x) = ax + b b for some a, a, b bE R and du dx
(~) = 0 =} a = o. 2
Then u(x) = b, 6, and and Then u(x) =
it
u(x) dx
= 0 =} bf = 0 =} b = o.
Therefore uu is the zero zero function, and so so A/"(L) H SS = {O}. {0}. The uniqueness Therefore is the function, and N(L) n The uniqueness property then then follows follows from from the the first first part part of of this property this exercise. exercise, ii. Suppose uu E € A/"(L) S. Then u(x) = ax ax + b for some some a, o, b eR ii. Suppose N(L) n S. Then u(x) b for bE R and and u(O)
= 0 =} b = O.
Then u(x) — ax, ax, and and Then u(x) = du dx (f) = 0
=}
a = O.
Therefore is the the zero zero function, N(L) n S = The uniqueness Therefore uu is function, and and so so N(L} C\S = {O}. {0}. The uniqueness then follows follows from from the the first first part part of of this property then property this exercise. exercise. 5. The condition 5. The condition
(C.2) implies that that du/dx du/dx is that u u is is constant. constant. The boundary conditions implies is zero, zero, and and hence hence that The boundary conditions on u u would would then then imply that uu is the zero function. But, But, by by assumption, nonzero on imply that is the zero function. assumption, uu is is nonzero that (u,u) cannot hold. hold. (we assumed that (we assumed (u, u) = 1). 1). Therefore, Therefore, (C.2) cannot
7. 7.
(a) If LmU — 0, the form u(x) = ax + b. condition, (a) If Lihu = 0, then then u u has has the form u(x) = ax b. The The first first boundary boundary condition, du/dx(Q) = 0, implies that — 0, and then second boundary condition, du/dx(O) 0, implies that aa = 0, and then the the second boundary condition, u(£) = 0, O. Therefore, Therefore, uu is the zero function and N(Lih) is u(i] = 0, yields b6 = = 0. and M(Lm] is trivial. trivial.
Appendix C. Solutions Solutions to odd-numbered exercises exercises Appendix C. to odd-numbered
535 535
(b) For For any any f/ E <E C[O, C[Q,£\, the function function (b) .e], the
=
1£ l'
d2 u - dx 2 (x)
= f(x),
u(x)
f(s)dsdz
belongs to c~ C%, [0, i] and satisfies belongs to [O,.e] and satisfies 0
< x < .e.
This that L Lmu any /f € E C7[0,^], C[O, .e], and This shows shows that has aa solution solution for for any and therefore therefore mu = f has R(Lm) K(Lto) = = C[O,.e]. C[0,f\. (c) (c) Suppose Suppose u,v E € C~[O,.e]. Cft[Q,£\. Then Then
(Lmu,v)
I
=-
t d2
dx~(x)v(x)dx
0
]1 du =- [dx(X)V(X) 0 = =
+
Ii 0
du dv dx(X)dx(x)dx
i du dv . 0 dx (x) dx (x) dx (SInce v(.e)
I
-lot U(X)::~(X)dX
[U(X):~(X)]:
I = =-
0
t
= 0, du/dx(O) = 0)
d2
u(x) dx~ (x) dx (since u(.e)
= 0, dv/dx(O) = 0)
(u, Lmv).
Thus Thus Lm is is symmetric. symmetric.
(d) Suppose Suppose A is an an eigenvalue eigenvalue of of Lm with with corresponding eigenfunction u, u, and and corresponding eigenfunction (d) A is assume that has been been normalized normalized so so that that (u, (u,u) — 1. I. Then Then assume that u has u) = A = A(U,u)
= (AU,U) = (Lmu,u) i
d2
=-
I dx~(x)u(x)dx
=-
[::(x)u(x)]:
=
0
1c: i
0
d
+
li
(::(x)f dx
2
(x)) dx (since u(.e)
= 0, du/dx(O) = 0)
> O.
The C~[O,.e] has aa nonzero The last last step step follows follows because because every every nonzero nonzero function function in in CjjO, •£] has nonzero derivative. derivative.
9. u(x) = = x(lx(l — x), v(x) = x22(l — x). Then Then aa direct calculation shows shows that 9. Define Define u(x) v(x) = (1direct calculation that
(Mu,v) but but
7
= 30' 4
(u,Mv) = 15'
Appendix Solutions to Appendix C. C. Solutions to odd-numbered odd-numbered exercises exercises
536 536
11. 11.
(a) Then (a) Suppose Suppose u,v u, v €E C|[0,^]. C~[O, fl. Then
Applying conditions on obtain Applying the the boundary boundary conditions on u, u, v, v, we we obtain du -K dx (f)v(f)
du
dv
+ Kdx (O)v(O) + U(f)K dx (f) -
= au(f)v(f) + au(O)v(O) -
dv U(O)K dx (0)
au(f)v(f) - au(O)v(O)
= 0,
so (LRU,V) = (U,LRV), as desired. first degree polynomial: polynomial: u(x) = ax ++ b.b. The (b) If If LRU LRU = = 0, 0, then u must be a first u(x) = boundary conditions imply that a and b must satisfy satisfy the following equations: -Ka +ab
(af
= 0,
+ K)a + ab = O.
The computed as follows: The determinant determinant is is computed as follows: n- K
I a<- +
a K
a
I = -a(2K + af.) < O.
= 0, is, u = so N(LR) N(LR) is trivial. The only solution is a = b = 0, that is, = 0, so
Section 5.2 5.2 Section 1. If n =I- m, then
= !li{ ((n-m)1rx) 2 cos f
_cos ((n+m)1rx)} dx f =! [ f sin ((n-m)1rx) _ f sin ((n+m}7rx)]i. 2 (n - m)1r f (n + m)1r f o
0
This last expression simplifies simplifies to four terms, each including the sine function evaluated at an integer multiple of 1r, zero. Thus (Un, TT, and hence each equal to zero. (un,uUrn) m) = 0 for n 7^ TO. =I- m. for
Appendix C. Solutions to to odd-numbered odd-numbered exercises exercises Appendix C. Solutions
537
3. The eigenpairs are
2n -l)1['X)
cos (
2f
' n = 1,2,3, ....
5. The - rr + (X (A — - 5), so the the characteristic characteristic roots are The characteristic characteristic polynomial is rr22 — rl =
1 - -/21 - 4A 1 + -/21 - 4A 2 ' r2 = 2
(C.3)
Case 1: 1: A 1/2,1/2 and the A= = 21/4. 21/4. In In this this case, case, the the characteristic characteristic roots roots are are rr = = 1/2,1/2 and the Case general of the the ODE is general solution solution of ODE is
u(x)
= cle
X /
2 + c2xe X / 2.
The boundary condition u(O) u(Q) = — 00 yields = 0, 0, and and then condition The boundary condition yields c\ CI = then the the boundary boundary condition u(l) C2 = = O. u(l) = = 1 implies that c
The boundary conditions lead to the system system
clne
r
!
CI + C2 = + c2r2e r2 =
0,
O.
This system has the unique solution C1 = ci C2 = = 0, 0, so there is no nonzero solution for for c\ = < 21/4. Hence no no A A< 21/4 is eigenvalue. AA < 21/4. Hence < 21/4 is an an eigenvalue. A> Case 3: 3: A > 21/4. In this case, the roots are complex conjugate: r1
= "21 -
8'
t, r2
= "21 + 8'z,
8= -/4A-21
2'
The general solution of the ODE is
u(x) = (Clcos(8x) +C2 sin (8x)) eX / 2. The boundary condition u(0) 0, so so any any eigenfunction eigenfunction is is of form The boundary condition u(O) = = 0 0 yields yields c\ C1 = = 0, of the the form
u(x) = sin (8x )e x / 2. The Neumann Neumann condition condition at is equivalent equivalent to to the the equation The at x = = 11 is equation tan (8) = -28, 8 > O.
Although this equation equation cannot be solved explicitly, a simple graph shows that there are infinitely many solutions 0 < 81 < 8622 < < ... are < 6\ • • •,, with 2k -12k + 1 ) 8k E ( -2-1[', -2-1[' , k = 1,2, ....
Define by Define A& Ak by 8 _ -/4A k - 21 k 2 '
538 538
Appendix C. Solutions to to odd-numbered odd-numbered exercises Appendix C. Solutions exercises
that is, is, that 2
21
= 8k + 4'
Ak
k
= 1,2, ....
Ak, A; k= and the the corresponding eigenfunctions eigenfunctions are Then A*,, = 1,2, 1, 2 , ... . . . , are eigenvalues, and
Using find that we find that Using Newton's Newton's method, method, we 81 == 1.8366, 82 == 4.8158,
which yields yields which Al
== 8.6231,
A2
== 28.4423.
The eigenfunctions V2, as given by by the the above above formula. The eigenfunctions are are VI, vi,vz, as given formula. shows that that A direct direct calculation calculation shows
so vi and and V2 v? are are not orthogonal. so VI not orthogonal. 7.
(a)
,",00
(b) ( c)
2( _l)n+l
.
(
)
.
(
)
mr
sm n7rX
,",00
L....n=1
4sin(Vf) n2".2
SIn n7rX
,",00
12(_I)n+l n3".3
L....n=1
L....n=l
.
(
sIn n7rX
)
720( _I)n+l . ( ) (d) ,",00 L....n=l n5".o SIn n7rX the original functions using 10 the Fourier sine The errors in approximating the 10 terms of the graphed in Figure C.6. series are graphed
9. sin (37rx) (That is, all of the the Fourier sine coefficients coefficients are zero, except the the third, which which (STTX) (That is one.) 11. The series have the the form
~ ((2n -1)7rX) L...Ja n cos 2 ' n=l
where where
(b) an --
(d) an
32cos «2n-I)"./4) sin 2 «2n-I)"./8). ".2(2n_l)2 ,
=-
8 5760+2880( _l)n (2n-I)".+240(2n-l)2".2+ 7 (2n_l)4".4 (2n-l)
".
The errors in approximating approximating the the original functions using 10 10 terms of the Fourier Fourier quarter-wave cosine series are graphed in Figure C.7.
539 539
Appendix C. C. Solutions odd-numbered exercises exercises Appendix Solutions to to odd-numbered
0 . 0 3 , . . . . - - - - - - - - -.....
1~------------------~
0.02
0.5
0.01
-0.5 0
0.5
-0.01
1
0
0.5
x
x
-3
1.5 x 10
5
X1O
-5
1
-1~----------------~
o
0.5
-5~----------------~ 0.5 1 o x
1
x
Figure in approximating approximating four 10 terms terms of their Figure C.6. C.6. Errors Errors in four functions /unctions by 10 of their g(x) = Fourier sine sine series (see (see Exercise 5.2.7). 5.2.7). Top Top left: left: g(x) = x; Top Top right: right: h(x) h(x) = = 3 5 •3 | —x | ; Bottom left:= m(x] — x3; Bottom right: k(x)- =7x —3x 10x ;x ~ ~ — Bottom left: m(x) x - x= Bottom right: k{x) = 7x lOx 3 +
- Ix - I;
Section Section 5.3 5.3 ~oo
2(1_~_1)n) . ( ) n .".3 Sln n7rX
1.
(a)
3
2(1-C-l)n) . ( ) (b) x + ~oo L..-n=l n3.".3 sm n7rX (a) ~oo 32(_1)n+l sin (2n-l).".X)
.
L..-n=l
L..-n=l (2n_l)4.".4
(b) 1
(c)
+
L
16(-1)n.".+2(-1)n+l n .".-2) L..-n=l (2n-l)411'4
OO
2(1-(-1)n)
n=l nn-(2+n27r2)
5. We have
2
~oo
(2n-l)"X) 2
sin (n7rx)
d2 u
dX2 (x)
so so
cos
= -x,
0
< x < 1,
Appendix C. exercises Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises
540
0.04,....----------"
0.5
-0.02 -0.5'----------~
o
-0.04 0
1
0.5
0.5
x
0.01 , . . . . - - - - - - - - - - "
0.05
o
0
-0.01
-0.05
-0.02
-0.1
-0.03'----------~
o
1
x
0.5
-0.15 0
1
0.5
x
x
Figure Errors in four functions junctions by Figure C.7. C.7. Errors in approximating approximating four by 10 10 terms terms of of their their X; Top Top Fourier Exercise 5.2.11). Fourier quarter-wave quarter-wave cosine cosine series series (see (see Exercise 5.2.11). Top Top left: left: g(x) g(x) = = x; right: h(x) h(x) == !\- —Ixx- —\ ;Bottom Bottomleft: left: m(x) m(x) ==x x- —x x3 3; ;Bottom Bottomright: right: k(x) k(x] == right: 5 7x - lOx33 + 3xt. 7x-Wx +3x .
! I;
du = -(0) -
1'"
= ~:(O) _
x22.
dx
sdx
0
Write C C for for du/dx(O); du/dx(Q); then then another another integration integration yields Write yields u(x)=u(O)+
=0 +
l
0
"'d d;(s)ds
1'" {c -
=Cx-
s; } ds
x3
6·
Finally, we we choose choose C C so so that that u(l) u(l) = = 0, 0, which which yields C= = 1/6. 1/6. This This yields yields Finally, yields C u(x) =
~ (x-x 3 ).
541 541
Appendix C. Solutions Solutions to to odd-numbered odd-numberedexercises exercises Appendix C. 7. The The Fourier Fourier quarter-wave quarter-wave sine sine coefficients coefficients of of -Td —Td2u/dx u/dx22 are are 7. bn
= _ 2T £
1i
2 d u( ) . ((2n -l)'JrX) d 0 dx2 x sm 2£ x,
while while those those of of u are are
an
2
=£
1 0i
. u(x)sm
(2n - l)7rx ) dx. 2£
(
Using by parts parts twice, in Using integration integration by twice, almost almost exactly exactly as as in in (5.23), (5.23), we we can can express express b&„n in terms of of a terms an: n:
_ 2T £
1t 0
2 d u( ). ((2n-1)7rx) d dx 2 x sm 2£ x
[dU (x) sin ((2n -
= _ 2T {
£
dx _ (2n -1)7r n 2"
= 2T(2n -1)7r
2£2
1i
ii 0
l)7rX)] i 2f x=O
((2n -l)7rX) d } ddu() X cos n X 2"
X
du() ((2n -l)7rX) d odxxCOS 2f x
= du/dx(£) = 0)
(since sin (0)
= 2T(2n2£2-1)7r {[u () ((2n -l)7rX)] i X cos 2£ +
(2n -1)7r 2f
1i ().
2 _ T(2n _1)27r ~ 4£2 £
1t ().
uxsm
o
ux sm
,,=0
((2n -l)7rX) d } 2£ x
((2n - l)7rX) d 2£ x
o (since u(O)
= cos ((2n - 1)7r/2) = 0)
This the desired This gives gives the desired result. result. (Actually, (Actually, since since it it is is known known that that the the negative negative second second under the mixed boundary boundary conditions, we can just derivative derivative operator operator is is symmetric symmetric under the mixed conditions, we can just appeal which is appeal to to (5.29), (5.29), which is the the above above calculation calculation written written abstractly.) abstractly.)
9. Let ai, a2, 0,2,as,... Fourier quarter-wave quarter-wave sine sine coefficients coefficients of of U; u; then then 9. Let aI, a3, . .. be be the the Fourier 2
_ d u( ) ,.. dX2 x
= ~ ,..(2n _1)27r 2 ~
2002
an s
in ((2n -l)7rX) 200 '
n=l
where K = 3/2. 3/2. We also have where,.. We also have 0.001
=~
0.004
~ (2n - 1)7r
n=l
sin ((2n-1)7rX). 200
Appendix C. to odd-numbered exercises Appendix C. Solutions Solutions to odd-numbered exercises
542
Setting the two two series series equal solving for we find find Setting the equal and and solving for an, a n , we
~ 3.2.10 2 . (2n-1)7rx) u(x) = ~ 3(2n _ 1)37r3 sm 200 . The temperature distribution distribution is is graphed C.S. The temperature graphed in in Figure Figure C.8. 3.5r-----r-----r-----~---...__--__,
3
2.5 Q)
:s
2
~ Q)
c. ~ 1.5
0.5
40
20
x
60
80
100
Figure C.S. distribution (in degrees Celsius) Exercise 5.3.9. Figure C.8. The The temperature temperature distribution (in degrees Celsius) in in Exercise 5.3.9.
Section 5.4 1. €J, so 1. Suppose Suppose fI,, g9 E <E C1[0, Cr>[0,<], so that that
= f(€) = g(O) = g(€) = O.
1(0)
Then Then
(-! (k(X):~) ,g) =-li
d~ (k(x):~(x))9(X)dX
df =-k(x)dx(x)g(x)
= =
1 i
0
Ii + 1i k(x)dx(x)d;(x)dx df d 0
0
dl d k(x) dx(x) d~(x)dx (using g(O)
k(x)/(x)~;(x)l:
-It
f(x)!
(integration by parts)
= g(€) = 0)
(k(X)~;(X)) dx
(integration by parts)
Appendix C. Solutions to to odd-numbered odd-numbered exercises exercises Appendix C. Solutions
=
-11
I(x)! (k(x)
~~ (x))
543 543
dx (using 1(0)
= I(t) = 0)
= (/,- d~ (k(x)~~)). 3 3. Take p(x) p(x) = = (x — - c) c)3(d x)33 and and V[c,d] suggested in in the the hint. 3. Take (d -— x) V[c>d] as as suggested hint.
5. Repeating the the calculation calculation beginning beginning on on page page 173, we obtain 5. Repeating 173, we obtain
! [~lt
1 £
= -
0
c(
Ap(x)
au at)
(~f dx+ ~
2
dx,
1t
Ak(x)
(~;f dX]
t > O.
the total energy is always negative, This shows that derivative with respect to time of the and hence that that the the total total energy is always and hence energy is always decreasing. decreasing.
Section Section 5.5 5.5 1. 1.
(a) Yes. (b) No, o(/,f)/) ==00for forI(x) /(x)==1,1,but butI / i=/O.0. (b) No, a(f, (c) No, a(f, (c) No, o(/,f)/) ==00for forI(x) f ( x ) ==1,1,but butI / i=/O.0.
3. 3.
(a) The set S is of {x, {x, x subspace. (a) The set is the the span span of x 22 }} and and therefore therefore is is aa subspace. (b) As discussed the text, text, a(-,-) a(·,·) automatically satisfies two two of of the the properties (b) As discussed in in the automatically satisfies properties of an an inner product. Every Every function function p in in S satisfies p(O) = = 0,0, so of inner product. satisfies p(Q) so a(·,·) a(-, •) also also the third third property property (a(u,u) 0 implies implies that that u = = 0) 0) for for exactly exactly the satisfies the satisfies (a(u, u) = 0 the same reason as given in in the text for the subspace V (see page 181). 181). The best approximation is p(x) p(x) = = (9 — - 3e)x 3e)x22 + - 10)x. (c) The + (4e — (d) The bilinear bilinear form form is not an inner product product on P2, since since a(l, a(l, 1) = 00 but but 11i= (d) The is not an inner on 7>2, 1) = / 00 (a constant is to the the energy energy inner inner product product and and norm). norm). Therefore, Therefore, (a constant is "invisible" "invisible" to polynomial of the the form (9 — - 3e)o; 3e)x22 + + (4e -— 10)x ++ C E every polynomial € S is equidistant equidistant x energy norm. from from fI(x) ( x ) = eX e in the the energy
5. Write p(x] p(x) — = x(l x(l -— x) x) and q(x) — = x(l/2 x(1/2 — - x)(l x)(l -— x). x). The The approximation will be 5. Write and q(x) approximation will be v(x) = mp(x) + U2q(X), u-2q(x), where vex) = U1P(X) where Ku Ku = = f.f. The The stiffness stiffness matrix matrix K K is is K
= [ 1:(1 +x)*(x)*(x)dx 1:(1 +x)~(x)*(x)dx
101(1 + x)*(x)~(x) dx 101(1 + x)~(x)~(x) dx
=
[-~
-t],
and the the load vector ff is is and load vector f=
[f~XP(X)dX]
10 xq(x)dx
= [
12 1
1
-120
Therefore, 0.16412 ] -0.038168 .
]
.
1
Appendix C. Solutions to to odd-numbered odd-numbered exercises Appendix C. Solutions exercises
544 544
The exact is The exact solution solution is 1 2 u(x) = --x 4
1 + -x 2
1 - - I n (1 4ln2
+ x) .
The exact and approximate solutions solutions are are graphed in Figure Figure C.9. C.g. The exact and approximate graphed in 0.045r-----r-----r-----r-----r----~
0.04 0.035 0.03 0.025 0.02 0.015 exact approximate
0.01
0.2
0.4
0.6
0.8
Figure C.9. exact and and approximate approximate solutions solutions from from Exercise Exercise 5.5.5. Figure C.9. The The exact 5.5.5. 7.
long, or (a) It will take about about 10 1033 times as long, or 1000 1000 seconds (almost (almost 17 17 minutes), to to solve aa 1000 1000 xx 1000 1000 system, 10033 times 1066 seconds seconds (about 11.5 solve system, and and 100 times as as long, long, or or 10 (about 11.5 days) to to solve days) solve aa 10000 10000 xx 10000 10000 system. system. (b) Gaussian elimination elimination consists of aa forward forward phase, phase, in which the diagonal entries (b) Gaussian consists of in which the diagonal entries are used to eliminate and in are used to eliminate nonzero nonzero entries entries below below and in the the same same column, column, and and aa backward phase, phase, in in which which the the diagonal entries are used to to eliminate nonzero backward diagonal entries are used eliminate nonzero entries and in in the the same the forward phase, at at aa typical entries above above and same column. column. During During the forward phase, typical is only only 11 nonzero nonzero entry below the the diagonal, diagonal, and and only only 5 5 arithmetic step, step, there there is entry below arithmetic operations are are required to eliminate eliminate it it (1 (1 division division to to compute compute the the multiplier, multiplier, operations required to the current row row and 22 multiplications and 2 additions to add add a multiple of of the to the next). Thus the forward phase requires O(5n) O(5n) operations. A typical the backward backward phase phase requires requires 3 3 arithmetic arithmetic operations operations (a (a multiplication multiplication step of the step of and an an addition adjust the side and the and addition to to adjust the right-hand right-hand side and aa division division to to solve solve for for the unknown). Thus Thus the the backward backward phase phase requires requires O(3n) The grand unknown). O(3n) operations. operations. The grand total is O(Sn) total is O(8n) operations. operations. (c) will take take about about 10 times as long, or to solve 1000 (c) It It will 10 times as long, or 0.1 0.1 seconds, seconds, to solve aa 1000 1000 xx 1000 and 100 times as or 11 second, to solve 10000 tridiagonal system, tridiagonal system, and 100 times as long, long, or second, to solve aa 10000 10000 xx 10000 tridiagonal tridiagonal system. system.
Appendix C. C. Solutions to to odd-numbered Appendix odd-numberedexercises exercises
545
Section Section 5.6 5.6 1. 1.
the errors for for n = = 10,20,40,80: (b) Here are the 10, 20,40, 80: maximum error 1.6586 . 10 10~-0>3 4.3226 . 10 10~4 1.1036 . 10 io--'l4 2.7881.10 10~-05 2.7881
n 10 10 20 40 80 80
-q
We see that, when n is doubled, the error decreases decreases by a factor of approximately four. Thus error
= 0 (~2 ) .
exact solution is u(x) = x(l x(l3. The exact u(x) — — x 3 )/12. Here are the the errors for n = 10,20,40,80: 10, 20,40,80: n n 10 10 20 40 40 80 80
maximum error 1.1286 .• 10 10~3 2.9710 .• 10 10~-'l4 7.6186 .• 10 10~-0& 1.9288 .• 10 10~-0& -;j
descreases by a factor of approximately We see that, when n is doubled, the error descreases approximately four. Thus error = 0
(~2 ) .
5. The The weak form is
1
£{
find u G E V such that
o
=
1£
du dv k(x) dx (x) dx (x)
+ p(x)u(x)v(x) }
dx
f(x)v(x)dx for all v E V.
The bilinear form is The a(u,v)=
1 0
£{
du dv } k(X)dx(X)dx(X)+P(X)U(X)V(X) dx.
Section 5.7 1. u(x)
3.
= xe- x .
(a) This BVP models a bar whose top end (originally at x = = 0) is free and whose bottom end is fixed fixed at x = i. £. If we we apply a unit force to the cross-section bottom cross-section at x = s, then the part of the bar originally between x = s and x = £ t will compress, and the part of the bar originally above x = s will just move rigidly with u(x) u(x) — u(s) for 0 ::; < x < s. The compression of the bottom the = u(s) bottom part of the bar will satisfy Hooke's law: bar u(x) () =£-x k- = 1 ~ux i-x k
Appendix C. odd-numbered exercises Appendix C. Solutions Solutions to to odd-numbered exercises
546 546
(the (the uncompressed uncompressed length length of of the the part part of of the the bar bar between between xx = = ss and and xx = =£ t is is x). Therefore Therefore we we obtain obtain £i -—x). i-s
< s,
0< x
k'
u(x) = {
i-x
s<x<£.
-k-'
The is The Green's Green's function function is
G(XjS)
i-s -k-'
={
< s, < x < e.
0< x
i-x
S
-k-'
(b) The is (b) The Green's Green's function function is
G(Xj s)
=
dz
1 £
k(z)'
max{x,s}
(c) (c) If If kA; is is constant, constant, then then
G(XjS) = e-ma;{x,s}
l-s
={
k' i-x
-k-'
0< x < s, S
< x < e.
(d) (d)
u(X)
= In2 _! _ X2 2
4
+ ~ _In(l+x)
4
2
2'
5. we obtain obtain the the following to (5.67): (5.67): 5. By By direct direct integration, integration, we following solution solution to
u(x) =p
r k(s)' ds
10
Since Since xx = min{x, min{x, i} i\ for for xx E € [0, [0,il, £.], we wecan can write write _
ds
{minix,s}
U(X) - p
10
that is, is, that
u(X)
k(s)'
= g(Xje)p.
7. Green's function is 7. The The Green's function is
g(Xj s)
. (n7rs) . (n7rx) =~ L.J kn2l 27r 2 sm -e- sm -e- . n=l
Section 6.1 6.1 1. 1. The The steady-state steady-state solution solution of of Example Example 6.2 6.2 satisfies satisfies the the BVP BVP
-D::~ =
10-
u(O) = 0, u(lOO) = O.
7
,
0
< X < 100,
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numberedexercises exercises
547
Either the limit of Either by by solving solving this this BVP BVP or or by by taking taking the limit (as (as t ---+ —> 00) oo) of of the the solution solution of Example 6.2, 6.2, we we find find that that the the steady-state steady-state solution solution is is Example (
Us X
. (n7rx) ) _~2.1O-3(1-(-1)n) ~ Dn 7r SIll 100 . -
3
3
n=l
3. is 3. The The solution solution is 2(_1)n+l n 2 2 e- 7r tsin(n7rx). n7r
00
u(x,t)
= '"' ~ n=l
A graph A graph of of u(·, u(-, 0.1) 0.1) is is given given in in Figure Figure C.lO. C.10. 1~====~~--~------~----~----~ u(·,O) 0.9 u(·,O.1 )
0.8 0.7
0.6 0.5 0.4
0.3 ~.~ ~.~
0.2
_.-.-,-,-,-,-
-'~,~
"'
.
0.1
... ... 0.2
0.4
,
0.8
0.6 x
Figure C.1O. 0.1), together C.10. The The snapshot snapshot u(·, w(-,0.1), together with the initial temperature temperature distribution, for Exercise 6.1.3. distribution, Exercise 6.1.3. 5. 5. With With
p(x, t) and v(x, t)
= u(x, t) pcov ot
x = g(t) + C(h(t) -
g(t))
p(x, t), we have
_",02 V
=pcou
ox 2
at
_",02 U _
ox 2
(pc OP ot
= f(x t) - pc (d9 (t) dt ,
_",02 p )
ox 2
+~
(dh (t) _ dg (t))) . "dt dt
We We also also have have
v(x, to)
= u(x, to) -
p(x, to)
= 1j;(x) -
x
g(to) - C(h(to) - g(to))
Appendix C. Solutions to Appendix C. Solutions to odd-numbered odd-numbered exercises exercises
548 and and
= u(O, t) = u(l, t) -
v(O, t) vel, t) We We define define
g(x, t)
= I(x, t) -
and and ifJ(x)
pc
= 1j;(x) -
p(O, t) = get) - get) pel, t) = h(t) - h(t)
= 0, = o.
7
(~! (t) + (~~ (t) - ~! (t)) ) x g(to) - l(h(to) - g(to)).
Then Then v satisfies satisfies {)v
{)2V
pc {)t -
K
{)x 2 = g(x, t), 0 < x < l, t
> 0,
v(x,to) = ifJ(x), 0 < x < l, v(O, t) = 0, t > to, vel, t) = 0, t > to. 7. vex, t) = = u(x, t) -— xcos x cos (t). homo7. Define Define v(x, (t). Then Then v satisfies satisfies the the following following IBVP IBVP (with (with homogeneous boundary conditions, but but with with aa nonzero source term): term): nonzero source geneous boundary conditions, {)v
{)2V
.
at - {)x2 = x sm (t), 0 < x < 1, t > 0, v(x,O) = 0, 0 < x < 1, v(O, t) = 0, t > 0, v(l,t) = 0, t > O.
This This IBVP IBVP has solution 00
v(x,t)
= Lan(t) sin (mrx), n=l
where where 2( _l)n
an (t) = mr (n4 7r 4
+ 1)
(
()
cos t - e
_n 2 ,..2 t
2
2 •
(
)
- n 7r sm t) .
The solution solution to the original original IBVP IBVP is is then then u(x, u(x,t)t) = vex, v(x,t)t) + xcos(t). A graph graph of The to the x cos (t). A of u(·,1.0) Figure C.11. «(•, 1.0) is is given given in in Figure C.ll. 9. temperature u(x, t) satisfies IBVP 9. The The temperature satisfies the the IBVP {)u
pc at
{)2U
- K {)x 2
< x < 100, t > 0, 0 < x < 100, t > 0, t > O.
= 0, 0
u(x,O) = 5, u(O, t) = 0, u(100, t) = 0, The solution solution is The is u(x t) ,
_"n ,,2 t (n7rx) . = '~ \:""'" 10(1-(-1)n) e 1002 sin n7r 100 00
2
pc
n=l
The temperature temperature at at the midpoint after after 20 20 minutes minutes is The the midpoint is ti(50,1200) = 1.58 1.58 degrees degrees Celsius. u(50, 1200) == Celsius.
Appendix C. C. Solutions odd-numbered exercises Appendix Solutions to to odd-numbered exercises
549
Figure C.ll. The snapshot u(-, 1.0), together with the initial temperature snapshot u(·, initial temperature distribution, distribution, for Exercise 6.1.7. 11. 11.
(a) The steady-state temperature temperature is is u u.(x) x/20. (a) The steady-state = re/20, s (x) = (b) The The temperature temperature u(x,t) u( x, t) satisfies satisfies the the IBVP IBVP (b) pc
AU
at -
02U
= 0, u(x,O) = 5, K,
ox 2
u(O, t) u(lOO, t)
= 0,
< x < 100, 0 < x < 100, t > 0,
0
t
> 0,
= 5, t > o.
The solution solution is is The 10e - ''''' " t sin (nlrx) = -20X + L -nlr -- . 100 00
u(x t) ,
2
2
l002pc
n=l
Considering the the results results of Exercise 9, is obvious obvious that that at least several thousand Considering of Exercise 9, it it is at least several thousand seconds will elapse before the the temperature temperature is is within within 1% of steady so we we seconds will elapse before 1% of steady state, state, so can accurately estimate using aa single single term term of of the the Fourier Fourier series: can accurately estimate u(x, u(x,t)t) using series:
x
u(x t) == , 20
10 + -e 11'
",,2
lO02pc
t
We want want to to find find tt large enough that that We large enough
lu(x, t) - u.(x)1 < 0.01
lu.(x)1
-
(
lrX )
sin 100 .
Appendix C. Solutions to to odd-numbered odd-numbered exercises exercises Appendix C. Solutions
550 550
for all all x E this is for e [0,100]. [0,100]. Using Using our our approximation approximation for for u, u, this is equivalent equivalent to to 200 sin ( ffo-) 7rX
A A graph shows shows that 200 sin (;o~) 7rX
~2
for we need for all x, so so we need
This yields t
>
-100 pcln 0.005 ~ 4520. 2
K.7r 2
-
75 minutes 20 seconds About 75 minutes and 20 seconds are are required. required.
Section 6.2 1. The solution is 1. The solution is 00
u(x, t)
= do + L
dne-n21r2t cos (n7rx),
n=1
where do =
1 1 o
1 x(1-x)dx=-6' d n =2
11
x(l-x)cos(n7rx)dx=
0
2 ((-It+
The graphs are given given in in Figure Figure C.12. The graphs are C.I2. /I 3. 3.
(a) Ifu,v E C1[0,f], (a) Ifu,v£ C^[0,4 then then (LNU,V)=-
10t
d
2
dx~(x)v(x)dx
du
= - dx(x)v(x)
=
l
Ii0+ 10t
du dv dx(x)dx(x)dx
i du dv . -(x)-(x)dx (smcedU(O)=du(£)=O) odx dx do; do;
dv = u(x)dx(x)
= - 10t
Ii0- 10t 2
2
d v u(x)dx 2 (x)dx
d u(x) dx~ (x) dx (since
= (u, LNV).
This shows that LN is symmetric.
1
22 n 7r
~~ (0) = ~~ (£) = 0)
-1) •
551
Appendix Solutions to to odd-numbered odd-numbered exercises Appendix C. C. Solutions exercises 0.25,....----"T""""----r-~-~__r---~---___,
"
----.,
..,-. ..... - -'-'- -'- ............ ... " ...
0.2
'!:-:::: ............................... ,:.':"'... ~~ 0.15. __ , ....
"-0.1 u(x,O) - - - u(x,0.02) ,-, - u(x,0.04 u(x,0.06) u(x,oo) 0.2
0.8
0.6
0.4
x
Figure C.12. The The solution w(x,t) 6.2.1 at times 0, 0, 0.02, Figure C.12. solution u(x, t) from from Exercise Exercise 6.2.1 at times 0.02, 0.04, and and 0.06, 0.06, along the steady-state solution. These These solutions were estimated estimated 0.04, along with with the steady-state solution. solutions were using the Fourier Fourier series. series. using 10 10 terms terms in in the (b) an eigenvalue LN and is aa corresponding eigenvector, nor(b) Suppose Suppose A A is is an eigenvalue of of LN and U it is corresponding eigenvector, normalized so that (u, (u. u) = 1. 1. Then A = A(U, u) = (AU, u)
= (LNU,U) =
-it ::~
(x)u(x) dx
= - ~:(x)u(x)l: + £
= ~
1 0
d
C:(x))
1£ (::(X))2
2
dx (since
dx
~~(O) = ~~(f) = 0)
O.
Thus LN cannot cannot have any negative eigenvalues. 5. 5.
(a) U is is aa solution to the the BVP. BVP. Then Then (a) Suppose Suppose u solution to
if
I(x)dx
= -t>
it ::~(X)dX
= t> (::(0) - ::(f)) = t>(a -
This is is the the compatibility This compatibility condition: condition:
1£ I(x) dx = t>(a - b).
b).
C. Solutions to to odd-numbered odd-numbered exercises Appendix C.
552
The operator [0, f] -t C[O, f] defined defined by (b) The operator K : c1 C^[0,£\ ->• C[Q,t\
has eigenpairs eigenpairs has
>'0 =
~n2~2 (n~x) 1, 'Yo(x) = 1, and >'n = 1 + -;y-, 'Yn(x) = cos -f- , n = 1,2,3, ....
The method of Fourier series can be applied to show that a unique solution C[O, fl. (The key is is that that 0 is is not not an an eigenvalue eigenvalue of of K, as as it it exists for for each each /f E exists G C[0,^]. (The key is LN.) is of of LN.) 7. As shown in this section, section, the solution solution to the IBVP is
u(x, t)
~ dne- n 1T = do + L...J 2
2
t
/l2 cos (n~x) -f- ,
n=l
dl, c?2, d2, ... the Fourier cosine coefficients coefficients of of"p. We have where do, di, • • • are are the if). We
L dne-n21T2t/l2 cos (n;x) ~ L JdnJ e-n21T2t/l2Icos (n;x) I 00
00
n=l
n=l
n=l
L JdnJ e-(n 2-1)1T 2t/l 2. 00
~ e-1T2t/l2
n=l
This last last series series certainly certainly converges converges (as (as can be proved, proved, for for example, using the the coracomThis can be example, using narisrm anr\ parison t.pst^ test), and
This shows that 00
do
+L
dne-n21T2t/£2 cos (n;x) -t do as t -t
00.
n=l
The limit do The limit do is is
~
1£
"p(x) dx,
the average of the initial temperature temperature distribution. the 0.992 degrees 9. The steady-state temperature is about 0.992 degrees Celsius. Celsius. 11. 11.
the Fourier sine series of u(x,t) u(x, t) on (0,^) (0, f) is (a) Suppose that the
u(x, t)
= L an(t) sin (n;x), 00
n=l
and and u satisfies satisfies
an (t)
=~
it
u(x, t) sin (n;x) dx
0
au ax (0, t) = au ax (f, t) = 0 for all t > o.
AnnpnHiv Appendix C C.
553
Solutions to r»HH-nu inhered exercises exerr.ises Solutions to odd-numbered
2 The of —d u/dx22 is follows: The nth nth Fourier Fourier sine sine coefficient coefficient of -02U/OX is computed computed as as follows:
2
r 02U
. (n1l"x)
-"llo ox 2 (x, t) sm -e- dx i
. (n1l"x)ll ou (n1l"x)] = --2 [ou -(x,t)sm - -n1l"1 -(x,t)cos dx
e
2n1l"
e
Ox
r
ou
e
0
e
ox
0
(n1l"x)
=£2 10 ox(x,t)cos -e- dx 2n1l" = £2 2n1l"
[ u(x, t) cos (n1l"x) -e-
= £2 ((-1)
n
Ii + f 10r n1l"
0
u(e, t) - u(O,t))
.
u(x, t) sm (n1l"x) -e- dx ]
n 211"2
+ f2an(t).
Since the the values values w(0, u(O, t) and u(e, t) are are unknown, unknown, we we see see that that it it is not possible possible Since and u(l, is not 2 to express express the sine coefficients coefficients of u/dx22 in — to the Fourier Fourier sine of —d -02U/OX in terms terms of of oi(t),a2(t), al (t), a2(t), .... (b) The Fourier Fourier sine = t isis (b) The sine series series of of u(x, t) = 00
'"'
2 (1 - (_1)n) t
~
n1l"
n=l
sin (1mx),
2 and the the formal formal calculation of the the sine sine series of —d -02U/OX yields and calculation of series of u/dx22 yields 00
L 2 (1 -
(-1t) n1l"tsin (n1l"x).
n=l
However, However,
02U - ox 2 (x, t)
= 0,
2 and so all of of the the Fourier Fourier sine sine coefficients coefficients of of —d -02U/OX be zero. Thus and so all u/dx22 should should be zero. Thus the calculation is the formal formal calculation is wrong. wrong.
Section 6.3 6.3 Section 1. The formula formula for for the the solution solution u the same as in in Example Example 6.6, with aa different 1. The u is is exactly exactly the same as 6.6, with different
value for for Kfl, (4.29 instead of 3.17). This This implies that the the amplitude amplitude of of the the solution value (4.29 instead of 3.17). implies that solution is Therefore, there temperature is reduced reduced by by about about 26%. 26%. Therefore, there is is less less variation variation in in the the temperature distribution the silver ring as opposed to to the the gold gold ring. ring. distribution in in the silver ring as opposed 3. 3.
The IBVP is (a) fa) The IBVP is
ou pc at -
02U ox 2 = 0, -511"
< X < 511", t > 0, u(x,O) = "p(x), -511" < X < 511", u( -511", t) = u(511", t), t > 0, fl,
ou ou ox (-511", t) = ox (511", t), t > O.
554 554
Appendix Solutions to Appendix C. C. Solutions to odd-numbered odd-numbered exercises exercises (b) The solution is (b) The solution is
+L 00
u(x, t) =
Co
"n2
t
ene-25P""C cos
(nx) ""5 '
n=l
where where
71"4
Co
= 25 + 9'
en
=
10( _l)n+l n4
'
n
= 1, 2,3, ....
4 (c) is the /9 degrees Celsius. (c) The The steady-state steady-state temperature temperature is the constant constant u Uss = = 25 25 + + 7T 71"4/9 degrees Celsius.
(d) We so that (d) We must must choose choose t so that Ius - u(x, t)1
lusl
< 0.01
-
holds for every every xx E € [-571",571"]. [—STT, STT]. By error, we find that holds for By trial trial and and error, we find that about about 360 360 seconds (6 minutes) minutes) are are required. seconds (6 required. 5. 5.
(a) Lp is (a) To To show show that that Lp is symmetric, symmetric, we we perform perform the the now now familiar familiar calculation: calculation: we we form integral (Lpu, (Lpu, v) v) and (u, Lpv). Lpv). The The the integral and integrate integrate by by parts parts twice twice to to obtain obtain (u, form the boundary boundary term term from from the the first first integration integration by by parts parts is is du - [ dx (x )v(x)
]l
-t
du
= dx (-f)v( -f) -
du dx (f)v(f).
Since both satisfy periodic Since both u and and v satisfy periodic boundary boundary conditions, conditions, we we have have v( -f)
= v(f),
du dx (-f)
du
= dx (f),
so the second integraintegraso the boundary boundary term term vanishes. vanishes. The The boundary boundary term term from from the the second tion by by parts parts vanishes vanishes for for exactly exactly the the same same reason. tion reason. (b) Suppose (u, u) = 1. 1. Then Then Lpu AU, where where u has has been been normalized: normalized: (u, (b) Suppose L pu = \u,
A = A(U, u)
= (Au, u) = (Lpu, u) = == ~
1 £ _£
d2U dx 2 (x)u(x) dx
[~:(x)u(x)rl +
I: (~:(x)f
I: (~:(x)f
dx
dx
O.
The conditions: The boundary boundary terms terms vanishes vanishes because because of of the the periodic periodic boundary boundary conditions: du dx (-f)u( -f) 7. 7.
du
= dx (f)u(f).
(a) the ring ring is completely completely insulated, insulated, aa steady-state temperature distribution (a) Since Since the steady-state temperature distribution cannot exist unless the the net net amount amount of heat being being added to the the ring ring is is zero. zero. cannot exist unless of heat added to This is is exactly exactly the the same situation as bar with with the the ends, ends, as as well well as This same situation as aa straight straight bar as the insulated. the sides, sides, insulated.
555
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
(b) (b) Suppose Suppose Uu is is aa solution solution to to (6.21). (6.21). Then Then
I
t
f(x) dx
=
-K,
1£
-i
02
ax~ (x, t) dx
-i
=
-K,
(
=K,
aU ]l [-(x,t) ax -l aU aU) ax(-l,t)- ax(l,t)
=0.
The follows from the periodic periodic boundary The last last step step follows from the boundary conditions. conditions. (c) The (c) The negative negative second second derivative derivative operator, operator, subject subject to to boundary boundary conditions, conditions, has has aa nontrivial null space, namely, namely, the the space space of of all all constant constant functions functions on (—i,i). on (-l, l). In In nontrivial null space, to the Fredholm alternative for symmetric matrices, we we would would expect analogy analogy to the Predholm alternative for symmetric matrices, expect aa solution solution to to the the boundary boundary value value problem problem to to exist exist if if and and only only if if the the right-handright-handside side function function is orthogonal to this null space. This condition is
I:
cf(x) dx
= 0 for all c E R,
or or simply simply
t
J- l
f(x)dx =
o.
Section 6.4 =
1. give the the proof the general Gram matrix where 1. We We give proof for for the general case case of of aa Gram matrix G. Suppose Suppose Gx Gx = 0, 0, where and x ERn. € R n . Then Then (x, (x, Gx) = 00 must must hold, hold, and n
n
(x, Gx)
= Z)GX)iXi = L i=1
n
L GijXjXi
i=1 j=1 n
n
i=1 j=1
=~
(tXjUj,Ui) Ui
(t XjUj, ~ XiUi) n
=
LXjUj j=1
Thus Gx = = 00 implies that the the vector Thus implies that vector n
LXjUj j=1
2
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
556
is the zero Un} this in is the zero vector. vector. But, But, since since {U1, {wi, U2, W 2 ,... . . . ,,u is linearly linearly independent, independent, this in turn turn n} is implies that x\ xi ••• = x 0, that is, that x = 0. Since the only vector implies that Xl = = X2 = ... = Xn = 0, that is, that x = 0. Since the only vector n x €R Rnn satisfying satisfying Gx Gx = = 0 is is the the zero zero vector, vector, G G is is nonsingular. nonsingular. x E 3. 3. (a) (a)
°
_ [
M-
2/9 1/18
=[
1/18] K 2/9'
-3] f __1_ [ 11 cos (t) ] 6 ' (t) - 162 11 cos (t) .
6 -3
(b) The system is (b) The system of of ODEs ODEs is
do:
= -Ko: + f(t),
M dt
that is, that is, 2 d0: 1
9" d.t
1 d0:2
.!.. d0:1 18 dt
5. 5.
11 cos (t) 162 '
+ 18 d.t = -60:1 + 30:2 + ~ d0:2 _ 3
+9
dt -
_ 6 0:2
0:1
+
11 cos (t) 162 .
(a) Write pi = 8.97, 8.97, P2 p2 = (a) Write P1 = 7.88, 7.88,
°50<< x<<50,100, X
p(x) = {
and similarly similarly for c(x) and and K(X). the IBVP IBVP is and for c(x) ,.(x). Then Then the is aU p(x)c(x) at
a ( aU) - ax ,.(x) ax = 0,
= 5,
°< °<
x
u(x,O) u(O,t)
x = 0, t > 0,
u(100, t)
= 0, t > 0.
< 100, t > 0,
< 100,
(b) (b) The The mass mass matrix matrix M M is is tridiagonal tridiagonal and and symmetric, symmetric, and and its its nonzero nonzero entries entries are are Mi,i+1=
and
M;;
={
~ 6 ' ~
{
6
'
~ 3 ' (Pi C1 +P2C2 )h 3
~ 3'
i = 1,2, ... , ~ - 1,
i
= ~,~ + 1, ... , n -
= 1,2, ... , ~ n 2 = 2' i
1,
1,
.
'-n+1n+2 2 - 2 '2 , ...
1 ,n-.
The stiffness matrix K is tridiagonal its nonzero The stiffness matrix K is tridiagonal and and symmetric, symmetric, and and its nonzero entries entries are are -~ i = 1,2, ... , ~ - 1, h' K"+l = 1.,1. ~2 i = ~, ~ + 1, ... , n -1, -h' and ~ i = 1,2, ... , ~ - 1, h '
{
K;;
={
1<1+1<2
h
'
~
h '
i =~,
i = ~
+ 1, %+ 2, ... , n -
1.
Appendix C. C. Solutions Solutions to odd-numbered exercises
557
7. The solution is 00
u(x,t)
= I>n(t) sin C~;), n=l
where
4 (
2
( 10 pc e -~ "n ,,2t -1 ) an (t) __ 400(2+(-1)n) 2 7 7 K 7r n
+ Kn 27r 2) t .
The errors in Examples 6.8 6.8 and 6.9 6.9 are graphed in Figure C.13. 0.05,.----..-----.....----....----...,......----,
____~
°l~ -0.05
-0.1 \
\\
-0.15
\ \ \ \
""
-0.2
"
....
_-_
20
....
"
40
. "'
,,
, ,,
"
'
,,
, ,,
,
, ,,
, ..
. .. .
l-
.. .
Euler - _. Backward Euler
x
60
I
80
100
Examples 6.8 and 6.9 (see Exercise Exercise 6.4.7). Figure C.I3. C.13. The errors in Examples 6.4-V9. 9.
(a) ThelBVPis The IBVP is p(x)c(x) au at
-
a ( K(X) aU) ax ax = 0, 0
< x < t', u(x,O) = 5, 0 < x < t', u(O, t) = 0, t > 0, u(t', t) = 0, t > O.
t
> 0,
(b) The weak form is to find u satisfying
l l{ o
p(x)c(x)
& ~ } at (x, t)v(x) + K(X) & ax (x, t) dx (x) dx = 0, t > 0,
\Iv E V.
(c) The temperature distribution after after 120 120 seconds is shown in Figure C.14.
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
558
t = 120 (seconds) 5r-----~----~====~~~----~----__,
4.5
4 3.5 ~
::::I
3
T!!Q)2.5 c..
E
2
2
20
40
60
80
100
x
after 120 seconds in Exercise Exercise 6.4.9. Figure C.14. The temperature temperature distribution after 6.4-9.
Section 6.5 1. The BVP to be be solved is 1. The BVP to solved is
d2 u -k dx 2
= f(x),
0
< x < 100,
~:(O) = 0, du (100) dx
= 0,
with kk = 1.5 (25-x)(100-x) with 1.5and andf(x) f(x) ==1O-7 10~x7x(25 - z)(100 - z)+1/240. +1/240.The Thesteady-state steady-statetempertemperature is with u(100) = 00 isis shown ature is not not unique; unique; the the solution solution with ii(100) = shown in in Figure Figure C.15. C.15. 3. total amount heat energy added to bar is W, where 3. (a) (a) The The total amount of of heat energy being being added to the the bar is 0.51A 0.51A W, where AA is (O.OlA W through W in is the the cross-sectional cross-sectional area area (0.01 AW through the the left left end end and and 0.5A 0.5AW in the the interior). W must interior). Therefore, Therefore, 0.51A 0.51 AW must be be removed removed through through the the right right end; end; that that is, is, rate of W jcm22 through the right right end. heat energy must be be removed heat energy must removed at at aa rate of 0.51 0.51 W/cm through the end. (b) is (b) The The BVP BVP is d2 u dx 2
= 0.005,
du k dx (0)
= -0.01,
du k dx (100)
= -0.51.
-I>,
0
< x < 100,
The temperature is unique; the with u(100) The steady-state steady-state temperature is not not unique; the temperature temperature with w(100) = = 00 is graphed in in Figure C.16. is graphed Figure C.16.
559 559
Appendix Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises 6r-------~------_r------~--------r_------~
5 4 Q)
::; 3
"§ Q)
a. E 2
2
o -1~------~------~------~--------~----~
o
20
40
x
60
80
100
Figure The computed computed steady-state fron Figure C.I5. C.15. The steady-state temperature temperature distribution distribution from J^.fOTfnoo fi6.5.1. t\ 1 Exercise 7~------~------~--------~------~-------,
6
5
2
°o~------~------~------~------~----~ 20 40 60 80 100 x
Figure The computed from Figure C.I6. C.16. The computed steady-state steady-state temperature temperature distribution distribution from Exercise 6.5.3. Exercise 6.5.3.
560 5.
Appendix C. Appendix C. Solutions Solutions to odd-numbered odd-numberedexercises exercises (a) We have n
n
u·Ku= LLK;jUjU; i=O j=O
n
=L
n
La (4)j, 4>i) UjU;
i=O j=O
~
t,a (t, .;f;,f}
~a
(t, .;~;, t, .;~;)
=a(v,v). Therefore,
Ku = 0 ~ U· Ku = 0 ~
a(v,v)
= o.
(b) Suppose v E and a(v, a( v, v) == 0. O. By definition of a(-, .), G iT V and •), this is equivalent to
Since the integrand integrand is nonnegative, this implies that the integrand integrand is in fact K(X) is positive, we conclude that zero, and, since K(X)
dv(X) dx
is the zero function. Therefore, v is a constant function. function, 0, it follows that (c) Thus, if Ku = 0, n
v(X) = L
U;4>i(X)
;=0
the components of u. But But then is a constant function, where Uo, MO, U2, 1*2, •. .. • • ,, Un un are are the 0,1,2, there is a constant constant C such that V(Xi) v(xi) = — C, ii = 0,1, 2 , ... . . . , n. These nodal Un, = CUe, values of v are precisely the numbers Uo, UQ, Ul, MI, ... ...,u we see see that uu = Cuc, n , so we we wanted which is what we wanted to prove. 7. 7.
(a) Define v(O)
= O}.
Then the the weak form of the the BVP is
find U E V such that a(u, v)
= (I, v) for all v E V.
(CA)
(b) The fact that a solution of the strong form is also a solution of the weak form is proved by the the usual argument: multiply the differential differential equation by an arbitrary test function v € E V, integrate by parts. V", and then integrate
561
Appendix C. C. Solutions odd-numbered exercises Appendix Solutions to to odd-numbered exercises
The form The proof proof that that aa solution solution of of the the weak weak form form is is also also aa solution solution of of the the strong strong form is similar to the the argument given on on page page 268. 268. Assuming Assuming that that Uu satisfies is similar to argument given satisfies the the weak (C.4), an integration by some simplification simplification shows weak form form (C.4), an integration by parts parts and and some shows that that
k(£)
~: (£)v(£)
-1£
{:x [k(X)
~: (x)] + f(x)} v(x) dx = 0 for all v E V.
Since C V, this this implies implies that that the the differential differential equation equation Since V C
d [k(x)dx(x) du ] +f(x)=O, O<x<£ dx holds, and we have holds, and we then then have
du k(£) dx (£)v(£)
= 0 for all v E V.•
Choosing any v € shows that condition holds holds Choosing any E V with with v(i} v(£) ^ f::. 00 shows that the the Neumann Neumann condition at at xx — = t. £. 9. The The temperature seconds is C.I7. 9. temperature distribution distribution after after 300 300 seconds is shown shown in in Figure Figure C.17. t=300 (seconds) 8r-----------==~~-----r------~------,
7 6
2
20
60
40
80
100
x
Figure C.I7. The The temperature Figure C.17. temperature distribution distribution from from Exercise Exercise 6.5.9 (after {after 300 300 seconds). seconds}. 11. Here Here is sketch of of the If Ku = 11. is aa sketch the proof: proof: If = 0,0, then then
u· Ku = 0 => a(v, v) = where where
n-l
V
= LUi¢>i. ;=0
0,
Appendix Solutions to to odd-numbered Appendix C. C. Solutions odd-numbered exercises exercises
562
But the usual must be constant function, and V(Xn) v(xn) = But then, then, by by the usual reasoning, reasoning, vv must be aa constant function, and = 00 (since 0 for Thus v is the zero (since CPi(X (j)i(xnn) ) = 0 for ii = 0,1,2, 0,1, 2 , ... . . . ,, n-l). n — 1). Thus is the zero function, function, which which implies implies that the nodal values of vv are all zero. zero. Therefore uu = = 0, 0, and so so K is nonsingular.
Section 6.6 1. For t = only 2 2 terms terms are are required required for for an an accurate graph, while 61, 1. For = 6060, 6060, only accurate graph, while for for t = = 61,
about 150 150 terms are required. required. about terms are 3. Green's function function G(x, G(a;,t;r/,s) is given by 3. The The Green's t; y, s) is given by 2
~
~~e
-K(2n-l)2,,2(t-8)/(4pcl 2 ) .
~
((2n -1)1rY )
U
. ((2n -1)1rX)
~
U
n=l
for to < s < t, while 0 for for s > t. Selected Selected snapshots snapshots of of G(x, t; t] 75, 75,60) for while G(x, t; y, y, s) = 0 60) are C.18. are shown shown in in Figure Figure C.I8. Graph Graph of G(x,t;75,60) G(x,t;75,60) for for various values values of of t
0.02
- _. ._,'"'' -
t=120 t=240 t=360 t=480 t=600
~ 0.015 :::l
"@
Cl.
E 0.01 $
0.005
20
60
40
80
100
x
Figure C.IS. Snapshots of the function in Exercise 6.6.3 at tt = Figure C.18. Snapshots of the Green's Green's function in Exercise 6.6.3 at = 120,240,360,480,600 seconds. Twenty Twenty terms terms of of the the Fourier to 120, 240, 360, 480, 600 seconds. Fourier series series were were used used to create these graphs. create these graphs.
Section 7.1 7.1 Section 1. the solution 1. Some Some snapshots snapshots of of the solution are are shown shown in in Figure C.19. C.19.
3. two waves add constructively, and then then separate separate again. See Figure Figure 3. The The two waves join join and and add constructively, and again. See C.19.
Appendix C. C. Solutions to odd-numbered odd-numbered exercises exercises Appendix Solutions to
563
1.5.--.-----r--.....---.....--.----.-r========i1 t=o t=2.5 t=5
, "
1\
"
" ,," ,, ,, , , 0.5
~ _,
,
...
, I
,"
'
I
~i
I
I I
I I
~ ..
,- I
I
-I
,.'
-f
I;~
i
I
I
1&
,~"-
I
I
~~,
~
I),
, , • -, ~ '\. .,•
"
I
l~!
~"
..
I
I
I.
~
I.
/'j'
j\ '\
1\ I I I
,ii
~!~
r' I
~
.
."
, __~____~ I I OL-____~__6_~~/~\~~-~J_'\~/_~,-~I_\~_'~~~~~~ -20
-15
-10
-5
0
5
10
15
20
x -3
1.5 x 10 t=O t=0.02 t=0.04
0.5
I
!
i'
"
,
I
,• -~O
-30
-20
I
,"
""I
, ,,
,•
-10
,-i
"
'I • I I I I I
I
,
0
I I I I I
10
,,! -I
i I i ! i !
,
I
20
30
40
x
Figure C.19. Some snapshots snapshots of of the solution to Exercise 7.1.1. Figure C.19. (Top) (Top) Some the solution to Exercise 7.1.1. (Bottom) Constructive interference in in Exercise Exercise 7.1.3. center is is (Bottom) Constructive interference 7.1.3. The The "blip" "blip" in in the the center the result of of two waves combining combining temporarily. temporarily. (The (The velocity velocity in in this this example is the result two waves example is l.) cc = 1.)
Section Section 7.2 1. is found found by by setting setting c enn = 0 0 in in Example Example 7.4: 7.4: 1. The The solution solution is
. (n7rx) u(x,t) = ~ ~bncos (cn7rt) ~ sm 25 . n=l
Appendix C. C. Solutions to odd-numbered odd-numbered exercises exercises Appendix Solutions to
564
A graph analogous to Figure 7.6 7.6 is given in Figure C.20.
o
10
5
15
20
25
x
Figure C.20. C.20. Fifty Fifty snapshots snapshots of of the the vibrating vibrating string string from from Example Example 7.4, Figure 7-4, with no no external with external force. force. The solution is 3. The
u(X,t)
= Lan(t)sm (2n-1)1I'X) 50 ' 00
•
n=l
where
and and
8 (v'2sin (n1l'/2) - v'2cos (n1l'/2) + (_1)n) 400 ,en= (2n - 1)11' . 5(2n - 1)211'2 The fundamental frequency frequency is snapshots are The fundamental is now now c/100 instead instead of of c/50. Fifty Fifty snapshots are shown shown in Figure C.21. C.2l. bn
=
5. The The solution is 1 +50t u(x,t) = ( 20
2) + ~ ~bncos (cn1l't) 25 cos (n1l'X) 25 ' n=l
where
= 2(2cos(n1l"2~ ~ 1- (-It),
n = 1,2,3, .... n1l' Fifty Fifty snapshots of the the solution are shown in Figure C.22. The solution gradually moves are free both ends ends are free to to move move vertically. vertically. moves up; up; this this is is possible possible because because both bn
565 565
Appendix C. Solutions to odd-numbered exercises
0.2
c
CD
E CD
~
'i5.. In 'i5
- 0.2
o
5
15
10
20
25
x
Figure C.21. Fifty snapshots vibrating string string from from Example Example 7.4, 7.4, Figure C.21. Fifty snapshots of of the the vibrating with right end with the the right end free. free.
'E CD E CD
<..>
a. 0.2
5
15
10
20
25
x
Figure C.22. C.22. Fifty Fifty snapshots snapshots of of the the vibrating string from Figure vibrating string from Example Example 7.4, 7.4, with both ends with both ends free. free.
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
566 7. The The solution solution is 7. is
(2n-1)1rX)
u(x, t) = ~ an(t) sm 00
•
2
'
where where
C2(2n4~1)21r2)cos(C(2n;1)1rt) + c2(2n4~1)21r2'
an(t) = (bn-
2(_1)n+l bn
= 125(2n -
en
= -,-----"--:-(2n - 1)1r
1)21r 2 '
4g
Snapshots of the the solution are graphed graphed in Figure C.23, be compared compared to Snapshots of solution are in Figure C.23, which which should should be to Figure 7.9. Figure 7.9.
;
,- -
;
,,' .... .;.,.;:~:~ .. -;~ .... ""
..
0°
,.
'
. . .>;>' ;
;
;
-,
;
-,_._,- - _._,-,-,-
-,
;
........................................ . t=O - _. t=5e-05 t=0.0001 t=0.00015
.-:>;"
.0,'.,, .--';'
;
;{'-
°o~------~------~------~------~------~ 0.2 0.4 0.6 0.8 x
Figure C.23. displacement of the bar in Example Example 7.6, C.23. Snapshots Snapshots of the displacement taking into account the effect effect of of gravity. gravity.
Section 7.3 7.3 Section 1. The 100/20 = = 5, = T/60, and the the 1. The fundamental fundamental period period is is li/c 2l/c = 0.2. 0.2. Using Using h h = 100/20 5, Dt Dt = T/60, and RK4 we obtain solution shown shown in in Figure C.24. RK4 method, method, we obtain the the solution Figure C.24.
3. 3.
(a) Since Since the the initial disturbance is is 24cm from the the boundary boundary and and the wave speed speed (a) initial disturbance 24cm from the wave is 400cm/s, it will take 24/400 24/400 = = 0.06 0.06ss for for the reach the the boundary. boundary. will take the wave wave to to reach is 400 cm/s, it
Appendix C. Solutions Solutions to odd-numbered exercises exercises Appendix C. to odd-numbered
567
O . 2 r-------~-------,--------~------~------~
'E Q) E
g
Ci
'6
-0 . 2 ~------~--------~------~--------~------~
o
0 .2
0.4
0.6
x
0.8
Figure C.24. The computed computed solution of the wave equation equation in Exercise Exercise 7.3.1. Shown are 30 snapshots, snapshots, plus the initial displacement. displacement. Twenty 7.3.1. Shown Twenty subintervals subintervals space and 60 time steps were used. in space used. (b) The IBVP is
aatu 2
2
2 -
a u = 0, 2
< x < 50, u(x,O) = 0, 0 < x < 50, c ax 2
0
t
> 0,
au at (x,O)
= ,(x), 0 < x < 50, u(O, t) = 0, t > 0,
u(50, t)
= 0, t > 0,
with c = 400 statement of the exercise. 400 and ,7 given in the statement = 50/80 (c) Using piecewise linear finite elements and the RK4 method (with h = and .6.t = 6 .• 10), we ~ t < ~ 0.06. 0.06. At = 10~44 ), we computed the solution over the interval 0 < snapshots are shown in Figure C.25, which shows that it does take 0.06 0.06 Four snapshots C.25, which wave to reach the boundary. (The reader should notice the seconds for for the wave spurious "wiggles" "wiggles" in the computed solution; solution; these are due to the fact that the true solution is not smooth.) 5. It is not possible to obtain a reasonable numerical solution using finite elements. In Figure C.26, = 2.5.10= 3.75-10~ 3.75.10- 44 .• C.26, we we display the result obtained obtained using h — 2.5-10~33 and .6.t At = Three snapshots are shown. shown. 7. (a) The The weak form is
{a u au dV} It f(x, t)v(x) dx p(x) (x, t)v(x) + k(x) ax (x, t) dx (x) dx =
1 £
o
2
(Jt2
0
Appendix C. C. Solutions Solutions to to odd-numbered exercises Appendix odd-numbered exercises
568
0.1r-----~------~------~------~----__,
'E Q) E Q) u
CIl
a. rn '0
10
20
x
40
30
50
Figure Figure C.25. C.25. The computed solution solution of of the wave equation in Exercise 7.3.3. 7.3.3. 1.2~------~------~------~------~------~
0.8
'E Q) E Q) u
CIl
a. rn '0
0.4
0.2
0.6
0.8
x
Figure C.26. Figure C.26. The computed solution solution of of the wave equation in Exercise 7.3.5. 7.3.5.
for > to to and and vv E € V, where for t 2: where
v = {v E C
2
[O, £]
v(O)
= O} .
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
569
homogeneous bar: (b) The system of ODEs has the same form as in the case of a homogeneous _ d2 u _ _ M dt 2 + Ku = f(t), except that the entries in the mass matrix are now now
1t = 1t
Mij
=
p(x)cPi(x)(/Ji(x)dx, i,j = 1,2, ... , n,
now and the entries in the stiffness stiffness matrix are now Kij
k(x)
d:: (x) ~!i (x) dx,
i,j
= 1,2, ... , n.
The components of are unchanged (see Section Section 7.3.2). 7.3.2). The components of the the vector vector f are unchanged (see
Section 7.4 1. 1.
=
(a) c/80. Therefore (a) The The fundamental frequency frequency is c/(2i) el(2Ji.) = e180. e 80 = 500 c = 40000 cm/s
'*
(or 400m/s). (b) T/p, where T is the tension. The is 10/40 = = 0.25g/cm, 0.25 g/cm, (b) We We have have ec2 = T/p, whereTisthetension. The density density p pis so T is 4 • 1088 dynes (gcm/s 22 ). 4.10 ). (c) The other resonant frequencies are the integer multiples of the fundamental fundamental frequency: 1000, 1500, 2000,... 2000, ... Hz. 1000,1500, 3. Snapshots of the solution are shown in Figure C.27. C.27. The reason that resonance does not occur is that the point source is placed at a point of the string that does point). (In the formula (7.28), not move under the fourth standing wave (a fixed point). sin (rmra) — sin (27r") (2vr) = 0.) = sin = 0.) sin (m7ra)
Section Section 8.1 8.1 1. The heat equation equation for a heterogeneous heterogeneous medium is 1.
p(x)e(x)
au at - V· (K(X)VU) = 0,
x E
n, t > to·
3. For this example, [V.F= [
10
180
F·n=1.
5. Using for scalar obtain 5. Using the the product product rule rule for scalar functions, functions, we we obtain 3
v· (vVu) = L i=1
a
a
aXi [v o:J
3 ov OU = '"" L...J ox; ox;
i=1
02U
'""-2 3
+ v L...J ox'
= Vv· VU+ v~U.
i=1'
Appendix C. Solutions odd-numbered exercises exercises Appendix C. Solutions to to odd-numbered
570
co
-7
2.5 x 10
= 1044
2 1.5
0.5 Oli;;:::------:::::I.
-0.5 -1
-1.5
-2 -2.5 ' - - - - - 0......- 2 - - - - 0..... 4 - - - - 0.....6 - - - - 0....8 - - - - - ' 0 x
Figure C.27. C.27. Solution (7.26) with with an oscillatory forcing forcing term Figure Solution to to (7.26) an oscillatory term (see (see ExerExerfrequency of forcing term term is is 1044, fourth natural natural frequency. cise 7.4.3). cise 7.4.3). The The frequency of the the forcing 1044, the the fourth frequency. However, does not not exhibit exhibit resonance resonance since since the the point point source source is is placed placed at at However, the the solution solution does fourth standing aa fixed point of fixed point of the the fourth standing wave. wave. 7. Suppose Suppose u, u,vv G Then 7. E C™(O). C~ (n). Then (Lmu,v)
=-
In v.6.u
= { Vu· Vv
in
=
In Vu·Vv
={
ian
=-
u
In
-1an
v : (Green's first identity)
av - { u.6.v (Green's first identity) an
in
u.6.v
— (u,Lmv). (u,Lmv). = The boundary terms terms vanish vanish because because the the product product that that forms the integrand integrand is is zero zero The boundary forms the over the the entire boundary. For For example, over entire boundary. example,
{ v
au
ian an since on F2. since v = 00 on on FI fl and and du/dn au/an = 00 on f z.
=0
Appendix C. Solutions Solutions to to odd-numbered Appendix C. odd-numbered exercises exercises
571 571
Section 8.2 1. 1.
(a)
(b) The The graphs graphs of of the error are given in C.28. (b) the error are given in Figure Figure C.28.
X10-3
o
0
0.2
2
Figure Figure C.28. C.28. The error in approximating approximating ff(x,y) ( x , y ) by thefirst4 the first 4 terms (top) and the the first first 25 terms terms (bottom) (bottom) of of the (See Exercise and the double double Fourier Fourier sine sine series. series. (See Exercise 8.2.1') 8.2.1.) 3. The solution solution is 3. The is given given by by 00
u(x)
=L
00
L
m=l n=l
~mn sin (m7rXl) sin (n7rX2),
I\mn
cmn are the coefficients where the Cmn coefficients from Exercise 1 and
572
5.
Appendix C. C. Solutions Solutions to odd-numbered odd-numbered exercises
(a) The IBVP is ThelBVPis pc
au at - KC!..U = 0.02, u(x,O) u(x, t)
= 5, = 0,
x
E
n, t > 0,
x E n, x E
an, t > O.
The domain n the rectangle $1 is the rectangle
{x E R2 : 0 < Xl < 50, 0 < X2 < 50} . (b) The solution is u(x, t)
~ L...J ~ amn(t) sm . (m7rXl) = L...J -w sm. (n7rX2) 50 ' m=l n=l
where a mn (t)
=
b
=
mn
Cmn Amn
(b mn _ Cmn \
)
KAmn
20 (-1
e -t
+
Cmn
\
K~mn
,
+ (_I)m) (-1 + (_I)n) , mn7r 2
2 (-1
=
+ (_1)m) (-1 + (-It) 25mn7r 2
=
(m 2
'
+ n 2 )7r2 2500
(c) The steady-state temperature temperature Us us (x) satisfies the BVP -KC!..U
u(x)
= 0.02, x E
= 0,
x E
n,
an.
The solution is Us (X)
~~ Cmn . (m7rXl) . (n7rX2) = L...J L...J KAmn sm -w sm 50 . m=l n=l
(d) The maximum difference between between the the temperature temperature after after 10 10minutes minutes and and the th steady-state steady-state temperature temperature isisabout about 11degree. degree. The Thedifference differenceisisgraphed graphedininFigure Figur C.29. C.29. 7. The minimum temperature seconds. temperature in the plate reaches 4 degrees Celsius after 825 825 seconds 9. The leading edge of of the the wave wave isis initially initially 2/5 2/5 units units from from the the boundary, boundary, and and the th wave travels at a speed of of 261..;2 261-\/2 units units per per second. second. Therefore, Therefore,the the wave wavereaches reaches the th boundary after after ..;2/1305 V^/1305 ~= 0.00108 0.00108 seconds. seconds. Figure Figure 8.6 8.6shows showsthe thewave waveabout aboutto t< reach the boundary after 1010~33 seconds. seconds. 11. The difficult task is is to compute compute the the Fourier Fourier coefficients coefficients of of the the initial initial displacement displacemen ill. If If we write ?jJ. write 00
?jJ(x)
00
= 2: 2: bmn sin (m7rX l) sin (n7rX2), m=l n=l
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
573
60
o
0
x,
Figure Figure C.29. C.29. The difference difference between the temperature temperature in the plate after after 10 minutes and the steady-state temperature. temperature. (See (See Exercise 8.2.5.) then we find then we find that that 0,
m=/=-n,
ain 2 (mrr/Z) lZ50m 2 rr2 ,
m=n.
We then have that 00
u(x,t)
=L
00
L amn(t)sin(mll'x )sin(mrxz), 1
m=l n=l
where amn(t) a m n (t) satisfies satisfies where
dZa
mn dt2 + Amn C
2
= 0, amn(O) = bmn , damn (0) = o. amn
dt
The result is
amn(t)
={
m=/=-n,
°b'mm cos (n--) Cy Ammt , m=n.
Thus the solution is 00
u(x, t)
=
L bmm cos (CVAmmt) sin (mll'Xl) sin (mll'xz). m=l
Four snapshots of uu are shown in Figure C.30.
Appendix Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
574
X10-4
-1 1
-1
1
X10-4
-1
-1
1
1
Figure C.30. Four snapshots of the solution to Exercise 8.2.11: t = = 00 Figure C.30. (top left), left), t = T/8 T/8 (top (top right), right), tt = T/2 T/1 (bottom (bottom left), left), t = 5T/8 5T/8 (bottom (bottom right). right). The (top The solution is periodic with period T. T. 13. 13. The The solution solution is is
=L 00
u(x)
. . L 4sin(m7r/2)sin(mr/2) + 7r sm (m7rxI) sm 00
(m 2
n 2)
2
m =l n=l
The The graph graph of of uu is is shown shown in in Figure Figure C.3l. C.31. 15. 15.
(a) IBVP is (a) The ThelBVPis pc
au at - K~U = 0.02,
x E 0, t
> 0,
u(x, 0) = 5, x E 0, u(x,t) =0, xEr}Ur 4 , t>O,
au (x, t) = an
0, x E r2 U r3, t
> O.
°
The domain domain O is is the the rectangle The rectangle
{x E R2
: 0 < Xl
< 50, 0 < X2 < 50} .
(n7rX2).
Appendix C. to odd-numbered Appendix C. Solutions Solutions to odd-numbered exercises exercises
575
0.5
o -0.5 1
o
0
Xl
Figure C.31. 8.2.13. C.31. The solution to Exercise 8.2.13. (b) The solution is (b) The solution is
u (x, t)
=~ ~ (t)·sm (2m 100 -1) JrX l) . (2n -1) JrX 2) ~ ~amn sm 100 ' m=l n=l
where amn(t)
= (b mn _
C~n
) e-I
80 = .,......----0-.,......----,-_o_ (2m - 1)(2n - 1)Jr 2
Cmn
8 = .,----,.,.----:-.,...,.....---;---;:2
mn
C~n
,
KAmn
bmn
A
+
~Amn
25(2m - 1)(2n - 1)Jr _ «2m - 1)2 + (2n - 1)2)Jr 2 10000 .
(c) the BVP BVP (c) The The steady-state steady-state temperature temperature us(x) us(x) satisfies satisfies the -,,~u
u(x)
au
= 0.02, x E n, = 0, x E fl U f4,
an (x) = 0,
x E f2 U fa.
The The solution solution is is Us
(
_
~~
x) - ~ ~ m=l n=l
Cmn
"Amn
•
sm
(2m-l)JrXl) . (2n-l)JrX2) 100 sm 100 .
Appendix exercises Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises
576 576
(d) tem(d) After After 10 10 minutes, minutes, the the temperature temperature uu is is not not very very close close to to the the steady-state steady-state temthe difference difference u(x, u(x, y, 600) 600) —u -u.(x, y) graphed (Note: perature; the (x, y) is graphed in Figure C.32. (Note: s The The temperature temperature variation variation in in this this problem problem may may be be outside outside the the range range in in which which the linear linear model model is is valid, valid, so so these these results results may may be be regarded regarded with with some some skeptiskeptithe cism.) cism.)
o -2
-4 -6 -8 -10 60 60
o
0
Figure C.32. C.32. The The difference difference between between the the temperature temperature in in the the plate plate after after 10 10 Figure minutes minutes and and the the steady-state steady-state temperature. temperature. (See (See Exercise Exercise 8.2.15.) 8.2.15.)
Section Section 8.3 1. are 1. The The next next three three coefficients coefficients in in the the series series for for g9 are C40 ~
-0.0209908,
C50 ~
3. 3. The The solution solution is is
0.0116362, 00
u(r, B)
=
C60 ~
L amoJO(SOm r ), m=l
where where
amo
Cmo = -2-' sOm
-0.00722147.
Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises Appendix
577
f(r, 9) of the Cmo cmo are the coefficients coefficients of /(r, 0) = 1 -— r, and the SOm som are the positive roots of Jo. A direct calculation shows that Jo. alO
a20 a30 a40
a50 a60
== 0.226324, == -0.0157747, == 0.00386078, == -0.00148156, == 0.000716858, == -0.000399554.
The solution (approximated by by six terms of the series) is graphed in Figure C.33. C.33.
0.25 0.2 0.15 0.1 0.05
o 1
- 1 -1
Xl
Figure C.33. C.33. The The approximation approximation to solution u, u, computed computed with six terms of of the (genemlized) (generalized) Fourier Fourier series (see Exercise Exercise 8.3.3). 8.3.3). 5. The The solution solution is 5. is
00
u(r,9)
=L
amoJO(SOm r ),
m=l
where amo
Cmo = -2-' sOm
the f(r, 9) Jo. the CmO Cmo are are the the coefficients coefficients of of /(r, 0) = r, and and the the 80m som are are the positive positive roots roots of of JQ. A direct calculation shows shows that alO
a20
== 0.141350, == -0.0371986,
Appendix C. Solutions to to odd-numbered odd-numbered exercises Appendix C. Solutions exercises
578
a30 a40 a50 a60
== == == ==
0.0106599, -0.00537260, 0.00283289, -0.00182923.
The solution solution (approximated (approximated by by six six terms terms of the series) series) is graphed in Figure C.34. The of the is graphed in Figure C.fr
0.15
0.1
0.05
o 1
- 1 -1
x,
Figure C.34. C.34. The approximation to to solution solution u, u, computed computed with with six six terms Figure The approximation terms of the (generalized) (generalized) Fourier Fourier series series (see Exercise 8.3.5). of the (see Exercise 8.3.5). 7. If If we write 00
¢(r,8) =
L cmoJO(OmOr ) m=l 00
+L
00
L (Cmn cos (n8) + dmn sin (n8)) In(Omn r ),
m=l n=l Cmn d mn are known, and where the c mn and d 00
u(r, 8, t)
=L
amo(t)JO(OmO r )
m=l 00
+L
00
L (amn(t) cos (n8) + bmn(t) sin (n8)) In(Omn r ),
m=l n=l
then then a mn (t) -- Cmne -t
bmn(t)
= dmne-t
m -- 1, 2, 3, ... , n -- 0 , 1 , 2, ... ,
m, n
= 1,2,3, ....
Appendix C. C. Solutions Solutions to odd-numbered odd-numberedexercises exercises
579
However, since since
m
= 1,2,3, ....
Therefore, 00
u(r, 0, t)
=L
aml(t) cos (O)Jl(amlr),
m=l
with a m i(£) given given above. above. After After 30 30 seconds, seconds, the temperature distribution distribution can can be be with aml(t) the temperature approximated accurately accurately using a single eigenfunction eigenfunction (corresponding to the largest largest approximated eigenvalue, AU), An), so we need only Cll ~
9.04433.
The temperature temperature distribution distribution after after 30 30 seconds is graphed graphed in Figure C.35.
10
-10 -10
Figure C.35. C.35. The The approximation approximation to to solution at tt = 30, 30, computed computed with with Figure solution uu at one term of the (generalized) (generalized) Fourier series (see (see Exercise 8.3.7). 8.3.7). nA2, the same area as a square drum of side 9. A circular drum of radius A has area 7l'A2, length "fir ^/TrA. The fundamental fundamental frequency frequency of of such such aa square square drum drum is A. The is length C
Comparing to Example 8.9, we we see see that the circular drum sounds a lower frequency frequency than a square drum of equal area.
Appendix C. Solutions Solutions to exercises Appendix C. to odd-numbered odd-numbered exercises
580
Section 8.4 1. The mesh mesh for for this this problem which the free nodes nodes are 1. The problem is is shown shown in in Figure Figure C.36, C.36, in in which the free are labeled. stiffness matrix matrix is The stiffness is labeled. The 4.4815 -1.1759 K ~ [ -1.1759 0.0000
-1.1759 4.9259 0.00000 -1.3426
-1.1759 0.0000 4.9259 -1.3426
0.0000 ] -1.3426 ' -1.3426 5.8148
the load load vector vector is is while the while F ~
0.11111 ] 0.11111 0.11111 . [ 0.11111
The resulting weights for the the finite finite element given by by The resulting weights for element approximation approximation are are given
u
= K-1F ~
0.048398] 0.044979 0.044979 . [ 0.039879
Figure C.36. mesh for for Exercise Exercise 8.4.1. Figure C.36. The The mesh 8.4-13. for this this problem is shown shown in Figure C.37, C.37, in free nodes are 3. The The mesh mesh for problem is in Figure in which which the the free nodes are labeled. stiffness matrix is 16 16 x 16 and and neither it nor the load be labeled. The The stiffness matrix is x 16 neither it nor the load vector vector will will be reproduced here. The The matrix is singular, as is is expected for aa Neumann problem. matrix is singular, as expected for Neumann problem. reproduced here.
581 581
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
The unique solution to KU KU = = F with its last component equal to zero is
u=
-0.071138 -0.047315 -0.012656 0.001458 -0.067934 -0.047349 -0.014145 0.001566 -0.065432 -0.046198 -0.015160 -0.000329 -0.062914 -0.046391 -0.016065 0.000000 16
12
4
o
0.2
0.6
0.4
0.8
Xl
Figure for Exercise Figure C.37. C.37. The The mesh mesh for Exercise 8.4.3. 8-4-3. 5.
(a) A direct calculation calculation shows that the the inhomogeneous Dirichlet problem
= f(x), u(x) = g(x),
-V'. (k(x)V'u)
x E
n,
x EOn,
has weak form
u E G + V, a(u,v)
= (f,v)
for all v E V
= eben),
Appendix C. Solutions to to odd-numbered odd-numbered exercises Appendix C. Solutions exercises
582
where G is is any any function function satisfying satisfying the the condition g(x) for for xx E an, and where condition G(x) = p(x) € dQ, and
G+V
= {G + v
: v E V} .
Substituting u = w, where where w E into the the weak weak form form yields Substituting — G + w, G V, into yields wE V, a(w,v)
= (f, v) -
a(G,v) for all v E V.
In the the Galerkin Galerkin method, method, we we replace replace V by by aa finite-dimensional finite-dimensional subspace In subspace Vn Vn and and solve solve wE Vn , a(w,v) = (f,v) -a(G,v) for all v E Vn . When using piecewise piecewise linear linear finite we can can satisfy the boundary boundary conconWhen using finite elements, elements, we satisfy the ditions approximately approximately by by taking taking G to to be be aa continuous continuous piecewise piecewise linear ditions linear function function at the the boundary boundary nodes nodes agree agree with with the the given given boundary boundary function whose values values at whose function g. For simplicity, we we take G to be zero at g. at the interior nodes. The resulting load then given given by by load vector vector is is then
Ii = (f, CPi) -
a(G, cp;), i
= 1,2,3, ... , n.
Since G is is zero zero on on interior nodes, the the quantity quantity a(G, CPi) is nonzero nonzero only only if if (free) Since interior nodes, &) is (free) node ii belongs to a triangle adjacent to the boundary. boundary. (b) The regular triangulation triangulation of the the unit square having 18 18 triangles has only four each one belongs to to triangles triangles adjacent adjacent to to the the boundboundinterior (free) nodes, and interior (free) nodes, and each one belongs that every every entry entry in in the the load load vector vector is modified (which (which is is not ary. This This means means that ary. is modified the typical typical case). Since I/ = = 0, 0, the the load load vector vector ff is is defined defined by by the case). Since
= -a(G,CPi), i = 1,2,3,4.
f; The load vector is f
==
0.22222222222222] 1.55555555555556 0.22222222222222 ' [ 1.55555555555556
while the solution solution to Ku Ku = = ff is 0.27777777777778] ...:... u -
7. 7.
0.61111111111111
[
0.27777777777778
.
0.61111111111111
(a) (a) Consider Consider the the BVP BVP -V· (k(x)Vu)
= I(x),
in 0"
(C.5)
au an (x) = h(x), x Eon.
E V = C 22(O) (TI) and applying Green's Multiplying the PDE by a test function function vv € Green's first first identity identity yields yields
1n
kVu . Vv
=
r + ionr
in
Iv
kvh for all v E V.
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
583
We will apply Galerkin's method with Vm Vm equal to the space of all continuous piecewise linear function relative to a given triangulation T. We We label the standard basis of Vm Vm as as >i, 02, ... - - - ,, CPn,
E Vn , a( Wn, CPi)
= (f, CPi) +
r
Jon
khcpi, i
= 1,2, ... ,m.
Writing Writing m
Wn
=L
(JjcPj
j=l
and and
mXm we obtain obtain the the system system Kw Kw = = F. The stiffness matrix K E GR R mxm js given given by we The stiffness matrix K is by
Kij
= a(cpj,CPi),
i,j
= 1,2, ... ,n,
and the load vector FER by F e Rmm by
Fi = (f, cp;)
+
r
Jon
khcpi, i = 1,2, ... , n.
The boundary integral in the the expression for Fi is zero unless Zi z» is a boundary node. the following calcula(b) The compatibility condition for (C.5) is determined by the tion: tion:
In f = - In V·
(kVu)
__ r k OU = - r kh. Jon
- Jon an (c) Now consider (C.5) (C.5) with k(x)
= 1,
f(x)
3
= XlXZ + 4'
hex)
3xi
= -5'
where n O is the unit square. We will produce the finite element solution using 16x16 Rl6Xl6 the regular grid with 18 18 triangles (16 (16 nodes). The stiffness stiffness matrix K E eR is singular, as should be expected, and there are infinitely many solutions. The
Appendix C. Solutions Solutions to to odd-numbered odd-numberedexercises exercises Appendix C.
584
unique solution uu with with last last component component equal equal to to zero zero is unique solution is 0.3622 0.2984 0.1344 -0.0843 0.3728 0.3302 0.2081 0.0255 0.3803 0.3447 0.2334 0.0591 0.3665 0.3257 0.1878 0.0000
u=
9.1 Section 9.1 1. The The complex complex Fourier Fourier series series of of f/ is 1. is 00
n=-oo
where Co CQ = = 2/3 2/3 and and where Cn
=-
2(-1t
n
n 2 7r 2 '
= ±1, ±2, ....
approximating f/ by partial Fourier series are shown in Figure C.38. C.38. The errors in approximating by a partial 3. The The complex complex Fourier Fourier coefficients coefficients of of f/ are are 3.
=
Cn
(-It+ 1 sin (1) n7r -1
.
The magnitudes magnitudes of the error in approximating partial Fourier series are shown approximating f/ by a partial in Figure C.39. C.39. 5. 5. Let Let
00
g(x) = ao + L
(an cos
(n;x) + b sin (n;x)) , n
n=l
where
ao
=
;£ Ii g(x)dx,
!:
-i
l g(x) b = l Ii g(x)
an = n
-l
(n;x) dx, n= 1,2,3, ... , sin (n;x) dx, n= 1,2,3, ... , cos
Appendix C. Solutions Solutions to to odd-numbered Appendix C. odd-numbered exercises exercises
585 585
0.04r-------r-----r------r------,
-0.02
----.&....----. . .0.5. . .-------1 0
-0.04'-----.......... -1 -0.5
0.04r-----""T'"--------Il(~----..,..----.....,
0.02
Orvr-~--------------------------~~~vJ~ -0.02 -0. 04 '--_ _ _........._ _ _- - L_ _ _ _.........._ _ _....J -1 -0.5 0 0.5 x_ 0.04,......-----.r-------l.t-------,.-----.., 0.02
o~------------------------------------~ -0.02
..
-0.04'-------·.....----...I·~---- ·-----~ -1 -0.5 0.5 o
x
Figure C.38. The error in approximating approximating ff(x) - x22 by (x) = = 1— by its partial complex Fourier series with N = 10 10 (top), N = 20 20 (middle), (middle), and N = 40 (bottom). complex 40 (bottom). (See Exercise 9.1.1.) (see (6.25)), let (see (6.25)), and and similarly similarly let
hex) = Po + f: (Pn cos (n;x) + qn sin (n;x)) . n=l
The complex complex Fourier Fourier coefficient coefficient of! given by by The of / is is given Cn
=~ U
Ii !(x)e-
i1rn
;r;/i
dx.
-i
For > 0, For n n > 0, we we have have Cn
= 2~
J: (g(x)
1(1 Ii
="2 £
_£
+ ih(x))
(n;x) - isin (n;x)) dx .1 g(x)sm (n7rx) g(x) cos (n7rx) -g- dx - l£ -g- dx (cos
Ii . -i
Appendix C. Solutions Appendix C. Solutions to to odd-numbered odd-numbered exercises exercises
586
0.5
o """-
-1
o
-0.5
0.5
y
0.5
o~ -1
-0.5
o
0.5
o
0.5
x
0.5
0-
-1
-0.5
-
x
lx Figure C.39. approximating f(x] =e by Figure C.39. The The magnitude magnitude of of the the error error in in approximating f(x) = eix by its 10 (top), (top), N its partial partial complex complex Fourier Fourier series series with with N N = = 10 N = 20 20 (middle), (middle), and and N N = = 40 40 (bottom). (See (See Exercise (bottom). Exercise 9.1.3.) 9.1.3.)
+i
I: h(x)
E
cos
I:
(n;x) dx + E h(x) sin (n;x) dX)
= ~ (an + qn + i(pn -
bn )).
Similarly, if Similarly, if n > 0, 0, then then
Finally, Finally,
co
= ao + ipo·
7. 7. We We have have
n=O
n=O
e 21rij
1
_
- e 21ri j/N
-
l'
Appendix C. C. Solutions Solutions to odd-numbered exercises
587
the sum of a finite geometric series: using the formula for the
l6 27ry Moreover, since ei8 is a 27r-periodic function of 8, = 9, we we see see that ee27rij = 1 and hence that that N-l
L
= O.
(e7rijn/N)2
n=O
On the other hand, by Euler's formula,
~ + ~.. L...J (;7rjn/N)2 e =~ L...J ( cos (jn7r) N sm (jn7r))2 N n=O
n=O N-l
=L
(cos
(j~7r)
_ sin
e~7r) -
y:
2
2
(j~7r)
+ 2icos
(j~7r) sin (j;))
n=O
=
y:
cos
2
n=O
2
e~7r)
n=O
N-l
+2i
sin
L
cos
(j~7r) sin (j~7r).
n=O
Since this expression equals zero, we we must have
y:
cos
2
e~7r) -
y:
n=O
sin
2
e~7r) = 0,
n=O N-l
L cos (j~7r) sin (j~7r) = O. n=O
we set out to prove. prove. The first equation The second equation is one of the results we can be be written, using the identity sin sin22 (8) (9) = = 1I -— cos cos22 (8), (0), as written, using the trigonometric trigonometric identity can
y:
cos
2
e~7r) -
n=O
£ (1 -
cos
2
e~7r)) = 0,
n=O
which simplifies to N-l
2
or or
L
cos
2
e~7r) = N,
n=O
N ~COS2 e~7r) -"2' n=O
which is the desired result. The result
~ sin e~7r) = ~ 2
n=O
then follows.
Appendix C. Solutions to to odd-numbered Appendix C. Solutions odd-numbered exercises exercises
588
Section 9.2 1. 1. The The graph graph of of {|F {IFnI} is shown shown in in Figure Figure C.4D. C.40. n|} is
0.5.------......------r-------r--......- -.. . .
0.4
0.3 LL
c::
0.2
0.1
~O
5
10 n
20
15
magnitude of {Fn} from Figure C.40. The magnitude of the sequence {Fn} from Exercise Exercise 9.2.1. 9.2.1. 3. As shown in text, 3. As shown in the the text, en
where where
5 {F {Fn}~~-16 n}* =_16
== Fn, n = -16, -15, ... ,15,
is the the DFT DFT of {/j}jl_ is of {Ii }J~-16' 16, fj
= f(xj),
= -1 + :6' j = -16, -15, ... ,15
Xj
f( -1) = = /(!))• f(l)). Therefore, we we can estimate {f(Xj)} by taking the inverse (note that /(—I) {f(xj}} by DFT (using the inverse FFT) of of {en}. results are are shown shown in in Figure Figure C.41. DFT (using the inverse FFT) {cn}. The The results C.41. 5. We have
"A
N-l
~ n=O
N-l N-l
e2rrijn/N _ n -
..!. " " -2rrimn/N 2rrijn/N N ~ ~ame e n=O m=O N-l N-l
_ 1 ""
-
N~~ame n=O m=O
2rri(j-m)n/N
N-l {N-l } _ ..!. " "2rri(j-m)n/N N~am ~e
-
n=O
m=O
If jj — ra, then If = m, then N-l
L
n=O
N-l
e 2rri (j-m)n/N
=
2: 1 = N, n=O
.
589
Appendix Appendix C. Solutions to odd-numbered exercises 0.5.....-----~----"""T""----~-------.
-0.5~----~----~~----~----~
-1
o
-0.5
0.5
x
Figure C.41. The The function = x(l x(l -— xx22)) (the (the curve) curve) and and the the estiestiFigure C.4l. function f(x) f(x) = mates of f(xj) f(xj) (the circles) computed computed from from the Fourier coefficients coefficients of of ff mates of (the circles) the complex complex Fourier (see Exercise 9.2.3). (see Exercise 9.2.3). while if ^ m, is aa finite geometric series: series: while if jj =/= m, then then this this sum sum is finite geometric N-l
N-l
Le
21ri (j-m)n/N
= L (e 2rri (j-m)/N)n
n=O
n=O
(e 21l"iu-m)/N)N _ e21l"i(j-m)/N e 27Ti (j-m)
1
1
-
e 2rri (j-m)/N
1
-
1
=0.
Therefore, Therefore, N-l ~
am L.J e
2rri(j-m)n/N_
{
m=j, m =/=j,
-
n=O
and so so we obtain and we obtain N-l
..!. N-l
{N-l
m=O
n=O
~ A e 21rijn/N _ ~ L.J n - N L.J am n=O
1 -Naj N
= =aj, as desired.
~
L.J e
27Ti(j-m)n/N
}
Appendix C. C. Solutions Solutions to odd-numberedexercises exercises Appendix to odd-numbered
590
7. Below we we show the exact exact Fourier Fourier sine I, the the coefficients coefficients estimated by 7. Below show the sine coefficients coefficients of of /, estimated by the DST, and and the error. Since Since both and the estimated a are zero for n the DST, the relative relative error. both a an and the estimated an are zero for n n even, we show only only an an for for nn odd. odd. even, we show
n
estimated
an
1
an
relative error
1
6.2121 . 10- 6
1
2.5801.10-
2.5801 .10-
3
9.5560 . 10- 3
9.5511 . 10- 3
5.1571 . 10- 4
5
2.0641 . 10- 3
2.0555 . 10- 3
4.1824 . 10- 3
7
7.5222 . 10-
4
4
1.7340 . 10- 2
9
3.5393 . 10- 4
3.3531 . 10- 4
5.2608 . 10- 2
11
1.9385 . 10- 4
1.6778 . 10- 4
1.3448.10- 1
13
1.1744.10-
4
8.0874.10- 5
3.1135.10- 1
15
7.6448 . 10- 5
2.4279 . 10- 5
6.8241.10- 1
7.3918 . 10-
9. We We have 9. have N-1
(imr) N = 4"" f N-1 N-1
. 2 "~ Fn sm
~~ m
n=l
(mn7r) . (in7r) N
. -;;;- sm sm
n=l m=l N-1
N-1
m=l
n=l
= 4 Lim L sin (m;7r) sin e~7r). By the the hint, hint, By
~ . (mn7r) . (in7r) ~ sm -;;;- sm N n=l
is either N N/2 or 0, 0, depending on whether whether m ra = = ij or not. It It then then follows immediately is either /2 or depending on or not. follows immediately that that
~
. (in7r) N N = 4"2fJ = 2NfJ,
2 ~ Fn sm n=l
which wanted to which is is what what we we wanted to prove. prove.
Section 9.3 1. The The partial sine series, series, with 50 terms, is shown shown in in Figure C.42. It It appears appears 1. partial Fourier Fourier sine with 50 terms, is Figure C.42. that the to the the function F satisfying satisfying that the series series converges converges to function F F(x) = x - 2k, -2k - 1
< x < 2k + 1,
k = 0, ±1, ±2, ....
The period of this this function is 2. The period of function is 2. 3. 3.
(a) The extension fIOdd continuous on on [-£, [—I, £] t] only only if if /(O) = 0. Otherwise (a) The odd odd extension is continuous I(a) = a. Otherwise, 0dd is fodd has aa jump discontinuity at = 0. IOdd has jump discontinuity at xx = o. (b) even extension is continuous continuous on £] for for every (b) The The even extension lev fevenen is on [-£, [—•£,•£] every continuous continuous I/ [0, f\ -t -»- R. R. [a,£]
:
591 591
Appendix to odd-numbered Appendix C. C. Solutions Solutions to odd-numbered exercises exercises
1.5r-----.----....-----.----....----.........-----, 1
-1.5~---~------~------~----~-----~----~
-3
-2
-1
0
2
3
x
Figure partial Fourier Fourier sine sine series series (50 terms) of of ff(x) Figure C.42. C.42. The The partial (50 terms) (x) = = x. x. 5. The quarter-wave sine series of f/ : [0, [0, f]i] -+ —>• RR isis the the full full Fourier Fourier series series of ofthe the function function / : [—2i, 2i] -+ -» R R obtained by first =£ t (to [-2£,2f] obtained by first reflecting reflecting the the graph of f/ across the line x = (to obtain a function defined on [0, and then taking the [0, 2£]) 21]) and the odd extension of the the result. That is, is, /is is defined by by
1:
1
f(x), f(x) = f(2£ - x), { -f(-x), -f(x + 2£),
°:-: x:-::: x:-::: £, 2£, f<
-£:-::: x < 0, -2£:-::: x <-£.
Since this function is odd, its full Fourier series has only sine terms (all of the cosine coefficients the even sine terms also coefficients are zero), and because of the other symmetry, the drop out.
Section 9.4 1. 1. The Fourier series of f/ converges pointwise to the function F defined by x = ±(2k - 1)71", k = 1,2,3, ... , (2k - 1)71" < X < (2k + 1)71", k = 0, ±1, ±2, .... 3. There are many such functions f, /, but they all have one or more discontinuities. An example is x, 0:-::: x:-::: ~, f(x) = { x+ 1, ~<x:-:::l.
Appendix C. Solutions to to odd-numbered Appendix C. Solutions odd-numberedexercises exercises
592
5. If If {fN} {/N} converges [a, b], 6], then then it it obviously obviously converges (after 5. converges uniformly uniformly to to /f on on [a, converges pointwise pointwise (after all, (E [a, 6], between ( x ) converges to the maximum maximum difference, difference, over over x E [a,b], between /N(X) fN(X) and and ff(x) converges to all, the zero, so each converge to uniform zero, so each individual individual difference difference must must converge to zero). zero). To To prove prove that that uniform mean-square convergence, define convergence implies mean-square define MN
= max{lf(x) -
fN(X)1 : a:::; x :::; b}.
Then Then
lb
Jlb
If(x) - fN(X)12 dx :::;
M'j. dx
= MNVb-a. --+ 00 as N N —> --+ oo, 00, which gives the the desired result. By hypothesis, MN —> £] —>• --+ R is continuous. Then even, periodic extension of f/ 7. Suppose /f : [0, [0,^] Then ffeven, even, the even, to R, is defined by feven(x)
={
f(x - 2k£), f( -x + 2k£),
2k£ :::; x < (2k + 1)£, k (2k - 1)£ :::; x < 2k£, k
= 0, ±1, ±2, ... ,
= 0, ±1, ±2, ... .
Obviously, continuous on every interval interval (2k£, (2ki, (2k (Ik + 1)£) 1)1) and and ((2k ((2k — Obviously, then, then, ffeven is continuous on every even is 1)1,2k£.), except possibly and (2k -1)£, — l)i, k = — 0, 0, ±1, 1)£, 2k£), that that is, is, except possibly at at the the points points Ikt 2k£ and ±1, ±2, ±2, .... We have1 1H7_ lim
x~2W-
feven(x)
= =
lim
x~2W-
f(-x+2k£)
lim f(x)
x~o+
= f(O) and and lim
x~2kl+
feven(x}
=
lim
x~2kl+
f(x - 2k£)
= lim f(x) x~o+
= f(O). Since = /(O) is continuous continuous at at xx = 2n£. Since ffeven(2k£) f(O) by by definition, definition, this this shows shows that that ffeven 2/';,£. even(2kf) even is A similar calculation shows A similar calculation shows that that lim
x~(2k-l)l-
feven(x) =
lim
x~(2k-l)l+
and hence that feven is continuous at x
feven(x) = feven((2k - 1)£) = feR),
= (2k -
I)£,
9. Given Given f/ : [0, [0,£]f\ --+ -»• R, R, define! define /: [-21,21] --+ -»RR by by 9. : [-2£,2£] f(x), lex) = /(2£ - x), { -fe-x), -f(x + 2£),
0:::; x:::; £, £ < x:::; 2£, -£:::; x < 0, -2£:::; x < -f.
Appendix to odd-numbered Appendix C. C. Solutions Solutions to odd-numbered exercises exercises
593
Then F :: R R —>• --+ R R to to be of f/ to to R. Assuming I/ Then define define F be the the periodic periodic extension extension of R. Assuming is smooth, the quarter-wave sine sine series series of of I/ converges converges to if F F is is piecewise piecewise smooth, the quarter-wave to F(x) F(x) if is continuous at x, continuous at x, and and to to 1
"2 [F(x-) + F(x+)] if F discontinuity at at x. is continuous, continuous, then then its its quarter-wave quarter-wave sine sine if F has has aa jump jump discontinuity x. If I/ is series converges to I/ except at xx = O. 0. If If I/ is is continuous /(O) = = 0, 0, then then except possibly possibly at continuous and and 1(0) series converges to the quarter-wave sine sine series series of converges to at every € [0, [0,.e]. i}. the quarter-wave of f/ converges to f/ at every xx E
Section 9.5 1. The The function to satisfy satisfy h(—1) = h(l), so its its Fourier coefficients decay decay 1. function h(x) hex) fails fails to h(-l) = h(l), so Fourier coefficients like l/n 1/n and and its its Fourier Fourier series series is is the slowest to to converge. the slowest converge. The The function function I/ satisfies satisfies like /(—I) = /(I), df/dx has has aa discontinuity at rex = = a 0 (and (and the the derivative of fIper also f( -1) = f(l), but but dl/dx discontinuity at derivative of per also has discontinuities discontinuities at at xx = ±1). ±1). Therefore, Therefore, the has the Fourier Fourier coefficients coefficients of of f/ decay decay like like 1/n2. Finally, its first first derivative continuous, but its second second derivative derivative 1/n2. Finally, ggper and its derivative are are continuous, but its per and has aa jump at xx = ±1, ±1, so so its coefficients decay like 1/n 1/n33.. The has jump discontinuity discontinuity at its Fourier Fourier coefficients decay like The Fourier series of g is the fastest to converge. Fourier series of 9 is the fastest to converge. 3. Figure shows the the /, its partial series with with 21, 21, 41, 41, 81, 81, and and 161 161 terms, terms, 3. Figure C.43 C.43 shows I, its partial Fourier Fourier series and the line near xx = is indeed and the line yy = = 1.09. 1.09. Zooming Zooming in in near =a 0 shows shows that that the the overshoot overshoot is indeed about 9%; 9%; see see Figure about Figure C.44. C.44. 1.5~--------~---------r--------~--------~
>- 0.5
21 terms - _. 41 terms 81 terms 161 terms
-0.5
o x
0.5
Figure C.43. C.43. The The function its partial series Figure function f from from Exercise Exercise 9.5.3, 9.5.3, its partial Fourier Fourier series terms, and the line line yy = 1.09. with and 161 with 21, 21, 41, 41, 81, 81, and 161 terms, and the = 1.09.
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numberedexercises exercises
594
1.1051--..-----r----...----~====::::c:::===;_,
21 terms 41 terms 81 terms 161 terms
1.1
1.095
>.
1 .09 - - - - - - - - - - - - - I,-:- - - - - - - -I ...\ - - - - - - - - - - - ii' , 1.085
I
,
I
i i
I
-
,,
1.08 I
I
i
o
0.02
0.06
0.04
x
0.08
0.1
Figure C.44. C.43. Figure C.44. Zooming in on the overshoot in Figure C.43.
Section 9.6 1. 1.
(a) (a) The The infinite infinite series series
1
00
Ln
2
n=l
87 2 converges to a finite value. Therefore, {lin} and so, by by Theorem 9.36, value.87 {1/n} E G f£2 2 the L2(0, 1). the sine sine series series converges converges to aa function function in in L (0,1).
(b) Figure C.45 shows the sum of the first 100 100 terms of the sine series. The graph suggests suggests that that the the limit limit /f is is of of the the form form ff(x) ( x ) = m(l m(l -— x). The The Fourier Fourier sine sine series are series of of such such an an f/ are Cn
=2
10t
m(l - x) sin (mTx)
= 2m, n = 1,2,3, .... n~
Therefore, in order order that cn = = lin, 1/n, we must have have m = Tr/2. Therefore, Therefore, in that en we must m = ~/2. Therefore,
f(x) 87
87A A
~
= 2(1 -
x).
standard the theory that standard result result in in the theory of of infinite infinite series series is is that 00
L:k
n=l
converges converges if if kA; is is greater greater than 1. 1. This This can can be proved, proved, for for example, example, by comparison comparison with with the the improper improper integral integral
f
1
oo dx X
k'
Appendix C. C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises Appendix
595
2.-------~------_,--------T_------_r------_.
- 0 . 5 L . . - - - - - - - -.......- - -........----'----~ o 0.2 0.4 0.6 0.8
x
C.45. The partial sine series, with 100 terms, from Exercise Exercise 9.6.1. 9.6.1. Figure C.45. terms, from The infinite series 3. The
~ 00
(
1)2
fo
1
=~~ 00
series, a standard example of a divergent series. Therefore, {1/ fo} 0(j. is the harmonic series, {l/^/n} 2 1) function. tp2, , and so so the series does not converge to an an L2(0, L 2 (0,1) function. 5.
2 (a) The function ff(x) == xxkk belongs to L L2(0, 1) if and only if the integral (x) = (0,1)
is finite. finite. Provided k #^ —1/2, -1/2, we we have
1
1 X2k
dx == lim
o
r-+O+
lim
11
x 2k dx
r
1 - r 2k + 1 1 + 2k
r-+O+ 1
=={
1+2k' 00,
For kA; = -1/2, For == -1/2,
{1
10
x 2k dx ==
t
10
11
dx == lim dx x r-+O+ r X == lim -In (r)
==
r-+O+ 00.
Appendix to odd-numbered Appendix C. C. Solutions Solutions to odd-numbered exercises exercises
596
2 Thus we we see EL L2(0, 1) if and only if k > -1/2. see that f/ e (0,1) -1/2. 4 11 4 X- // ,, as computed by the (b) The first few few Fourier sine coefficients coefficients of ff(x) (x) = = a:" DST, are approximately
1.5816, 0.25353, 0.63033, 0.63033, 0.17859, 0.17859, 0.41060, 0.14157, .... 0.41060, 0.14157,.... (c) partial Fourier sine (c) The The graphs graphs of of /,j, the the partial sine series, series, with with 63 63 terms, terms, and the differdifference in Figure the two, two, are are shown shown in Figure C.46. C.46. ence between between the
6
--
4
y=x- 1/4 sine series (63 terms)
~
2
• 0.2
0.4
0.6
0.8
1
x 0.1n-------~~------~~------~~-------,---------n
o
-0.1U.------~--------~------~--------~------~
o
0.2
0.4
0.6
0.8
1
x
1 4 Figure C.46. C.46. The together with with its its partial partial Fourier / ,, together The function ff(x) ( x ) = xX-1//4 Fourier sine series (first (first 63 terms) (top), and the difference (bottom). See difference between the two (bottom). Exercise 9.6.3. 9.6.3. Exercise
7. Since Vn ~ v, there exists a positive integer N such that vn —>•
n? N ~
10
Ilv - vnll < 2'
Then, if if n, m m? > N, TV, we Then, we have have 10
10
IIvn - vmll ::; IIvn - vII + IIv - vmll < 2 + 2 = 10. Therefore, } is Cauchy. Therefore, {v {vnn} Cauchy.
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
597
Section 9.7 1. integration by parts (Green's identity): Sup1. The proof is a direct calculation, using integration pose £ eben). Cf)(fi). Then Then u, vv E pose u,
(KDU, v)
=
-10
=
1
=
10
n
= -
=
V'. (k(x)V'u) v
k(x)V'u . V'v -
{ k(x)v ~u
Jon
k(x)V'u· V'v (since v
vn
= 0 on an)
r V'. (k(x)V'v) u + Jon r k(x)u vn ~v
Jn
-10
V'. (k(x)V'v) u (since u = 0 on
an)
= (U,KDV). 3. If If t is is very very large, then we can approximate approximate u(x, -u(x, t) t] by the first term in in its its gener3. large, then we can by the first term generalized Fourier Fourier series. series. Using same notation notation as as before for the the eigenvalues eigenvalues and and the same before for alized Using the eigenfunctions of the the negative Laplacian on n, fi, we have
constant C1 c\ is the first generalized Fourier coefficient temperature The constant coefficient of the initial temperature 5: 5: In 5'1f;1 C1
= In'1f;i·
The approximation is is valid provided >' AI1 is is aa simple simple eigenvalue; is, there The approximation valid provided eigenvalue; that that is, there is is only only one linearly independent independent eigenvector corresponding to >'1. AI. Then Then all of the other terms in the generalized Fourier series decay to zero much more rapidly than does the term. the first first term.
Section 10.1 Section 10.1 1. 1. We must check that the one-point rule gives the exact values for the integral
when /(x) 1, /(x) or /(x) we have have when I(x) = = 1, I(x) = = xi, Xl, or I(x) = = x
and and
Appendix C. Solutions exercises Appendix C. Solutions to to odd-numbered odd-numbered exercises
598 With With /(x) f(x) = = #i, Xl, we we have have
1
f =
111-"'1 1 0
TR
= On the other hand,
Xl
dx 2 dx1
0
1 1
o
~f
2
(Xl - xI)
1
1
1
= -2 - -3 = -. 6
dX1
G, D= ~. ~ =~,
so the rule is exact in this case as well. By symmetry, the rule must hold for f(x) = /(x) = X2, which shows that the rule has degree of precision at least 1. 1. To show degree of precision is not greater than 1, we note that, for for /(x) f(x) = = xi, that the degree 1, we xl,
while 3. We have
On the other hand, the mapping from TR TR to T is 1
Xl
= 1 + Zl + 2"Z2,
X2
= Z2·
The Jacobian is The Jacobian is
J=[~
t],
and its determinant is 1. Therefore, with and 1. Therefore,
we have
11l-z1 ( + 1 1 1 f
T
=
9
TR
=
1
0
Zl
1
+ 2" Z2 ) z~ dZ2 dz 1.
0
This last last integral integral also also equals equals 1/8. This 1/8.
5. reader should consult Exercise (and its its solution) solution) for for an an explanation of 5. (The (The reader should consult Exercise 8.4.5 8.4.5 (and explanation of inhomogeneous Dirichlet condition is handled.) Let G be the piecewise linear how an inhomogeneous function whose whose nodal value is zero everywhere everywhere except at those boundary nodes lying the boundary boundary which which are are not not free. free. At At the the nonfree nonfree boundary boundary nodes, nodes, the the value value of of on the on
599 599
Appendix C. C. Solutions Solutions to odd-numbered exercises
G is is the assigned Dirichlet Dirichlet data. data. To To solve solve the inhomogeneous inhomogeneous Dirichlet Dirichlet problem, problem, we merely need to modify the load vector by replacing
by by
Fi
=
l
JrPi - a(G,CPi).
fa) is nonzero nonzero only if the free node nfi r\fi belongs to a triangle that The quantity a(G, CPi) also contains a (nonfree) boundary node. The point here is simply that this can easily be determined from the information in the data structure. As we we loop over we can determine, for for each, whether it contains both a free node the triangles, we node and a nonfree node. node. If it does, we we modify the load vector accordingly. accordingly.
Section 10.2 Section 10.2 1. A = U requires n -— 1 steps, and step ii uses 1. Computing Computing A = L LU
(n - i)(l
+ 2(n -
i))
= 2(n -
i)2
+ (n -
i)
arithmetic operations (this is determined by simply counting the operations in the the pseudo-code pseudo-code on page 473). The total number of operations required required is n-1
i=l
n-1
n-1
j=l
j=l
2n 3 n2 n --- 2 6 3 O(2n33/3) operation count given in the text. This agrees with the O(2n -1 The computation of L L-lb b requires n -— 1 steps, with 2(n -— i) arithmetic operations nfir stfvn. Thfi tnta.l is per step. The total is n-l
n-l
2 ~)n -1) i=l
= 2"Lj = n 2 -
n.
j=l
The final step of back substitution requires n steps, with 2( n -— i) + 2(n + 1 operations per step, for a total of of n
n-l
L {2(n - i) + 1} = 2 L j + n = n
2
•
j=l
i=l
2n2 -— n, n, which also agrees with the The total for the two triangular solves is 2n2 the count given in in the the text. text. given 3. With 3. With
cp(x)
1 = -x· Ax 2
b . x,
Appendix C. Appendix C. Solutions Solutions to to odd-numbered odd-numbered exercises exercises
600 we have have we
1
= "2 (x + y). A(x + y) 1
h· (x + y)
1
= "2x . Ax + y . Ax + "2 Y . Ay - b . x - b . Y =
+ (Ax -
b) . y
1
+ "2 Y . Ay.
The fact A is The fact that that A is symmetric symmetric allows allows the the simplification simplification 1
1
"2x . Ay + "2 Y . Ax
= y. Ax,
which was used above. above. We thus see see that that
+0
(1IyI\2) ,
with with V'
(b) (x,y) (x, y) == (y,x) (y, x) for all x,y. x, y. (b) for all (c) + ,8y, /3y, z) = a(x, + /?(y, for all x, y, ft. (c) (ax (ax + z) = a(x, z) z) + ,8(y, z) z) for all x, y, zz and and all all a, a,,8. These for These properties properties hold hold for
= X· Ay.
(X,y)A
The third would be for any any matrix matrix A, A, the the second second property The third property property would be true true for property obviously obviously A be be symmetric, first property A be be positive positive requires requires that that A symmetric, and and the the first property requires requires that that A definite. definite. 7. 7.
(0) (0) (a) With x xeD) = (X(D)) (a) With = (4,2), (4,2), the the negative negative gradient gradient is is -V'
The a = and so so The minimizer minimizer is is a = 5/14, 5/14, and X(l)
= (23, 23) . 7 14
(b) (23/7,23/14), the (b) At At x(1) x(1) = (23/7,23/14), the negative negative gradient gradient is is (-3/14,3/7), (-3/14,3/7), so so we we must must minimize minimize ,/, (X(l) _ r7,/, ( (1))) =.E...- a 2_ ~ a _ 529. '/' av,/, x 196 196 28
The minimizer is is aa = 5/6, 5/6, and and so The minimizer so x
(2)
= (87 2) 28"
The The desired desired solution solution is is (3,2). (3, 2).
= 0,0, the (c) With With xeD) x(0) = the CG CG algorithm algorithm produces produces (1) X(l) == x = (2.67456,2.34024), (2.67456, 2.34024),
with X(2) x^ = (3,2), (3, 2), the exact exact solution.
601 601
Appendix C. odd-numbered exercises Appendix C. Solutions Solutions to to odd-numbered exercises 9. If yy = x - x(O), x = y + x(O) =x x (0) , then x =y x (0) and and so so Ax = b
=> Ay + Ax(O) = b => Ay = b -
Ax(O).
We can therefore replace b by b -— Ax(O), Ax^ 0) , apply the CG algorithm to estimate y, and add x(O) x^ to get get the estimate estimate of x. x.
Section 10.3 10.3 Section 1. F(x) = 0). Then 1. Let the vector-valued function F be defined by F(x) = (f(x), (/(x),0).
'\7. (¢F) = cf/fVl. F
+ '\7¢. F = ¢ !f + !¢ f, vXl
VXl
so, by the divergence theorem,
inr¢~f + inr ~¢ f= inr'\7'(¢F)=lan ¢F.n=lan ¢fnl. VXl
VXl
If 0 ¢E G C8"([2), C'o0(fi), then the boundary integral vanishes, and we we obtain
r ¢~ - _ inr o¢ f
in
OXI -
OXI
•
The derivation for 0/ OX2 is exactly analogous. d/dx-2 3. A direct computation shows that
Ilf - 911L2 = ~ while
IIf -
911Hl
for all integers m,n,
= ~Jl + m 2 Jr2 + n 2 Jr2 for all m,n.
Thus the L2 L2 error is independent of m, n, n, while while the HI Hl error becomes arbitrarily oo. -+ 00. large as m, n —>
Section 10.4 Section 10.4 1. 1.
(a) Let u, Vh, u, vERn v € Rn contain the nodal values of piecewise linear functions 'Uh, Uh,Vh, respectively, so that n
'Uh
=
L
n
'Ui¢i, Vh
=
L
i=1
i=1
It follows that
n
n
i=1 j=1
=u·Mv.
Vi¢i.
602
Appendix C. Solutions Solutions to Appendix C. to odd-numbered odd-numbered exercises exercises (b) in the eigenvectors for problem (b) As As shown shown in the text, text, if if u u and and v v are are generalized generalized eigenvectors for the the problem T Ku = AMu, then then L LTTu u and and L LTv orthogonal in in the the Euclidean Euclidean norm. norm. But But Ku v are are orthogonal then then o = L T U • LTV = U . LLTV = U . M v = (Uh' Vh). 2 Thus and Vh orthogonal in in the the L L2 norm. norm. Thus Uh UH and VH are are orthogonal
3. 3.
(a) same method 10.5, we find that smallest eigenthe same method as as in in Example Example 10.5, we find that the the smallest eigen(a) Using Using the the pentagon pentagon is is approximately approximately 18.9. estimates obtained obtained on on five five value on the 18.9. (The (The estimates value on successively finer 19.5574, 19.0818, 19.0818, 18.9601, 18.9601, 18.9294. 18.9294. The The successively finer meshes meshes were were 21.2794, 21.2794, 19.5574, coarsest mesh is is shown in Figure Figure C.47.) C.47.) coarsest mesh shown in (b) It would would be be reasonable reasonable to to hypothesize hypothesize that that (b) It A(n) I
-t Al ,
where Ai Al = ~ 18.2 is the the smallest eigenvalue on on the the disk of area area 1. (The value value of of where 18.2 is smallest eigenvalue disk of 1. (The Ai found near of Section Al was was found near the the end end of Section 8.3.) 8.3.)
(c) Repeating calculation again of area area 1, 1, we find that (c) Repeating the the calculation again for for aa regular regular decagon decagon of we find that the smallest smallest eigevalue eigevalue is is approximately approximately 18.3. values obtained obtained on the 18.3. (The (The values on four four successively meshes were were 19.0328, 18.2755.) successively finer finer meshes 19.0328, 18.5055, 18.5055, 18.3268, 18.3268, 18.2755.) 0.8.------..----.......-----..-----, 0.6 0.4 0.2 xN
0 -0.2 -0.4 -0.6 _0.8l...-----L------'-----"-----~
-0.5
0
x
0.5
1
Figure The coarsest Figure C.47. C.4T. The coarsest mesh mesh from from Exercise Exercise 10-4-3. 10.4.3.
Bibliography Bibliography [1] Antman. The The equations for large vibrations of [1] Stuart Stuart S. S. Antman. equations for large vibrations of strings. strings. American American Mathematical Monthly, 87:359-370, 1980. Mathematical 1980. [2] Kendall E. Atkinson. An An Introduction to Numerical Analysis. John Wiley & Sons, New York, York, 2nd 2nd edition, Sons, New edition, 1989. 1989.
[3] Eric Becker, Graham Carey, and Tinsley Oden. Elements. [3] Eric B. B. Becker, Graham F. F. Carey, and J. J. Tinsley Oden. Finite Finite Elements. Prentice-Hall, Englewood Englewood Cliffs, Prentice-Hall, Cliffs, 1981. 1981. [4] Elementary Boundary Boundary Value Problems. Problems. Marcel Dekker, New York, [4] T. A. Bick. Elementary 1993. 1993.
[5] William Boyce and and Richard DiPrima. Elementary Equations [5] William E. E. Boyce Richard C. C. DiPrima. Elementary Differential Differential Equations and Value Problems. Sons, New 7th edition, edition, John Wiley Wiley & Sons, New York, York, 7th and Boundary Boundary Value Problems. John 2000. [6] Susanne C. Brenner and and L. L. Ridgway Mathematical Theory [6] Susanne C. Brenner Ridgway Scott. Scott. The The Mathematical Theory of of Finite Finite Element Methods. Springer-Verlag, New York, 1994. Element [7] W. L. Briggs and and V. V. E. Henson. The DFT: An An Owner's Owner's Manual Manual for for the the Discrete Discrete [7] W. L. Briggs E. Henson. The DFT: Fourier Transform. Society for Industrial and Applied Mathematics, Mathematics, PhiladelPhiladelFourier Transform. Society for Industrial and Applied phia,1995. phia, 1995. [8] E. O. Fast Fourier Fourier Transform Its Applications. Applications. Prentice[8] E. O. Brigham. Brigham. The The Fast Transform and and Its PrenticeHall, Englewood Cliffs, 1988. 1988.
[9] Michael Celia and William G. Differential [9] Michael A. A. Celia and William G. Gray. Gray. Numerical Numerical Methods Methods for for Differential for Scientific Scientific and Engineering Applications. Equations: Fundamental Concepts Concepts for Prentice-Hall, Englewood Cliffs, 1992. Prentice-Hall, [10] Ruel Churchill and and James Ward Brown. Value [10] Ruel V. V. Churchill James Ward Brown. Fourier Fourier Series Series and and Boundary Boundary Value Problems. McGraw-Hill, McGraw-Hill, New York, 5th edition, 1993. Problems. 1993. [11] Philippe G. Element Method Method for Elliptic Problems. Problems. North [11] Philippe G. Ciarlet. Ciarlet. The The Finite Element North Holland, 1978. Holland, Amsterdam, Amsterdam, 1978. [12] J. W. Cooley and J. W. Tukey. An algorithm algorithm for the machine computation computation of of Fourier series. Mathematics of Computation, 19:297-301,1965. complex Fourier 19:297-301, 1965. 603
604
Bibliography
[13] Applied Numerical Linear Linear Algebra. Society [13] James W. W. Demmel. Demmel. Applied Society for for Industrial Industrial and Applied Applied Mathematics, Philadelphia, 1997. and Mathematics, Philadelphia, 1997.
[14] G. G. B. Princeton Uni[14] B. Folland. Folland. Introduction Introduction to to Partial Partial Differential Differential Equations. Equations. Princeton University Press, Princeton, 2nd edition, 1995. versity Press, Princeton, 2nd edition, 1995. [15] Gerald Folland. Fourier Pacific [15] Gerald B. B. Folland. Fourier Analysis Analysis and and Its Its Applications. Applications. Brooks/Cole, Brooks/Cole, Pacific Grove, 1992. Grove, 1992. [16] George E. Forsythe, Forsythe, Michael Michael A. A. Malcolm, Malcolm, and Cleve B. B. Moler. Moler. Computer Meth[16] George and Cleve ods for for Mathematical Computations. Prentice-Hall, Prentice-Hall, Englewood Englewood Cliffs, Cliffs, 1977. 1977. [17] Philip Gillett. Analytic Geometry. D. C. Heath, Lexington, [17] Philip Gillett. Calculus Calculus and Analytic Geometry. D. C. Heath, Lexington, 1984. 1984.
[18] Jack Goldberg and Potter. Differential Ap[18] Jack L. L. Goldberg and Merle Merle Potter. Differential Equations: Equations: A A Systems Systems Approach. Prentice-Hall, Upper Upper Saddle Saddle River, 1997. proach. Prentice-Hall, River, 1997. [19] Gene H. H. Golub Golub and F. Van Van Loan. Loan. Matrix Matrix Computations. Johns Hopkins [19] Gene and Charles Charles F. Computations. Johns Hopkins University Press, Press, Baltimore, University Baltimore, 3rd 3rd edition, edition, 1996. 1996. [20] Advanced Engineering Mathematics. Prentice-Hall, [20] Michael Greenberg. Greenberg. Advanced Prentice-Hall, Upper Upper Saddle Saddle River, 2nd edition, edition, 1998. 1998.
[21] M. E. Gurtin. Gurtin. An Continuum Mechanics. [21] M. E. An Introduction Introduction to to Continuum Mechanics. Academic Academic Press, Press, New York, York, 1981. New 1981. [22] Richard Haberman. Haberman. Elementary Elementary Applied Applied Partial Differential Differential Equations: With [22] Richard Boundary Value Problems. Problems. Prentice-Hall, Prentice-Hall, Upper Fourier Series and Boundary Upper Saddle Saddle River, 1998. River, 1998. [23] William W. Hager. Applied Applied Numerical Linear Algebra. Prentice-Hall, Prentice-Hall, Engle[23] William W. Hager. Englewood Cliffs, Cliffs, 1988. wood 1988. [24] J. Ray Hanna and and John John H. H. Rowland. Rowland. Fourier Series, Transforms, [24] J. Ray Hanna Transforms, and BoundProblems. John John Wiley New York, 2nd edition, edition, 1990. ary Value Problems. Wiley & & Sons, Sons, New York, 2nd 1990. [25] T. Heideman, Heideman, D. D. H. H. Johnson, and C. Burrus. Gauss Gauss and and the the history of [25] M. M. T. Johnson, and C. S. S. Burrus. history of the fast fast Fourier Fourier transform. transform. Archive for History of the of Exact Science, 34:265-277, 34:265-277, 1985. 1985. [26] Morris Hirsch Hirsch and and Stephen Differential Equations, Dynamical Systems, [26] Morris Stephen Smale. Smale. Differential Systems, and Linear Algebra. Academic Press, New New York, and Academic Press, York, 1974. 1974. [27] Johnson. Numerical Solution of of Partial Differential Differential Equations by the [27] Claes Claes Johnson. the Finite Cambridge University Press, Cambridge, 1987. University Press, Cambridge, 1987. Finite Element Element Method. Method. Cambridge [28] W. Kammler. Kammler. A A First First Course in Fourier Fourier Analysis. Analysis. Prentice-Hall, Prentice-Hall, Upper [28] David David W. Course in Upper Saddle River, Saddle River, 2000. 2000. [29] Wilfred Kaplan. Kaplan. Advanced Advanced Calculus. Addison-Wesley, Reading, Reading, 4th 4th edition, [29] Wilfred Calculus. Addison-Wesley, edition, 1994. 1994.
Bibliography
605
[30] David David Kincaid Kincaid and and Ward Ward Cheney. Cheney. Numerical Brooks/Cole, Pacific [30] Numerical Analysis. Analysis. Brooks/Cole, Pacific Grove, 2nd 2nd edition, edition, 1996. 1996. Grove, [31] Patrick Patrick M. M. Knupp Knupp and and Stanly Stanly Steinberg. Steinberg. The The Fundamentals of Grid Grid Genera[31] Fundamentals of Generation. CRC CRC Press, Press, Boca Boca Raton, Raton, 1993. 1993. tion. [32] Young Young W. W. Kwon Kwon and and Hyochoong Hyochoong Bang. The Finite Using [32] Bang. The Finite Element Element Method Method Using MATLAB. CRC Press, Press, Boca Boca Raton, Raton, 1997. 1997. MATLAB. CRC [33] J. J. D. Lambert. Numerical Ordinary Differential Systems. John John [33] D. Lambert. Numerical Methods Methods for for Ordinary Differential Systems. Wiley & & Sons, Sons, Chichester, Chichester, 1991. 1991. Wiley [34] David David C. C. Lay. Lay. Linear and Its Its Applications. Addison Wesley Wesley Longman, Longman, [34] Linear Algebra Algebra and Applications. Addison Reading, 2nd (updated) edition, edition, 2000. Reading, 2nd (updated) 2000. [35] David David R. R. Lide, editor. CRC CRC Handbook of Chemistry Chemistry and and Physics. CRC Press, Press, [35] Lide, editor. Handbook of Physics. CRC Boca Boca Raton, Raton, 1998. 1998. [36] L. A. Applied to Problems in [36] C. C. C. C. Lin Lin and and L. A. Segel. Segel. Mathematics Mathematics Applied to Deterministic Deterministic Problems in the Natural Sciences. Society Society for for Industrial Industrial and and Applied Applied Mathematics, Mathematics, PhiladelPhiladelthe Natural Sciences. phia, 1988. 1988.
[37] Jerrold Jerrold E. Marsden and and Anthony J. Tromba. Tromba. Vector Vector Calculus. Calculus. W. H. Freeman, Freeman, [37] E. Marsden Anthony J. W. H. New York, 4th edition, 1996. 1996. New York, 4th edition, [38] R. M. M. Mattheij and J. Molenaar. Ordinary Differential Differential Equations in Theory Theory and Practice. Practice. John John Wiley & Sons Sons Ltd., Ltd., Chichester, Chichester, 1996. 1996. Reprinted Reprinted by by the the Wiley & and Society Industrial and 2002. Society for for Industrial and Applied Applied Mathematics, Mathematics, Philadelphia, Philadelphia, 2002.
[39] Robert Robert C. C. McOwen. McOwen. Partial Methods and and Applications. Applications. [39] Partial Differential Differential Equations: Equations: Methods Prentice-Hall, Upper Saddle River, 1996. Prentice-Hall, Upper Saddle River, 1996. [40] Carl Carl D. D. Meyer. Meyer. Matrix Matrix Analysis and Applied Linear Algebra. Society for for InIn[40] Analysis and Applied Linear Algebra. Society dustrial 2000. dustrial and and Applied Applied Mathematics, Mathematics, Philadelphia, Philadelphia, 2000. [41] Partial Differential Equations. Springer-Verlag, York, [41] Jeffrey Jeffrey Rauch. Rauch. Partial Differential Equations. Springer-Verlag, New New York, 1991. 1991.
[42] L. L. F. Shampine and and M. M. W. W. Reichelt. MATLAB ODE suite. SIAM Journal [42] F. Shampine Reichelt. The The MATLAB ODE suite. SIAM Journal on Scientific Computing, 18:1-22, 18:1-22, 1997. 1997. on Scientific Computing, [43] Lawrence Lawrence E. E. Shampine. Shampine. Numerical Numerical Solutions Solutions of of Ordinary Ordinary Differential [43] Differential EquaEquations. Chapman Chapman & & Hall, Hall, New New York, 1994. tions. York, 1994. [44] Gilbert Gilbert Strang. Strang. Linear and Its Harcourt, Brace, Brace, JoJo[44] Linear Algebra Algebra and Its Applications. Applications. Harcourt, vanovich, San San Diego, Diego, 3rd 3rd edition, edition, 1988. 1988. vanovich, [45] Gilbert Gilbert Strang Strang and and George George J. J. Fix. of the the Finite Method. [45] Fix. An An Analysis Analysis of Finite Element Element Method. Wellesley-Cambridge Press, Wellesley, 1988. 1988. Wellesley-Cambridge Press, Wellesley, [46] A. Strauss. Partial Differential Differential Equations: Equations: An An Introduction. Introduction. John [46] Walter Walter A. Strauss. Partial John Wiley Wiley Sons, New New York, York, 1992. 1992. & Sons,
606
Bibliography
[47] John C. C. Strikwerda. Finite Difference Difference Schemes Schemes and Partial Differential Differential EquaEqua[47] John Strikwerda. Finite and Partial tions. & Hall, Hall, New New York, York, 1989. tions. Chapman Chapman & 1989.
[48] Paul Swarztrauber. Fftpack, 1985. [48] Paul N. N. Swarztrauber. Fftpack, 1985. [49] Lloyd [49] Lloyd N. N. Trefethen Trefethen and and David David Bau. Bau. Numerical Numerical Linear Linear Algebra. Algebra. Society Society for for Industrial and Applied Mathematics, Mathematics, Philadelphia, 1997. 1997. [50] Charles Van Van Loan. Loan. Computational Frameworks for the Fast Fourier Transform. [50] Charles Computational Frameworks Transform. Society Mathematics, Philadelphia, 1992. Society for Industrial and Applied Mathematics, [51] Boca Raton, 2nd edition, [51] J. S. Walker. Fast Fourier Transform. Transform. CRC CRC Press, Boca edition, 1996. 1996. [52] H. F. F. Weinberger. Weinberger. A First Course Differential Equations with Com[52] H. Course in Partial Differential Blaisdell, New New York, York, 1965. plex Variables and Transform Methods. Blaisdell, plex Variables and Transform Methods. 1965.
[53] Trigonometric Series. Cam[53] Antoni Antoni Zygmund. Zygmund. Trigonometric Series. Cambridge Cambridge University University Press, Press, Cambridge, 2nd edition, 1959.
Index Index aluminum, 15, 26, 163, 163, 217, 217, 276 aluminum, 15,26, 276 angle between two angle between two vectors, vectors, 55 55 area 329 area integral, integral, 329 automatic step control, automatic step control, 111 111
boundary conditions, 134 boundary conditions, 134 Dirichlet, Dirichlet, 13, 13, 34, 34, 144, 144, 168, 168, 169, 169, 197, 211, 197, 211, 280, 292, 332, 335, 339 essential, 266, 313, 388 essential, 266, 313, 388 for aa vibrating vibrating string, string, 30 30 for for the diffusion equation, equation, 20 for the diffusion 20 for the hanging bar, for the hanging bar, 24 24 for the heat heat equation, equation, 13 for the 13 homogeneous, 14, 14, 168 homogeneous, 168 inhomogeneous, 164, 169, 197, inhomogeneous, 14, 14,164,169,197, 222, 243, 273, 273, 298, 222, 243, 298, 391 391 inhomogeneous Dirichlet, 321 321 inhomogeneous Dirichlet, mixed, 13, 13,150,161, 301, 313, 313, mixed, 150, 161, 283, 283, 301, 333, 348, 388 333,348,388 natural, 266, 313, 313, 388 388 natural, 266, Neumann, 13, 27, 34, Neumann, 13, 27, 34, 152, 152, 231, 231, 273, 275, 282, 332, 335, 349, 273,275,282,332,335,349, 388 periodic, 153, 153, 246 periodic, 246 Robin, 143 Robin, 143 time dependent, 223 223 time dependent, boundary 14, 144 144 boundary value value problem, problem, 14, on aa rectangular rectangular domain, domain, 345 on 345 BVP, 14 14 BVP,
back substitution, 474 back substitution, 474 backward Euler method, 118, 263, 310 backward Euler method, 118,263,310 banded matrix, matrix, 386, 475 banded 386, 475 bar bar aluminum, 217, 276 276 aluminum, 217, chromium, 278 chromium, 278 245 circular, circular, 245 copper, 228, 243, 244, 264, 265, 278 elastic, 21, 21, 173 elastic, 173 heat equation and, and, 333 heat equation 333 heat flow flow in, in, 99 heat heterogeneous, heterogeneous, 276 276 iron, 214, 214, 217, 222, 228, 230, 236, 244, 264, 281, 281, 323 steel, 302 steel, 302 basis, basis, 50 50 orthogonal, 57 orthogonal, 55, 55, 57 orthonormal, 65 orthonormal, 57, 57, 65 Bessel function Bessel function of order order n, of n, 366 366 properties, 366 366 properties, Bessel's equation Bessel's equation of order order n, n, 364 364 of Bessel's inequality, 428 best approximation, 61, 61, 147,156,181, 147,156,181, best approximation, 182, 343 343 182, 491 in the energy norm, 491 in the energy norm, bilinear form, 180, 180, 270 bilinear form, 270 symmetric, 181 181 symmetric, body force, 23 body force, 23
C[a, b], 33, 33, 58 C[a,_b], 58 336 eC 22(ft), (n),336
ek[a, b], 33 Ck[a,b], 33 00 Co (ft), 489 489 e~(n), C£(n), 336, eben), 336, 377 377 e1 (n) , 338 338 C&(fi), carbon monoxide, monoxide, 220 carbon 220 Cauchy sequence, sequence, 451 451 Cauchy Celsius, 19 19 Celsius, chain rule, rule, 360 chain 360
607
608 change of of variables variables change in multiple integral, 471 in aa multiple integral, 471 characteristic characteristic polynomial polynomial of aa second-order second-order ODE, ODE, 82 of 82 of 69 of aa square square matrix, matrix, 69 characteristic characteristic root root of aa second-order second-order ODE, ODE, 82 of 82 Cholesky factorization, factorization, 474, 474, 496 Cholesky 496 chromium, 278 chromium, 278 co-domain, 32 co-domain, 32 coefficients coefficients discontinuous, 264 discontinuous, 264 compatibility condition, condition, 240, 240, 243, 243, 250, compatibility 250, 276,350 276, 350 for aa singular singular linear linear system, system, 45 for 45 complete complete normed vector vector space, space, 452 normed 452 complete 449 complete orthogonal orthogonal sequence, sequence, 449 completeness completeness of HI, 490 ^,490 2 of L L2, 453 , complex numbers, numbers, 394 complex 394 concentration concentration time evolution evolution of, of, 221 time 221 concentration gradient, gradient, 17 concentration 17 conditioning conditioning of matrix, 481, 486 of aa matrix, 481, 486 conjugate 485 conjugate directions, directions, 485 conjugate conjugate gradients gradients algorithm, 485 algorithm, 485 convergence, 486 convergence, 486 conservation conservation of of energy, energy, 173 173 continuously continuously differentiable differentiable function, function, 33 33 convergence convergence mean-square, 149, 419 mean-square, 149, 419 pointwise, 419 419 pointwise, uniform, uniform, 420 420 convolution, 424 convolution, 424 periodic, 425 425 periodic, copper, 278 copper, 228, 228, 243, 243, 244, 244, 265, 265, 278 d'Alembert's solution solution to the wave equad'Alembert's to the wave equation, 288 tion, 288 data data structure structure for describing describing aa triangulation, triangulation, 467 for 467 DCT, 414 DCT, 414
Index delta 318 delta function, function, 126, 126, 205, 205, 318 sifting property, 126 sifting property, 126 delta 126 delta sequence, sequence, 126 dense 186 dense matrix, matrix, 186 density, density, 10, 10, 330 330 descent 479 descent direction, direction, 479 determinant, 69 determinant, 69 DFT, 404 DFT, 404 differential equation, equation, 1 differential 1 autonomous, 109 autonomous, 109 constant coefficient, coefficient, 4, 4, 82, 82, 91 91 constant converting to to aa first-order system, converting first-order system, 79 79 first-order linear, linear, 87 first-order 87 homogeneous, 3, 3, 202 homogeneous, 202 inhomogeneous, 3, 96 inhomogeneous, 96 linear, 2, 2, 91 91 linear, linear system, system, 260 linear 260 nonconstant nonconstant coefficient, coefficient, 44 nonlinear, 33 nonlinear, order, 22 order, ordinary, 1, 1, 79, 79, 82, 82, 213, 213, 260 ordinary, 260 partial, 1 partial, 1 right-hand side, side, 44 right-hand scalar, 55 scalar, system, 5, 5, 91, 91, 108 108 system, differential differential operator operator symmetric, 137 symmetric, 137 differentiating an an integral, integral, 11 11 differentiating diffusion, 16 16 diffusion, diffusion diffusion coefficient, coefficient, 18 18 diffusion equation, equation, 18 18 diffusion inhomogeneous, 220 inhomogeneous, 220 dimension, 50 dimension, 50 Dirac delta delta function, function, 126, 126, 205, 205, 318 Dirac 318 Dirichlet 13 Dirichlet condition, condition, 13 Dirichlet 423 Dirichlet kernel, kernel, 423 discrete 414 discrete cosine cosine transform, transform, 414 discrete Fourier Fourier transform, discrete transform, 404 404 discrete sine sine transform, transform, 410 discrete 410 and 411 and the the FFT, FFT, 411 disk disk Fourier series series on on a, a, 359, 359, 372 372 Fourier displacement 21 displacement function, function, 21 divergence divergence operator, 329 operator, 329
609
Index Index 330 theorem, 330 domain domain 31 of aa function, function, 31 of domain of dependence, 289 domain domain of of influence, influence, 290 290 domain dot product, 45, 55, 71 dot DST,410 DST, 410 eigenfunction, 68, 68, 145, 145, 494 494 eigenfunction, complex-valued, 394 of of aa differential differential operator, operator, 139 139 eigenpairs on on aa disk, disk, 369 369 145 under Dirichlet conditions, 145 under mixed mixed boundary boundary conditions, conditions, under 151, 153 153 151, 233 under Neumann Neumann conditions, conditions, 233 under under periodic periodic boundary boundary condicondiunder tions, 247 247 tions, eigenspace, 70 eigenspace, eigenvalue, 68, 116, 116, 494 of aa differential differential operator, operator, 139 139 of 139 of a symmetric matrix, 139 eigenvalue problem general, 455 generalized, 495 eigenvector, 68 eigenvector, 68 of a symmetric matrix, 139 139 of a symmetric matrix, elastic 21 bar, 21 bar, elliptic elliptic regularity, 492 energy energy inner inner product, product, 182,379 182, 379 energy 182 energy norm, norm, 182 Euclidean Euclidean n-space complex, 395 Euler's Euler's formula, formula, 83, 83, 394 Euler's Euler's method, method, 117, 117, 261, 261, 310 backward, 310 backward, 118, 118, 263, 263, 310 improved, 104 even even extension, extension, 418 418 even even function, function, 415 415 and the the full full Fourier Fourier series, series, 417 and 417 existence, 238 existence, 238 38 of of solutions solutions to to aa linear linear system, system, 38 explicit method, 118
extension extension even, even, 418 418 odd, odd, 417 417 periodic, 425 periodic, 425 fast fast Fourier Fourier transform, transform, 393, 393, 407 407 FFT, FFT, 393, 393, 407 407 Fick's Fick's law, law, 17 17 fill-in, 477 fill-in, 477 finite finite element element method, method, 77, 77, 167, 167, 173 173 for for eigenvalue eigenvalue problems, problems, 495 495 for for the the heat heat equation, equation, 256 256 for for the the wave wave equation, equation, 306 306 Fourier Fourier coefficients, coefficients, 149 149 complex, complex, 397 397 rate rate of of decay, decay, 436 436 sine, sine, 149 149 Fourier 77, 149, 149, 155 155 Fourier series, series, 77, method method of, of, 166 166 complex, 401 complex, 397, 397, 401 double double sine sine series, series, 343 343 for for the the wave wave equation, equation, 291 291 full, full, 249, 249, 252, 252, 398 398 in in three three dimensions, dimensions, 355 355 on aa rectangular rectangular domain, on domain, 339 339 pointwise convergence, 429 pointwise convergence, 429 sine, 149, 149, 211 211 sine, Fourier's law, 331 331 Fourier's law, Fourier's of heat heat conduction, conduction, 12 12 Fourier's law law of Fredholm Fredholm alternative, alternative, 45, 45, 241 241 free free nodes, nodes, 379 379 function, 31, 35 35 function, 31, function space, 33 33 function space, fundamental frequency, 497 fundamental frequency, 497 of aa circular circular drum, drum, 375 of 375 of aa vibrating vibrating string, string, 294 of 294 fundamental theorem theorem of of calculus, calculus, 11, 11, fundamental 23, 101, 101, 327, 327, 330, 330, 338 338 23, Galerkin method, method, 173, 173, 180, 180, 193, 193, 258, 258, Galerkin 269, 275, 307, 378 269,275,307,378 Gaussian elimination, elimination, 43, 43, 77, 77, 196 Gaussian 196 for aa banded banded matrix, matrix, 476 for 476 operation count, count, 53,474,486 53, 474, 486 operation pseudo-code, 474 pseudo-code, 474
610 610
general general solution solution of 286 of the the wave wave equation, equation, 286 generalized 495 generalized eigenvalue eigenvalue problem, problem, 495 generalized 205 generalized function, function, 126, 126, 205 Gibbs's phenomenon, 148, Gibbs's phenomenon, 148, 344, 344, 435, 435, 443 gold,250 gold, 250 183,457 Gram-Schmidt procedure, 74, Gram-Schmidt procedure, 74,183, 457 27 gravitational gravitational constant, constant, 27 gravity, 27 gravity, 27 Green's 377 Green's first first identity, identity, 337, 337, 339, 339, 377 Green's 123 Green's function, function, 77, 77, 123 causal,124 causal, 124 for 203 for aa BVP, BVP, 203 for 127 for aa PDE, PDE, 127 for the heat 279 for the heat equation, equation, 279 grid, 188 grid, 101, 101, 188 irregular, 111 irregular, 111 guitar, 296, 318 guitar, 296, 318 HI, 490 Hl,m HJ,490 #<J,490 heat 19 heat capacity, capacity, 10, 10, 19 heat 275 heat equation, equation, 9, 9, 12, 12, 245, 245, 275 and finite elements, 257 and finite elements, 257 in 333 in aa bar, bar, 333 in 332 in three three dimensions, dimensions, 332 in 334 in two two dimensions, dimensions, 334 inhomogeneous, inhomogeneous, 13 13 weak form, 257 weak form, 257 heat flow, 99 heat flow, steady-state, 14 steady-state, 14 heat flux, 330 heat flux, 11, 11, 12, 12, 330 homogeneous homogeneous versus 13 versus heterogeneous, heterogeneous, 13 Hooke's 22 Hooke's law, law, 22 Hookean, 22 Hookean,22
IBVP, 14 IBVP, 14 implicit method, 118 118 implicit method, initial 246, 258 258 initial condition, condition, 14, 14, 80, 80, 246, for the wave wave equation, 24 for the equation, 24 initial initial value value problem problem for 285 for the the wave wave equation, equation, 285 initial-boundary initial-boundary value value problem, problem, 14,274 14, 274 for wave equation, 291 for the the wave equation, 291
Index Index
inner inner product, product, 56, 56, 59, 59, 181 181 complex, 395 complex, 395 2 complex L2, complex L , 396 energy, 182 energy, 182 inner product space, 56 inner product space, 56 integral integral area, 329 area, 329 iterated, 329 iterated, 329 line, 329 line, 329 surface, 329 surface, 329 volume, 328 volume, 328 integrating an ODE, 102 102 integrating an ODE, integrating 87 integrating factor, factor, 87 integration by parts, integration by parts, 138, 138, 178, 178, 307, 307, 336,489 336, 489 interpolant interpolant 492 piecewise piecewise linear, linear, 492 inverse inverse of 207 of aa differential differential operator, operator, 207 inverse 404 inverse discrete discrete Fourier Fourier transform, transform, 404 iron, 214, 217, iron, 19, 19, 214, 217, 222, 222, 228, 228, 230, 230, 236, 236, 244, 459 244, 260, 260, 264, 264, 281, 281, 323, 323, 459 iterated integral, 329 iterated integral, 329 iterative iterative method method for 478 for solving solving aa linear linear system, system, 478 Jacobian 471 Jacobian matrix, matrix, 471 jump discontinuity, 427 jump discontinuity, 427
Kelvin, 19 19 Kelvin, kinetic energy, 174 kinetic energy, 174 L L22 ,,445 445 L22 inner 60 L inner product, product, 59, 59, 60 Laplace's equation, 336, 336, 352 Laplace's equation, 352 Laplacian, 332 Laplacian, 332 in polar coordinates, 362 in polar coordinates, 362 lead,255 lead, 255 Lebesgue Lebesgue integral, 446 integral, 446 measure, 446 measure, 446 line 329 line integral, integral, 329 line 480 line search, search, 480 50 linear linear combination, combination, 50 linear 309 linear interpolant, interpolant, 309
611 611
Index
linear operator, 31, 132 132 linear operator, 31, definition, 35 definition, 35 linear operator equation, 36 linear operator equation, 31, 31, 36 linear linear system system 131 algebraic, algebraic, 31, 31, 131 linearly 52 linearly independent, independent, 52 load vector, load vector, 183 183 of, 467 467 computation of, computation for aa two-dimensional two-dimensional problem, problem, 378 378 for Lotka-Volterra predator-prey predator-prey model, model, Lotka-Volterra 108 108 LU factorization, factorization, 474 474 LU Maple, 147 Maple, 147 mapping, 31 31 mapping, mass matrix, matrix, 258, 258, 265, 265, 275, 275, 308, 308, 495 495 mass Mathematica, 147 147 Mathematica, MATLAB, 147 147 MATLAB, matrix, 31 matrix, 31 386,475 banded, 386, 475 dense, 186 dense, 186 Gram, 62 62 Gram, identity, 46 identity, 46 46 inverse, inverse, 46 invertible, 46 invertible, 46 mass, 308, 495 mass, 308, 495 53 nonsingular, 46, nonsingular, 46, 53 singular, 270 singular, 270 sparse, sparse, 173, 173, 186, 186, 189, 189, 386, 473 473 stiffness, stiffness, 308, 308, 495 495 272 symmetric, 71, 72, 72, 139, symmetric, 71, 139, 272 tridiagonal, 272 tridiagonal, 188, 188, 192, 192, 272 mean value value theorem, theorem, 431 431 mean mean-square, 60 60 mean-square, mean-square convergence, mean-square convergence, 149, 149, 419 of Fourier series, of Fourier series, 448 448 measurable measurable function, function, 446 set, 446 set, 446 mesh, 188 188 mesh, method of method of lines lines for the the heat heat equation, equation, 260 260 for middle C, 305 middle C, 295, 295, 305 modulus modulus 22 of of elasticity, elasticity, 22 Young's, 22
multiplicity of of eigenvalues, eigenvalues, 69 69 natural frequency natural frequency of aa string, 293, 318 318 of string, 293, Neumann Neumann condition, condition, 13 13 26 Newton, 26 Newton, Newton's law law of cooling Newton's of cooling and boundary conditions, 20 and boundary conditions, 20 and equation, 20 and the the heat heat equation, 20 Newton's second law 23, 29 29 Newton's second law of of motion, motion, 23, nodal values, 190 190 nodal values, nodes, 188 nodes, 188 nondimensionalization, 217 nondimensionalization, 217 59 norm, norm, 59 energy, energy, 182 182 normal derivative, derivative, 332 normal equations, equations, 62 normal normal modes modes of aa vibrating vibrating string, 293 of string, 293 null 134 null space, space, 134 of aa matrix, 42 of matrix, 42 trivial, 42 42 trivial,
odd extension, odd extension, 417 417 odd function, function, 415 odd 415 and full Fourier Fourier series, and the the full series, 417 417 ODE, ODE, 1 operator, 35 operator, 31, 31, 35 derivative, 36 differential, 36, 132 differential, 36, 132 linear, 132 linear, 132 matrix, 131 matrix, 35, 35, 131 nonlinear, 49 nonlinear, 35, 35, 49 wave, 285 wave, 285 order order of differential equation, equation, 22 of aa differential of numerical method, 103 of aa numerical method, 103 orthogonal basis, basis, 183 183 orthogonal orthogonality orthogonality of of functions, functions, 60 60 56 of of vectors, vectors, 56 partial derivative partial derivative weak, 490 490 weak, partial pivoting, 473
612 Pascal, 26 26 Pascal, PDE, PDE, 11 periodic convolution, 425 periodic extension, extension, 425 425 periodic periodic periodic function, function, 415 415 piano, 298 piecewise piece wise continuous, continuous, 427 piecewise linear approximation, 492 approximation, 492 basis function, 190, 190, 257, 257, 269 basis function, 269 function, 188, 188, 189 interpolant, interpolant, 259 piecewise polynomials, 173 piecewise smooth, smooth, 427 plate iron, iron, 459 459 pointwise convergence, 419 of complex Fourier series, 429 of aa complex Fourier series, 429 of aa Fourier series, 433 433 of Fourier cosine cosine series, of aa Fourier Fourier sine 433 of sine series, series, 433 of aa full series, 432 432 of full Fourier Fourier series, Poisson's equation, 335 Poisson's equation, 335 on aa disk, 373 on disk, 373 polar coordinates, 360 potential energy, 173 potential energy, 173 elastic, elastic, 173, 173, 174 174 external, 175 external, 175 gravitational, 175 minimal, 177 power series solution power series solution of equation, 364 of Bessel's Bessel's equation, 364 preconditioned conjugate conjugate gradients, gradients, 486 486 preconditioned pressure, 25 prime factorization and the FFT, FFT, 407 407 and the principle of virtual work, 177 product rule, 337 programming finite finite elements, 386 projection theorem, 182, 397 Pythagorean Pythagorean theorem, theorem, 55, 55, 428 428
quadrature, 102 quadrature, 102 choosing choosing aa rule, rule, 470 470 general formula, formula, 469 one-point Gauss rule, 469 one-point rule on aa triangle, 470 470 one-point
Index
over an an arbitrary arbitrary triangle, over triangle, 471 471 three-point rule rule for triangle, 470 470 three-point for aa triangle, quarter-wave cosine series, series, 153 quarter-wave sine functions, functions, 162 quarter-wave sine 162 151 quarter-wave sine quarter-wave sine series, series, 151 range range of aa function, function, 31 of 31 of linear operator, operator, 38 38 of aa linear resonance, resonance, 295, 295, 305, 305, 318, 318, 319 319 Riemann integral, integral, 446 446 Riemann Riesz Riesz representation representation theorem, theorem, 490 490 RK4, 107 RK4, 107 Runge-Kutta method, 106 Runge-Kutta-Fehlberg Runge-Kutta-Fehlberg method, method, 111 111
scalar, 32, 395 scalar, 32, 395 semidiscretization in space, space, 260 semidiscretization in 260 separation 225, 340, 340, 348 separation of of variables, variables, 225, 348 in polar coordinates, 362 in polar coordinates, 362 shifting 164, 197, 197, 222, shifting the the data, data, 164, 222, 299, 299, 321 321 sifting sifting property, property, 205 205 silver, silver, 255 255 Simpson's rule, Simpson's rule, 106 106 sink sink heat, heat, 12 12 snapshot snapshot temperature, 215 temperature, Sobolev space, 490 source heat, 12 span, span, 52 52 sparse matrix, 186, 386, sparse matrix, 186, 386, 473 473 sparsity sparsity pattern, pattern, 386, 386, 477 477 specific heat, 10, 330 temperature, 19 and temperature, spectral method, 156 156 spectral for aa BVP, for BVP, 144 144 for aa system system of of ODEs, ODEs, 96 for 96 for solving system, 167 for solving aa linear linear system, 167 speed wave, 288 of a wave, wave, 433 square wave, stability, 118 stability, of of aa time-stepping scheme, 310
613 613
Index stability 116 stability region, region, 116 stainless steel, 26 standing standing wave, wave, 294 steady-state steady-state and Neumann conditions, 237 temperature, 225 temperature, 225 steel, 302 steel, 302 steepest steepest descent algorithm, 481 algorithm, 481 direction, 481 direction, 481 stiff 260 stiff differential differential equation, equation, 117, 117, 260 stiff stiff system of ODEs, 117 stiffness stiffness 22 of of aa bar, bar, 22 stiffness stiffness matrix, 183, 191, 258, 265, 275, 275, 308, 308, 495 495 algorithm 466 algorithm for for computing, computing, 466 computation computation of, of, 465 465 for a two-dimensional problem, 378 null 271 null space, space, 271 singular, 275 singular, 270, 270, 275 strain, 22 strain, 22 string string elastic, 27, 131, 131, 160 sagging, 30 sagging, 30 strong strong form form of a BVP, 177, 267 subspace, 34 of Rn, R n , 39 superposition, 287 superposition, 287 principle of, 47, 85 support support of 382 of aa function, function, 192, 192, 382 surface integral, 329 symmetry and eigenvalues, 72 of 137 of aa differential differential operator, operator, 137 71 of of aa matrix, 71 of the the Laplacian, Laplacian, 337 of 337 temperature temperature gradient, gradient, 12 test function, function, 178, 267, 306 306 test 178, 267, thermal conductivity, 330 thermal conductivity, 12, 12, 19, 19, 330 101 time step, 101 time-stepping, 101 101 time-stepping, trace theorem, 490
transient transient behavior, 117, 118 transpose and product, 71 71 and the the dot dot product, of 45 of aa matrix, matrix, 45 trapezoidal trapezoidal rule, rule, 402 triangulation, 382 triangulation, 379, 379, 382 data 467 data structure structure for, for, 467 description 462 description of, of, 462 tridiagonal 192 tridiagonal matrix, matrix, 188, 188, 192 trigonometric interpolation, interpolation, 406 uniform convergence, convergence, 420 of a complex Fourier series, 439 of 441 of aa Fourier Fourier cosine cosine series, series, 441 of of aa Fourier Fourier sine sine series, series, 441 441 of of aa full full Fourier Fourier series, series, 441 441 of of continuous continuous functions, functions, 443 443 of cosine cosine series, series, 441 441 of uniqueness, 238 of to aa linear 42 of solutions solutions to linear system, system, 42 unit impulse, impulse, 126 unit normal vector, 328 unit normal vector, 328 unit point source, 126 variation of variation of parameters, parameters, 98 98 variational form of of a BVP, 173 vector, 31, 32 function 132 function as, as, 132 vector field, 329 vector 132 vector space, space, 132 complex, 395 definition, definition, 32 32 vibrating string, 292 vibrating string, 292 virtual work, 177 volume integral, 328
wave wave left-moving, left-moving, 288 288 right-moving, 288 right-moving, 288 wave wave equation, equation, 23, 23, 173 173 acoustic, 334 acoustic, 334 d'Alembert's solution, 288 general 286 general solution, solution, 286 homogeneous, 293 in 285 in an an infinite infinite domain, domain, 285
614 614
in three dimensions, 334 in two two dimensions, dimensions, 334 in 334 inhomogeneous, 296 on 374 on aa disk, disk, 374 on a square, 346 318 with a point source, 318 wave 285 wave operator, operator, 285 wave 296 wave speed, speed, 288, 288, 296 weak 490 weak derivative, derivative, 490 weak form weak form of a BVP, 173, 177, 266, 267 ofaBVP, 177,266, of of aa BVP in in two two or or three dimendimensions, sions, 378 of the the wave equation, 307 Young's modulus, 22
Index
APPLICATION FOR FOR COMPLIMENTARY COMPLIMENTARY STUDENT STUDENT MEMBERSHIP APPLICATION MEMBERSHIP For For buyers buyers of of Gockenbach's Gockenbach's PDEs PDEs book book
• siaiTL, 5'am...
IMIsIGldol21
SOCIETY for for INDUSTRIAL INDUSTRIAL and and APPLIED APPLIED MATHEMATICS MATHEMATICS SOCIETY
(Please print print or or type) type) (Please Initial
First
Name Name Mailing Mailing Address Address City // State State // Zip/postal Zip/postal code code City
I
Country // E-mail E-mail Address Address Country Phone Phone University/College University/College Name and and Address Address Name
Phone and and E-mail E-mail Listing Listing in in Phone Combined Membership Membership List List Combined
hereby authorize authorize my my telephone telephone number number and and e-mail e-mail address address to to be be listed listed in in the the Combined Combined Membership Membership II hereby WM, MAA, List List of of AMS, AMS, AMATYC, AMATYC, A AWM, MAA, and and SIAM. SIAM. Yes Yes _ _ No No _ _ Initial Initial _ _ _ __ Type Type of of School School check one one check check one one check
Type of of Work Work Desired Desired upon upon Graduation Graduation Type Research oQ Research Adm./Mgmt. oQ Adm.lMgmt. Teaching oQ Teaching
University oQ University oQ College College (4-year) (4-year)
oa College College (2-year) (2-year)
Salutation Salutation a Mr OMr OMs. oa Other Other_ __
a MS.
Consulting oQ Consulting Gender Gender Male oa Male Education Education (Highest (Highest degree degree attained) attained)
Other oa Other
Female 0Q Female
Institution Institution
Major Major I/ Degree Degree I/ Year Year
Primary Primary
0Q
Linear algebra algebra and and matrix matrix theory. theory. I.1. Linear
oQ
Professional Professional Interests Interests (Check (Check no no more more than than 3) 3)
0Q
Real and andcomplex complex analysis analysis 2.2. Real including approx;mation approximation theory. theory, incIud;ng integral transforms transforms (including (including integral Fourier series series and and wavelets), wavelets), Fourier integral integral equations, equations, asymptotic asymptotic methods, and and special special functions. functions. methods,
D Q 12. 12. Optimization Optimization theory theory and and mathematical programming programming mathematical including discrete discrete and and numerical numerical including optimization optimization and and linear linear and and nonlinear programming. programming. nonlinear
oQ
3. Ordinary Ordinary differential differential equations equations 3. including dynamical dynamical systems. systems. including
oQ
4. Partial Partial differential differential equations equations 4. including inverse inverse problems. problems. including
oQ
5. Discrete Discrete mathematics mathematics and and graph graph 5. theory including includingcombinatorics, combinatorics, theory combinatorial combinatorial optimization, optimization, and and networks. networks.
oQ oQ
oQ
oQ oQ
6. 6. Numerical Numericalanalysis analysis (theory). (theory).
7. Computational Computational mathematics mathematics 7. including scientific scientific computing. computing, including parallel computing, computing, and and algorithm algorithm parallel development. development. 8. Computer Computerscience science including including 8. computer architecture, architecture, computer computer computer hardware, hardware, computational computational complexity. complexity, applied applied logic, logic, database, database, symbolic computation. computation. symbolic
oQ
13. Communication theory theory including including 13. Communication information theory theory and and coding coding information theory. theory.
oQ
14. Applied Applied geometry geometry including including 14. computer-aided design design and and related related computer-aided robotics. robotics.
oQ
15. Image Image processing processing including including 15. computer computer graphics, graphics, computer computer vision, vision, related related robotics, robotics, and and tomography. tomography.
o'-'
Classical mechanics mechanics of of solids solids 16. '6- Classical including elasticity, elasticity, structures structures and and including vibrations, vibrations, and and constitutive constitutivemodels. models.
oQ
17. 17. Fluid Fluid mechanics mechanics including including turbulence, aeronautics, aeronautics, and and turbulence, multiphase flow. flow. multiphase
oQ
18. 18. Quantum Quantum physics. physics, statistical statistical mechanics, mechanics, and and relativity. relativity.
oQ
19 Geophysical Geophysical sciences sciences including including 19. reservoir modeling, modeling, seismic seismic reservoir exploration, and and petroleum petroleum exploration, engineering. engineering.
oQ
20. Atmospheric Atmospheric and and oceanographic oceanographic 20. sciences. sciences.
Applied probability probability including including 9.9. Applied stochastic processes, processes, queueing queueing stochastic theory, and and signal signal processing. processing. theory, 10.Statistics Statistics including includingdata data analysis analysis 10. and and time time series series analysis. analysis.
II. 11. Control Control and and systems systems theory theory including optimal optimal control. control. including
oQ
21. Chemical Chemical kinetics, kinetics, combustion combustion 21. theory, theory, thermodynamics, thermodynamics, and and heat heat transfer. transfer.
oQ
22. Biological Biological sciences sciences including including 22. biophysics, biomedical biomedical engineering, engineering, biophysics, and biomathematics. biomathematics. and
oQ oQ oQ
oQ
23. Environmental Environmental sciences. sciences. 23. 24. Economics. Economics. 24. 25. Social Social sciences. sciences. 25. 26. Functional Functional analysis analysis and and operator operator 26. equations, equations, and and integral integral and and functional equations. equations. functional
27. Management Management sciences sciences including including oQ 27. operations research. research. operations
oQ
28. Applied Applied mathematics mathematics education education 28. (K-12, undergraduate undergraduate curriculum, curriculum, (K-12, graduate study study and and modeling modeling graduate courses). courses).
oQ
29. Astronomy, Astronomy, planetary planetary sciences, sciences, 29. and optics. optics. and
oQ oQ
30. Simulation Simulation and and modeling. modeling. 30. 31. Materials Materials science, science, polymer polymer physics, physics, 31. and structure structure of of matter. matter. and
oQ
32. Electromagnetic Electromagnetic theory, theory, 32. semiconductors, semiconductors, and and circuit circuit analysis. analysis. oa Other Other _ _ _ _ _ _ _ _ __
Please Complete Complete Reverse Reverse Please
SIAM Complimentary Student Membership Benefits: This This is is aa I5-month membership beginning beginning October 15-month membership October of of the the current current year. year. Complimentary Complimentary student student members members will will receive receive all all issues issues of of SIAM SIAM News News (available (available in in print print only) only) and and SIAM Review Review (electronic (electronic access only). Student Student are entitled to to 30% 30% off off list price on on all all SIAM SIAM access only). are entitled list price SIAM books. books. Students may free; additional SIAM Activity Groups: Students may receive receive one one Activity Activity Group Group membership membership free; additional Activity Activity Group Group memberships are are $10.00 $10.00 each. each. memberships Control and and Systems Theory _ _ Computational Science Science & Engineering _ _ Computational & Engineering Control Systems Theory Dynamical Systems _ _ Discrete Mathematics Mathematics Discrete Geometric Design _ _ Imaging Science Science _ _ Linear Algebra _ _ Optimization _ _ Orthogonal Polynomials Polynomials and and Special Functions _ _ Orthogonal Special Functions
Geosciences Geosciences Life Sciences Life Sciences Supercomputing Supercomputing _ _
Total paid paid for for additional additional Activity Activity Groups: Groups: $ $,_ _ __ Total
SIAM Journal Subscriptions: Student Student members one each SIAM journals members may may purchase purchase one each of of not not more more than than four four SIAM journals in in print, only, at at member library of of SIAM SIAM journals, journals, print, for for their their personal personal use use only, member discount discount prices. prices. A A package package of of the the complete complete library via electronic access access only, also available. current SIAM SIAM journals found at via electronic only, is is also available. A A list list of of current journals can can be be found at http://epubs.siam.orgl. Please Please contact contact Customer Customer Service for the the current discounted prices. prices. Contact Contact information information is http://epubs.siam.org/. Service for current discounted i s listed listed of journal journal and and amount amount paid. below. Please Please list list name name of below. paid. $_-$_-$_-$_--
additional subscriptions: $,$_ _ _ __ Total paid for additional payment to SIAM: $_ _ __ Total payment SIAM: $_ All Students are required required to to complete complete the the Student Certification information: information: All Students are Student Status Status Certification CERTIFICATION CERTIFICATION NameofCollegeorUniversity Name of College or University _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
NameofDepartmentChair Name of Department Chair _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ APPLICATION FOR FOR MEMBERSHIP APPLICATION MEMBERSHIP
IIapplyformembershipinSIAM: apply for membership in SIAM: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ Signature Signature
Date Date
Please completed form for additional additional Please mail mail this this completed form (original (original only; only; photocopies photocopies will will not not be be accepted) accepted) and and your your payment payment for Activity Activity Groups Groups or or journal journal subscriptions subscriptions to: to:
SIAM SIAM
Customer Service Customer Service 3600 University University City Science Center, Center, Philadelphia, Philadelphia, PA PA 19104-2688 3600 City Science 19104-2688 For further further information, information, please please contact contact SIAM SIAM Customer Customer Service: For Service: Toll in USA USA and and Canada: 800-447-SIAM'• Worldwide: Worldwide: 215-382-9800· Fax: 215-386-7999 Toll free free in Canada: 800-447-SIAM 215-382-9800 • Fax: 215-386-7999 [email protected]·• www.siam.org [email protected]