More gaussian integration bugs
- To: mathgroup at yoda.physics.unc.edu
- Subject: More gaussian integration bugs
- From: pmcguire at amethyst.bucknell.edu
- Date: Wed, 8 Apr 92 09:56:22 EDT
lsf at holmes.astro.nwu.edu (Sam Finn) noted that the following incorrect
computation
occurred with Mathematica on a Sparcstation:
Mathematica version 2.0.4.5
The following integral is incorrect. The sign of the result is a clear
tip-off; moreover, it is a tabulated integral and can be found in
Gradshteyn & Ryzhik (3.462 4).
Mathematica 2.0 for SPARC
Copyright 1988-91 Wolfram Research, Inc.
-- OPEN LOOK graphics initialized --
In[1]:= Integrate[x Exp[-(x-1)^2] , {x, -Infinity, Infinity}]
3 3
-(2 E Sqrt[Pi] + HypergeometricU[-, -, 1])
2 2
Out[1]= ------------------------------------------
2 E
In[2]:= N[%]
Out[2]= -1.86153
The difficulty seems to be machine dependent as I got the correct result
using Mathematica 2.0 on a MacIIcx with no problem. To recognize this as
the correct answer it is easy to see the integral is the same as
Integrate[Exp[-x^2]],{x,-Infinity,Infinity].
Integrate[x Exp[-(x-1)^2] , {x, -Infinity, Infinity}]
Pi^(1/2)
N[%]
1.772453850905516027
Paul McGuire
pmcguire at bucknell.edu