MathGroup Archive 2001

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

Search the Archive

Re: combining Log[] terms

  • To: mathgroup at
  • Subject: [mg30488] Re: combining Log[] terms
  • From: Hendrik van Hees <h.vanhees at>
  • Date: Fri, 24 Aug 2001 04:05:49 -0400 (EDT)
  • Organization: GSI Darmstadt
  • References: <9m281v$h28$>
  • Sender: owner-wri-mathgroup at

Nicolas Bock wrote:

> Is there a function that combines terms like
> Log[a] - Log[b]
> to
> Log[a/b]?
> I couldn't find anything so far in the documentation regarding the
> Log[] function, only some references to Collect[], which does
> something similar to what I want for powers of a given expression.

Fortunately Mathematica does not combine logs in the way you like to do. 
The point is that this manipulations are only valid for real quantities in 
general not for complex ones.

If you have only positive real numbers as arguments in your log-terms you 
can use simple pattern matching constructs to force Mathematica to combine 
logarithms, for instance:

In[1]:= -Log[a] + Log[b] /. {Log[x_] - Log[y_] -> Log[x/y]}

Out[1]= Log[-]

Hendrik van Hees                Home:    
c/o GSI-Darmstadt SB3 3.183     FAQ:
Planckstr. 1                    
D-64291 Darmstadt               mailto:h.vanhees at 

  • Prev by Date: RE: Greatest element in list
  • Next by Date: Re: Fitting to a square wave
  • Previous by thread: Re: combining Log[] terms
  • Next by thread: Greatest element in list