MathGroup Archive 1999

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

Search the Archive

RE: Integrate (undocumented feature)

  • To: mathgroup at
  • Subject: [mg20803] RE: Integrate (undocumented feature)
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Sun, 14 Nov 1999 18:13:52 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Following my suggestion that Integrate has an undocumented capability to do
integrals around a contour in the complex plane. Bill Bertram wrote noted
cases where Integrate gives the wrong answer for such problems.  One such
example was:
>Integrate[1/(x - 2I), {x, -1, 1, 1 + 3I, -1 + 3I, -1}] // FullSimplify
>this gives  the result  I Pi (wrong by a factor 2)

I wonder if the problem isn't so much with the way Integrate 
handles the form 
  Integrate[f[x],{x,x0,x1,x2, ...}]
but Integrate may incorrectly do the integral along one of the line
segments.  Consider the problem below (using Version 4).

Integrate[1/(x - 2I), {x, -1 + 3I, 1 + 3I}] // N
0. + 1.5708*I

NIntegrate[1/(x - 2I), {x, -1 + 3I, 1 + 3I}]
0. - 1.5708*I

I am far from an expert on this subject, but I suspect NIntegrate got it
right and Integrate got it wrong. It seems with Version 4 we seldom hear
about errors with Integrate except when the integrand explicitly involves
complex numbers, or the limits of integration are complex.  In any case I
think one should always verify results from Integrate with NIntegrate.

Ted Ersek

For Mathematica tips, tricks see

  • Prev by Date: Mangled the notebook settings.
  • Next by Date: Re: Re: TensorQ
  • Previous by thread: Re: Integrate (undocumented feature)
  • Next by thread: Deleting a DownValue, Evaluate[f@@argList]=. does not do it