       Re: Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?

• To: mathgroup at smc.vnet.net
• Subject: [mg81843] Re: [mg81803] Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Thu, 4 Oct 2007 04:35:37 -0400 (EDT)
• References: <fdqclq\$mmg\$1@smc.vnet.net> <200710031033.GAA26771@smc.vnet.net>

```On 3 Oct 2007, at 19:33, Peter Breitfeld wrote:

> W. Craig Carter schrieb:
>>
>> Hello,
>> This works as I would hope it would:
>>
>> Simplify[Log[a^2] + Log[b^2] - Log[-2 b^2],
>>   Assumptions -> Element[a, Reals] && Element[b, Reals]]
>>
>> It returns -Log[-2/a^2]
>>
>> However, something a little more complicated:
>>
>> Simplify[
>> Log -
>>    - 2 Log[-2 ((R + x)^2 + y^2 + (z - zvar)^2)]
>>     +    2 Log[(R + x)^2 + y^2 + (z - zvar)^2]),
>>   Assumptions ->
>> {Element[zvar,Reals], Element[x,Reals],Element[y, Reals], Element
>> [z, Reals}]
>>
>> doesn't simplify. I can't see a way to do this, but brute force.
>>
>> Any ideas?
>> Thanks,
>>
>> W. Craig Carter
>>
>
> You can use a rule to bring everything under one Log:
>
> LogZusammenRule={
>   n_. Log[a_]+m_. Log[b_]:>Log[a^n b^m],
>   n_. Log[a_]-m_. Log[b_]:>Log[a^n/b^m],
>   a_ Log[b_]:>Log[b^a] };
>
> Then your expression
>
> ll= - 2 Log[-2 ((R + x)^2 + y^2 + (z - zvar)^2)] +
>        2 Log[(R + x)^2 + y^2 + (z - zvar)^2]
>
> will be reduced to Log:
>
> ll/.LogZusammenRule   =====>  Log
>
> Gruss Peter
> --
>

The only problm is that the original expression is never equal to Log
 for any real values of the parameters. In fact it is:

ComplexExpand[-2*Log[-2*((R + x)^2 + y^2 + (z - zvar)^2)] +
2*Log[(R + x)^2 + y^2 + (z - zvar)^2]]
-2*I*Pi - 2*Log

Andrzej Kozlowski

```

• Prev by Date: Re: Bug ???
• Next by Date: Strange result for a definite integral: Unknown Symbol (\.10) returned
• Previous by thread: Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
• Next by thread: Re: Re: Re: Simplifying Log[a] + Log[expr_] -