using FindRoot with a list of starting values
- To: mathgroup at smc.vnet.net
- Subject: [mg25757] using FindRoot with a list of starting values
- From: "Lu, Shihua" <SLu at crai.com>
- Date: Sat, 21 Oct 2000 14:43:10 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Here is the problem. I need to solve a simultaneous equation system using FindRoot. For example, there are 3 equations and 3 unknowns, FindRoot[{eq1, eq2, eq3},{x,x0},{y,y0},{z,z0}] However, when I have many unknowns, it is awkward to type in all the starting values by hand. Also, if I need to change the starting values in the middle of the program, or even change the number of unknowns to solve for, I need to find out a more elegant way to provide inputs to FindRoot. I tried the following. First, I built a list, start={{x,x0},{y,y0},{z,z0}}. Then, I use the command FindRoot[{eq1,eq2,eq3},start]. It did not work because start is a Table. Can someone teach me a trick to make it work? Many thanks, Shihua Lu