From: spellucci@mathematik.tu-darmstadt.de (Peter Spellucci) Subject: Re: " rapid oscillating integral " Date: 2 Jun 1999 19:02:57 GMT Newsgroups: sci.math.num-analysis In article <37554915.B8CE3D3E@netwood.net>, "E. Robert Tisdale" writes: |> Man J wrote: |> |> > Is there any numerical scheme |> > for calculating some " rapid oscillating integral "? |> > Such as integrating cos(50x) dx from x=0 to x=10pi ... |> > But my function is much more complex than this. |> |> The answer is zero! yes correct, but I assume that the poster has indeed a highly oscillatory function without periodicity. there are special quadrature rules for this case, e.g. filons quadrature. see the book "numerical integration" by davis & rabinowitz for example. also quadpack (in netlib) has software for this task. hope this helps peter ============================================================================== From: Charles Bond Subject: Re: " rapid oscillating integral " Date: Wed, 02 Jun 1999 11:51:29 -0700 Newsgroups: sci.math.num-analysis Quadpack has some fairly robust strategies for handling integrals with 'rapidly oscillating tails'. The code is in FORTRAN, but F2C can convert for you. The manual for Quadpack explains the methodology. Man J wrote: > Dear friends, > > is there any numerical scheme for calculating some " rapid oscillating > integral " ?? > Such as doing Intgrate cos50x dx from x=0 to x=10pi ...... But my > function is much more complex than this. Pls help. Thanks a lot. > > ( I will program it by C++.) ============================================================================== From: Jean-Philippe Grivet Subject: Re: " rapid oscillating integral " Date: Thu, 03 Jun 1999 18:20:07 +0200 Newsgroups: sci.math.num-analysis David Wilkinson wrote: > > No, I think he means cos(50x)*f(x) dx where f(x) varies more slowly. I > would like to find a method too! > > In article <37554915.B8CE3D3E@netwood.net>, E. Robert Tisdale > writes > >Man J wrote: > > > >> Is there any numerical scheme > >> for calculating some " rapid oscillating integral "? > >> Such as integrating cos(50x) dx from x=0 to x=10pi ... > >> But my function is much more complex than this. > > > >The answer is zero! > > > >Just integrate from x_l to x_l + (x_u - x_l) mod 2pi > >where x_l is the lower bound and x_u is the upper bound. > > > >Hope this helps. E. Robert Tisdale > > > > -- > David Wilkinson Hi! Filon's method has been devised for this problem; see Handbook of mathematical functions, Abramowitz and Stegun, p 890 and p 924 Numerical recipes in C, Press et al. pp 590-591. Hpoe this helps -- ******************************************************** Jean-Philippe GRIVET, Centre de Biophysique Moleculaire rue Charles-Sadron, 45071 Orleans cedex 02, France Telephone: 02 38 25 76 32 Telecopie: 02 38 63 15 17 e-mail: grivet@cnrs-orleans.fr ******************************************************** ============================================================================== From: "Dann Corbit" Subject: Re: " rapid oscillating integral " Date: Thu, 3 Jun 1999 10:23:54 -0700 Newsgroups: sci.math.num-analysis One possibility is double exponential integration, as modified for oscillatory functions. See, for instance: T.Ooura and M.Mori, The Double exponential formula for oscillatory functions over the half infinite interval, Journal of Computational and Applied Mathematics 38, 1991, 353-360 You can find code here: http://momonga.t.u-tokyo.ac.jp/~ooura/intde.html -- C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html "The C-FAQ Book" ISBN 0-201-84519-9 C.A.P. Newsgroup http://www.dejanews.com/~c_a_p C.A.P. FAQ: ftp://38.168.214.175/pub/Chess%20Analysis%20Project%20FAQ.htm ============================================================================== From: Bruce Johnson Subject: Re: " rapid oscillating integral " Date: 4 Jun 1999 01:19:13 GMT Newsgroups: sci.math.num-analysis Man J <98901192r@polyu.edu.hk> wrote: > > > Dear friends, >

is there any numerical scheme for calculating some " rapid oscillating > integral " ?? >
Such as  doing   Intgrate  cos50x dx from x=0 to > x=10pi ...... But my function is much more complex than this. Pls help. > Thanks a lot. >

( I will program it by C++.) This came up a while ago, quite a list was compiled. Bruce G. Evans, Pratical Numerical Integration, Wiley, 1993, Chapter 3: Oscillatory Integrals-Finite Range, Chapter 4: Oscillatory Integrals- Infinite Range. G. A. Evans, "Integrating oscillatroy integrands of a nontrigonometric type over a finite range," International Journal of Computer Mathematics, vol. 42, Iss. 3-4, pp. 213-221, 1992. M. Van Daele, H. De Meyer, and G. Vanden Berghe, "Modified Newton-Cotes formulae for numerical quadrature of oscillatory integrals with two independent variable frequencies," International Journal of Computer Mathematics, vol. 42, Iss. 1-2, pp. 83-97, 1992. H. De Meyer, G. Vanden Berghe, and J. Vanthournout, "Numerical quadrature based on an exponential type of interpolation," International Journal of Computer Mathematics, vol. 38, pp. 193-209, 1991. Bui Doan Khanh, "A numerical evaluation of very oscillatroy infinite integrals by asymptotics," Applied Mathematics and Computation, vol. 40, Iss. 2, pp. 117-124, Nov. 1990. G. Vanden Berghe, H. De Meyer, and J. Vanthournout, "On a class of modified Newton-Cotes quadrature formulae based upon mixed-type interpolation," J. Comput. Appl. Math., vol. 31, pp. 331-349, 1990. H. De Meyer, J. Vanthournout, and G. Vanden Berghe, "On a new type of mixed interpolation," J. Comput. Appl. Math., vol. 30, pp. 55-69, 1990. U. T. Ehrenmark, "A three-point formula for numerical quadrature of oscillatory integrals with variable frequency," J. Comput. Appl. Math., vol. 21, pp. 87-99, 1988. P. J. Davis and P. Rabinowitz, Methods of Numerical Integration, Academic Press, New York, London, 1984, section 2.10. D. Levin, "Procedure for computing one- and two-dimensional integrals of functions with rapid irregular oscillations," Math. Comp., vol. 38, pp. 531-538, 1982. H. Engels, Numerical Quadrature and Cubature, Academic Press, 1980, section 8.5 "Numerical Integration of rapidly-oscillating functions." G. M. Philips, "A survey of one-dimensional and multidimensional numerical integration," Computer Physics Communications, vol. 20, pp. 17-27, 1980, section 2.5 "Oscillatory integrands." B. Gabutti, "On high precision methods for computing integrals involving Bessel functions," Math. Comp., vol. 33, no. 147, pp. 1049-1057, 1979. T. N. L. Patterson, "On high precision methods for the evaluation of Fourier integrals with finite and infinite limits," Num. Math., vol. 27, pp. 41-52, 1976. R. K. Littlewood and V. Zakian, "Numerical evaluation of Fourier integrals," J. Inst. Applics., vol. 18, pp. 331-339, 1976. A. Alaylioglu, G. A. Evans, and J. Hyslop, "The use of Chebyshev series for the evaluation of oscillatory integrals," C. J., vol. 19, no. 2, pp. 258- 267, 1976. A. Alaylioglu, G. A. Evans, and J. Hyslop, "Automatic generation of quadrature formulae for oscillatory integrals," C. J., vol. 18, no. 2, pp. 173-176, 1975. R. Piessens and F. Poleunis, "A numerical method for the integration of oscillatory functions," B.I.T., vol. 11, pp. 317-327, 1971. N. S. Bakhvalov and L. G. Vasil'eva, "Evaluation of the integrals of oscillating functions by inetrpolation at nodes of Gaussian quadratures," USSR Comp. Math. Phys., vol. 8, pp. 241-249, 1968. E. O. Tuck, "A simple "Filon-trapezoidal" rule," Math. Comp., vol. 21, pp. 239-241, 1967. W. W. Clendenin, "A method for the numerical calculation of Fourier Integrals," Num. Math., vol. 8, pp. 422-436, 1966. Saengar, "On a numerical quadrature of fourier transforms," J. Math. Anal. Appl., vol. 8, pp. 1-3, 1964. Balbine and Franklin, "The calculation of fourier integrals," Math. Comp., vol. 20, pp. 570-589, 1960. E. A. Flinn, "A modification of Filon's method of numerical integration," J. Assoc. Comput. Mach., vol. 7, pp. 181-184, 1960. Hurwitz, Pfeifer, and Zweifel, "Numerical quadrature of fourier transform integrals II," M.T.A.C., vol. 13, pp. 89-90, 1959. I. M. Longman, "Note on a method for computing infinite integrals of oscillatory functions," Proc. Cambridge Phil. Soc. , vol. 52, pp. 764-768, 1956. Y. L. Luke, "On the computation of oscillatory integrals," Proc. Cambridge Phil. Soc., vol. 50, pp. 269-277, 1954. Hurwitz and Zweifel, "Numerical quadrature of fourier transform integrals," M.T.A.C., vol. 10, pp. 140-149, 1956. L. N. G. Filon, "On a quadrature formula for trigonometric integrals," Proc. Roy. Soc. Edinburgh, vol. 49, pp. 38-47, 1928. ============================================================================== From: David Wilkinson Subject: Re: numerical integration Date: Thu, 9 Dec 1999 21:20:20 +0000 Newsgroups: sci.math.num-analysis Keywords: evaluating numerical integrals of oscillating functions The analytical answer, from MathCad is (Pi/2)^0.5 = 1.25331 to 5 d.p. but you want to do it numerically. There are no singularities as the integrand is zero at x = 0. The difficulties are that it is an improper integral with one infinite bound and that it is oscillating with a very slow convergence to zero at high x. One way of overcoming these problems is as follows. Split the range into two parts,0 to a and a to infinity, where a is 1 or 10 or any number that is not a multiple of Pi. Use a standard numerical method for the integral from 0 to a, such as Romberg's method or adaptive integration with a prescribed error. You could use Gaussian integration but you would have to do a certain amount of work to find the error bounds by differentiating the integrand many times and evaluating it over the range. Romberg etc. are less work and just as accurate. For the second integral you can, in principle, overcome the oscillating problem by using Filon's method, truncating the range at some finite upper limit but the slow convergence makes this impractical. Instead, integrate by parts, integrating the trigonometric part and differentiating the power of x. After one step this gives cos(a)/(a)^0.5 -0.5*int(cos(x)/(x)^3/2,(x,a,inf)). If you do this repeatedly then each time you get an analytic part and a remaining integral with the denominator increased by another power of x, and hence ever more rapidly convergent. You could continue this as a series, truncating when the latest analytic part is smaller than the error required. Otherwise, at some stage you could evaluate the remaining rapidly converging integral by Filon's method over a truncated range. You can get any accuracy you like by these numerical methods, subject to rounding errors. In article <82p1lr$6eg$1@ssauraab-i-1.production.compuserve.com>, Jan C. Hoffmann <100550.3643@compuserve.com> writes > >Tanase Costin schrieb in im Newsbeitrag: >Pine.LNX.4.04.9912091355080.8408-100000@firikyiwa.percussion.phyast.pitt.e >du... >> >> >> And, sure, making proper change of variables can be as easy as >converting >> >> Integral( 1/sqrt(x) f(x) , {x, 0, 1} ) >> > >Hi, > >example: > >Integral( 1/sqrt(x) * sin(x) , {x, 0, infinty} ) > >How would you or sombody else solve this numerically. > >-- >Jan C. Hoffmann (c/o MTEC) >http://ourworld.compuserve.com/homepages/MTEC/ > -- David Wilkinson ============================================================================== From: "Jan C. Hoffmann" <100550.3643@compuserve.com> Subject: Re: numerical integration Date: Fri, 10 Dec 1999 12:44:55 +0100 Newsgroups: sci.math.num-analysis Dann Corbit schrieb in im Newsbeitrag: jZV34.3393$Jj5.2783@client... > Jan C. Hoffmann <100550.3643@compuserve.com> wrote in message > news:82p7p6$u0$1@ssauraac-i-1.production.compuserve.com... > > > > Dann Corbit schrieb in im Newsbeitrag: > > BnU34.2726$Jj5.2110@client... > > > Jan C. Hoffmann <100550.3643@compuserve.com> wrote in message > > > news:82p1lr$6eg$1@ssauraab-i-1.production.compuserve.com... > > > > > > > > Tanase Costin schrieb in im Newsbeitrag: > > > > > > Pine.LNX.4.04.9912091355080.8408-100000@firikyiwa.percussion.phyast.pitt.e > > > > du... > > > > > > > > > > > > > > > And, sure, making proper change of variables can be as easy as > > > > converting > > > > > > > > > > Integral( 1/sqrt(x) f(x) , {x, 0, 1} ) > > > > > > > > > > > > > Hi, > > > > > > > > example: > > > > > > > > Integral( 1/sqrt(x) * sin(x) , {x, 0, infinty} ) > > > > > > > > How would you or sombody else solve this numerically. > > > > > > Since the integrand diminishes more slowly than 1/x, I don't think it > > has an > > > answer. > > > > > > > Hi, > > > > yes, there is a solution. What I think is that a numerical solution is > > difficult to find. You must apply some built-in strategies. > Interesting. I did try it using double exponential integration for infinite > integrands that oscillate and got this answer: > I_8=integral (0..infinity) sin(x)/sqrt(x) dx > I_8= 1.25331 , err= 1.32964e-014 , N= 118 > > What is the correct result? Hi, your result is correct: sqrt(pi/2) = 1.25331 ... Remark: That was an example that can also be solved analytically. That is necessary for testing numerical methods and accuracy of results. I thought of finding a 100% numerical method without any changes. Just putting in a formula as is. I still think it is difficult to solve it purely numerically without (semi)analytical work. -- Jan C. Hoffmann (c/o MTEC) http://ourworld.compuserve.com/homepages/MTEC/ ==============================================================================