       Re: simple equation substitutions

• To: mathgroup at smc.vnet.net
• Subject: [mg128547] Re: simple equation substitutions
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Fri, 2 Nov 2012 00:45:26 -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: <20121101071928.99D326857@smc.vnet.net>

```eqns = {y == x + 2, x == 7};

Solve[eqns, {x, y}]

{{x -> 7, y -> 9}}

Solve[eqns, Variables[eqns]]

{{x -> 7, y -> 9}}

Simplify[Solve[eqns[], y], eqns[]]

{{y -> 9}}

Simplify[Solve[#[], y], #[]] &@eqns

{{y -> 9}}

Solve[eqns, y, Integers]

{{y -> ConditionalExpression[9, x == 7]}}

Reduce[eqns, {x, y}] // ToRules

{x -> 7, y -> 9}

Reduce[eqns, y] // ToRules

{x -> 7, y -> 9}

Reduce[eqns, x] // ToRules

{y -> 9, x -> 7}

Eliminate[eqns, x] // ToRules

{y -> 9}

Bob Hanlon

On Thu, Nov 1, 2012 at 3:19 AM, Neal Becker <ndbecker2 at gmail.com> 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?
>

```

• Prev by Date: Re: Solve...or not
• Next by Date: Abs in the denominator
• Previous by thread: [newb] simple equation substitutions
• Next by thread: Re: simple equation substitutions