MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simplifying Logs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113157] Re: Simplifying Logs
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Fri, 15 Oct 2010 13:53:29 -0400 (EDT)
  • References: <i93k7o$e4s$1@smc.vnet.net> <201010140327.XAA06157@smc.vnet.net>

On 14 Oct 2010, at 05:27, gekko wrote:

> On Oct 13, 5:39 pm, Themis Matsoukas <tmatsou... at me.com> wrote:
>> This works as expected and combines the logs:
>>
>> Simplify[Log[a] - Log[b], Assumptions -> {a > 0, b > 0}]
>>
>> Log[a/b]
>>
>> But this doesn't:
>>
>> Simplify[1 + Log[a] - Log[b], Assumptions -> {a > 0, b > 0}]
>>
>> 1 + Log[a] - Log[b]
>>
>> This seems inconsistent to me. I suppose I would like to see a =
CombineLog=
> s command in the future.
>>
>> Themis
>
> This is an interesting example. The reason Mathematica doesn't combine
> the logs in the second case is that it doesn't consider that the
> original expression is any simpler than the original one. The exact
> details of why depend on the definition of the default
> ComplexityFunction used by Simplify (an implementation of this is
> given in the function SimplifyCount, defined in the help menu page for
> ComplexityFunction, under the "Properties & Relations" tab). You could
> specify an alternative ComplexityFunction, but

This isn't quite true. In fact 1+Log[a]-Log[b] is more complex according =
to the default complexity function than Log[E a/b]. The default =
complexity of the former is 9 while the later is 8 (Leaf count, which =
gives answers close to the default complexity is 8 and 7 accordingly.

The real reason why the simplification does not work seems to be due to =
the fact that Mathematica lacks a suitable transformation function and =
it will never replace 1 by Log[E] (since Log[E] is automatically =
converted to 1).

Andrzej Kozlowski




  • Prev by Date: Re: Programing tips: What is faster?
  • Next by Date: Re: referencing auto-numbered cell
  • Previous by thread: Re: Simplifying Logs
  • Next by thread: Re: Simplifying Logs