Re: Using results of Solve[simultaneous equations]
- To: mathgroup at smc.vnet.net
- Subject: [mg31083] Re: Using results of Solve[simultaneous equations]
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sun, 7 Oct 2001 03:11:51 -0400 (EDT)
- References: <9pme0e$64g$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Timie
Two ideas for the first part:
Clear[a,c]:
{a->b,{c:>d}}/.r:Rule|RuleDelayed -> Set;
Definition[a,c]
a = b
c = d
Clear[a,c]
ToSet[(Rule|RuleDelayed)[x_,y_]]:= x=y;
ToSet[z_]:=z;
ToSet//@{a->b,{c:>d}};
Definition[a,c]
a = b
c = d
Second part:
Whether this can be done depends on the values of a and b.
A little further manipulation will be needed in each case.
Clear[a,b]
Eliminate[{a==t, b==t^2+t+1},t]
-1 + b == a + a^2
Solve[{a==t, b==t^2+t+1},b,t]
{{b -> 1 + a + a^2}}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Timie Milie" <milstead at cs.bris.ac.uk> wrote in message
news:9pme0e$64g$1 at smc.vnet.net...
> I use solve to solve some simultaneous equations and get results of the
form
> a->... b->... c->...
>
> I want to do 2 things:
> assign each result to an equation of the form a=... b=... c=...
> so I can then manipulate them...
>
> e.g.
> display the b result in terms of the result in a
>
> e.g.
> b = 2 a
>
> milstead at cs.bris.ac.uk
>
>
>