Re: Inverse of "PowerExpand"

*To*: mathgroup at smc.vnet.net*Subject*: [mg51659] Re: Inverse of "PowerExpand"*From*: "Dr. Wolfgang Hintze" <weh at snafu.de>*Date*: Wed, 27 Oct 2004 23:44:08 -0400 (EDT)*References*: <clnf0f$ode$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Klaus, let's take a slightly simpler example: In[114]:= v = PowerExpand[Log[f*f]] Out[114]= 2*Log[f] 1st idea In[115]:= Simplify[v] Out[115]= 2*Log[f] ... same as your example. 2nd idea In[125]:= ComplexExpand[v] Out[125]= 2*I*Arg[f] + Log[f^2] ... oh, looks quite good, but the imaginary part is disturbing. So let's tell Mathematica that f is >0 (and hence real) In[123]:= Simplify[ComplexExpand[v], f > 0] Out[123]= 2*Log[f] ... still not ok! But telling it in another way (Arg[f]==0) works: In[124]:= Simplify[ComplexExpand[v], Arg[f] == 0] Out[124]= Log[f^2] Now back to your example: In[1]:= w = PowerExpand[Log[a*b*b/c]] Out[1]= Log[a] + 2*Log[b] - Log[c] "Inversion" can be done by using In[18]:= Simplify[ComplexExpand[w], Arg[a] == 0 && Arg[b] == 0 && Arg[c] == 0 && a > 0 && c > 0] Out[18]= Log[(a*b^2)/c] But, when playing around with the conditions, trying to be logical (a>0 should mean Arg[a]==0 etc.) and other, you can discover the most funny things. E.g. adding the condition b>0 yields In[19]:= Simplify[ComplexExpand[w], Arg[a] == 0 && Arg[b] == 0 && Arg[c] == 0 && a > 0 && c > 0 && b > 0] Out[19]= 2*Log[b] + Log[a/c] Noch einen schönen Abend dabei...(have a nice evening experimenting...) Wolfgang Klaus G wrote: > PowerExpand[Log[a*b*b/c]] > > gives: > > Log[a] + 2 Log[b] - Log[c] > > Which Function will return the original "Log"? > > Klaus G. > >