Runs SymPy's simplify() heuristics: rational simplification, powsimp,
cancellation and together, factor_terms, then the specialized
simplifications (Piecewise, hypergeometric, Bessel, trigonometric,
logarithmic, combinatorial, sums, integrals and products) and keeps the
shortest result under measure, returning the input when the result is
more than ratio times as complex.
Usage
simplify(
e,
ratio = 1.7,
measure = count_ops,
rational = FALSE,
inverse = FALSE,
doit = TRUE,
...
)Arguments
- e
An expression, matrix or list.
- ratio
Accept a result only if it is not more than
ratiotimes as complex as the input (Infkeeps the shortest).- measure
The complexity measure,
count_ops()by default.- rational
FALSEkeeps Floats,TRUEconverts them to rationals,NULLconverts them and back at the end.- inverse
Also combine functions with their inverses (
inversecombine()).- doit
Evaluate unevaluated objects at the end.
- ...
Ignored.