RICHARD L. BURDEN
DOUGLAS J. FAIRES
ANNETTE M. BURDEN
TUT:Index of Algorithms
Bisection 2.1 49
Fixed-Point Iteration 2.2. 59
Newton's 2.3. 67
Secant2.4 71
False Position 2.5 73
Steffensen’s 2.6 88
Horner’s 2.7 94
Miiller’s28 97
Neville’s Iterated Interpolation 3.1 120
Newton’s Interpolatory Divided-Difference
3.2 124
Hermite Interpolation 3.3. 139
Natural Cubic Spline 3.4 147
Clamped Cubic Spline 3.5 152
Bézier Curve 3.6 167
Composite Simpson’s Rule 4.1. 205
Romberg 4.2 2/6
Adaptive Quadrature 4.3 224
Simpson’s Double Integral 4.4 243
Gaussian Double Integral 4.5 244
Gaussian Triple Integral 4.6 246
Buler’s 5.1 267
Runge-Kutta (Order Four) 5.2288
Runge-Kutta-Fehlberg 5.3. 297
‘Adams Fourth-Order Predictor-Corrector 5.4
311
‘Adams Variable Step-Size
Predictor-Corrector 5.5 318
Extrapolation 5.6 325
Runge-Kutta for Systems of Differential
Equations 5.7 333
Trapezoidal with Newton Iteration 5.8 354
Gaussian Elimination with Backward
Substitution 6.1 368
Gaussian Elimination with Partial Pivoting
62 378
Gaussian Elimination with Scaled Partial
Pivoting 6.3 380
LU Factorization 6.4 410
LDL! Factorization 6.5 422
Cholesky’s 6.6 423
Crout Factorization for Tridiagonal Linear
Systems 6.7 427
Jacobi Iterative 7.1 459
Gauss-Seidel Iterative 7.2 462
SOR7.3 473
Iterative Refinement 7.4 482
Preconditioned Conjugate Gradient 7.5
495
Padé Rational Approximation 8.1 538
Chebyshev Rational Approximation 8.2
542
Fast Fourier Transform 8.3 567
Power 9.1 587
Symmetric Power 9.2 590
Inverse Power 9.3. 594
Wielandt Deflation 9.4 598
Houscholder’s 9.5. 607
QR96 618
Newton’s for Systems 10.1 653
Broyden 10.2 661
Steepest Descent 10.3 670
Continuation 10.4 679
Linear Shooting 11.1 689
Nonlinear Shooting with Newton’s Method
11.2 696
Linear Finite-Difference 11.3 702
Nonlinear Finite-Difference 11.4 708 _
Piecewise Linear Rayleigh-Ritz 11.5 778
Cubic Spline Rayleigh-Ritz 11.6 723
Poisson Equation Finite-Diffference 12.1
738
Heat Equation Backward-Difference 12.2 +
749
Crank-Nicolson 12.3. 753
Wave Equation Finite-Difference 12.4 76]
Finite-Element 12.5 772
518
BURGlossary of Notation
C(X) Set of all functions continuous on X— 3
R Set of real numbers 3
C*(X)__ Set of all functions having n continuous derivatives on X 4
C™(X)_ Set of all functions having derivatives of all orders on X 4
0.3 A decimal in which the numeral 3 repeats indefinitely 10
Fly) Floating-point form of the real number y 17
0() Order of convergence 34
LJ Floor function, [.cJ, the greatest integer less than or equal tox 50
{ 1 Ceiling function, [x7 the smallest integer greater than or equal to.x 42
sgn(x) Sign of the number x: 1ifx>0,—Lifx <0 52
4 Forward difference 87
z Complex conjugate of the complex number z 95
(2) The Ath binomial coefficient of order m 1/5
FL] Divided difference of the function f 123
v Backward difference 127
R Set of ordered n-tuples of real numbers 261
% Local truncation error at the ith step 276
> Equation replacement 362
° Equation interchange 362
(a) Matrix with aij as the entry in the ith row and jth column 363,
x ‘Column vector or element of R" 364
[A,b] Augmented matrix 364
o A matrix with all zero entries 386
by Kronecker delta: 1ifi = j,0ifi Aj 390
In nxn identity matrix 390 [= ———
A+ Inverse matrix ofthe matix A391 Se LiVERPOOL
A’ Transpose matrix of the matrix A394 SH souN MOORES:
My —— Minor ofa matrix 400 ER
det A Determinant of the matrix A 400 Library Services:
0 ‘Vector with all zero entries 386 ‘Accession No.
Iix|| Arbitrary norm of the vector x. 438 |_
[xtl2 The / norm of the vector x 438. ‘Supplier G. l tovoice Date
|IXlloo The, norm of the vectorx 438.
||Al| Arbitrary norm of the matrix A 444 Se
|All2 The fy norm of the matrix A 445 1
Wale, ee comettemans a cx. | Seley = ls eeaer eae
p(A) The spectral radius of the matrix A 452
K(A) — The condition number of the matrix A 478
(x.y) Inner product of the n-dimensional vectors x and y 487
Tl, _Setof all polynomials of degree m or less 521
fi, Set of all monic polynomials of degree n 528
Ti Set of all trigonometric polynomials of degree n or less 546
zy Set of complex numbers 570
F Function mapping I” into R" 642
A(x) Matrix whose entries are functions form IR" into 651
J(x) Jacobian matrix 652
Vg Gradient of the function g 667
iitvisnA lsotemullNumerical Analysis
TENTH EDITION
Richard L. Burden
Youngstown University
J. Douglas Faires
Youngstown University
Annette M. Burden
Youngstown University
os CENGAGE
“© Learning
‘Australia » Brazil Mexico + Singapore + United Kingdom + United Stateso% CENGAGE
«© Learning’
Numerical Ana
Tenth Edition
Richard L. Burden, J. Douglas Faires,
Annette M. Burden
Product Director: Terence Boyle
Senior Product Team Manager: Richard Stratton
Associate Content Developer: Spencer Arrtt
Product Asslstant: Kathryn Schrumpf
‘Market Development Manager Julie Schuster
Content Project Manager: il Quinn
Senior Art Director: Lindo May
‘Manufacturing Planner: Doug Berthe
IP Analyst: Christina Cioramello
Ip Project Manager: john Sarantakis
Production Service: Cenveo Publisher Services
Compesiter: Cenveo Publisher Services
Cover Image: © ogsondrew/Shutterstck.com
Printed in the United States of America
rine Number:O1 Print Year: 2014
© 2016, 20m, 2005 Cengage Learning
WCN:or100:101
[ALL RIGHTS RESERVED. No part ofthis work covered by the copyright herein
‘may be reproduced, transmitted, stored, or used in any form or by any means
graphic, electronic, or mechanical, including but not limited to photocopying,
recording, scanning, digitizing, taping, web distribution, information networks,
orinformation storage and retrieval systems, except as permitted under Section
107 008 ofthe 1976 United States Copyright Act, without the prior written
permission of the publisher.
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support,
*¥00"354°9706
For permission to use material from this text or product,
submit all requests online at
wr cengage.com/permissions.
Further permissions questions can be emailed to
permissionrequest@cengage.com.
Library of Congress Control Number: 2014949816
ISBN: 978-1305 25366-7
Cengage Learning
20 Channel Center Street
Boston, MA 02210
USA
Cengage Learning is a leading provider of customized learning solutions with
office locations around the globe, including Singapore, the United Kingdom,
Australia, Mexico, Brazl, ang Japan, Locate your local office at
Worn cengage.com/global
Cengage Learning products are represented in Canada by Nelson Education, Ltd.
Toleamn more about Cengage Learning Solution, visit www.cengage.com.
Purchase any of our products at your local college store or at our preferred
cnline store worw.cengagebrain.com.This edition is dedicated to the memory of
J. Douglas Faires
Doug was a friend, colleague, and coauthor for over 40 years.
He will be sadly missed,vrerae ieee
ena ~Contents
Preface xi
Ez... 1 Mathematical Preliminaries and Error Analysis 1
11 Review of Calculus 2
1.2 Round-off Errors and Computer Arithmetic 14
1.3. Algorithms and Convergence 29
1.4 Numerical Software 38
EE .w 2 Solutions of Equations in One Variable 47
2.1 The Bisection Method 48
2.2. Fixed-Point Iteration 55
2.3. Newton’s Method and Its Extensions 66
24 Error Analysis for Iterative Methods 78
25 Accelerating Convergence 86
2.6 Zeros of Polynomials and Miller's Method 91
2.7 Numerical Software and Chapter Review 101
3 Interpolation and Polynomial Approximation 103
3.1 Interpolation and the Lagrange Polynomial 104
3.2 Data Approximation and Neville’s Method 115
3.3 Divided Differences 122
3.4. Hermite Interpolation 134
3.5. Cubic Spline Interpolation 142
3.6 Parametric Curves 162
3.7 Numerical Software and Chapter Review 168
4 Numerical Differentiation and Integration 171
4.1 Numerical Differentiation 172
4.2. Richardson’s Extrapolation 183
43. Elements of Numerical Integration 191
viiviii Contents
4.4 Composite Numerical Integration 202 *
4.5 Romberg Integration 211
4.6 Adaptive Quadrature Methods 219
4.7 Gaussian Quadrature 228
4.8 Multiple Integrals 235
4.9 Improper Integrals 250
4.10 Numerical Software and Chapter Review 256
Ew 5 Initial-Value Problems for Ordinary Differential
Equations 259
5.1. The Elementary Theory of Initial-Value Problems 260
52 Buler’s Method 266
5.3. Higher-Order Taylor Methods 275
5.4 Runge-Kutta Methods 282
5.5 Error Control and the Runge-Kutta-Fehlberg Method 294
5.6 Multistep Methods 302
5.7. Variable Step-Size Multistep Methods 316
5.8 Extrapolation Methods 323
5.9. Higher-Order Equations and Systems of Differential Equations 331
5.10 Stability 340
5.11. Stiff Differential Equations 349
5.12 Numerical Software 357
Er... 6 Direct Methods for Solving Linear Systems 361
6.1 Linear Systems of Equations 362
6.2 Pivoting Strategies 376
6.3 Linear Algebra and Matrix Inversion 386
64° The Determinant of a Matrix 400
6.5. Matrix Factorization 406
6.6 Special Types of Matrices 416
6.7, Numerical Software 433
Ea 7 Iterative Techniques in Matrix Algebra 437 e
7.1 Norms of Vectors and Matrices 438
7.2. Bigenvalues and Figenvectors 450
7.3. The Jacobi and Gauss-Siedel Iterative Techniques 456
7.4 Relaxation Techniques for Solving Linear Systems 469
7.5. Error Bounds and Iterative Refinement 476
7.6 The Conjugate Gradient Method 487
7.7 Numerical Software 503Contents ix
| wee 8 Approximation Theory 505
8.1 Discrete Least Squares Approximation 506
8.2 Orthogonal Polynomials and Least Squares Approximation 517
8.3. Chebyshev Polynomials and Economization of Power Series 526
84° Rational Function Approximation 535
8.5. Trigonometric Polynomial Approximation 545
8.6. Fast Fourier Transforms 555
8.7 Numerical Software 567
rr... 9 Approximating Eigenvalues 569
9.1 Linear Algebra and Bigenvalues 570
9.2. Orthogonal Matrices and Similarity Transformations 578
9.3 The Power Method 585
9.4 Householder’s Method 602
95 The QR Algorithm 610
9.6 Singular Value Decomposition 624
9.7 Numerical Software 638
Ew 10 Numerical Solutions of Nonlinear Systems of
Equations 641
10.1. Fixed Points for Functions of Several Variables 642
10.2 Newton's Method 651
10.3 Quasi-Newton Methods 659
10.4 Steepest Descent Techniques 666
10.5 Homotopy and Continuation Methods 674
10.6 Numerical Software 682
rE. 11 Boundary-Value Problems for Ordinary Differential
Equations 685
11.1 The Linear Shooting Method 686
11.2 The Shooting Method for Nonlinear Problems 693
11.3 Finite-Difference Methods for Linear Problems 700
114 Finite-Difference Methods for Nonlinear Problems 706
115 The Rayleigh-Ritz Method 712
11.6 Numerical Software 728x
Contents
Equations 731
12.1 Elliptic Partial Differential Equations 734
12.2 Parabolic Partial Differential Equations 743
12.3 Hyperbolic Partial Differential Equations 757
12.4 An Introduction to the Finite-Element Method 765
12.5 Numerical Software 779
Bibliography 781
Answers to Selected Exercises 787
Index 889Preface
Ew About the Text
This text was written for a sequence of courses on the theory and application of numerical
approximation techniques. It is designed primarily for junior-level mathematies, science,
and engineering majors who have completed at least the first year of the standard college
calculus sequence. Familiarity with the fundamentals of matrix algebra and differential
‘equations is useful, but there is sufficient introductory material on these topics so that
‘courses in these subjects are not needed as prerequisites.
Previous editions of Numerical Analysis have been used in a wide variety of situations.
In some cases, the mathematical analysis underlying the development of approximation
techniques was given more emphasis than the methods; in others, the emphasis was reversed.
‘The book has been used as a core reference for beginning graduate-level courses in engi
neering, mathematics, computer science programs, and in first-year courses in introductory
analysis offered at international universities. We have adapted the book to fit these diverse
users without compromising our original purpose:
To introduce modern approximation techniques; to explain how, why, and when they
can be expected to work; and to provide a foundation for further study of numerical
analysis and scientific computing.
“The book contains sufficient material for at least a full year of study, but we expect
many people will use the text only for a single-term course. in such a single-term course,
students learn to identify the types of problems that require numerical techniques for their
solution and see examples of the error propagation that can occur when numerical methods
are applied, They accurately approximate the solution of problems that cannot be solved
cexactly and learn typical techniques for estimating error bounds for their approximations.
“The remainder ofthe textthen serves as areference for methods that are not considered inthe
course. Fither the full-year or the single-course treatment is consistent with the philosophy
of the text.
Virtually every concept in the text is illustrated by example, and this edition contains
more than 2500 class-tested exercises ranging from elementary applications of methods
and algorithms to generalizations and extensions of the theory. In addition, the exercise
sets include numerous applied problems from diverse areas of engineering as well as from
the physical, computer, biological, economic, and social sciences. The applications, chosen
clearly and concisely, demonstrate how numerical techniques can and often must be applied
in real-life situations.
‘A number of software packages, known as Computer Algebra Systems (CAS), have
been developed to produce symbolic mathematical computations. Maple®, Mathematica®,
and MATLAB® are predominant among these in the academic environment. Student
versions of these software packages are available at reasonable prices for most common
xiPreface
computer systems. In addition, Sage, a freé open source system, is now available.
Information about this system can be found at the site
hutp://www.sagemath.org
Although there are differences among the packages, both in performance and in price,
all can perform standard algebra and calculus operations.
‘The resulls in most of our examples and exercises have been generated using problems
for which exact values can be determined because this better permits the performance of
the approximation method to be monitored. In addition, for many numerical techniques,
the error analysis requires bounding a higher ordinary or partial derivative of a function,
‘which ean be a tedious task and one that is not particularly instructive once the techniques
of calculus have been mastered. So having a symbolic computation package available
can be very useful in the study of approximation techniques because exact solutions can
often be obtained easily using symbolic computation. Derivatives can be quickly obtained
‘symbolically, and alittle insight often permits a symbolic computation to aid in the bounding
process as well
Zw Algorithms and Programs
In our first edition, we introduced a feature that at the time was innovative and somewhat
controversial. Instead of presenting our approximation techniques in a specific programming,
Janguage (FORTRAN was dominant at the time), we gave algorithms in a pseudocode that
‘would lead to a well-structured program in a variety of languages. Beginning with the
second edition, we listed programs in specific languages in the Instructor's Manual for the
book, and the number of these languages increased in subsequent editions. We now have the
programs coded and available online in most common programming languages and CAS.
‘worksheets, All of these are on the companion website for the book (see “Supplements”),
For cach algorithm, there is a program written in Fortran, Pascal, C, and Java. In
addition, we have coded the programs using Maple, Mathematica, and MATLAB. This
should ensure that a set of programs is available for most common computing systems.
Every program is ifustrated witha sample problem that is closely correlated to the text.
This permits the program to be run initially in the language of your choice to see the form.
of the input and output, The programs can then be modified for other problems by making.
minor changes. The form of the input and output are, as nearly as possible, the same in each.
of the programming systems. This permits an instructor using the programs to discuss them.
generically without regard to the particular programming system an individual student uses.
The programs are designed to run on a minimally configured computer and given
in ASCII format to permit flexibility of use. This permits them to be altered using any
editor or word processor that creates standard ASCII files. (These are also commonly ealled
“text-only” files.) Extensive README files are included with the program files so that
the peculiarities of the various programming systems can be individually addressed. The
README files are presented both in ASCII format and as PDF files. As new software is
developed, the programs will be updated and placed on the website for the book.
For most of the programming systems, the appropriate software is needed, such as
4 compiler for Pascal, Fortran, and C, or one of the computer algebra systems (Maple,
Mathematica, and MATLAB). The Java implementations are an exception. You need the
system to run the programs, but Java can be freely downloaded from various sites. The best
‘ay to obtain Java is to use a search engine to search on the name, choose a download site,
and follow the instructions for that site.Preface
Ew New for This Edition
‘The firs edition ofthis book was published more than 35 years ago, in the decade after major
advances in numerical techniques were made to reflect the new widespread availability of
computer equipment. In our revisions of the book, we have added new techniques in an
attempt to keep our treatment current, To continue this trend, we have made a number of
significant changes for this edition:
© Some of the examples in the book have been rewritten to better emphasize the problem
being solved before the solution is given. Additional steps have been added to some of
the examples to explicitly show the computations required for the first steps of iteration
processes. This gives readers a way to test and debug programs they have written for
problems similar to the examples.
‘© Chapter exercises have been split into computational, applied, and theoretical to give
the instructor more flexibility in assigning homework. In almost all of the computational
situations, the exercises have been paired in an odd-even manner. Since the odd problems
are answered in the back of the text, if even problems were assigned as homework,
students could work the odd problems and check their answers prior to doing the even
problem.
‘* Many new applied exercises have been added to the text
‘* Discussion questions have been added after each chapter section primarily for instructor
use in online courses.
‘© The last section of each chapter has been renamed and split into four subsections: Nu-
merical Software, Discussion Questions, Key Concepts, and Chapter Review. Many of
these discussion questions point the student to modern areas of research in software
development.
‘Parts of the text were reorganized to facilitate online instruction,
‘* Additional PowerPoints have been added to supplement the reading material
‘© The bibliographic material has been updated to reflect new editions of books that we
reference, New sources have been added that were not previously available
As always with our revisions, every sentence was examined to determine ifit was phrased
{na manner that best relates what we are trying to describe.
EE... Supplements
‘The authors have created a companion website containing the supplementary materials
listed below. The website located at
hups://sites google com/site/numericalanalysisiburden!
is for students and instructors. Some material on the website is for instructor use only.
Instructors can aecess protected materials by contacting the authors for the password.xiv
Preface
‘Some of the supplements can also be obtained at
https:/iwww.cengagebrain.com
by searching the ISBN.
1. Student Program Examples that contain Maple, Matlab, and Excel code for student
use in solving text problems. This is organized to parallel the text chapter by chapter.
Commands in these systems are illustrated, The commands are presented in very
short program segments to show how exercises may be solved without extensive
programming,
2. Student Lectures that contain additional insight to the chapter content. These
lectures were written primarily for the online learner but can be useful to students
taking the course in a traditional setting,
3. Student Study Guide that contains worked-out solutions to many of the problems.
The first two chapters of this guide are available on the website for the book in
PDF format so that prospective users can tell if they find it sufficiently useful
The entire guide can be obtained only from the publisher by calling Cengage
Learning Customer & Sales Support at 1-800-354-9706 or by ordering online at
hutp:/fwww.cengagebrain.com/.
4, Algorithm Programs that are complete programs written in Maple, Matlab, Math-
ematica, C, Pascal, Fortran, and Java for all the algorithms in the text, These
programs are intended for students who are more experienced with programming
languages.
5. Instructor PowerPoints in PDF format for instructor use in both traditional and
online courses. Contact authors for password.
6. Instructor's Manual that provides answers and solutions to all the exercises in
the book, Computation results in the Instructor's Manual were regenerated for
this edition using the programs on the website to ensure compatibility among the
various programming systems, Contact authors for password.
7. Instructor Sample Tests for instructor use. Contact authors for password.
8. Errata,
le Course Sugge:
ns
‘Numerical Analysis is designed to allow instructors flexibility in the choice of topics as well
as in the level of theoretical rigor and in the emphasis on applications. In line with these
aims, we provide detailed references for the results that are not demonstrated in the text
and for the applications that are used to indicate the practical importance of the methods.
‘The text references cited are those most likely to be available in college libraries and have
‘been updated to reflect recent editions. We also include quotations from original research
papers when we feel this material is accessible to our intended audience. All referenced
material has been indexed to the appropriate locations in the text, and Library of Congress
call information for reference material has been included to permit easy location if searching
for library material.
‘The following flowchart indicates chapter prerequisites. Most of the possible sequences
that can be generated from this chart have been taught by the authors at Youngstown State
UniversityPreface xv
‘The material in this edition should permit instructors to prepare an undergraduate course
{in numerical linear algebra for students who have not previously studied numerical analysis.
This could be done by covering Chapters 1, 6, 7, and 9.
| Chapter 1
|
Ghapies? | [ Chapters | [ Capers
Pag
t
Chapter 8 | [ Chapeer 4
Chapter 5
Chapter 9
{Chapter |=
aE
Chapter 12
Acknowledgments
We have been fortunate to have had many of our students and colleagues give us their
impressions of earlier editions of this book, and we take all of these comments very seriously.
‘We have tried to include all the suggestions that complement the philosophy of the book
and are extremely grateful to all those that have taken the time to contact us about ways to
improve subsequent versions.
‘We would particularly like to thank the following, whose suggestions we have used in
this and previous editions.
Douglas Carter,
John Carroll, Dublin University
Yavuz Duman, TC. Istanbul Kultur Universitesi
Neil Goldman,
Christopher Harrison,
‘Teryn Jones, Youngstown State University
Aleksandar Samardzic, University of Belgrade
Mikhail M. Shvartsman, University of St. Thomas
Dennis C, Smolarski, Santa Clara University
Dale Smith, Comcast
We would like to thank Dr. Barbara T, Faires for her cooperation in providing us with
materials that we needed to make this revision possible. Her graciousness during such a
difficult time was greatly appreciatedxvi
Preface
As has been our practice in past editions ‘of the book, we have used student help at
Youngstown State University in preparing the tenth edition. Our able assistant for this
edition was Teryn Jones who worked on the Java applets. We would like to thank Edward
R. Burden, an Electrical Engineering doctoral student at Ohio State University, who has
‘been checking all the application problems and new material in the text. We also would
like to express gratitude to our colleagues on the faculty and administration of Youngstown
State University for providing us the opportunity and facilities to complete this project.
We would like to thank some people who have made significant contributions to
the history of numerical methods. Herman H. Goldstine has written an excellent book
titled A History of Numerical Analysis from the 16th Through the 19th Century [Golds].
Another source of excellent historical mathematical knowledge is the MacTutor History of
Mathematics archive at the University of St. Andrews in Scotland. It has been created by
John J. O'Connor and Edmund F, Robertson and has the Internet address
http-/Avww- gap des st-and.ac.uk/~history/
An incredible amount of work has gone into creating the material on this site, and we have
found the information to be unfailingly accurate. Finally, thanks to all the contributors to
Wikipedia who have added their expertise to that site so that others can benefit from their
knowledge,
In closing, thanks again to those who have spent the time and effort to contact us
cover the years. It has been wonderful to hear from so many students and faculty who used
‘our book for their first exposure to the study of numerical methods. We hope this edition
‘continues this exchange and adds to the enjoyment of students studying numerical analysis.
If you have any suggestions for improving future editions of the book, we would, as always,
be grateful for your comments. We can be contacted most easily by e-mail at the addresses.
listed below.
Richard L. Burden
riburden@ysu.edu
Annette M, Burden
amburden@ysu.eduMathematical Preliminaries
and Error Analysis
Introduction
In beginning chemistry courses, we sce the ideal gas law,
PV =NRT,
which relates the pressure P, volume V. temperature T, and number of moles NV of an
“ideal” gas. In this equation, R is a constant that depends on the measurement system.
Suppose two experiments are conducted to test this law, using the same gas in each
cease, In the first experiment,
P = 1.00atm, V =0.100m°,
N =0.00420mol, R= 0.08206,
‘The ideal gas law predicts the temperature of the gas to be
PV. (1.00)(0.100)
(NR ~ (0:00420)(0.08206) = 9-15 K = 17
When we measure the temperature of the gas, however, we find that the true temperature is
1c.
We then repeat the experiment using the same values of R and NV but increase the
pressure by a factor of two and reduce the volume by the same factor. The product PV’
remains the same, so the predicted temperature is still 17°C. But now we find that the actual
temperature of the gas is 19°C.
12 CHAPTER 1 = Mathematical Preliminaries and Error Analysis
Clearly, the ideal gas law is suspect, but before concluding that the law is invalid in
this situation, we should examine the data to see whether the error could be attributed to
the experimental results. If so, we might be able to determine how much more accurate our
experimental results would need to be to ensure that an error of this magnitude does not
occur.
Analysis of the error involved in calculations isan important topic in numerical analysis,
and is introduced in Section 1.2. This particular application is considered in Exercise 26 of
that section,
This chapter contains short review of those topics from single-variable calculus
that will be needed in later chapters. A solid knowledge of calculus is essential for an
understanding of the analysis of numerical techniques, and more thorough review might
be needed for those who have been away from this subject for a while. In addition there is
an introduction to convergence, error analysis, the machine representation of numbers, and.
some techniques for categorizing and minimizing computational error.
aw 1.1 Review of Calculus
Limits and Continuity
‘The concepts of limit and continuity of a function are fundamental to the study of calculus
and form the basis for the analysis of numerical techniques.
Definition 1.1 A function f defined on a set X of real numbers has the limit Lat xo, written
lim f@)=L,
if, given any real number ¢ > 0, there exists a real number 5 > 0 such that
If@)-L)
0, there exists a positive integer NV (e) such that [xy —x| < ©
whenever n > N(6). The notation
X, Of HX as n> 00,
‘means that the sequence (,)32 converges to x .
If f is a function defined on a set X of real numbers and xo € X, then the following
statements are equivalent:
a fis continuous at xo;
by If {,}22, is any sequence in X converging to xp, then limy +50 f (tn) = f(x).
.
The functions we will consider when discussing numerical methods will be assumed to
be continuous because this is a minimal requirement for predictable behavior. Functions that
are not continuous can skip over points of interest, which can cause difficulties in attempts
to approximate a solution to a problem.
Differentiability
More sophisticated assumptions about a function generally lead to better approximation
results. For example, a function with a smooth graph will normally behave more predictably
than one with numerous jagged features. The smoothness condition relies on the concept
of the derivative.
Let f be a function defined in an open interval containing x. The function f is differen-
tiable at xp if
Gu) = lim f(x) — fo)
=m t= a5
exists. The number (x9) is called the derivative of f at.xo. A function that has a derivative
at each number in a set X is differentiable on X. .
‘The derivative of f at xo is the slope of the tangent line to the graph of f at (x9, f(x0)),
as shown in Figure 1.2.4 CHAPTER 1 =
Mathematical Preliminaries and Error Analysis
Figure 1.2
‘The tangent line has slope f(x)
Cp fo) y=fe)
Theorem 1.6 If the function f is differentiable at xp, then f is continuous at x0. .
The theorem tite to Mice ‘The next theorems are of fundamental importance in deriving methods for error esti-
Rolle (1652-1719) appeared in
1691 in a itle-known ereatise
‘mation. The proofs of these theorems and the other unreferenced results in this section can
be found in any standard calculus text,
peat eet ‘The set of all functions that have n continuous derivatives on X is denoted C"(X), and.
éalites. Role originally
criticized the calculus that was
developed by Isane Newton and
Gottried Leibniz butter
‘became one of its proponents
the set of functions that have derivatives of all orders on X is denoted C*(X). Polynomial,
rational, trigonometric, exponential, and logarithmic functions are in C*(X), where X
consists of all numbers for which the functions are defined. When X is an interval of the
real line, we will again omit the parentheses in this notation,
Theorem 1.7. (Rolle’s Theorem)
Suppose f € Cla, b] and f is differentiable on (a,b). If f(a) = f(b), then a number cin
(a, b) exists with f'(c) = 0. (See Figure 1.3.) .
Figure 13
fla) = f(b)
Theorem 1.8 (Mean Value Theorem)
If f € Cla, b] and f is differentiable on (a, 6), then a number c in (a, b) exists with (See
Figure 1.4.)
_ £0)- f@
fe HalaFigure 1.4
Theorem 1.9
Figure 1.5,
Example 1
11 ReviewofCaleulus 5
Parallel lines
Slope ’()
y= fe)
f(b) ~f@
DO
Sloy
(Extreme Value Theorem)
If f € Cla, b), then ¢1, 2 € [a,b] exist with f(cy) < f(x) < f(cr), for all x € [a,b].
In addition, if f is differentiable on (a, 6), then the numbers cy and c2 occur either at the
endpoints of [a, b] or where f” is zero. (See Figure 1.5.) .
Find the absolute minimum and absolute maximum values of
f@)=2-e 42x
oon the intervals (a) (0, 1], and (b) [1,2].
Solution We begin by differentiating f(x) to obtain
$1) =e 42.
f(x) = 0 when ~e* +2 = 0 of, equivalently, when e* = 2, Taking the natural logarithm
of both sides of the equation gives
In (e*) = In (2) or x = In (2) ~ 0.69314718056CHAPTER 1 = Mathematical Preliminaries and Error Analysis
Theorem 1.10
Theorem 1.11
Figure 1.6
(a) When the interval is (0, 1], the absolute extrema must occur at f(0), f (In (2)), or
(1). Evaluating, we have
FO) =2- 2 +20) =
f (ln (2) = 2 — e@) + 21n (2) = 2 In (2) = 1.38629436112
fl) =2—e +21) = 4—e © 128171817154.
‘Thus, the absolute minimum of f(x) on (0, 1] is f() = 1 and the absolute
maximum is f (In (2)) = 210 (2).
(b) When the interval is [1, 2}, we know that f”(x) # 0 so the absolute extrema occur
at f(1) and f @). Thus, f 2) = 2 —e? + 2(2) = 6 — e* ~ —1.3890560983. The
absolute minimum on (1, 2] is 6 — ¢? and the absolute maximum is 1
We note that
nay, LF O91 = 16 — | © 1.3890560983. .
‘The following theorem is not generally presented in a basic calculus course but is.
derived by applying Rolle’s Theorem successively to f, f’,... . and, finally, to f°).
‘This result is considered in Exercise 26.
(Goneralized Rolle’s Theorem)
Suppose f € C[a, b] isn times differentiable on (a,b). If f(x) = Oat the n + I distinct
numbers @ = Xp < xy <...