MMA version 13.3

Can somebody explain the following behavior:

Here Simplify works as expected:

x1 e[1] + x2 e[1]  // Simplify

(x1 + x2) e[1]

However, here Simplify only works on e[2]

x1 e[1] + x2 e[1] + x3 e[2] + x4  e[2] // Simplify

x1 e[1] + x2 e[1] + (x3 + x4) e[2]

And here Simplify does not work at all:

x1  e[1] + x2  e[1] + x3 e[2] + x4 e[2] + x5 e[3] + x6 e[3] // Simplify

x1 e[1] + x2 e[1] + x3 e[2] + x4 e[2] + x5 e[3] + x6 e[3]

FullSimplify does not have these problems.

  • 3
    $\begingroup$ Simplify wants to distinguish itself from FullSimplify otherwise it could lose its job in Mathematica. $\endgroup$ Commented Oct 24, 2023 at 19:05
  • $\begingroup$ Just to save other folks the work: For the second expression, Simplify reduces the LeafCount from 17 to 15, while FullSimplify reduces it to 13. For the third expression Simplify doesn't change the LeafCount at all (obviously), while FullSimplify reduces it from 25 to 19. $\endgroup$ Commented Oct 24, 2023 at 21:24
  • 1
    $\begingroup$ Somewhat speculatively: the number of possible transformations is subject to combinatorial explosion. Mathematica presumably uses various heuristics as to which transformations to attempt. As expressions grow in size, fewer types of transformation can be attempted (to avoid run-time explosion). Presumably it would be difficult to identify the types of symmetry that seem so natural to us. $\endgroup$
    – mikado
    Commented Oct 24, 2023 at 22:10
  • $\begingroup$ @mikado You could be correct for more complicated expressions. However, with 4 terms there is hardly a combinatoric explosion. $\endgroup$ Commented Oct 25, 2023 at 7:05
  • $\begingroup$ @DanielHuber you are probably right, but does simplification know it is working with a "top-level" expression? Or does it do the same thing when attempting simplification of a subexpression of something more complicated? $\endgroup$
    – mikado
    Commented Oct 25, 2023 at 18:12


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.