       Re: Integrate bug

• To: mathgroup at smc.vnet.net
• Subject: [mg76851] Re: Integrate bug
• From: dimitris <dimmechan at yahoo.com>
• Date: Mon, 28 May 2007 01:11:44 -0400 (EDT)
• References: <f38qnt\$hsh\$1@smc.vnet.net><f3bhoh\$3gs\$1@smc.vnet.net>

``` /  Jean-Marc Gulliet       :
> dimitris wrote:
> > \$VersionNumber
> > 5.2
> >
> > In:=
> > int1 = (1/(2*Pi*I))*Integrate[1/o, {o, 1, I, -1, -I, 1}]
> > Out=
> > 1
> >
> > In:=
> > int2 = (1/(2*Pi*I))*Integrate[1/o, {o, r, r*I, -r, (-r)*I, r},
> > Assumptions -> r > 0]
> > Out=
> > 1
> >
> > In:=
> > int3 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, 1, I, -1, -I, 1}]
> > Out=
> > 2
> >
> > In:=
> > int4 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, r, r*I, -r, (-r)*I, r},
> > Assumptions -> r > 0]
> > Simplify[int4]
> >
> > Out=
> > -((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=
> > 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:= \$VersionNumber
>
> Out= 6.
>
> In:= int1 = (1/(2*Pi*I))*Integrate[1/o, {o, 1, I, -1, -I, 1}]
>
> Out= 1
>
> In:= int2 = (1/(2*Pi*I))*
>    Integrate[1/o, {o, r, r*I, -r, (-r)*I, r},
>         Assumptions -> r > 0]
>
> Out= 1
>
> In:= int3 = (1/(2*Pi*I))*Integrate[Exp[2/o], {o, 1, I, -1, -I, 1}]
> FullSimplify[int3]
>
> Out= -((1/(2*Pi))*(I*(I*E^(2*I) + 4*I*Pi - I*Cos -
>              2*ExpIntegralEi[2*I] + 2*ExpIntegralEi +
>         2*Gamma[0, -2] -
>              2*Gamma[0, -2*I] + Sin)))
>
> Out= 0
>
> In:= 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= -((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= 0
>
> Best regards,
> Jean-Marc

int1 and int2 returns 1 in both 5.2 and 6.
Good! This is in agreement with residue thorem.

int3 returns 0 in 6?
We have discovered a bug in version 6, I think.
The result should be 2;I hope I ,don't miss something!
Version 5.2 gives 2.

int4 give 0 in 6? So does 5.2.
The result should be 2. Again I hope I don't miss something!

Dimitris

```

• Prev by Date: Re: Quadratic form: symbolic transformation
• Next by Date: Re: Quadratic form: symbolic transformation
• Previous by thread: Re: Integrate bug
• Next by thread: Integrate bugs