Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I force Log[Exp[x]]=x

595 views
Skip to first unread message

Bart Killam

unread,
Feb 10, 2000, 3:00:00 AM2/10/00
to

For real x, Log[Exp[x]]=x. For general complex x
Mathematical leaves this expression unevaluated. I
have tried Log[Exp[x/;Im[x]=0]], but this give a result
of 0.

How do I tell Mathematica that I want the expression
simplied for real x ? Thanks for any help.
--
Bart Killam Work: 919-677-8000 x7538
SAS Institute Inc. Fax: 919-677-8123
SAS Campus Dr., R5115 Email: sas...@unx.sas.com
Cary NC 27513-8000


Hendrik van Hees

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
In Mathematica 4.0 just use

Simplify[Log[Exp[x]],Element[x,Reals]]

--
Hendrik van Hees Phone: ++49 6159 71-2755
c/o GSI-Darmstadt SB3 3.162 Fax: ++49 6159 71-2990
Planckstr. 1 mailto:h.va...@gsi.de
D-64291 Darmstadt http://theory.gsi.de/~vanhees/index.html


Harald Giese

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
Bart Killam wrote:
>
> For real x, Log[Exp[x]]=x. For general complex x
> Mathematical leaves this expression unevaluated. I
> have tried Log[Exp[x/;Im[x]=0]], but this give a result
> of 0.
>
> How do I tell Mathematica that I want the expression
> simplied for real x ? Thanks for any help.


Hi,

This does the job:

Simplify[Log[Exp[x]], x \[Element] Reals]


/Harald
--

Harald Giese
Email: gi...@dkrz.de
Phone: +49 (0)40 42838 5796; Fax: +49 (0)40 5605724
Institut fuer Meereskunde der Universitaet Hamburg
(Institute of Oceanography of the University of Hamburg)
Troplowitzstrasse 7, D-22529 Hamburg


Jens-Peer Kuska

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
Hi,

there are so many ways

Log[Exp[x]] // PowerExpand

Simplify[Log[Exp[x]], Element[x, Reals]]

FullSimplify[Log[Exp[x]], Element[x, Reals]]

Regards
Jens

Kevin J. McCann

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
ComplexExpand[Log[E^x]]

does the trick.

Kevin

--

Kevin J. McCann
Johns Hopkins University APL


Bart Killam <sas...@unx.sas.com> wrote in message
news:87tp95$5...@smc.vnet.net...

Dimiter Petsev

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
Try:

PowerExpand[Log[Exp[x]]]

Works for me.

Regards,

Dimiter Petsev

Bart Killam <sas...@unx.sas.com> wrote in message
news:87tp95$5...@smc.vnet.net...
>
> For real x, Log[Exp[x]]=x. For general complex x
> Mathematical leaves this expression unevaluated. I
> have tried Log[Exp[x/;Im[x]=0]], but this give a result
> of 0.
>
> How do I tell Mathematica that I want the expression
> simplied for real x ? Thanks for any help.

Brian Higgins

unread,
Feb 11, 2000, 3:00:00 AM2/11/00
to
Bart,

One way is to wrap Log[Exp[x]] with PowerExpand.

In[68]:=PowerExpand[Log[Exp[x]]]

Out[68]=x

Cheers, Brian


Sent via Deja.com http://www.deja.com/
Before you buy.


0 new messages