RE: Integrate (undocumented feature)
- To: mathgroup at smc.vnet.net
- Subject: [mg20803] RE: Integrate (undocumented feature)
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Sun, 14 Nov 1999 18:13:52 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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). In[1]:= Integrate[1/(x - 2I), {x, -1 + 3I, 1 + 3I}] // N Out[1]= 0. + 1.5708*I In[2]:= NIntegrate[1/(x - 2I), {x, -1 + 3I, 1 + 3I}] Out[2]= 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. Regards, Ted Ersek For Mathematica tips, tricks see http://www.dot.net.au/~elisha/ersek/Tricks.html