Re: Incorrect integral in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg91436] Re: Incorrect integral in Mathematica*From*: Bhuvanesh <BhuvaneshBhatt at gmail.com>*Date*: Thu, 21 Aug 2008 05:56:44 -0400 (EDT)

This was a bug. Essentially, the following should have Sqrt[Pi]/Sqrt[a], but it was incorrectly giving zero in version 5.0.x: Integrate[Exp[-a*(y - y0)^2], {y, -Infinity, Infinity}, GenerateConditions->False] Here are a couple of workarounds: $Version = 5.0.1 for Linux (November 18, 2003) In[1]:= Integrate[Exp[-x^2/(2w^2)]Exp[-(y - y0)^2/(2z^2)], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, GenerateConditions->True] /. If[_,res_,_]:>res //InputForm Integrate::gener: Unable to check convergence. Out[1]//InputForm= Sqrt[2*Pi]*Sqrt[z^2]*If[Re[w^2] > 0, Sqrt[2*Pi]*Sqrt[w^2], Integrate[E^(-x^2/(2*w^2)), {x, -Infinity, Infinity}, Assumptions -> Re[w^2] <= 0]] In[2]:= Integrate[Exp[-x^2/(2w^2)]Exp[-(y - y0)^2/(2z^2)], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}, Assumptions->z>0] //InputForm Out[2]//InputForm= Sqrt[2*Pi]*z*If[Re[w^2] > 0, Sqrt[2*Pi]*Sqrt[w^2], Integrate[E^(-x^2/(2*w^2)), {x, -Infinity, Infinity}, Assumptions -> z > 0 && Re[w^2] <= 0]] The integral works correctly in version 5.1 and newer versions. Sorry for the inconvenience. Bhuvanesh, Wolfram Research