Re: Nasty bug in Integrate (version 5.0)
- To: mathgroup at smc.vnet.net
- Subject: [mg45919] Re: Nasty bug in Integrate (version 5.0)
- From: Harold.Noffke at wpafb.af.mil (Harold Noffke)
- Date: Thu, 29 Jan 2004 05:36:43 -0500 (EST)
- References: <bv83h6$icj$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
MathUser: I also run Mathematica 5.0. I tested all your integrals, and obtained answers which appear to be correct, except for Out[2] below. In[2] doesn't seem to know it should account for the pole at x=0, if a or b (not both) are negative. I would have expected a warning message about the pole, and maybe also about the limit of 1+c as c -> -1. Out[2] was not the answer I expected. I don't see why the Log[ ... ] expression disappeared. Maybe an answer to this question can be posted. Before running each integral, did you Remove x,a,b to be sure they don't carry spurious values? If you have time, try analyzing a Trace on In[2]. I'd be interested in reading a post of the results. Mathematica 5.0 for Microsoft Windows Copyright 1988-2003 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= Integrate[1/x + x^c, {x, a, b}] Im[b] Out[1]= (-a + b) If[(Im[a] - Im[b]) (-(Im[b] Re[a]) + Im[a] Re[b]) > 0 || ------------- >= 0 || Im[a] - Im[b] 1 + c 1 + c Im[a] a - b + Log[a] + c Log[a] - Log[b] - c Log[b] > -------------- >= 0, -------------------------------------------------------, -Im[a] + Im[b] (a - b) (1 + c) 1 c > Integrate[-------------- + (a + (-a + b) x) , {x, 0, 1}, a + (-a + b) x Im[b] > Assumptions -> !((Im[a] - Im[b]) (-(Im[b] Re[a]) + Im[a] Re[b]) > 0 || ------------- >= 0 || Im[a] - Im[b] Im[a] > -------------- >= 0)]] -Im[a] + Im[b] In[2]:= Integrate[1/x + x^c, {x, a, b}, Assumptions -> {Element[a,Reals], Element[b, Reals]}] 1 + c 1 + c -a + b Out[2]= ---------------- 1 + c In[3]:= Integrate[1/x + x^c, {x, a, b}, Assumptions -> {a > 0, b > 0}] 1 + c 1 + c -a + b b Out[3]= ---------------- + Log[-] 1 + c a Regards, Harold