Ilya Zakharevich on Mon, 04 Mar 2019 17:58:23 +0100


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

Re: Integration Methods in PARI


On Fri, Mar 16, 2018 at 5:57 PM, <Henri.Cohen@math.u-bordeaux.fr> wrote:
> Pari is unable to integrate an oscillating function of this type; in
> fact I would be surprised if any software could do it. 

What is the problem?

    (06:34) gp > f(x) = sumnum(N=0,(x+N*2*Pi)/((x+N*2*Pi)^2+1) - N/(N^2+1)/2/Pi)
    %1 = (x)->sumnum(N=0,(x+N*2*Pi)/((x+N*2*Pi)^2+1)-N/(N^2+1)/2/Pi)
    (06:34) gp > \p 150
       realprecision = 154 significant digits (150 digits displayed)
    (06:34) gp > intnum(x=0, 2*Pi, exp(cos(x))*sin(sin(x))*f(x),1) - Pi/2*(exp(exp(-1))-1)
    time = 40,856 ms.
    %2 = -3.729170365600103372 E-154

The need to use the optional argument to intnum() is the (unfortunate)
catastrophic loss of precision in intnum().  (I reported it recently
with a possible fix.)

Ilya