MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Polylogarithm Integration - Bis

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46160] Re: Polylogarithm Integration - Bis
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Mon, 9 Feb 2004 05:54:07 -0500 (EST)
  • References: <c02l20$71b$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Bill Rowe <readnewsciv at earthlink.net> wrote:
> On 2/6/04 at 4:15 AM, D at D.gov (D) wrote:
>
> >Some more example for the integral:
>
> >Integrate[PolyLog[2, Exp[I*(x - y)]], {y, 0, 2*Pi}]
>
> >with x=5/2, I get 0 as expected. But with x=2.5 I get
>
> >19.634954084936204 + I*1.7763568394002505`*^-15
>
> >which is not close to zero!
>
> When you use x = 5/2 you are asking Mathematica to use exact numbers. So,
> Integrate returns the correct exact result of 0. But when you use 2.5 you
> are asking Mathematica to use machine precision numbers. Integrate does
> not seem to be coded to avoid problems with loss of precision that occurs
> with machine precision numbers.

You miss the point. Such a huge discrepancy cannot be explained in this
simple manner. See below.

> If you want to use machine precision, use
> NIntegrate instead of Integrate.
>
> When I use NIntegrate with x = 2.5 on this problem I get
>
> -1.551478671979467*^-6 - 7.615056976939538*^-7*I
>
> and a warning that numerical integration is converging too slowly.
> Clearly, this result is close to zero. And coupled with the warning
> strongly indicates there are issues with numerical precision for this
> particular integral.

Unfortunately you snipped the part where D had said:

"With x=-2.5 I get

  44.964016795241896 + I*1.7763568394002505`*^-15

etc.

I have only one conclusion: there is a
bug with Integrate or PolyLog or both."

So now consider the following, obtained using version 5.0:

In[1]:= Integrate[PolyLog[2, Exp[I*(x - y)]], {y, 0, 2*Pi}]

Out[1]= If[x >= 2*Pi || x <= 0, Pi^3 - Pi*Log[-E^((-I)*x)]^2 +
   2*I*Pi^2*Log[1 - E^((-I)*x)] - 2*I*Pi^2*Log[1 - E^(I*x)],
  Integrate[PolyLog[2, E^(I*(x - y))], {y, 0, 2*Pi},
   Assumptions ->  !(x >= 2*Pi || x <= 0)]]

In[2]:= % /. x -> -5/2

Out[2]= Pi^3 - 2*I*Pi^2*Log[1 - E^(-((5*I)/2))] +
   2*I*Pi^2*Log[1 - E^((5*I)/2)] - Pi*Log[-E^((5*I)/2)]^2

In[3]:= FullSimplify[%]

Out[3]= (1/4)*(5 - 4*Pi)^2*Pi

The above is essentially the same result as D got, but using exact numbers.

In[4]:= N[%]

Out[4]= 44.964016795241896

But the answer should presumably be 0 instead:

In[5]:= Integrate[PolyLog[2, Exp[I*(-5/2 - y)]], {y, 0, 2*Pi}]

Out[5]= 0

So I must agree with D that there is indeed a bug somewhere here.

David Cantrell


  • Prev by Date: RE: Formal Definition of the Term "Form"
  • Next by Date: Re: Can't display Times font in Windows XP
  • Previous by thread: Re: Polylogarithm Integration - Bis
  • Next by thread: Re: Polylogarithm Integration - Bis