Re: [Q] Why Integrate[1/x,x] <> Log[Abs[x]] with Mma 2.2 ?
- To: mathgroup at smc.vnet.net
- Subject: [mg8788] Re: [Q] Why Integrate[1/x,x] <> Log[Abs[x]] with Mma 2.2 ?
- From: "Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
- Date: Thu, 25 Sep 1997 12:26:22 -0400
- Organization: Defence Evaluation and Research Agency
- Sender: owner-wri-mathgroup at wolfram.com
Denis Barbier <barbier at cmapx.polytechnique.fr> wrote in article <5vt7q9$ghc at smc.vnet.net>... > 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 Log[Abs[x2]]-Log[Abs[x1]]. 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 expected. -- Stephen P Luttrell luttrell at signal.dra.hmg.gb Adaptive Systems Theory 01684-894046 (phone) Room EX21, DERA 01684-894384 (fax) Malvern, Worcs, WR14 3PS, U.K. http://www.dra.hmg.gb/cis5pip/Welcome.html