# How to simplify Log expressions using rules

I have the following expression,

(Cot[(t1 - t2)/2]*((4*I)*t1^3 - (9*I)*t1^2*x +
(6*I)*t1*x^2 - (2*I)*x^3 -
12*x*Cot[(t1 - x)/2] - 12*x*Cot[x/2] +
3*x^2*Csc[(t1 - x)/2]^2 -
3*x^2*Csc[x/2]^2 +
6*t1^2*Log[1 - E^((-I)*(t1 - x))] -
12*t1*x*Log[1 - E^((-I)*(t1 - x))] +
6*x^2*Log[1 - E^((-I)*(t1 - x))] -
12*t1^2*Log[1 - E^(I*(t1 - x))] +
12*t1*x*Log[1 - E^(I*(t1 - x))] -
6*x^2*Log[1 - E^((-I)*x)] -
24*Log[Sin[(t1 - x)/2]] +
6*t1^2*Log[Sin[(t1 - x)/2]] +
24*Log[Sin[x/2]] + (12*I)*(t1 - x)*
PolyLog[2, E^((-I)*(t1 - x))] +
(12*I)*t1*PolyLog[2, E^(I*(t1 - x))] -
(12*I)*x*PolyLog[2, E^((-I)*x)] +
12*PolyLog[3, E^((-I)*(t1 - x))] -
12*PolyLog[3, E^((-I)*x)]))/9


rule1 = u_*Log[v_] + u_*Log[w_] :>

• If I scrape-n-paste just your eight Logs into a separate list and I try to reorder them to find pairs of logs that match your pattern then I don't see any such pair. Mathematica pattern matching is very brute force. It never, well probably almost never, sees two expressions that are obviously the same if you just use algebra on them and thus it decides they match. It only matches expressions of literally exactly the same form. 6*t1^2*Log[1 - E^((-I)*(t1 - x))]+6*t1^2*Log[1 - E^((-I)*(t1 - x))]/.u_*Log[v_] + u_*Log[w_] :> u*Log[v*w] "works" because both those are exactly the same form. – Bill May 6 '19 at 19:28