MathGroup Archive 2003

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

Search the Archive

Re: Solve Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44973] Re: Solve Function
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Thu, 11 Dec 2003 05:28:26 -0500 (EST)
  • References: <br6oqv$2lb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

x={x1,x2,x3,x4};

Thread[f/@x == g/@x]

{f[x1] == g[x1], f[x2] == g[x2], f[x3] == g[x3], 
  f[x4] == g[x4]}


Bob Hanlon

In article <br6oqv$2lb$1 at smc.vnet.net>, Gregory Lypny
<gregory.lypny at videotron.ca> wrote:

<< I've got a question about the Solve function.  I read in the 
Mathematica Book that Solve can handle a set of simultaneous equations 
(page 88) and that the syntax for the function is to list each equation 
followed by the variables to solve for.  What if all of the equations 
have the same form, say, because they're constraints in the first-order 
conditions of an optimization?  I'm wondering whether Solve can handle 
a neater specification in matrix form, something along the lines of

Solve[f[x]==g[x], x],

where x is a vector of variables {x1, x2, x3, ... , xn}.  It would save 
a lot of typing.  I've tried to feed solve a variable defined as an 
array, but I keep getting errors to the effect that the equation is not 
well formed.


  • Prev by Date: Re: motifps or equivalent for MacOS X
  • Next by Date: Re: Solve Function
  • Previous by thread: Solve Function
  • Next by thread: Re: Solve Function