正在加载图片...
4.5 Gaussian Quadratures and Orthogonal Polynomials 147 Dahlquist.G.,and Bjorck,A.1974,Numerica/Methods (Englewood Cliffs,NJ:Prentice-Hall). 87.4.3,p.294. Stoer,J.,and Bulirsch,R.1980,Introduction to Numerical Analysis(New York:Springer-Verlag). 53.7,p.152. 4.5 Gaussian Quadratures and Orthogonal Polynomials In the formulas of 84.1,the integral of a function was approximated by the sum of its functional values at a set of equally spaced points.multiplied by certain aptly nted for chosen weighting coefficients.We saw that as we allowed ourselves more freedom in choosing the coefficients,we could achieve integration formulas of higher and higher order.The idea of Gaussian quadratures is to give ourselves the freedom to choose not only the weighting coefficients,but also the location of the abscissas at which the function is to be evaluated:They will no longer be equally spaced.Thus, 令 we will have twice the number of degrees of freedom at our disposal;it will turn out that we can achieve Gaussian quadrature formulas whose order is,essentially,twice that of the Newton-Cotes formula with the same number of function evaluations. Does this sound too good to be true?Well,in a sense it is.The catch is a familiar one,which cannot be overemphasized:High order is not the same as high accuracy.High order translates to high accuracy only when the integrand is very 的 smooth,in the sense of being"well-approximated by a polynomial." There is,however,one additional feature of Gaussian quadrature formulas that SCIENTIFIC( adds to their usefulness:We can arrange the choice of weights and abscissas to make the integral exact for a class of integrands"polynomials times some known function W(z)"rather than for the usual class of integrands "polynomials."The function W()can then be chosen to remove integrable singularities from the desired integral. Given W(z),in other words,and given an integer N,we can find a set of weights w;and abscissas j such that the approximation 10.621 N Wof(e)dz≈∑fe) (4.5.1) % Numerical Recipes 43106 j=1 is exact if f(x)is a polynomial.For example,to do the integral (outside exp(-cos2z)d North (4.5.2) -1 V1-x2 (not a very natural looking integral,it must be admitted),we might well be interested in a Gaussian quadrature formula based on the choice 1 w@)=√1- (4.5.3) in the interval (-1,1).(This particular choice is called Gauss-Chebyshey integration, for reasons that will become clear shortly.4.5 Gaussian Quadratures and Orthogonal Polynomials 147 Permission 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). Dahlquist, G., and Bjorck, A. 1974, Numerical Methods (Englewood Cliffs, NJ: Prentice-Hall), §7.4.3, p. 294. Stoer, J., and Bulirsch, R. 1980, Introduction to Numerical Analysis (New York: Springer-Verlag), §3.7, p. 152. 4.5 Gaussian Quadratures and Orthogonal Polynomials In the formulas of §4.1, the integral of a function was approximated by the sum of its functional values at a set of equally spaced points, multiplied by certain aptly chosen weighting coefficients. We saw that as we allowed ourselves more freedom in choosing the coefficients, we could achieve integration formulas of higher and higher order. The idea of Gaussian quadratures is to give ourselves the freedom to choose not only the weighting coefficients, but also the location of the abscissas at which the function is to be evaluated: They will no longer be equally spaced. Thus, we will have twice the number of degrees of freedom at our disposal; it will turn out that we can achieve Gaussian quadrature formulas whose order is, essentially, twice that of the Newton-Cotes formula with the same number of function evaluations. Does this sound too good to be true? Well, in a sense it is. The catch is a familiar one, which cannot be overemphasized: High order is not the same as high accuracy. High order translates to high accuracy only when the integrand is very smooth, in the sense of being “well-approximated by a polynomial.” There is, however, one additional feature of Gaussian quadrature formulas that adds to their usefulness: We can arrange the choice of weights and abscissas to make the integral exact for a class of integrands “polynomials times some known function W(x)” rather than for the usual class of integrands “polynomials.” The function W(x) can then be chosen to remove integrable singularities from the desired integral. Given W(x), in other words, and given an integer N, we can find a set of weights wj and abscissas xj such that the approximation  b a W(x)f(x)dx ≈  N j=1 wjf(xj ) (4.5.1) is exact if f(x) is a polynomial. For example, to do the integral  1 −1 exp(− cos2 x) √ 1 − x2 dx (4.5.2) (not a very natural looking integral, it must be admitted), we might well be interested in a Gaussian quadrature formula based on the choice W(x) = 1 √ 1 − x2 (4.5.3) in the interval(−1, 1). (This particular choice is called Gauss-Chebyshev integration, for reasons that will become clear shortly.)
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有