0
$\begingroup$

I have a long expression and it includes some terms with long polynomial coefficients.

For example,

expression = 
  Log[a] (48 A ((2 - 4 a + 3 a^2) eA F^2 + A eF ((2 - 4 a + a^2) A - 4 (-1 + a)^2 F)) - (-1 + a) A^2 Log[a/(-1 + a)]^2 (A (-96 + 192 a + 420 a^3 R - 779 a^4 R
+ 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]) - 2 (-1 + a) A F Log[a/(-1 + a)] Log[(-1 + a)/b] (A (-96 + 192 a + 420 a^3 R - 779 a^4 R
+ 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]) - (-1 + a) F^2 Log[(-1 + a)/b]^2 (A (-96 + 192 a + 420 a^3 R - 779 a^4 R + 657 a^5 R
- 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]));

where all parameters are positive with a>1. I try to Simplify it with

Simplify[expression, {Positive[R], Positive[A], Positive[F], Positive[eA], Positive[eF], Positive[b]}, Assumptions -> a > 1]

but it returns the same expression. Obviously, there are three terms multiplied by the same polynomial (A (-96 + 192 a + 420 a^3 R - 779 a^4 R + 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]). But I don't know how to tell Mathematica to understand this.

I found with the first term in the parentheses absent, Mathematica knows how to do this. But in my real problem, I have a long expression with many instances like the abovementioned. Thank you very much!

expression2 = Log[a] ((*48 A ((2 - 4 a + 3 a^2) eA F^2 + A eF ((2 - 4 a + a^2) A - 4 (-1 + a)^2 F))*) - (-1 + a) A^2 Log[a/(-1 + a)]^2 (A (-96 + 192 a + 420 a^3 R - 779 a^4 R
    + 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]) - 2 (-1 + a) A F Log[a/(-1 + a)] Log[(-1 + a)/b] (A (-96 + 192 a + 420 a^3 R - 779 a^4 R
    + 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]) - (-1 + a) F^2 Log[(-1 + a)/b]^2 (A (-96 + 192 a + 420 a^3 R - 779 a^4 R + 657 a^5 R
    - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b]));

Simplify[expression2, {Positive[R], Positive[A], Positive[F], Positive[eA], Positive[eF], Positive[b]}, Assumptions -> a > 1]

(*-(-1 + a) Log[a] (A Log[a/(-1 + a)] + F Log[(-1 + a)/b])^2 (A (-96 + 192 a + 420 a^3 R - 779 a^4 R + 657 a^5 R - 243 a^6 R + 29 a^7 R - 12 a^2 (4 + 7 R)) + 12 (-1 + a)^3 a^2 (7 - 14 a + 3 a^2) F R Log[b])*)
$\endgroup$

1 Answer 1

1
$\begingroup$

Try FullSimplify:

FullSimplify[expression, {Positive[R], Positive[A], Positive[F], 
  Positive[eA], Positive[eF], Positive[b], a > 1}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you. I actually tried FullSimplify but it runs for a very long time before aborting manually. Is there any other method? $\endgroup$
    – user95273
    Feb 11 at 12:02
  • 1
    $\begingroup$ It takes 2.5 sec on my 5 year old machine. $\endgroup$ Feb 11 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.