Integration Bug in Mathematica
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg589] Integration Bug in Mathematica
- From: Rod Frehlich <rgf at terra.colorado.edu>
- Date: Wed, 22 Mar 1995 07:28:19 -0700
Integration bug in Mathematica for Integrate[x Exp[-a x^2 ] Sin[b x + c]^2,{x,-Infinity,Infinity}] Mathematica 2.2 for IBM RISC System/6000 Copyright 1988-93 Wolfram Research, Inc. -- Terminal graphics initialized -- In[3]:= In[3]:= y = x Exp[-a x^2 ] Sin[b x + c]^2 2 x Sin[c + b x] Out[3]= --------------- 2 a x E In[4]:= In[4]:= y1 = Integrate[y,{x,-Infinity,Infinity}] General::intinit: Loading integration packages -- please wait. Out[4]= 0 In[5]:= In[5]:= y = y /. {Sin[x_]^2 -> 1/2 - 1/2 Cos[2 x]} 1 Cos[2 (c + b x)] x (- - ----------------) 2 2 Out[5]= ------------------------ 2 a x E In[6]:= In[6]:= y2 = Integrate[y,{x,-Infinity,Infinity}] 2 Sqrt[b ] Sqrt[Pi] Sin[2 c] Out[6]= -------------------------- 2 3/2 b /a 2 a E In[7]:= In[7]:= (* y1 and y2 should be equal! y1 is obviously incorrect since the integrand x Exp[-a x^2 ] Sin[b x + c]^2 is not an odd function *) In[8]:= Rod Frehlich, University of Colorado