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:
- Change the default
ComplexityFunction? - Change the default
TransformationFunctions? - Utilize parallel computation?
- Utilize Compile?
If they are possible, how should I do those things? Also, what is a suitable value for TimeConstraint?
TransformationFunction, i.e., how to define suitable transformations functions s.t.FullSimplifygenerates satisfying results? The document gives nothing about how that should be done. Again, thanks for the comment : ) – Y.X Oct 08 '15 at 13:14Assumptionsoption to include any constraints on parameters or variables. Assign any known values. – Bob Hanlon Oct 08 '15 at 16:24a,bfor example, or perhaps in your example theErfc[]is not going to simplify with the elementary functions. Then you use instead ofSimplify[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 08 '15 at 19:29Experimental`OptimizeExpression[expression]. The output is a bit difficult to read but if I remember correctly you can use this answer to simplify the view (does not provide a direct method with ``ExperimentalOptimizeExpressionbut if I remember you can use it as inspiration). – userrandrand Aug 19 '22 at 01:33ComplexityFunctionis notLeafCountbutSimplify`SimplifyCount– rnotlnglgq Dec 08 '22 at 02:33