MathGroup Archive 2007

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

Search the Archive

Re: Integrate bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76779] Re: Integrate bug
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 27 May 2007 04:56:13 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <f38qnt$hsh$1@smc.vnet.net>

dimitris wrote:
> $VersionNumber
> 5.2
> 
> In[75]:=
> int1 = (1/(2*Pi*I))*Integrate[1/o, {o, 1, I, -1, -I, 1}]
> Out[75]=
> 1
> 
> In[76]:=
> int2 = (1/(2*Pi*I))*Integrate[1/o, {o, r, r*I, -r, (-r)*I, r},
> Assumptions -> r > 0]
> Out[76]=
> 1
> 
> In[78]:=
> int3 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, 1, I, -1, -I, 1}]
> Out[78]=
> 2
> 
> In[82]:=
> int4 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, r, r*I, -r, (-r)*I, r},
> Assumptions -> r > 0]
> Simplify[int4]
> 
> Out[82]=
> -((I*((-E^(-2/r))*r - E^(2/r)*r + (E^(-2/r) - I*E^((2*I)/r))*r +
> (I*E^((2*I)/r) + E^(2/r))*r))/(2*Pi))
> Out[83]=
> 0
> 
> inti (i=1,2,3) are correct (residue theorem)
> int4 is incorrect (it should be 2; residue theorem)
> 
> 1)Any ideas for workarounds in version 5.2?
> 2)What does version 6 do?
> 
> Thanks
> Dimitris

Hi Dimitris,

I have got {1, 1, 0, 0} with version 6.0.

In[1]:= $VersionNumber

Out[1]= 6.

In[2]:= int1 = (1/(2*Pi*I))*Integrate[1/o, {o, 1, I, -1, -I, 1}]

Out[2]= 1

In[3]:= int2 = (1/(2*Pi*I))*
   Integrate[1/o, {o, r, r*I, -r, (-r)*I, r},
        Assumptions -> r > 0]

Out[3]= 1

In[4]:= int3 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, 1, I, -1, -I, 1}]
FullSimplify[int3]

Out[4]= -((1/(2*Pi))*(I*(I*E^(2*I) + 4*I*Pi - I*Cos[2] -
             2*ExpIntegralEi[2*I] + 2*ExpIntegralEi[2] +
        2*Gamma[0, -2] -
             2*Gamma[0, -2*I] + Sin[2])))

Out[5]= 0

In[6]:= int4 = (1/(2*Pi*I))*
   Integrate[Exp[2/o], {o, r, r*I, -r, (-r)*I, r},
        Assumptions -> r > 0]
FullSimplify[int4, Assumptions -> r > 0]

Out[6]= -((1/(2*Pi))*(I*(4*I*Pi - I*E^((2*I)/r)*r - E^(2/r)*r +
             (I*E^((2*I)/r) + E^(2/r))*r +
        2*ExpIntegralEi[-((2*I)/r)] -
             2*ExpIntegralEi[(2*I)/r] - 2*Gamma[0, -((2*I)/r)] +
             2*Gamma[0, (2*I)/r])))

Out[7]= 0

Best regards,
Jean-Marc


  • Prev by Date: Re: Fun with Manipulate
  • Next by Date: Re: Stopping Automatic Animation in v6
  • Previous by thread: Integrate bug
  • Next by thread: Re: Integrate bug