Pascal Molin on Tue, 11 Dec 2018 10:13:35 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Integration of periodic functions


In my opinion, it would be nice to
- use intcirc for periodic functions (and redirect the user to do so)
- use rectangle sums inside intcirc

Pascal

Le mar. 11 déc. 2018 à 01:10, Jacques Gélinas <jacquesg00@hotmail.com> a écrit :
Responding to http://pari.math.u-bordeaux.fr/archives/pari-dev-1812/msg00003.html

For periodic functions integrated over a period, the trapezoidal or midpoint methods can
give much more accurate results than other numerical integration methods.
Compare, for example, the number of bits LOST in

exr(x,y) = [exponent( if(!x,y,1-y/x) ), 0] - exponent(0.)*[1,1];

{
localbitprec(64*4);

rm = intnumromb(X=0,2*Pi,sin(X)/(5+3*sin(X)));

de = intnum(X=0,2*Pi,sin(X)/(5+3*sin(X)));

exr(-Pi/6,rm) == [9,256] && exr(-Pi/6,de) == [158,256]

}

This carries over to infinite intervals, as pointed out by Alan Turing
http://www.turingarchive.org/viewer/?id=471&title=4
where “ the method of Romberg does rather spoil than improve that
excellent convergence” of the trapezoidal method.
(Bauer+Rutishauser+Stiefel 1963 New aspects in numerical quadrature)

Ref: Weideman 2002 Numerical Integration of Periodic Functions - A Few Examples (AMM 109)

Jacques Gélinas