MathGroup Archive 2000

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

Search the Archive

Re: imposing side conditions on Solve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24056] Re: [mg24029] imposing side conditions on Solve
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 22 Jun 2000 01:01:48 -0400 (EDT)
  • References: <8ipn8l$anb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Andrzej
You give the following examples and explanations

> In[13]:=
> Solve[{x + y == 2, x == a, y == a}, {x, y}]
> Out[13]=
>  {}
>
> We get no answer because the only solution forces a specific value of the
> parameter, namely a=1. This is in accordance with the Mathematica Book.

SNIP

> But now consider a slightly different case:
>
> In[15]:=
> Solve[{x + y == 2, x == a, y == a, a == 1}, {x, y}]
>
> Out[15]=
> {{x -> 1, y -> 1}}
>
> We get an answer, even though again it only holds for a specific value of
> the parameter. The difference is that the value a=1 is forced explicitely
> (without using x and y) rahter than "implicitely", as in the first
example.

Here are three more variants:

Solve[{x + y == 2, x == a, y == a}, {x, y, a}]

        {{x -> 1, y -> 1, a -> 1}}

Solve[{x + y == 2, x == a, y == a}, {x, y}, {a}]

{{x -> 1, y -> 1}}

Solve[{x + y == 2, x == a, y == a}]

        {{a -> 1, x -> 1, y -> 1}}

Any suggestions?
--
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

"Andrzej Kozlowski" <andrzej at bekkoame.ne.jp> wrote in message
news:8ipn8l$anb at smc.vnet.net...
>However, as is fairly often the case with the Mathematica Book,
> the situation is more subtle than you realize on first reading.  In fact,
> whether you get a solution or not depends  on the way the values of
> parameters gets "forced" on them. To see this consider the following
> examples.
>
> In[13]:=
> Solve[{x + y == 2, x == a, y == a}, {x, y}]
> Out[13]=
> {}
>
> We get no answer because the only solution forces a specific value of the
> parameter, namely a=1. This is in accordance with the Mathematica Book. As
> explained in the Mathematica Book Reduce will give you all the answers:
>
> In[14]:=
> Reduce[{x + y == 2, x == a, y == a}, {x, y}]
>
> Out[14]=
> a == 1 && x == 1 && y == 1
>
> But now consider a slightly different case:
>
> In[15]:=
> Solve[{x + y == 2, x == a, y == a, a == 1}, {x, y}]
>
> Out[15]=
> {{x -> 1, y -> 1}}
>
> We get an answer, even though again it only holds for a specific value of
> the parameter. The difference is that the value a=1 is forced explicitely
> (without using x and y) rahter than "implicitely", as in the first
example.
> If you now look carefully at your equations you can also see that the
values
> of the e's are forced explicitely, so you do get an answer.
>
>
> Andrzej
>
>
> --
> Andrzej Kozlowski
> Toyama International University, JAPAN
>
> For Mathematica related links and resources try:
> <http://www.sstreams.com/Mathematica/>
>
>
>




  • Prev by Date: RE: Resources for high school student?
  • Next by Date: Re: Conversion of Orderless functions to non Orderless one
  • Previous by thread: Re: imposing side conditions on Solve
  • Next by thread: Re: imposing side conditions on Solve