Docsity

Introduction to Numerical Analysis, Notas de estudo de Engenharia Elétrica

Pré-visualização parcial do texto

Baixe Introduction to Numerical Analysis e outras Notas de estudo em PDF para Engenharia Elétrica, somente na Docsity!

INTRODUCTION TO

NUMERICAL ANALYSIS

--------- SECOND EDITION

F. B. HILDEBRAND

Professor of Mathematics, Emeritus

Massachusetts Institute of Technology

DOVER PUBLICA TraNS, INC.

NEW YORK

CONTENTS

 - 1 Introduction Preface xi 
  • 1.1 Numerical Analysis
  • 1.2 Approximation
  • 1.3 Errors
    • 1.4 Significant Figures
    • 1.5 Determinacy of Functions. Error Control
  • 1.6 Machine Errors
  • 1.7 Random Errors
  • 1.8 Recursive Computation
  • 1.9 Mathematical Preliminaries
    • 1.10 Supplementary References - Problems
      • 2 Interpolation with Divided Differences
    • 2.1 Introduction
    • 2.2 Linear Interpolation
    • 2.3 Divided Differences
    • 2.4 Second-Degree Interpolation
    • 2.5 Newton's Fundamental Formula vi CONTENTS
    • 2.6 Error Formulas
    • 2.7 Iterated Interpolation
    • 2.8 Inverse Interpolation
    • 2.9 Supplementary References - Problems
      • 3 Lagrangian Methods
  • 3.1 Introduction
  • 3.2 Lagrange's Interpolation Formula
  • 3.3 Numerical Differentiation and Integration
  • 3.4 Uniform-spacing Interpolation
  • 3.5 Newton-Cotes Integration Formulas
  • 3.6 Composite Integration Formulas
  • 3.7 Use of Integration Formulas
  • 3.8 Richardson Extrapolation. Romberg Integration
  • 3.9 Asymptotic Behavior of Newton-Cotes Formulas
  • 3.10 Weighting Functions. Filon Integration
  • 3.12 Supplementary References ll 3.11 Differentiation Formulas llO - Problems ll - 4 Finite-Difference Interpolation
    • 4.1 Introduction
    • 4.2 Difference Notations
    • 4.3 Newton Forward- and Backward-difference Formulas
    • 4.4 Gaussian Formulas
    • 4.5 Stirling's Formula
    • 4.6 Bessel's Formula
    • 4.7 Everett's Formulas
    • 4.8 Use of Interpolation Formulas
    • 4.10 Throwback Techniques 4.9 Propagation of Inherent Errors ISO
    • 4.11 Interpolation Series
    • 4.12 Tables of Interpolation Coefficients
    • 4.13 Supplementary References - Problems - 5 Operations with Finite Differences
  • 5.1 Introduction
  • 5.2 Difference Operators CONTENTS vii
  • 5.3 Differentiation Formulas
  • 5.4 Newtonian Integration Formulas
  • 5.5 Newtonian Formulas for Repeated Integration
    • 5.6 Central-Difference Integration Formulas
  • 5.7 Subtabulation
  • 5.8 Summation and Integration. The Euler-Maclaurin Sum Formula
    • 5.9 Approximate Summation
    • 5.10 Error Terms in Integration Formulas
    • 5.11 Other Representations of Error Terms
    • 5.12 Supplementary References - Problems - 6 Numerical Solution of Differential Equations
    • 6.1 Introduction
    • 6.2 Formulas of Open Type
      • 6.3 Formulas of Closed Type
      • 6.4 Start of Solution
      • 6.5 Methods Based on Open-Type Formulas - Methods 6.6 Methods Based on Closed-Type Formulas. Prediction-Correction
      • 6.7 The Special Case F = Ay
      • 6.8 Propagated-Error Bounds
      • 6.9 Application to Equations of Higher Order. Sets of Equations
      • 6.10 Special Second-order Equations
        • 6.11 Change of Interval
        • 6.12 Use of Higher Derivatives
        • 6.13 A Simple Runge-Kutta Method
        • 6.14 Runge-Kutta Methods of Higher Order
        • 6.15 Boundary-Value Problems
        • 6.16 Linear Characteristic-value Problems
        • 6.17 Selection of a Method
        • 6.18 Supplementary References - Problems - 7 Least-Squares Polynomial Approximation
          • 7.1 Introduction
            • 7.2 The Principle of Least Squares
            • 7.3 Least-Squares Approximation over Discrete Sets of Points
            • 7.4 Error Estimation
  • 7.5 Orthogonal Polynomials viii CONTENTS
  • 7.6 Legendre Approximation
  • 7.7 Laguerre Approximation
    • 7.8 Hermite Approximation
    • 7.9 Chebyshev Approximation
    • 7.10 Properties of Orthogonal Polynomials. Recursive Computation
    • 7.11 Factorial Power Functions and Summation Formulas
    • 7.12 Polynomials Orthogonal over Discrete Sets of Points
    • 7.13 Gram Approximation
    • 7.14 Example: Five-Point Least-Squares Approximation
    • 7.15 Smoothing Formulas - Sets of Points 7.16 Recursive Computation of Orthogonal Polynomials on Discrete
    • 7.17 Supplementary References - Problems
      • 8 Gaussian Quadrature and Related Topics
  • 8.1 Introduction
  • 8.2 Hermite Interpolation
  • 8.3 Hermite Quadrature
  • 8.4 Gaussian Quadrature
  • 8.5 Legendre-Gauss Quadrature
    • 8.6 Laguerre-Gauss Quadrature
    • 8.7 Hermite-Gauss Quadrature
    • 8.8 Chebyshev-Gauss Quadrature
    • 8.9 Jacobi-Gauss Quadrature
    • 8.10 Formulas with Assigned Abscissas
    • 8.11 Radau Quadrature
    • 8.12 Lobatto Quadrature
    • 8.13 Convergence of Gaussian-quadrature Sequences
    • 8.14 Chebyshev Quadrature
    • 8.15 Algebraic Derivations
    • 8.16 Application to Trigonometric Integrals
    • 8.17 Supplementary References - Problems - 9 Approximations of Various Types
    • 9.1 Introduction
    • 9.2 Fourier Approximation: Continuous Domain
    • 9.3 Fourier Approximation: Discrete Domain

Exponential Approximation Determination of Constituent Periodicities Optimum Polynomial Interpolation with Selected Abscissas Chebyshev Interpolation Economization of Polynomial Approximations Uniform (Minimax) Polynomial Approximation Spline Approximation Splines with Uniform Spacing Spline Error Estimates A Special Class of Splines Approximation by Continued Fractions Rational Approximations and Continued Fractions Determination of Convergents of Continued Fractions Thiele's Continued-Fraction Approximations Uniformization of Rational Approximations Supplementary References Problems Numerical Solution of Equations Introduction Sets of Linear Equations The Gauss Reduction The Crout Reduction Intermediate Roundoff Errors Determination of the Inverse Matrix Inherent Errors Tridiagonal Sets of Equations Iterative Methods and Relaxation Iterative Methods for Nonlinear Equations The Newton-Raphson Method Iterative Methods of Higher Order Sets of Nonlinear Equations Iterated Synthetic Division of Polynomials. Lin's Method Determinacy of Zeros of Polynomials Bernoulli's Iteration Graeffe's Root-squaring Technique Quadratic Factors. Lin's Quadratic Method Bairstow Iteration Supplementary References Problems

CONTENTS ix

539

PREFACE

The preface to the first edition contained the following passages:

This volume is intended to provide an introductory treatment of the funda- mental processes of numerical analysis which is compatible with the expansion of the field brought about by the development of the modern high-speed calculating devices, but which also takes into account the fact that very substantial amounts of computation will continue to be effected by desk calculators (and by hand or slide rule), and that familiarity with computation on a desk calculator is a desirable preliminary to large- scale computation in any case.

  • • • The present text is based on the premise that the introductory course should provide a fairly substantial grounding in the basic operations of computation, approximation, interpolation, numerical differentiation and integration, and the numerical solution of equations, as well as in applications to such processes as the smoothing of data, the numerical summation of series, and the numerical solution of ordinary differential equations. It is believed that this course not only should exhibit techniques available for each purpose, but also should attempt to derive the relevant formulas in such a way that the underlying hypotheses are in evidence and that methods of generalization and modification are reasonably apparent, and that the problems of error analysis, convergence, and stability should be treated as adequately as time and preparation permit. Furthermore, the course desirably should be accompanied by a problem laboratory, in which enough actual computation is effected (presumably by

xii PREFACE

use of desk calculators) to establish the practical significance of the theoretical develop- ments. Such an introduction should afford preparation for an "advanced course," dealing with certain of the somewhat more sophisticated aspects of the solution of equations and with modern methods of matrix inversion and determination of characteristic values of matrices, together with the numerical solution of partial differential equations and of integral equations, ...

These remarks apply nearly as weIl to the present edition and to the philosophy underlying it. In particular, it is believed to be unrealistic to suppose that henceforth essentiaIly all computation will be delegated to large-scale pro- gramed digital computers; that soon sufficiently efficient algorithms will exist to permit one to entrust most problems directly to a computer without preliminary or subsequent individual analyses and without a fair understanding of the rationale of the algorithms to be employed; and that, accordingly, the "numerical analysis" which is to be relevant in the classroom properly divides into the con- sideration of flow charts and of the technique and logic of computer pro- graming, on the one hand, and the study of relatively profound mathematical treatments of special areas, on the other. ExceIlent texts for these two purposes are available and are under preparation; but, in addition, it is thought that there exists a continuing need for suitable texts which follow a more classical middle course. This edition primarily was intended to introduce a selection of the more recent significant developments in the field and, correspondingly, to increase the focus of the text upon concepts and procedures associated with computers. At the same time, many changes have been made in phraseology, notation, and arrangement of the earlier material and a number of the treatments have been modified and amplified (or abbreviated). The new material introduced includes sections on machine errors and on recursive calculation in Chapter I; increased emphasis on the midpoint rule and the consideration of Romberg integration and the classical Filon integration in Chapter 3; a modified treatment of prediction-correction methods and the addition of Hamming's method in Chapter 6; the use of recursive methods in Chapters 7 and 8; brief considerations of uniform (minimax) approximation by polynomials and rational functions and four sections on spline approximation in Chapter 9; and treatments of pivoting and equilibration, ill conditioning, Crout's method for tridiagonal systems, the iterative methods of MuIler, Traub, Ostrowski, and others, modifications of the method of false position and of the Lin and Bairstow procedures, and expanded treatments of the concept of the "order" of an iterative process, as weIl as additional methods for solving sets of nonlinear equations, in Chapter 10. Some results bearing on error analysis and on the convergence of approximation sequences, but depending

INTRODUCTION TO

NUMERICAL ANALYSIS

INTRODUCTION

1.1 Numerical Analysis

The ultimate aim of the field of numerical analysis is to provide convenient methods for obtaining useful solutions to mathematical problems and for extracting useful information from available solutions which are not expressed in tractable forms. Such problems may each be formulated, for example, in terms of an algebraic or transcendental equation, an ordinary or partial dif- ferential equation, or an integral equation, or in terms of a set of such equations. This formulation may correspond exactly to the situation which it is intended to describe; more often, it will not. Analytical solutions, when available, may be precise in themselves, but may be of unacceptable form because of the fact that they are not amenable to direct interpretation in numerical terms, in which case the numerical analyst may attempt to devise a method for effecting that interpretation in a satisfactory way, or he may prefer to base his analysis instead upon the original formulation. More frequently, there is no known method of obtaining the solution in a precise form, convenient or otherwise. In such a case, it is necessary either to attempt to approximate the problem satisfactorily by one which is amenable

2 INTRODUCTION TO NUMERICAL ANALYSIS

to precise analysis, to obtain an approximate solution to the original problem by methods of numerical analysis, or to combine the two approaches. On the other hand, the problem itself may not be clearly defined, and the analyst may be provided only with its partial solution, perhaps in the form of a table of approximate data, together with a certain amount of information with regard to its reliability, or perhaps in terms of an integral defining a function which cannot be expressed in terms of a finite number of tabulated functions. His purpose then is to obtain additional useful information concern- ing the function so described. Generally the numerical analyst does not strive for exactness. Instead, he attempts to devise a method which will yield an approximation differing from exactness by less than a specified tolerance, or by an amount which has less than a specified probability of exceeding that tolerance. When the informa- tion supplied to him is inexact, he attempts both to obtain a dependable measure of the uncertainty which results from that inexactness and also to obtain an approximation which possesses a specified reliability compatible with that uncertainty. He tries to devise a procedure which would be capable of affording an arbitrarily high degree of accuracy, in a wide class of situations, if the reliability of given information and of available calculating devices were correspondingly high. Even when successful in this attempt, he still seeks alternative procedures which may possess certain advantages in convenience or efficiency in certain situations, but which may be of less general applicability, or which may have the property that the degree of accuracy obtainable, even under ideal circum- stances, cannot exceed a certain limit which depends upon the function to be analyzed. In this last case, which is of frequent occurrence, he attempts to ascertain that limit and to classify the situations in which it is not sufficiently high. Needless to say, there are relatively few situations in which all these objectives have been, or can be, perfectly attained, as will be illustrated in the sequel. However, research with these aims in view continues to provide new procedures, as well as additional information with regard to the basic advantages and disadvantages of the older ones. Additional impetus has been afforded by the development of automatic desk calculators and, more recently, of large-scale computers. For example, certain methods had long been known to possess important theoretical advantages, but had not been convenient, from the point of view of the labor and time involved, for use in hand calculation or in calcula- tion based on the use of the slide rule or of tables of logarithms, and hence had been considered as little more than mathematical curiosities. However, technological developments have promoted several of them into a much more

4 INTRODUCTION TO NUMERICAL ANALYSIS

it be possible, by taking n sufficiently large, to be certain that the set S. of generated functions will contain at least one member which approximates the function lex) within any preassigned tolerance, on the interval of interest. It is a most fortunate fact that the convenient set S.. which consists of all poly- nomials of degree n or less, possesses this property if only lex) is continuous on that interval and the interval is of finite extent. This fact was established in 1885 by a famous theorem of Weierstrass, which states, in fact, that any function lex) which is continuous on a closed

interval [a, b] can be uniformly approximated within any prescribed tolerance,

on that interval, by some polynomial. By this statement we mean that, given any positive tolerance B, there is a polynomial p(x) such that I/(x) - p(x)1 ~ B

for all x such that a ~ x ~ b.

Principally for the two reasons just given, polynomial approximation is of wide general use when the function to be approximated is continuous and the interval of approximation is finite, as well as in certain other cases, and accord- ingly is to form the basis of much of the work which follows. Other types of approximations are considered in Chap. 9. Following the choice of the set S., an appropriate selective process must be chosen in accordance with the nature of the available information concerning

the function/(x). When the value of/ex) is known for at least n + 1 values of

x, say X o, Xl' ... , X., the simplest and most often used process consists of

selecting, from the members of So, a function y"(x) which takes on the same value as does/ex) for each of those n + I values of x. Here again the choice of polynomials is convenient. For, whereas in the general case there may be no such function in S.. or there may be several, it is a well-known fact that there

exists one and only one polynomial of degree n or less which takes on prescribed

values at each of n + 1 points. In particular, if lex) is indeed in S", this process will then belect it. Other useful processes are described in Chaps. 7 and 9. The final problem, that of devising an appropriate method of estimating the error, is a troublesome one and cannot be discussed at this point. Clearly, the precision of the estimate must depend upon the amount of available in- formation relative to lex), and its usefulness will depend upon the form in

which that information is supplied. In particular, if all available information

is needed by the selective process, no error estimate is possible. It is of some importance to notice that, if S" is indeed taken as the set of all polynomials of degree n or less, then the Weierstrass theorem guarantees only the existence of a member of S. which affords a satisfactory approximation

to a continuous function/(x), on any finite interval, when n is sufficiently large.

This does not imply that the particular member chosen by a particular selective process will tend to afford such an approximation as n increases indefinitely.

INTRODUCI10N 5

Only when a dependable method of estimating the error is available can this question be resolved with certainty. Furthermore, even though it were possible to devise a selective process which had this property, it would not necessarily follow (for example) that the derivative of the selected polynomial yix) would tend to approximate the derivative of/ex), even though the latter were known to exist and to be continuous. Again, recourse must be had to an error analysis. When the selective process specifies n + 1 instances of exact agreement between the function/(x) and its approximation and/or between certain of their derivatives, on a discrete set of points, the resultant approximation (ifit exists) is called an interpolation. In particular, when/unctional agreement is prescribed

at n + 1 distinct points, the interpolation process is sometimes said to be

collocative. In some references the term interpolation is used in a somewhat more general sense. (See, for example, P. J. Davis [1963]'t)

1.3 Errors

Most numerical calculations are inexact either because of inaccuracies in given data, upon which the calculations are based, or because of inaccuracies intro~ duced in the subsequent analysis of those data. In addition to gross errors, occasioned by unpredictable mistakes (human or mechanical) and hypothetically assumed to be absent in the remainder of this discussion, it is convenient to define first a roundoff error as the consequence of using a number specified by n correct digits to approximate a number which requires more than n digits (generally infinitely many digits) for its exact specification.t Such errors are frequently present in given data, in which case they may be called inherent errors, due either to the fact that those data are empirical, and are known

only to n digits, or to the fact that, whereas they are known exactly, they are

"rounded" to n digits according to the dictates of convenience or of the capacity of a calculating device. They are introduced in subsequent analysis either because of deliberate rounding or because of the fact that a calculating device is capable of supplying only a certain number of digits in effecting operations such as addition, multiplication, division, conversion between number systems, and so forth. It is then convenient to define a truncation error, by exclusion, as any error which is neither a gross error nor a roundoff error. Thus, a truncation error is one which would be present even in the hypothetical situation in which

t A name followed by a date in brackets refers to an item in Appendix B, the Bibliography.

t It is assumed here and elsewhere, for simplicity and consistency, that the decimal

notation is used.