Message Boards Message Boards

0
|
9066 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Combine sum of logarithms to logarithm of a product?

Is there any Mathematica command with which I can combine a sum of logarithms into a logarithm of a product?

Log[a]+Log[b] -> Log[a*b], Log[a]-Log[b] -> Log[a/b], etc.
POSTED BY: Ralph Trenkler
2 Replies
Posted 4 years ago

Any idea why these logs are not combined?

In[26]:= FullSimplify[
 Log[T0^2/(Ti1 Ti2)] - 
  Log[((Ti1 + ((c dT)/2 - c (-T0 + Ti1))/
      c) (Ti2 + (-((c dT)/2) - c (-T0 + Ti2))/c))/(Ti1 Ti2)]]

Out[26]= Log[T0^2/(Ti1 Ti2)] - Log[-((dT^2 - 4 T0^2)/(4 Ti1 Ti2))]

EDIT: Mathematica needs to know that these variables are not 0. Adding this line fixes it.

$Assumptions = {T0 > 0, Ti1 > 0, Ti2 > 0, c > 0}
POSTED BY: Dublin Nichols
Posted 4 years ago

Perhaps

In[6]:= FullSimplify[Log[a] + Log[b], a > 0 && b > 0]
Out[6]= Log[a b]

In[7]:= FullSimplify[Log[a] - Log[b], a > 0 && b > 0]
Out[7]= Log[a/b]

is what you're after.

POSTED BY: Kyle Martin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract