MathGroup Archive 2005

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

Search the Archive

Re: Please explain this weird Integrate result

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60146] Re: Please explain this weird Integrate result
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 4 Sep 2005 03:02:11 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, U.K.
  • References: <dfbevv$inu$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jose Reckoner wrote:
> 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?
> 
Hi Jose,

the constant term -1/2 is a constant of integration. Say f(x) is any 
real function, F(x) is the primitive of f(x), then any function F(x) + 
C, C being an arbitrary constant, is an indefinite integral of f(x); 
that is (F(x) + C)' = f(x).

Now, *Integrate* does not return any symbolic  constant term such as C
(so we would get x + (1/2)*Log[-1 + 2*x] + C for instance), nor does it 
return, usually,  any numeric constant term (or you may think of the 
value of the constant to be zero).

However, a constant term might be returned sometimes, like in your case. 
  Two different, although equivalent, expressions may lead to different 
representations of the solution since the algorithms used by *Integrate* 
might be different in each case.

As long as you work with indefinite integrals, you may "discard" the 
constant term -1/2 and be sure that both indefinite integrals represent 
the same family of functions.

In[1]:=
int1 = Expand[Integrate[(2*x)/(2*x - 1), x]]

Out[1]=
-(1/2) + x + (1/2)*Log[-1 + 2*x]

In[2]:=
int2 = Expand[Integrate[1 + 1/(-1 + 2*x), x]]

Out[2]=
x + (1/2)*Log[-1 + 2*x]

In[3]:=
int1 - int2

Out[3]=
-(1/2)

In[4]:=
D[int1, x]

Out[4]=
1 + 1/(-1 + 2*x)

In[5]:=
D[int2, x]

Out[5]=
1 + 1/(-1 + 2*x)

Obviously, the second form for the integrand is the one preferred by 
Mathematica.

Best regards,
/J.M.


  • Prev by Date: Re: my wish list for Mathematica next major version
  • Next by Date: Re: Re: piecewise vs which
  • Previous by thread: Re: Please explain this weird Integrate result
  • Next by thread: ComplexExpand confusion