marktuttle
(Mark Tuttle)
1
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?
jmcgee
(John McGee)
2
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
marktuttle
(Mark Tuttle)
3
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.