Re: FindRoot with a vector of unknowns

*To*: mathgroup at smc.vnet.net*Subject*: [mg125066] Re: FindRoot with a vector of unknowns*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Mon, 20 Feb 2012 02:49:10 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

On 2/19/12 at 6:28 AM, sam.takoy at yahoo.com (Sam Takoy) wrote: >Is there an elegant way to implement what I am trying to do here, >that is solve for a vector of unknowns: >FindRoot[x - {1, 2, 3} == {0, 0, 0}, {x, {1, 1, 1}}] >I can do this writing a loop, but hoping for a "vectorized" >solution. Elegant is subjective and using MapThread to solve this may not meet your notion of "vectorized". But here is how to to what you seem to want using MapThread In[1]:= MapThread[ FindRoot[(x - #1) == #2, {x, #3}] &, {{1, 2, 3}, {0, 0, 0}, {1, 1, 1}}] Out[1]= {{x->1.},{x->2.},{x->3.}}