|
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
|