Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Setting up equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66027] Re: Setting up equations
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 27 Apr 2006 02:26:26 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <e2nd3i$33m$1@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?
> 
Hi Yaroslav,

Try *Reduce* rather than *Solve* and use *ForAll* to put a condition on 
x, y, and z.

In[1]:=
Reduce[ForAll[{x, y, z}, 5*x + 6*y + 7*z ==
     a*x + b*y + c*z], {a, b, c}]

Out[1]=
a == 5 && b == 6 && c == 7

Best regards,
Jean-Marc


  • Prev by Date: Re: Object-Oriented Paradigm in Mathematica?
  • Next by Date: Re: Setting up equations
  • Previous by thread: Re: Setting up equations
  • Next by thread: Re: Setting up equations