FindRoot starting values
- To: mathgroup at smc.vnet.net
- Subject: [mg34223] FindRoot starting values
- From: Kyriakos <tuxedomoon at yahoo.com>
- Date: Fri, 10 May 2002 03:05:05 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear all, My problem is closely related to the following one, just on a bigger scale. I want to numerically find the solution to a system of equations. Suppose that we define a vector of the unknowns Q = Array[q, {3}] which generates {q[1], q[2], q[3]} and a vector of starting values, say all equal to 0.1 Q0 = Table[0.1, {3}] We also define three functions on the unknowns, say for example RHS = Table[Sum[(Q[[i]]^i)*(i^j), {i, 3}], {j, 3}] which expands to the vector { q[1] + 2 q[2]^2 + 3 q[3]^3, q[1] + 4 q[2]^2 + 9 q[3]^3, q[1] + 8 q[2]^2 + 27 q[3]^3 } and the vector of the constants (results), say LHS={1,2,3} The goal is to solve RHS==LHS. If I use FindRoot[RHS == LHS, {q[1], Q0[[1]]}, {q[2], Q0[[2]]}, {q[3], Q0[[3]]}] i get the solution {q[1] -> -0.5, q[2] -> 1., q[3] -> -0.550321} In my problem, the dimension of Q and Q0 is large, and I cannot input the starting values one-by-one. The fact that the way FindRoot accepts them is not in a list form does not allow anything of the form FindRoot[RHS == LHS, Table[{q[i], Q0[[i]]}, {i,3}] ] or anything similar that I have tried. Do you have in mind a way of circumventing the problem? Thanks in advance, Kyriakos __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com