Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail
From: Arthur G <gorramfreak+news@gmail.com>
Newsgroups: comp.soft-sys.matlab
Date: Fri, 22 Feb 2008 19:42:44 -0500
Message-ID: <47bf6c04$0$298$b45e6eb0@senator-bedfellow.mit.edu>
References: <fpk2e6$4db$1@fred.mathworks.com> <fpn9lu$b1i$1@fred.mathworks.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: log with syms variables?
User-Agent: Unison/1.8
Lines: 48
NNTP-Posting-Host: VPN-ONE-TWENTY-FOUR.MIT.EDU
X-Trace: 1203727364 senator-bedfellow.mit.edu 298 18.100.0.124
Xref: news.mathworks.com comp.soft-sys.matlab:453265



On 2008-02-22 15:01:02 -0500, "David Doria" <daviddoria@gmail.com> said:
> Can someone at least confirm this is the way it works?

You pretty much answered your own question. If your example isn't 
enough "proof" that you need to declare variables as positive to 
simplify as you desire, consider the following:

log( (-1)*(-1) ) = log(1) = 0

but

log(-1) = i*pi

so

log(-1) + log(-1) = 2i*pi


> 
> Thanks,
> 
> Dave
> 
> "David Doria" <daviddoria@gmail.com> wrote in message
> <fpk2e6$4db$1@fred.mathworks.com>...
>> if i do this
>> 
>> syms a b;
>> simplify(log(a*b))
>> 
>> i get log(a*b)
>> 
>> if i do this:
>> 
>> syms a b positive;
>> simplify(log(a*b))
>> 
>> i get log(a) + log(b)
>> 
>> The later is what I would like.  Is it necessary to declare
>> the symbolic variables as 'positive'? Or am I doing
>> something else wrong?
>> 
>> Thanks,
>> 
>> Dave