Integration or Evaluation Bug

*To*: mathgroup at smc.vnet.net*Subject*: [mg69339] Integration or Evaluation Bug*From*: "Chris H. Fleming" <chris_h_fleming at yahoo.com>*Date*: Thu, 7 Sep 2006 23:58:06 -0400 (EDT)

I have found what is either a bug in integration or evaluation of exponential integrals and boiled it down to this simple example NIntegrate[Exp[-w] Cos[w t] / (w^2+1),{w,0,1000}] Plotted as a function of t, this is correctly oscillatory decay Assuming[t > 1/1000, Integrate[Exp[-w] Cos[w t] / (w^2+1),{w,0,1000}]] Plotted as a function of t, this is incorrectly growth instead of decay. The analytic answer has all terms like Exp[stuff t] Ei[-stuff t] If stuff was real, that would decay like 1/(stuff t) So I don't know if it's an integration bug or a bug in Ei evaluation