I would like to perform the FindRoot
command over the function func
. Suppose:
func = Function[{x,y,z},{x+y+z,3x-y-0.5z}]
I would like to solve func==0
over the variables y
, z
over a grid of inputs x
. Since my actual func
is more complicated, I have to resort to using FindRoot
rather than Solve
.
One way to do this is to execute:
FindRoot[func[x0,y,z], {{y, y0}, {z, z0}}]
where x0
is a numeric input.
However, since my actual y
, z
consist of a large (and non-constant) number of variables, I wish to execute the following command:
FindRoot[func[x0, variables], {startingvariables}]
This however does not seem to work as either,
- all variables have to be specified manually, or
- the function has to be redefined
Is there a way out?
FindRoot[func[x0,y,z],{{y,y0},{z,z0}]
cannot work (you have one equationfunc[x0,y,z] == 0
, but two unknowns,y
andz
). $\endgroup$