Re: [newb] simple equation substitutions
- To: mathgroup at smc.vnet.net
- Subject: [mg128545] Re: [newb] simple equation substitutions
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Fri, 2 Nov 2012 00:44:46 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <k6t7qk$1mi$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 11/1/2012 2:19 AM, Neal Becker wrote:
> {y == x + 2, x == 7}
>
> Solve[%, y]
>
> -> {}
>
> What I expected to happen is have x->7 applied to y == x+2.
>
> My real plan is to develop a list of (a lot more complicated)
>expressions that will have repeated substitutions applied.
>
> Why didn't the above work and/or what should I do instead?
>
Solve wants you to list _all_ the variables.
-----------------------
In[4]:= {y==x+2,x==7};
Solve[%,{y,x}]
Out[5]= {{y->9,x->7}}
------------------------
--Nasser