Pré-visualização parcial do texto
Baixe Numerical Initial Value Problems in Ordinary Differential Eq e outras Manuais, Projetos, Pesquisas em PDF para Cultura, somente na Docsity!
NUMERICAL INITIAL VALUE PROBLEMS IN ORDINARY DIFFERENTIAL EQUATIONS C. William Gear Department of Computer Science University of Iilinois Prentice-Hall, Inc. Englewood Cliffs, New Jersey Prentice-Hall Series in Automatic Computation George Forsythe, editor ANSELONE, Collectively Compacr Operator Approximation Theory and Applications to Integral Equations ARBIB, Theories of Abstract Automata BATES AND DOUGLAS, Programming Language/One, 2nd Ed. BAUMANN, FELICIANO, BADER, AND SAMELSON, Introduction to ALGOL BLUMENTHAL, Management Informarion Systems BOBROW AND SCHWARTZ, editors, Computers and the Policy-Making Community: Applications t0 International Relations BOWLES, editor, Computers in Humanistic Research CRESS, DIRKSEN, AND GRAHAM, FORTRAN IV with WATFOR and WATEIV DANIEL, The Approximate Minimization of Functionals DESMONDE, Computers and Their Uses, 2nd Ed. EVANS, WALLACE, AND SUTHERLAND, Simulation Using Digital Computers FIKE, Computer Evaluation of Mathematical Functions FORSYTHE AND MOLER, Computer Solution of Linear Algebraic Systems GAUTHIER AND PONTO, Designing Systems Programs SEAR, Numerical Initial Value Problems in Ordinary Diflerential Equarions GORDON, System Simulation GREENSPAN, Lectures on the Numerical Solurion of Linear, Singular and Nonlinear Differential Equations HARTMANIS AND STEARNS, Algebraic Structure Theory of Sequential Machines HEAPS, Mn Introduction to Computer Languages HULL, Introduction to Computing JOHNSON, System Structure in Dara, Programs, and Computers LORIN, Parallelism in Hardware and Software: An Introduction to Considerations in Real and Apparent Concurrency MARTIN, Design of Real-Time Computer Systems MARTIN, Future Developments in Telecommunications MARTIN, Programming Real-Time Computer Systems MARTIN, Systems Analysis for Data Transmission MARTIN, Telecommunicarions and the Computer MARTIN, Teleprocessing Network Organization MARTIN AND NORMAN, The Computerized Society MATHISON AND WALKER, Computers and Telecommunicarions: Issue in Public Policy MCKEEMAN, HORNING, AND WORTMAN, Á Compiler Generator MINSKy, Computation: Finite and Infinite Machines MOORE, Interval Analysis PYLYSHYN, editor, Perspectives on the Computer Revolution SALTON, The SMART Retrieval System: Experiments in Automatic Data Processing SAMMET, Programming Languages: History and Fundamentals STERLING AND POLLACK, Introduction to Statistical Dara Processing STROUD, Approximate Caleulation of Multiple Integrals TAVISS, editor, The Computer Impact TRAUB, Ierarive Merhods for the Solutions of Eguations VARGA, Matrix Irerative Analysis Vazsonyi, Problem Solving by Digital Computers with PL|I Programming WILKINSON, Rounding Errors in Algebraic Processes To my children, Jodi and Chris FOREWORD The successful solution of a realistic problem in applied mathematics requires the fusion of four distinct ingredients: (1) knowledge of the sub- ject area of the problem; (2) knowledge of the relevant mathematics; (3) knowledge of the relevant computer science; (4) a talent for selecting just what part of all this knowledge will actually solve the problem, and ignoring the rest. Professor Gear is one of those rare individuals with these four capabili- ties. He has made himself familiar with subject areas that spawn differential equations. He has a good grounding in mathematical analysis. He has demonstrated a capacity as a systems programmer and teacher of systems programming, and is as capable in symbol manipulation as he is in com- puting with numbers. He has created powerful programs (e.g., DIFSUB on pp. 158-166) for solving difficult practical problems. In particular, he knows a lot about solving stiff differential equations, a difficult area that has received much attention in recent years. Because of Professor Gear's fine credentials, 1 am delighted that this book is joining my Prentice-Hall Series in Automatic Computation, and I believe the reader will find it both readable and very useful. GeorGE E. FORSYTHE vii X PREFACE skip these chapters entirely, and continue to the chapters on the selection of methods and implementation. The reader is assumed to have a background equivalent to a beginning course in numerical analysis at the advanced undergraduate level in which the topics of interpolation, solution of nonlinear equations, and some basic matrix theory have been covered. No previous knowledge of numerical techniques for difierential equations is assumed, but a basic knowledge of differential equations is required. The chapters on theory require a greater knowledge of matrix theory, such as obtained from an undergraduate course on linear algebra. Chapters 4 and 10 deal with the theory of one-step and multistep methods, respectively. The material was chosen to provide the justification for many of the approaches used in current programs (some of which are given in the text), where that material was of reasonable proportions. In addition, I have tried in Chapter 10 to set down the theory of multivalue methods for both first and higher order equations, Chapter 11 deals mainly with the subject of stiff equations, which has become increasingly important as computers are applied in large simulation and design situations. It treats the subject pragmatically and does not discuss the theory for two reasons. First, the major problems are unsolved (for example, reasonably unrestrictive sufficient conditions for error bounds independent of the stifiness to be obtained). Secondly, those results that do exist are still sufficient!y new that it is too early to judge their merit. A book such as this owes debts to many people, a large number of whom Thave only met via their published work. I would like to give special acknowl- edgement to a number of people, Professors G. Dahlquist and P. Henrici did more than most people to put the mathematics in order, and provided me with much reading. Professors W. Gautschi, W. Kahan, and B. Parlett reviewed the manuscript and made many useful suggestions. Particularly stimulating environments were provided for my own work by Dr. W. Givens at Argonne National Laboratory, Professor W. Miller at the Stanford Linear Accelerator Center, and Professor G. Forsythe at Stanford University. 1 would also like to quote loosely from my advisor of graduate student days, Professor A. H. Taub, who said a lot of things I didn't believe until later. In particular, he pointed out that the academic life was a good one, and that the least one could do to repay one's debt to society was to set one's thoughts on paper so that the useful among them might benefit others. Thanks are also due to the University of Illinois for the sabbatical leave during which this book was written, and Stanford University and its Linear Accelerator Center for providing a home for me in that time. Much of the testing of early versions of the subroutine in Chapter 9 was done by Mis. K. Ratliff of Urbana. Messrs. S. Eisenstaat and M. Saunders of Stanford and many other students both at Stanford and Urbana made many helpful PREFACE Xi comments (and served as guinea pigs for many of the problems). To ail these people I am grateful, and especially to B. Hurdle who typed the manuscript accurately and at record speed. C. W. GEAR Stanford, California CONTENTS 1 Introduction 1.1 The Problem to be Solved 1 1.2 Numerical Approximation of the Solution 7 1.3 An Illustration—the Euler Method 10 1.3.1 Error estimates 13 1.3.2 Comparison of error estimates with actual errors 15 1,3.3 Stability 16 134 Roundof errors 18 1.3.5 The perturbation due to the numerical approximation 21 Problems 23 Higher Order 2 One-Step Methods 2.1 The Taylor's Series Method 25 2.2 Richardson Extrapolation to A = 0 26 xiii 25 xiv CONTENTS 2.3 Second Order Runge-Kutta Methods 27 24 Explicit Runge-Kutta Methods 31 24] The classical Runge-Kutta method 35 2.4.2 The Raiston Runge-Kutta method 36 24.3 Butcher's results on the attainable order of Runge-Kutta methods 36 2.5 Implicit Runge-Kutta Methods 37 2.5.1 Practical considerations of implicit Runge-Kutta methods 39 2.6 Convergence and Stability 40 26.1 Stability regions for explicit Runge-Kutia methods 40 2.6.2 Stability regions for implicit Runge-Kutta methods 42 Problems 43 Systems of Equations 3 and Equations of Order Greater than One 45 3.1 Application of One-Step Techniques to Systems of Equations 46 3.2 Reduction of a Higher Order Equation to a System of First Order Equations 47 3.3 Direct Methods for Higher Order Equations 47 3.3.1 Taylor's series methods 48 3.3.2 Runge-Kutta methods 48 Problems 50 Convergence, Error Bounds, 4 and Error Estimates for One-Step Methods 52 4.1 Vector and Matrix Norms 53 4.2 Existence and the Lipschitz Condition 54 4.3 Convergence and Stability 55 4.4 Error Bounds and Order of Convergence 59 4.5 Asymptotic Error Estimates 61 4.5.1 The perturbation due to the numerical approximation 64 xvi | CONTENTS 7.2.1 Generating functions for the coefficients 108 7.2.2 Two other techniques for deriving lhe Adams-Bashforth methods 109 72.3 Truncation error in the Adams-Bashforth methods 1 10 7.3 Implicit Multistep Methods—the Adams-Moulton Method 1i1 7.4 Predictor-Corrector Methods 14 Problems 115 Genera! Multistep Methods, 8 Order, and Stability 116 8.1 The Order of a Multistep Method 117 8.1.1 Determination of & if B is given and vice versa H"9 8.1.2 The principal root of a method 120 8.2 Milne's Method 121 8.2.1 Stability of Milne's method for y' = Ay 122 8.3 Stability of General Multistep Methods 124 8.3.1 Absolute stability 126 8.4 The Class of Three-Step Methods of Order Four 132 Problems 134 Multivalue 9 Methods 136 9.1 Behavior of the Error 137 9.1.1 Stability of predictor-corrector methods 138 9.2 Equivalent Methods 142 9.2.1 Factors afecting the choice of representation 143 9.2.2 Adams methods in the backward difference representation 147 9.2.3 The Nordsieck form of Adams” method 148 9.2.4 Modified multistep methods 150 9.2.5 Higher order equations 151 9.3 Automatic Control of Step Size and Order 155 Problems 167 10 N 2 CONTENTS Existence, Convergence, and Error Estimatos for Multivalue Methods 10.1 Convergence and Stability 172 J0,1.1 Stabiliry 174 10.1.2 Order 180 10.1.3 Consistency and convergence 187 10.2 The Maximum Order of a Stable Multistep Method 194 10.3 Existence of Stable Multivalue Methods 198 10,4 Improved Order for Normal Form Multivalue Methods 200 10.5 Asymptotic Behavior of the Error 204 Problems 207 Special Methods for Special Problems 11.1 Stiff Equations 209 JHII Multistep methods 212 11.12 A-stable methods 220 111.3 Methods based on a knowledge of Oflôy 222 11.2 Algebraic and Singular Equations 223 11.3 Parameter Estimation 227 Problems 229 Choosing a Method 12.1 Effect of Future Developments 235 Bibliography Index xvii 169 209 as1 237 251 | INTRODUCTION 1.1 THE PROBLEM TO BE SOLVED The theoretical physicist or chemist spends much of his time working with models of the world around him. A model is often given as a mathematical description of variables, some of which certainly exist and are measurable (pressure, for example), others of which may only be hypothesized (the characteristics of a new particle, for example). Frequently these models will be sets of ordinary differential equations in which the independent variable is time and the dependent variables are the physical variables. Occasionally the independent variable may be one of the physical variables due either to an interchange of variables, or the solution of a system in equilibrium state which is therefore independent of time, but we will call the independent variable é time throughout this book. The methods to be discussed are not dependent on any special property of time, so that the reader should be prepared to substitute x for space or whatever meets his fancy. When a model has been constructed, two things may happen to it. It may be necessary first to “test” it. This will involve the experimentalist in his laboratory. The behavior of the model must be compared with the observed behavior in the experiment. Secondly, the theoretician may wish to predict the behavior of the real world by studying the behavior of the model. Except in those few cases in which the equations can be integrated directiy, they will finish up on the desk of the numerical analyst with a request to “get some numbers,” Let us suppose that the pair of equations vY=(p—tgy—z Z=y (1) 2 INTRODUCTION cHAP. 1 has just been put in front of us, where y means dy/dt. What questions must we ask the physicist and what must we ask ourselves before we “put it on the computer” ? í Before starting an integration, we must get enough information to specify a problem. Equations (1.1) contain two unknown constants p and q. We will call these parameters, and we must know their value. If the problem is basically to determine these parameters by comparing experimental results with numerical integrations for various values of p and q, we may be faced with many integrations, and may need to investigate better methods. A dis- cussion of such problems will be delayed until a later chapter; we will first assume that all parameters are specified. Consider the equations 1=3 2 (1.2) Z=—y These have the solution = Asin(t+a y ( ) (1.3) z=Acos(t+ a) There are two constants of integration 4 and a. In general, a system of N first order equations has N constants of integration. If we are to provide numerical answers, that is, calculate the values of y(t) and z(t) for a number of values of £, enough information must be given to specify these constants of integration. If the values of the dependent variables y and z are specified for a value of * which we will call the initial value t, then the solution will in general be determined, (We will assume that a transformation has been made so that &, = O. This does not affect the problem or the methods to be dis- cussed.) The problem of determining values of y and z at future times + is then called an initial value problem. Alternatively, values of some of the dependent variables may be specified at a number of different values of 4. This is called a boundary value problem. The most common form of this problem is the swo- yY Initial TT volue 100 Fig. 1.1 Family of solutions of à first order differential equation.