MathGroup Archive 2005

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

Search the Archive

Re: Please explain this weird Integrate result


and thus spake Jose  Reckoner [2005.09.03 @ 01:15]:
> 
> Expand[Integrate[(2*x)/(2*x - 1), x]]
> 
> gives
> 
> -1/2 + x + Log[-1 + 2*x]/2
> 
> But,
> 
> Expand[Integrate[1 + 1/(-1 + 2*x), x]]
> 
> gives
> 
> x + Log[-1 + 2*x]/2
> 
> even though
> 
> (2*x)/(2*x - 1) == 1 + 1/(-1 + 2*x)
> 
> Where did the extra -1/2 in the first result come from?

Looks like a bug introduced in Mathematica 5.1.  Technically the result
is correct, however, since the result of an indefinite integral depends
on some constant term.  For some reason, the -1/2 isn't being lumped
into the constant is all.  

Note that the definite integrals are both correct:

In[9]:= Integrate[(2*x)/(2*x - 1),{x,1,10}]

            Log[19]
Out[9]= 9 + -------
               2

In[10]:= Integrate[1+1/(-1+2x),{x,1,10}]

             Log[19]
Out[10]= 9 + -------
                2

In[11]:= N[%]

Out[11]= 10.4722

In[12]:= NIntegrate[1+1/(-1+2x),{x,1,10}]

Out[12]= 10.4722

--
/*------------------------------*\
|        stephen layland         |
|    Documentation Programmer    |
| http://members.wri.com/layland |
\*------------------------------*/


  • Prev by Date: Re: ComplexExpand confusion
  • Next by Date: Re: ComplexExpand confusion
  • Previous by thread: Please explain this weird Integrate result
  • Next by thread: Re: Please explain this weird Integrate result