Dirk Laurie on Sun, 18 Mar 2018 19:21:08 +0100


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

Summation methods in Pari


In another thread, the integral

   intnum(x=0, +oo, x*exp(cos(x))*sin(sin(x))/(x^2+1))

was put forward.

One usually treats such integrals by integrating between the zeros of
the integerant and summing the series.

That is, one calculates it as

   a(j) = intnum(x=(j-1)*Pi,j*Pi,x*exp(cos(x))*sin(sin(x))/(x^2+1))
   sumalt(j=1,a(j))
0.69629540719872898198270609602401738323

checking the result by the other option to sumalt

   sumalt(j=1,a(j),1)
0.69562691429044417458883167983867515631

It is clear that at least one of these answers is in error by at least 0.0003.

The reason is that the sequence a(j) is not totally alternating, and
the theoretical basis for the acceleration method fails.

Since this is a property that the software could easily check, could
not a warning message be printed?