Re: Don't understand behaviour of Solve[]
- To: mathgroup at smc.vnet.net
- Subject: [mg58587] Re: Don't understand behaviour of Solve[]
- From: dh <dh at metrohm.ch>
- Date: Sat, 9 Jul 2005 04:07:48 -0400 (EDT)
- References: <daitlm$sus$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Oliver, Mathematica can not know what you consider to be a parameter and what a variable. If you do not specify a variable Mathematica takes it for a parameter. But then you have an overdetermined system without a generic solution. If you want the solution only for a fraction of variables you have to tell Mathematica to eliminate the rest by specifying a third argument. Example: Solve[{x + y == 3, x + 2 y == 5}, {x, y}] gives {{x -> 1, y -> 2}} Solve[{x + y == 3, x + 2 y == 5}, {x}] gives {} because Mathematica takes y now as a parameter, not a variable. You have 2 equations for 1 variable that do not have a generic solution. A solution only exists for a special value of y. If you only want a solution for x, you must tell Mathematica by the third argument: Solve[{x + y == 3, x + 2 y == 5}, {x}, y] gives {{x -> 1}} sincerely, Daniel Oliver Friedrich wrote: > Hallo, > > I have a problem understanding the general behaviour of the Solve[] > function. > > I have a set of equations with the variables a,b,c,d and k. > > Evaluating Solve[set,k] or Solve[set,{a,b}] returns with {}, whereas Solve > [set,{k,b,c,d}] returns solutions for k,b,c and d. > > My question: Why does Solve returns no solution when searching only for k > for example and why is there a solution for several variables? I thought > that giving a list of variables just means that I want to search for all of > them. But the procedure doesn't seem to be independant from one variable to > another. > > What kind of information contains my list of variables except my wish to > solve for these? > > Many thanks > > Oliver friedrich >