Re: How to get an optimal simplification?

*To*: mathgroup at smc.vnet.net*Subject*: [mg89437] Re: [mg89407] How to get an optimal simplification?*From*: "Szabolcs HorvÃt" <szhorvat at gmail.com>*Date*: Mon, 9 Jun 2008 06:19:41 -0400 (EDT)*References*: <200806090625.CAA27915@smc.vnet.net>

On Mon, Jun 9, 2008 at 09:25, yaqi <yaqiwang at gmail.com> wrote: > Hi, > > I expected to get: > {t1,t2,t3} > > with the expression: > Simplify[{a - b, b - c, c - a}, {t1 == a - b, t2 == b - c, t3 == c - > a}] > > But I only get {-t2-t3,t2,t3}, which is a little bit annoying. > > I know I can do the simplifications separately like, > Simplify[Simplify[Simplify[{a - b, b - c, c - a}, t1 == a - b], t2 > == b - c], t3 == c - a] > > But I still like to get the optimal result with one simplify > operation. > > Is there an answer? (the answer is useful for one of my big > derivations.) > Hello yaqi, This answer from Mathematica is a bit surprising because the LeafCount of {t1,t2,t3} is of course smaller than that of {-t2-t3, t2, t3} But what is it that you are really trying to do? Is it automatic simplification, or are you just trying to replace some terms? Perhaps {a - b, b - c, c - a} /. {a - b -> t1, b - c -> t2, c - a -> t3} is more appropriate. If a-b, b-c, and c-a do not appear literally in the actual expression that you are working with, you could express a, b, c and terms of t1, t2, and t3, and substitute the results. Trying to do this for this simple example might shed some light on the surprising result of Simplify: if t1+t2+t3 != 0 then there are no solutions; if t1+t2+t3==0, then there are infinitely many solutions. So perhaps this choice of variable substitution is not the best one (unless your expression has a special form, in which case a direct replacement might be usable).

**References**:**How to get an optimal simplification?***From:*yaqi <yaqiwang@gmail.com>