Re: Please explain this weird Integrate result
- To: mathgroup at smc.vnet.net
- Subject: [mg60153] Re: [mg60116] Please explain this weird Integrate result
- From: stephen layland <layland at wolfram.com>
- Date: Sun, 4 Sep 2005 03:02:24 -0400 (EDT)
- References: <200509030606.CAA19060@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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 | \*------------------------------*/
- References:
- Please explain this weird Integrate result
- From: "Jose Reckoner" <reckoner@gmail.com>
- Please explain this weird Integrate result