I know there is some sort of external function to convert
Log[x]+Log[y]
into
Log[x y]
but cannot find it. Any help?
I know there is some sort of external function to convert
Log[x]+Log[y]
into
Log[x y]
but cannot find it. Any help?
Greetings Bob, from Sy Blinder
The rule for sum of logs doesn’t appear to be built in to Mathematica. But try the following workaround:
In[13]:= Log[Exp[Log[x] + Log[y]]]
Out[13]= Log[x y]
You can do it with Simplify with assumptions
Simplify[Log[x] + Log[y], x > 0 && y > 0]
or with a replacement rule:
logRule = a_. Log[x_] + b_. Log[y_] :> Log[x^a*y^b];
Log[x] + Log[y] - Log[3] //. logRule
Beware that the rule has restrictions on its valididy.
Thanks for the help. Both ideas look good. Bob