正在加载图片...
6.10 Dawson's Integral 259 if (err EPS)break; odd=!odd; if (k MAXIT)nrerror("maxits exceeded in cisi"); *si=sumsi *ci=sumc+log(t)+EULER; 1f(x<0.0)*s1=-(*s1); 83 CITED REFERENCES AND FURTHER READING: 鱼 Stegun,I.A.,and Zucker,R.1976,Journal of Research of the National Bureau of Standards, vol.80B,pp.291-311;1981,0p.ct,ol.86,pp.661-686. Abramowitz,M.,and Stegun,I.A.1964,Handbook of Mathematical Functions,Applied Mathe- matics Series,Volume 55 (Washington:National Bureau of Standards;reprinted 1968 by Dover Publications,New York),Chapters 5 and 7. (Nort server 6.10 Dawson's Integral America computer, University Press. THE Dawson's Integral F(r)is defined by Progra F(a)-efed (6.10.1) OF SCIENTIFIC The function can also be related to the complex error function by iv示 F(z)= e[1-erfe(-iz)]. (6.10.2) A remarkable approximation for F(z),due to Rybicki [1],is 、商◇ 6 Numerica 10621 1 e-(s-nh) F()=√示naaa (6.10.3) n 431 What makes equation (6.10.3)unusual is that its accuracy increases exponentially (outside Recipes as h gets small,so that quite moderate values of h(and correspondingly quite rapid convergence of the series)give very accurate approximations. North We will discuss the theory that leads to equation(6.10.3)later,in $13.11,as an interesting application of Fourier methods.Here we simply implement a routine for real values of based on the formula. It is first convenient to shift the summation index to center it approximately on the maximum of the exponential term.Define no to be the even integer nearest to x/h,and zo≡noh,x'≡x-xo,andn'≡n-no,so that N e-(x'-n'h2 F(x)≈ (6.10.4) n'+no6.10 Dawson’s Integral 259 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). } if (err < EPS) break; odd=!odd; } if (k > MAXIT) nrerror("maxits exceeded in cisi"); } *si=sums; *ci=sumc+log(t)+EULER; } if (x < 0.0) *si = -(*si); } CITED REFERENCES AND FURTHER READING: Stegun, I.A., and Zucker, R. 1976, Journal of Research of the National Bureau of Standards, vol. 80B, pp. 291–311; 1981, op. cit., vol. 86, pp. 661–686. Abramowitz, M., and Stegun, I.A. 1964, Handbook of Mathematical Functions, Applied Mathe￾matics Series, Volume 55 (Washington: National Bureau of Standards; reprinted 1968 by Dover Publications, New York), Chapters 5 and 7. 6.10 Dawson’s Integral Dawson’s Integral F(x) is defined by F(x) = e−x2  x 0 et 2 dt (6.10.1) The function can also be related to the complex error function by F(z) = i √π 2 e−z2 [1 − erfc(−iz)] . (6.10.2) A remarkable approximation for F(z), due to Rybicki [1], is F(z) = limh→0 1 √π  n odd e−(z−nh)2 n (6.10.3) What makes equation (6.10.3) unusual is that its accuracy increases exponentially as h gets small, so that quite moderate values of h (and correspondingly quite rapid convergence of the series) give very accurate approximations. We will discuss the theory that leads to equation (6.10.3) later, in §13.11, as an interesting application of Fourier methods. Here we simply implement a routine for real values of x based on the formula. It is first convenient to shift the summation index to center it approximately on the maximum of the exponential term. Define n0 to be the even integer nearest to x/h, and x0 ≡ n0h, x ≡ x − x0, and n ≡ n − n0, so that F(x) ≈ 1 √π  N n=−N n odd e−(x −n h)2 n + n0 , (6.10.4)
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有