Group Abstract Group Abstract

Message Boards Message Boards

1
|
17.4K Views
|
9 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Integrate[1/x, x] should give Log[Abs[x]] but does not ?

Posted 8 years ago

Hello everyone, I tried to use the following statement:

In[1]:= Integrate[1/x, x]

Out[1]= Log[x]

Why the Out is without the absolute value? My goal is to get Out=Log[Abs[x]].

Thank you very much for your help.

POSTED BY: Gennaro Arguzzi
9 Replies
POSTED BY: Michael Rogers
POSTED BY: Murray Eisenberg
Posted 8 years ago

The general real antiderivative, rarely taught in calculus courses, is

$$\int {1 \over x} \; dx = \cases{ \log x + C_1 & $x > 0$ \cr \log (-x) + C_2 & x < 0 \cr}\,,$$

where $C_1$ and $C_2$ are independent real constants. The independence is due to the disconnected domain over the reals. Over the complex plane, the domain is connected but there is a branch-cut discontinuity (along the negative real axis for Mathematica's Log[x]).

In practical work, in the way the antiderivative arises, one usually has at hand a specific domain that does not contain $0$. In such a case the independence of $C_1$ and $C_2$ does not arise and one may deal with the formula $\log |x| + C$ for the antiderivative since $|x| = x$, $C = C_1$ or $|x| = -x$, $C = C_2$ according as the domain is positive or negative respectively.

Likewise, such practical work may be dealt with using the complex logarithm (such as Log[x] in Mathematica), but the constant of integration will have to contain a term of $-i\,\pi$ if $x$ is negative so that the value of the antiderivative will be real. This is often inconvenient when using Mathematica in introductory calculus classes, in which students have not yet been introduced to complex functions.

POSTED BY: Updating Name

RealAbs[] is new in Mathematica 11.1, so it would to be in 10.2.

So, what you got as an answer is basically a reformatted input.

Hello @Gianluca Gorni , my software gives me a different output:

In[24]:= D[Log[RealAbs[x]], x] // Simplify

Out[24]= Derivative[1][RealAbs][x]/RealAbs[x]

Do you know why? I'm using Mathematica 10.2.

POSTED BY: Gennaro Arguzzi

Since the recent introduction of RealAbs we have

In[11]:= D[Log[RealAbs[x]], x] // Simplify

Out[11]= 1/x

Is RealIntegrate coming soon?

POSTED BY: Gianluca Gorni

Hello @Carlo Barbieri , is there a way to tell to Mathematica that x is real? If I do this, Mathematica'll give me Log[Abs[x]] (I hope).

POSTED BY: Gennaro Arguzzi

Integrate returns a primitive (also called antiderivative or indefinite integral) valid in the complex plane, which means that the derivative will recover the integrand. The proposed result of Log[Abs[x]] is not correct for this purpose.

POSTED BY: Daniel Lichtblau

I'm not sure what you ask for is the correct result:

In[86]:= Integrate[1/x, {x, 1, z}]
Out[86]= ConditionalExpression[Log[z], Re[z] > 0 || z \[NotElement] Reals]

Remember that in general Mathematica treats symbols that you haven't otherwise specified as complex. So if you replace z with I, you will find I Pi/2 which is Log[I]. So in general the result of that integral for negative real z doesn't exist, but it does exist for arbitrary complex numbers, so you just can't take the Abs there.

This is where things start to get interesting: Exp[I Pi/2 + 2 k Pi] == I for all k, so actually you can't really say that Log is the inverse of Exp in the complex plane. This will get you into the amazing territory of Riemann surfaces, but I don't want to go any further. Maybe you can read this wikipedia article.

POSTED BY: Carlo Barbieri
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard