Message Boards Message Boards

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

Why the following expression of a logarithm of a product is not True?

Why isn't the first expression True ... ?

In[1]:= Log[a b] == Log[a] + Log[b]

Out[1]= Log[a b] == Log[a] + Log[b]

In[2]:= a = 10; b = 100;

In[3]:= Log[a b] == Log[a] + Log[b]

Out[3]= True

What am I missing? Is this a Type problem? Is there a Type for which the identity is not True?

POSTED BY: Mark Tuttle
2 Replies

Patrick McGee, Wolfram Research supplied the following nice use of Reduce to explain what I should have thought of ...

In[1]:= Reduce[Log[a b] == Log[a] + Log[b], {a, b}, Reals]

Out[1]= a > 0 && b > 0

Thus, if a or b is zero, or negative, it is no longer true that the logarithm of a product is the sum of the logarithms, obviously.

POSTED BY: Mark Tuttle

Only true for positive a,b. If a<0 and b<0 then a b > 0 and the left side evaluates.

Reduce[Log[a b] == Log[a] + Log[b], {a, b}, Reals]

shows the condition

POSTED BY: John McGee
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