Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Simplifying an expression in light of relationships between variables?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54263] Simplifying an expression in light of relationships between variables?
  • From: "Steve W. Brewer" <ste-ve at ka-tech.com>
  • Date: Mon, 14 Feb 2005 21:51:04 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Suppose I have a few variables that are related in the following way:

d == a + b
e == c + d



I want Simplify and FullSimplify to consider these relationships when 
performing simplification.  For example:

FullSimplify[a + b]

d



FullSimplify[d - b]

a



FullSimplify[a + b + c]

e



FullSimplify[e - c]

d



FullSimplify[e - c - b]

a



Is there a straightforward way to get this behavior?  I've tried 
experimenting with TransformationFunctions, but it looks like I need to 
include every possible permutation for it to work, for example:

TransformationFunctions ->
   {Automatic,
    # /. (d -> a + b)&,
    # /. (a + b -> d)&,
    # /. (a -> d - b)&,
    # /. (d - b -> a)&,
    # /. (b -> d - a)&,
    # /. (d - a -> b)&,
    ... }



This is unwieldy even in this simple example, and it rapidly becomes 
unmanageable as the number of variables and relationships increases.


Is there an easier way? 


  • Prev by Date: Re: rules and lists
  • Next by Date: Re: rules and lists
  • Previous by thread: Re: solve doesn't solve
  • Next by thread: Re: Simplifying an expression in light of relationships between variables?