MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to get an optimal simplification?

On Mon, Jun 9, 2008 at 09:25, yaqi <yaqiwang at> 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).

  • Prev by Date: Re: where is "Mathematica in education and research"?
  • Next by Date: Re: Dynamic GUI problems
  • Previous by thread: How to get an optimal simplification?
  • Next by thread: Re: How to get an optimal simplification?