MathGroup Archive 2004

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

Search the Archive

Re: Nasty bug in Integrate (version 5.0)

mathuser7 at (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

  • Prev by Date: Re: MathML Namespace + Mathematica
  • Next by Date: Re: changing replacement rule arrow ( ->) to equal sign(==)...
  • Previous by thread: Re: Nasty bug in Integrate (version 5.0)
  • Next by thread: Re: Nasty bug in Integrate (version 5.0)