Re: Nasty bug in Integrate (version 5.0)

*To*: mathgroup at smc.vnet.net*Subject*: [mg45926] Re: Nasty bug in Integrate (version 5.0)*From*: "David W. Cantrell" <DWCantrell at sigmaxi.org>*Date*: Thu, 29 Jan 2004 05:36:56 -0500 (EST)*References*: <bv83h6$icj$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

mathuser7 at hotmail.com (Math User) wrote: > Could anyone explain why Mathematica 5.0 is ignoring the term 1/x in > the first and second answers? Looks like a bug to me. I'd be interested to know how it came to be. > In[1]:= Integrate[1/x + x^c, {x, a, b}] > > Out[1]= (-a^(1 + c) + b^(1 + c))/(1 + c) This reminds me that I'm not even happy with In[1]:= Integrate[x^c, x]] Out[1]= x^(1 + c)/(1 + c) because it's incorrect when c is -1. I would have hoped that perhaps Mathematica would have given something like If[c == -1, Log[x], x^(1 + c)/(1 + c)] instead. I also think it strange that one cannot even coax Mathematica into considering the possibility that c might be -1 by the following In[2]:= Assuming[c == -1, Integrate[x^c, x]] Out[2]= x^(1 + c)/(1 + c) BTW, for Integrate[x^c, x]], I would also say that a better answer than Mathematica's is (x^(1 + c) -1)/(1 + c) because at least we then have it "correct" in the sense that In[3]:= Limit[(x^(1 + c) - 1)/(1 + c), c -> -1] Out[3]= Log[x] David Cantrell