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[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 > -- > The only problm is that the original expression is never equal to Log [4] 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[2] Andrzej Kozlowski
- References:
- Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
- From: Peter Breitfeld <phbrf@t-online.de>
- Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?