Re: Substitute all known relations in result

*To*: mathgroup at smc.vnet.net*Subject*: [mg86627] Re: [mg86614] Substitute all known relations in result*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Sat, 15 Mar 2008 17:42:26 -0500 (EST)*References*: <200803150809.DAA15208@smc.vnet.net>

As long as your relations are all algebraic you can use GroebnerBasis. For example suppose your relatins are r==x^2+y^2 and s==x^3+y^3 and you would like to substitute them into x^5 + y^2*x^3 + y^3*x^2 + y^5. First form an ideal made up of your formula and the relations you wish to hold: id = {x^5 + y^2*x^3 + y^3*x^2 + y^5, r - x^2 - y^2, s - x^3 - y^3}; And now use GroebnerBasis: First[GroebnerBasis[id, {r, s}, {x, y}]] r s Andrzej Kozlowski On 15 Mar 2008, at 09:09, Dr. Johannes Zellner wrote: > Hi, > > How do I make mathematica to display results with all known > relations / variables? > E.g. if a result is > x^2+y^2 > and before I'd defined > r = x^2+y^2 > I'd like mathematica to display the result rather as "r". > > And: I'd like mathematica to do this for each relation defined before > w/o specifying every possible replacement. > > Any help much appreciated. >

**References**:**Substitute all known relations in result***From:*"Dr. Johannes Zellner" <johannes.zellner@gmail.com>