Re: natural log of E

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg2009] Re: natural log of E*From*: "Brian J. Albright" <albright at physics.ucla.edu>*Date*: Thu, 14 Sep 1995 23:27:46 -0400*Organization*: UCLA Department of Physics and Astronomy

"Paul C. Hines" <hines at bonnie.drea.dnd.ca> wrote: >I'm trying to do some operations on the exponent of E. > I've tried to use the form test = Log[E[n]] so as to >return the value, test = n and thereby work with the exponent > n. Instead Mathematica returns Log[E[n]] to me. Why is that > and how do I get around the problem? > > > Well, at the risk of sounding trite, I'd first have to suggest that you try "Log[Exp[n]]" rather than "Log[E[n]]" That way instead of getting "Log[E[n]]" back, you get back "Log[E^n]". Big improvement, eh? I suspect that the reason that Mathematica is not able to interpret "Log[E^n]" as "n" might have to do with the fact that "Log" is a multivalued function of its argument, and Mathematica isn't able to decide on which Riemann sheet to put the answer. However, this isn't an entirely satisfactory answer, since when I ask for "Log[E]", mm spits out "1" rather than "1 + 2 Pi I n_Integer" or somesuch. /*shrug*/ Beats me. I guess that's a question for the experts. You can force the issue by applying a rule that handles Log[E^n]. This really isn't satisfactory either, but it can work in a pinch if you know what Riemann sheet you want: e.g. In[1]:= BogusLogRules = {Log[E^n_] -> n, Log[ m_ E^n_] -> Log[m] + n}; In[2]:= expression = Log[ 2 Exp[4 x] Log[ 3 Exp[5x] ] ]; In[3]:= expression 4 x 5 x Out[3]:= Log[2 E Log[3 E ]] In[4]:= expression //. BogusLogRules Out[4]:= 4 x + Log[2 (5 x + Log[3])] There are undoubtedly cleaner/more clever ways to do this, but you get the point.... Just be careful about how you handle the multivaluedness. Regards. -Brian -- Brian J. Albright Department of Physics and Astronomy, UCLA albright at physics.ucla.edu http://bohm.physics.ucla.edu/~albright