       Re: bugs in Mathematica 5.1

• To: mathgroup at smc.vnet.net
• Subject: [mg54046] Re: [mg54032] bugs in Mathematica 5.1
• From: "Igor C. Antonio" <igora at wolfram.com>
• Date: Wed, 9 Feb 2005 09:27:18 -0500 (EST)
• Organization: Wolfram Research, Inc.
• References: <200502081031.FAA17731@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Gennady Stupakov wrote:
> I tried to post this a few days ago, but it looks like it did not make it.
>
> Here is a couple of bugs that I found recently in Mathematica 5.1.
>
> In:={\$System, \$Version, \$MachineType, \$ProcessorType}
> Out={"Microsoft Windows","5.1 for Microsoft Windows (October 25, 2004)",
> "PC", "x86"}
>
> First, I integrate E^(I*x^2),  from 0 to Infinity and get zero, which, of
> course, is wrong.
>
> In:={Integrate[E^(I*x^2), {x, 0, Infinity}], Integrate[Cos[x^2] +
> I*Sin[x^2], {x, 0,
> Infinity}]}
> Out={0, (1/2 + I/2)*Sqrt[Pi/2]}
>

Mathematica 5.1 for Windows indicates that it does not converge.

In:= Integrate[E^(I*x^2), {x, 0, Infinity}]

2
I x
Integrate::idiv: Integral of E     does not converge on {0, Infinity}.

2
I x
Out= Integrate[E    , {x, 0, Infinity}]

In:=

> Second is a more complicated integral that I recently encounted in my
> research.
>
> In:=Integrate[E^(a*Cos[x] - b*Cos[2*x]), {x, 0, 2*Pi},
> GenerateConditions -> True]
> Out=If[Re[a] < Re[b], 2*Pi*BesselI[0, -a + b], Integrate[E^(a*Cos[x] -
> b*Cos[2*x]), {x, 0,
> 2*Pi},Assumptions -> Re[a] >= Re[b]]]
>
> Let us check this result comparing it with numerical integration for, say,
> b=2 and a=1:
>
> In:=
> b = 2.;
> a = 1.;
> {Integrate[E^(a*Cos[x] - b*Cos[2*x]), {x, 0, 2*Pi}], NIntegrate[E^(a*Cos[x]
> + b*Cos[2*x]),
> {x, 0, 2*Pi}]}
> Out={7.95493, 20.8711}
>
> Again, the analytical result is wrong.

Please file this with support at wolfram.com and Technical Support will

>
> It would be interesting if those bugs are reproduced on other OS and/or
> versions of Mathematica.
>