MathGroup Archive 2012

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

Search the Archive

Re: FindRoot with a vector of unknowns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125069] Re: FindRoot with a vector of unknowns
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 20 Feb 2012 02:50:12 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202191128.GAA15560@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Assuming, as you have indicated, that you want to solve several given 
equations separately for the _same_ variable, the following will work 
(although I'm not sure how "elegant" it is):

   eqns = Thread[x - {1, 2, 3} == {0, 0, 0}];
   starts = {1, 1, 1};
   MapThread[FindRoot, {eqns, List[x, #] & /@ starts}]

On 2/19/12 6:28 AM, Sam Takoy wrote:
> Hi,
>
> 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.
>
> Thanks,
>
> Sam
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Re: How to specify the gradient of this function?
  • Next by Date: Re: saving a Notebook as pdf or xml
  • Previous by thread: Re: FindRoot with a vector of unknowns
  • Next by thread: Re: FindRoot with a vector of unknowns