Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Strange Solve result after previous bad input

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100975] Re: [mg100937] Strange Solve result after previous bad input
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 18 Jun 2009 20:50:17 -0400 (EDT)
  • References: <200906181019.GAA24606@smc.vnet.net>

On 18 Jun 2009, at 19:19, Alain Cochard wrote:

> This is the proper solution to the correctly input system:
>
>     Mathematica 6.0 for Linux Itanium (64-bit)
>     Copyright 1988-2007 Wolfram Research, Inc.
>
>     In[1]:= Solve[{a==x + y, b==-x + y},{x,y}]
>
> 		    a - b       a + b
>     Out[1]= {{x -> -----, y -> -----}}
> 		      2           2
>
> Here, there is '=' instead of '==' in the 2nd eq:
>
>     In[2]:= Solve[{a==x + y, b=-x + y},{x,y}]
>
>     Solve::eqf: -x + y is not a well-formed equation.
>
>     Out[2]= Solve[{a == x + y, -x + y}, {x, y}]
>
> and then, subsequent properly input systems will still fail:
>
>     In[3]:= Solve[{a==x + y, b==-x + y},{x,y}]
>
>     Solve::svars: Equations may not give solutions for all "solve"  
> variables.
>
>     Out[3]= {{x -> a - y}}
>
>
> Is this normal?
>
> If so, is there a cure (some "resetting" procedure), apart from
> quiting Mathematica and entering back?
>
> Also, is there a way of testing that a previous bad input is indeed
> the cause of that strange output? (Because if it happened a long time
> ago in the Mathematica history, one might no longer remember.)
>
> Thanks
> AC
>

In your first attempt you unintentionally defined b to be -x + y. So,  
in your second attempt he second equation is  - x + y == - x+ y, which  
is a tautology. As a result your system amounts only to one equation  
a== x+y. The solution is simple, just Clear[b].

Andrzej Kozlowski


  • Prev by Date: Re: Strange Solve result after previous bad input
  • Next by Date: Re: Strange Solve result after previous bad input
  • Previous by thread: Re: Strange Solve result after previous bad input
  • Next by thread: Re: Strange Solve result after previous bad input