Bug introduced in 7.0 or earlier and fixed in 10.0.0

I have a rather ugly Mathematica expression (edit: shown below) that I would like to simplify with a time constraint; simplifying without a time constraint or memory constraint does not return as long as I've had the patience to wait (a couple of hours).

The problem, which I have not seen before, is that when I execute

Simplify[ expression, TimeConstraint -> 3]

I get an output that contains things like

...10000 E^(29599743/514000) Removed[$$Failure]...

The only warning message I receive during execution is

Simplify::time: Time spent on a transformation exceeded 3.` seconds, 
and the transformation was aborted. Increasing the value of TimeConstraint option may   
improve the result of simplification

Is this a known issue? I can't find anything about it. I expect when using TimeConstraint that I will not get the simplest answer back, but I also expect to get a usable answer (which this is not).

If you think it would be helpful to see the expression I'm trying to simplify, I can post it here. The simplest example in which I've had this problem has a LeafCount of 651 and ByteCount of 17312.


On the suggestion of @JacobAkkerboom, I am adding some more information so someone can try to reproduce the effect. Here is a compressed version of expression.


As mentioned, I get the problem simply by running

Simplify[ expression, TimeConstraint -> 3 ]

(or any other value of TimeConstraint I've bothered to check)

expression contains standard arithmetic operations, the constants E and Pi, the operations Cosh and Sinh, and three variables named y, z, and OD (and yes, I should make OD lower case, but it's hard for me to see optical depth as anything but capitals).


I have now reproduced the problem in an expression without a time constraint. The new expression1 has a LeafCount of 186, so it's not really that complicated.

Simplify[ expression1 ]

This returns nearly instantly with three instances of Removed[$$Failure]. Since there is no TimeConstraint set here, I have no idea what the problem is. I submitted a help request to Mathematica, and I'll let you know if they give any useful response. In the meantime, thoughts are most welcome. Especially if you can tell me if the problem exists (or not) in other versions of Mathematica. I am running 9.0.1 on Mac OS 10.8.3. Thank you to Mr. Wizard for verifying the problem exists in MMA 7 on Windows.

  • 2
    $\begingroup$ What version are you using? What functions is your expression composed of? For example, could you include the output of Union @ Cases[expression, _Symbol, {-1}, Heads -> True] ? $\endgroup$
    – Mr.Wizard
    Aug 14, 2013 at 16:43
  • 1
    $\begingroup$ @Mr.Wizard I am using The output of your suggestion is {Cosh, E, OD, \[Pi], Plus, Power, Sinh, Times, y, z} $\endgroup$
    – jkrich
    Aug 14, 2013 at 16:48
  • 2
    $\begingroup$ Thanks for adding the expression. I can now confirm the behavior exists also in version 7 on Windows. $\endgroup$
    – Mr.Wizard
    Aug 15, 2013 at 14:58
  • 1
    $\begingroup$ I'm marking this as a bug. It hasn't been confirmed as one by a consensus or official word yet but since nobody can provide an explanation I'm going to make a presumption. Also, the bugs tag will make this easier to track/remember. $\endgroup$
    – Mr.Wizard
    Aug 16, 2013 at 20:26
  • 1
    $\begingroup$ I'm afraid I don't know of anything that will help. If you find other expressions that cause a problem and it is a specific pattern (e.g. is it always Cosh?) we may be able to shield it. $\endgroup$
    – Mr.Wizard
    Aug 16, 2013 at 20:55

1 Answer 1


Not really an answer:

I get the same strange behavior, on Mac OSX v 9.0.0. The simplest case I could find where this happens is (thanks to @halirutan)

Simplify[Cosh[1/200] + E^(9200/257)]

Removed[$$Failure]/(2 E^(1/200))

  • $\begingroup$ Very peculiar... How did you track down this example? $\endgroup$
    – sebhofer
    Aug 16, 2013 at 12:02
  • $\begingroup$ @sebhofer Trial, error and patience I'm afraid :P. I just worked my way "down" from the simplest case the OP provides. $\endgroup$ Aug 16, 2013 at 12:09
  • $\begingroup$ Great effort :) $\endgroup$
    – sebhofer
    Aug 16, 2013 at 12:14
  • 1
    $\begingroup$ That's an excellent example. Is there any way to find out what transformation function Simplify is using when this error occurs? Relatedly, is there a way to get the full list of built-in TransformationFunctions for Simplify? Then maybe it is possible to exclude the offending function? $\endgroup$
    – jkrich
    Aug 16, 2013 at 20:00

Your Answer

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

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