Re: Setting up equations
- To: mathgroup at smc.vnet.net
 - Subject: [mg66018] Re: [mg65990] Setting up equations
 - From: "Carl K. Woll" <carlw at wolfram.com>
 - Date: Thu, 27 Apr 2006 02:26:05 -0400 (EDT)
 - References: <200604260837.EAA02689@smc.vnet.net>
 - Sender: owner-wri-mathgroup at wolfram.com
 
Yaroslav Bulatov wrote:
> I'm trying to do things of the form
> Solve[5 x + 6 y + 7 z == a x + b y + c z, {a, b, c}]
> 
> But since x,y,z are variables, what I really mean is
> Solve[5==a && 6==b && 7==c], so I need to convert to this form
> 
> If I only have one variable, the following does what I need
> 
> LogicalExpand[a*x + b*x^2 + O[x]^3 == 2*x + 3*x^2 + O[x]^3]
> 
> But what to do if I have several variables?
In your example, you could try SolveAlways:
In[1]:= SolveAlways[5 x + 6 y + 7 z == a x + b y + c z, {x, y, z}]
Out[1]= {{a -> 5, b -> 6, c -> 7}}
Carl Woll
Wolfram Research
- References:
- Setting up equations
- From: Yaroslav Bulatov <yaroslavvb@gmail.com>
 
 
 - Setting up equations