# General suggestions to accelerate Simplify and FullSimplify

To my understanding, the function Simplify[] and FullSimplify[] work by applying a series of built-in transformation rules to the expression and trying to minimize the TransformationFunctions in the process, which by default is LeafCount[].

In my recent work I need to simplify a lot of symbolic expressions involving elementary functions as well as a special function Erfc[]. While Simplify works fine for simple expressions, it is extremely time-consuming for more complicated expressions. Some complicated expressions take days to be simplified. And FullSimplify[] takes hours even for very simple expressions. I do not have much experience in symbolic computation, and I desperately need some help.

Specifically, is there any general suggestions to accelerate Simplify[] or FullSimplify[]? For example, in order to accelerate it, is it possible to:

1. Change the default ComplexityFunction?
2. Change the default TransformationFunctions?
3. Utilize parallel computation?
4. Utilize Compile?

If they are possible, how should I do those things? Also, what is a suitable value for TimeConstraint?

• 1: Yes, see documentation of ComplexityFunction; 2: Yes, see documentation of TransformationFunctions; 3: No (unless you can split up your expressions). 4 No. – Sjoerd C. de Vries Oct 8 '15 at 11:04
• @SjoerdC.deVries Thanks for the comment. Of course I am ALLOWED to change these; that I am well aware of. My questions is whether it is possible to change them to accelerate the computation, and how to do that : ) – Y.X Oct 8 '15 at 12:36
• You state that LeafCount is the current ComplexityFunction. That is not entirely true. You can find information about the actual function at the bottom of the ComplexityFunction page. It uses some extra stuff to take complexity of the numbers used in your expression into account. You might try changing the default function to LeafCount to see whether that helps. – Sjoerd C. de Vries Oct 8 '15 at 12:44
• Using TransformationFunctions to reduce the number of transformations will quite logically reduce time, but will, at the same time, probably have a negative impact on the results. – Sjoerd C. de Vries Oct 8 '15 at 12:46
• I've found that the best way to speed up simplifications is to first think for yourself which parts are never going to simplify together, like two independent parameters a, b for example, or perhaps in your example the Erfc[] is not going to simplify with the elementary functions. Then you use instead of Simplify[expression], Collect[expression,{a,b,Erfc[_]},Simplify]. This way you prevent mathematica from working on parts of the problem you know won't simplify. – Jansen Oct 8 '15 at 19:29