MathGroup Archive 2004

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

Search the Archive

Re: Polylogarithm Integration - Bis

  • To: mathgroup at
  • Subject: [mg46135] Re: Polylogarithm Integration - Bis
  • From: Bill Rowe <readnewsciv at>
  • Date: Sat, 7 Feb 2004 04:02:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 2/6/04 at 4:15 AM, D at (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. 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.
To reply via email subtract one hundred and four

  • Prev by Date: RE: derivation of a picewise defined function
  • Next by Date: Re: Specifying arguments inside nested functions
  • Previous by thread: Polylogarithm Integration - Bis
  • Next by thread: Re: Polylogarithm Integration - Bis