MathGroup Archive 2003

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

Search the Archive

Using FindRoot on a numerical vector-valued function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41123] Using FindRoot on a numerical vector-valued function
  • From: Randall Beer <beer at eecs.cwru.edu>
  • Date: Sun, 4 May 2003 03:55:25 -0400 (EDT)
  • Organization: Case Western Reserve University, Cleveland, OH, USA
  • Sender: owner-wri-mathgroup at wolfram.com

Suppose I have a function F that takes N arguments and returns a 
length-N vector: F[1,2,3] => {-1.1,2.08,0.03}.  This function involves 
numerically computing an object and then returning certain components of 
that object, so it cannot be expanded with symbolic arguments (e.g., 
F[x,y,z] will not work).

I need to find the arguments that make F return a vector of all 0s.  
That is, I would like to do something like:

FindRoot[F[y1, y2, y3], {y1, -1, 1}, {y2, -1, 1}, {y3, -1, 1}]

Unfortunately, this doesn't work because FindRoot wants 3 things, not a 
function returnning a vector of 3 things

I could do

FindRoot[{F1[y1, y2, y3] == 0, F2[y1, y2, y3] == 0, F3[y1, y2, y3] == 
0}, . . .]

but then I would have to numerically recompute the object 3 times.


Any suggestions would be greatly appreciated.


  • Prev by Date: Using InterpolateRoot Function in Mathematica
  • Next by Date: How change $AddOnsDirectory
  • Previous by thread: Fw: Re: Re: Using InterpolateRoot Function in Mathematica
  • Next by thread: Re: Using FindRoot on a numerical vector-valued function