Re: Working with Log
- To: mathgroup at smc.vnet.net
- Subject: [mg112118] Re: Working with Log
- From: Simon <simonjtyler at gmail.com>
- Date: Tue, 31 Aug 2010 04:17:11 -0400 (EDT)
- References: <i5g0ku$grr$1@smc.vnet.net>
Note that Log[a] + Log[b] does not always equal Log[a b], that being said... Just write some replacement rules logRep = x_. Log[a_] + y_. Log[b_] :> Log[a^x b^y] Then, e.g. In[2]:= y Log[2]+Log[x^2]-Log[z] Out[2]= y Log[2]+Log[x^2]-Log[z] In[3]:= %//.logRep Out[3]= Log[(2^y x^2)/z] Simon On Aug 30, 8:20 pm, Themis Matsoukas <tmatsou... at me.com> wrote: > I can use PowerExapnd to expand a Log: > > PowerExpand[Log[a b]] > > Log[a] + Log[b] > > How can I do the opposite, i.e. combine Log[a] + Log[b] into Log[a b]? > > Thanks > > Themis