MathGroup Archive 2002

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

Search the Archive

RE: Re: cannot solve *trivial* equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34423] RE: [mg34391] Re: [mg34380] cannot solve *trivial* equation
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Sun, 19 May 2002 04:14:40 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

The confusing factor here is whether A and Q are parameters or
variables.  If they're variables, there's no reason Solve shouldn't
solve the equations simultaneously for S.  If they're parameters, it
can't, since it can't assume the freedom to make A and Q have the right
relationship to each other.  Telling Solve to solve for or eliminate a
symbol causes it to be treated as a variable, and not a parameter.

Reduce dodges the question by essentially working with equations, not
variables (or parameters).  You can tell it to TRY to solve for or
eliminate one or more variables, but unlike Solve, Reduce feels NO
obligation to succeed!

Still, it suffices in this case to evaluate

Reduce[eqns,S]

The result is not a substitution rule, however.

Bobby

-----Original Message-----
From: Andrzej Kozlowski [mailto:andrzej at platon.c.u-tokyo.ac.jp] 
To: mathgroup at smc.vnet.net
Subject: [mg34423] [mg34391] Re: [mg34380] cannot solve *trivial* equation

On Friday, May 17, 2002, at 07:31  PM, Marco Manfredini wrote:
> Hi,
>
> I just tried a friend's Mathematica 4.0.0.0:
>
> Solve[{A == S + Q, Q == 2*S}, A]
>
> => {A->3*S}
>
> Solve[{A == S + Q, Q == 2*S}, S]
>
> => {}
>
> Can somebody explain this to me? (ie. "bug","you stupid")
>
> Marco
>
>
>
>
>
>


Read the documentation, you stupid. (Sorry, but you yourself asked for 
it).
Solve only finds generic solutions, that is those that hold without any 
restrictions on the parameters. But in your case there are  no such 
solutions: take A=Q=1  and you get incompatible equations. In other 
words you need restrictions on the parameters. The function to use in 
such cases is Reduce:

In[1]:=
Reduce[{A == S + Q, Q == 2*S}, S]

Out[1]=
2*A == 3*Q && S == Q/2

This tells you that a solution, S=Q/2 exists only if the condition 
2*A == 3*Q is satisifed. That is why Solve did not find a generic 
solution, there aren't any.

Andrzej

PS. You didn't really think that a bug of this kind would have survived 
long enough for you to discover it, did you?



Andrzej Kozlowski

Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/






  • Prev by Date: RE: A possible bug in Lists
  • Next by Date: RE: Re: RE: Re: ValueQ
  • Previous by thread: Re: Re[2]: cannot solve *trivial* equation
  • Next by thread: Re: Re: cannot solve *trivial* equation