MathGroup Archive 2008

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

Search the Archive

Re: Substitute all known relations in result


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.
>



  • Prev by Date: Re: RealOnly
  • Next by Date: Re: Clearing selected variables
  • Previous by thread: Substitute all known relations in result
  • Next by thread: Re: Substitute all known relations in result