MathGroup Archive 1997

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

Search the Archive

Re: [Q] Why Integrate[1/x,x] <> Log[Abs[x]] with Mma 2.2 ?

  • To: mathgroup at
  • Subject: [mg8788] Re: [Q] Why Integrate[1/x,x] <> Log[Abs[x]] with Mma 2.2 ?
  • From: "Stephen P Luttrell" <luttrell at>
  • Date: Thu, 25 Sep 1997 12:26:22 -0400
  • Organization: Defence Evaluation and Research Agency
  • Sender: owner-wri-mathgroup at

Denis Barbier <barbier at> wrote in article
<5vt7q9$ghc at>...
> it is well known that Integrate[1/x,x] = Log[Abs[x]], but Mma 2.2 returns
> Log[x].
> How can i correct this ?

I have checked that the following works correctly in Mathematica 3.0. I
don't know whether version 2.2 will behave in the same way.

Log[x] is the correct result, where x is a complex number.

If you want to evaluate the definite integral between two points on the
positive real line (which is what I suspect you want to do - correct me if
I'm wrong), then Log[x2]-Log[x1] will give the same result as

If you want to evaluate the integral along a piecewise linear contour whose
corners are specified by the list {x1,x2,...,xn}, where the xi are complex
numbers, then evaluate Integrate[1/x,{x,x1,x2,...,xn}]. For instance,
Integrate[1/x,{x,1,I,-1,-I,1}] will yield the result 2 I \[Pi], as

Stephen P Luttrell                                      
luttrell at
Adaptive Systems Theory                           01684-894046 (phone)
Room EX21, DERA                                    01684-894384 (fax)      
Malvern, Worcs, WR14 3PS, U.K.   

  • Prev by Date: Re: FindMinimum on a potentially Complex-valued function
  • Next by Date: need help
  • Previous by thread: Re: [Q] Why Integrate[1/x,x] <> Log[Abs[x]] with Mma 2.2 ?
  • Next by thread: remote kernel