Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
- To: mathgroup at smc.vnet.net
- Subject: [mg81693] Re: Simplifying Log[a] + Log[expr_] - Log[2 expr_]: Brute force necessary?
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Tue, 2 Oct 2007 05:23:11 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <fdqclq$mmg$1@smc.vnet.net>
W. Craig Carter wrote: > 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] - ---------^ Too many minus signs. > - 2 Log[-2 ((R + x)^2 + y^2 + (z - zvar)^2)] > + 2 Log[(R + x)^2 + y^2 + (z - zvar)^2]), ------------------------------------------------^ Extraneous parenthesis. > Assumptions -> > {Element[zvar,Reals], Element[x,Reals],Element[y, Reals], Element[z, Reals}] ----------------------------------------------------------------------------^ Missing square bracket. > > doesn't simplify. I can't see a way to do this, but brute force. > > Any ideas? Fixing the syntax errors and adding the parameter R in the list of real argument does not help. You could use *ComplexExpand*. In[1]:= 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[{R, zvar, x, y, z}, Reals]] Out[1]= Log[4] - 2 Log[-2 ((R + x)^2 + y^2 + (z - zvar)^2)] + 2 Log[(R + x)^2 + y^2 + (z - zvar)^2] In[2]:= ComplexExpand[ Log[4] - 2 Log[-2 ((R + x)^2 + y^2 + (z - zvar)^2)] + 2 Log[(R + x)^2 + y^2 + (z - zvar)^2]] Out[2]= -2 \[ImaginaryI] \[Pi] - 2 Log[2] + Log[4] HTH, -- Jean-Marc