MathGroup Archive 1993

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

Search the Archive

Re: Log[ E^x ]

  • To: mathgroup at
  • Subject: Re: Log[ E^x ]
  • From: villegas
  • Date: Sat, 11 Dec 1993 21:09:01 -0600

Iain "D." Currie <iain at> asked:

> I know x > 0.  How can I make 


> Log[ E^x ]

> evaluate to x??

> Iain Currie

The friendly rules of pre-calculus and calculus can usually be
enforced by applying the PowerExpand operator to the expression.
For your example:

In[1]:= Log[E^x] //PowerExpand

Out[1]= x

This will ignore the question of whether 'x' falls in the image of the
principal branch of the logarithm function.  Since you know x does
(the branch chosen by the built-in Log maps the complex plane, punctured
at the origin, to the open-closed strip -Infinity < Re[z] < +Infinity &&
-Pi < Im[z] <= +Pi, which contains the positive real axis), this
formula is valid.

   By the way, we can see which branch of the logarithm the built-in
'Log' is by using the PolarMap function in the package
ProgrammingExamples`ComplexMap` :

In[4]:= Needs["ProgrammingExamples`ComplexMap`"]

In[5] := ? PolarMap

PolarMap[f, {r0:0, r1, (dr)}, {phi0, phi1, (dphi)}, options...] plots the
   image of the polar coordinate lines under the function f. The default
   values of dr and dphi are chosen so that the number of lines is equal
   to the value of the option PlotPoints of Plot3D[]. The default for the
   phi range is {0, 2Pi}.

Try plotting on a disk that has a small puncture in the center to avoid
the origin; I chose E^-2 <= r <= E^3.  And use a variety of theta
intervals of length 2 Pi to see that the image is always contained in
the strip from -Pi to +Pi.

PolarMap[Log, {E^-2, E^3}, {0, 2 Pi}, PlotRange->All]

PolarMap[Log, {E^-2, E^3}, {-3 Pi, -Pi}, PlotRange->All]

   PowerExpand will perform other simplifications that are valid if the
variables are confined to certain subsets of the plane:

(1)  Log[x y] ===> Log[x] + Log[y]

In[22]:= Log[x y] //PowerExpand

Out[22]= Log[x] + Log[y]

(2)  Log[x^p] ===> p Log[x]

In[23]:= Log[x^p] //PowerExpand

Out[23]= p Log[x]

(3)  Sqrt[x y] ===> Sqrt[x] Sqrt[y]

In[24]:= Sqrt[x y] //PowerExpand

Out[24]= Sqrt[x] Sqrt[y]

(4)  (x y)^r  ===>  x^r y^r  (generalization of 3)

In[25]:= (x y)^r //PowerExpand

          r  r
Out[25]= x  y

Robby Villegas
Technical Support
Wolfram Research

  • Prev by Date: Rules for MPS format
  • Next by Date: min of a function in MMA
  • Previous by thread: Rules for MPS format
  • Next by thread: min of a function in MMA