|
[Date Index]
[Thread Index]
[Author Index]
Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
- To: mathgroup at smc.vnet.net
- Subject: [mg81803] Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Wed, 3 Oct 2007 06:33:14 -0400 (EDT)
- References: <fdqclq$mmg$1@smc.vnet.net>
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[4] -
> - 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[4]:
ll/.LogZusammenRule =====> Log[4]
Gruss Peter
--
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
Prev by Date:
Re: Re: Equivalent functionality to colorbar in Mathematica?
Next by Date:
Bug ???
Previous by thread:
Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
Next by thread:
Re: Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
|