MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Re: how to pick out alternating columns and rows in a matrix?
  • Next by Date: Re: Re (-1)^(3/4) -> (-1+I)/Sqrt[2] ?
  • Previous by thread: Fonts for math eqns in Davis,Porta&Uhl
  • Next by thread: Re: Re (-1)^(3/4) -> (-1+I)/Sqrt[2] ?