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: [mg34426] Re: [mg34391] Re: [mg34380] cannot solve *trivial* equation
  • From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
  • Date: Sun, 19 May 2002 04:14:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On Saturday, May 18, 2002, at 08:04  PM, DrBob wrote:

>
> 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.

I don't find it confusing. Variables are what is passed as the second 
(or second and third) argument to Solve. The rest are parameters.  
Anyway, I explained this in my reply to the original questioner, which 
has not yet appeared on the MathGroup, but will presumably at the same 
time as this posting.

> Reduce[eqns,S]
>
> The result is not a substitution rule, however.


it is easy to make it one:

ToRules[Reduce[{A == S + Q, Q == 2*S}, S]]

Out[7]=
{2*A -> 3*Q, S -> Q/2}

>
> -----Original Message-----
> From: Andrzej Kozlowski [mailto:andrzej at platon.c.u-tokyo.ac.jp]
To: mathgroup at smc.vnet.net
> Sent: Saturday, May 18, 2002 2:51 AM
> Subject: [mg34426] [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: Re: RE: Re: ValueQ
  • Next by Date: Re: Re: RE: Re: ValueQ
  • Previous by thread: RE: Re: cannot solve *trivial* equation
  • Next by thread: Notations / syntax extension