MATHEMATICA : Forcing Logarithms to Simplify

Click For Summary

Discussion Overview

The discussion revolves around the simplification of logarithmic expressions in Mathematica, specifically how to force the expression A Log[b] + A Log[c] to simplify to A Log[b c]. The scope includes technical reasoning related to mathematical simplification and the handling of logarithms under various conditions.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks a method to simplify A Log[b] + A Log[c] to A Log[b c] by default in Mathematica, expressing a preference for a built-in solution over custom rules.
  • Another participant notes that using Simplify with the conditions b > 0 && c > 0 successfully returns A Log[b c].
  • A participant questions the implications of allowing b and c to take on negative values, suggesting that this could involve branch cuts and affect simplification outcomes.
  • Concerns are raised about a long integral resulting in multiple logarithmic terms that cancel out when evaluated by hand, leading to a zero result, which Mathematica does not recognize without specific conditions on the variables.
  • One participant indicates that specifying the positivity or negativity of variables m1 and m2 is sufficient for Mathematica to return zero for the logarithmic expression in question.
  • A question is posed regarding whether the hand calculations explicitly account for the complexities of logarithms of negative values, including the implications of branch cuts.

Areas of Agreement / Disagreement

Participants express differing views on the handling of logarithms with negative arguments and the necessity of defining variable conditions for simplification. There is no consensus on a single approach to achieve the desired simplification in all cases.

Contextual Notes

Limitations include the dependence on the definitions of the variables involved and the potential impact of branch cuts on logarithmic simplifications. The discussion does not resolve the complexities associated with negative logarithmic arguments.

Hepth
Science Advisor
Gold Member
Messages
458
Reaction score
40
How can I force :

A Log + A Log[c]

to simplify to A Log[b c]?

I tried, A,b,c all elements of reals, but it doesn't do it. (Assume everything is Real)
I know I can make some patterned rules but I'd rather have it be by default.

(i.e. : a_ Log[b_] + a_ Log[c_] :> a Log[b c])
 
Physics news on Phys.org
Simplify[A Log + A Log[c], b > 0 && c > 0]

returns

A Log[b c]
 
But what if b and c are not defined as non-zero positive? If b=-2 and c=-3 then shouldn't it come out ok? Or does that, by definition, involve choosing branch cuts.

Basically I'm doing this long integral, and its resulting in multiple logarithms that all end up, if I do it by hand, cancelling. I get something like:

(A) Log[-m1] + (-A) Log[-m2] + (-A) Log[m1*(2 E1-ma)] + (A) Log[m2*(2 E1-ma)

Which if you do by hand, ignoring the fact that m's are positive, you get A Log[1] which is zero. But Mathematica doesn't recognize this. Even the first two should simplify, but I think there's some options I need to choose correctly. I guess I'll start with making sure the m's are all defined as positive, as well as the E's.
 
When I Simplify your last expression while telling it that both m1 and m2 are positive or while telling it that both m1 and m2 are negative that is sufficient for it to return zero.

When you do it by hand are you explicitly including that every log of a negative real value includes an infinite set of c*2*i*Pi for a unique integer c each time or are you assuming that c==1 for every one of your Log?
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
0
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K