RE: cannot solve *trivial* equation
- To: mathgroup at smc.vnet.net
- Subject: [mg34401] RE: [mg34380] cannot solve *trivial* equation
- From: "DrBob" <majort at cox-internet.com>
- Date: Sat, 18 May 2002 03:51:05 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
Study the outputs of this: eqns = {A == S + Q, Q == 2*S}; Solve[eqns, A] Solve[eqns, A, Q] Solve[eqns, A, S] Solve[eqns, S] Solve[eqns, S, A] Solve[eqns, S, Q] Solve[eqns, Q] Solve[eqns, Q, A] Solve[eqns, Q, S] {{A -> 3 S}} {{A -> 3 S}} {{A -> (3*Q)/2}} {} {{S -> Q/2}} {{S -> A/3}} {} {{Q -> 2 S}} {{Q -> (2*A)/3}} I suspect the difference is that Q and S appear in both equations, while A appears only in the first equation. I'm not sure why that prevents solving simultaneously for S and Q, but it does require Mathematica to choose from two possible answers. A possible explanation is that, unless told otherwise, Mathematica thinks of A and Q as parameters when solving for S. If they do not have the proper relationship to each other, there's no solution for S. Telling Solve to eliminate A or Q reduces the problem to only one parameter (Q or A respectively) and guarantees a solution. Still... it seems as if that explanation would apply to solving for A as well, when Q and S are parameters. Perhaps the difference is that the relationship Q and S must satisfy in order to allow a solution for A is explicitly contained in the second equation or, at least, contained in a set of equations that don't mention A. 'Tis a puzzlement. Nevertheless... it's helpful to tell Solve what variables to eliminate, if you can. Bobby Treat -----Original Message----- From: Marco Manfredini [mailto:marco at technoboredom.net] To: mathgroup at smc.vnet.net Subject: [mg34401] [mg34380] cannot solve *trivial* equation 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