Re: Simplify Log[ab] - Log[b] to Log[a] ?
- To: mathgroup at smc.vnet.net
- Subject: [mg16071] Re: [mg16039] Simplify Log[ab] - Log[b] to Log[a] ?
- From: dreiss at !SPAMscientificarts.com (David Reiss)
- Date: Tue, 23 Feb 1999 03:45:24 -0500
- Organization: EarthLink Network, Inc.
- References: <199902210515.AAA28765@smc.vnet.net.> <7aquud$387@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <7aquud$387 at smc.vnet.net>, Jurgen Tischer
<jtischer at col2.telecom.com.co> wrote:
> In[1]:= PowerExpand[Log[a b] - Log[b]]
>
> Out[1]= Log[a]
>
> Jurgen
>
> Simon Allfrey wrote:
> >
> > How do I persuade Mathematica to simplify
> >
> > Log[a b] - Log[b] to Log[a]?
> >
> > when processing algebraic expressions?
I missed the idea of using PowerExpand in my posting
so I have (re)learned something here.
I guess the thing worth pointing out for the user
is the usual spiel about how PowerExpand doesn't
respect branch cuts etc... so that using
it on an expression that contains something like
Log[a b] - Log[b] can lead to unwanted consequences
beyond the (presumably desired) consequences of
changing Log[a b] - Log[b] to Log[a]. For example in
In[1]:= (z^2)^(1/2) (Log[a b]-Log[b])//PowerExpand
Out[1]= z Log[a]
this might not be what the user wants (if z<0 for example).
However,
In[3]:=
(z^2)^(1/2) (Log[a b]-Log[b])/.{Log[x_ y_]:>Log[x]+Log[y]}
Out[3]= Sqrt[z^2]*Log[a]
It all depends on the broader context of the problem.
Regards,
David
--
----------------------------------------
Scientific Arts:
Creative Services and Consultation
for the Applied and Pure Sciences
David Reiss
Email: dreiss at !SPAMscientificarts.com
----------------------------------------
Remove the !SPAM to send email
- References:
- Simplify Log[ab] - Log[b] to Log[a] ?
- From: "Simon Allfrey" <simon@allfrey13.freeserve.co.uk>
- Simplify Log[ab] - Log[b] to Log[a] ?