正在加载图片...
Chapter 4.Integration of Functions 4.0 Introduction Numerical integration,which is also called quadrature,has a history extending 11800-41 back to the invention of calculus and before.The fact that integrals of elementary functions could not,in general,be computed analytically,while derivatives could Popl be,served to give the field a certain panache,and to set it a cut above the arithmetic drudgery of numerical analysis during the whole of the 18th and 19th centuries. 二NIS3 With the invention of automatic computing,quadrature became just one numer- ical task among many,and not a very interesting one at that.Automatic computing, C:THEA even the most primitive sort involving desk calculators and rooms full of"computers" 9 (that were,until the 1950s,people rather than machines),opened to feasibility the 竖8 much richer field of numerical integration of differential equations.Quadrature is merely the simplest special case:The evaluation of the integral f(x)dx (4.0.1) is precisely equivalent to solving for the value I=y(b)the differential equation dy dx =f() (4.0.2) 20521 with the boundary condition y(a)=0 (4.0.3 Chapter 16 of this book deals with the numerical integration of differential (outside equations.In that chapter,much emphasis is given to the concept of"variable"or Software. "adaptive"choices of stepsize.We will not,therefore,develop that material here. If the function that you propose to integrate is sharply concentrated in one or more peaks,or if its shape is not readily characterized by a single length-scale,then it America) is likely that you should cast the problem in the form of(4.0.2)-(4.0.3)and use the methods of Chapter 16. The quadrature methods in this chapter are based,in one way or another,on the obvious device of adding up the value of the integrand at a sequence of abscissas within the range of integration.The game is to obtain the integral as accurately as possible with the smallest number of function evaluations of the integrand.Just as in the case of interpolation (Chapter 3),one has the freedom to choose methods 129Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). Chapter 4. Integration of Functions 4.0 Introduction Numerical integration, which is also called quadrature, has a history extending back to the invention of calculus and before. The fact that integrals of elementary functions could not, in general, be computed analytically, while derivatives could be, served to give the field a certain panache, and to set it a cut above the arithmetic drudgery of numerical analysis during the whole of the 18th and 19th centuries. With the invention of automatic computing, quadrature became just one numer￾ical task among many, and not a very interesting one at that. Automatic computing, even the most primitive sort involving desk calculators and rooms full of “computers” (that were, until the 1950s, people rather than machines), opened to feasibility the much richer field of numerical integration of differential equations. Quadrature is merely the simplest special case: The evaluation of the integral I =  b a f(x)dx (4.0.1) is precisely equivalent to solving for the value I ≡ y(b) the differential equation dy dx = f(x) (4.0.2) with the boundary condition y(a)=0 (4.0.3) Chapter 16 of this book deals with the numerical integration of differential equations. In that chapter, much emphasis is given to the concept of “variable” or “adaptive” choices of stepsize. We will not, therefore, develop that material here. If the function that you propose to integrate is sharply concentrated in one or more peaks, or if its shape is not readily characterized by a single length-scale, then it is likely that you should cast the problem in the form of (4.0.2)–(4.0.3) and use the methods of Chapter 16. The quadrature methods in this chapter are based, in one way or another, on the obvious device of adding up the value of the integrand at a sequence of abscissas within the range of integration. The game is to obtain the integral as accurately as possible with the smallest number of function evaluations of the integrand. Just as in the case of interpolation (Chapter 3), one has the freedom to choose methods 129
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有