# FindRoot is only passing two variables

When I run the code:

q0 = FindRoot[findarea[ch, rh, ah, lineh, intersecth, q][[1 ;; 2]] == ah[[1 ;; 2]]*r3^2,
{q, q0}][[1, 2]];


FindRoot tries to run findarea[ch,rh]. Should I just modify findarea so that I can just pass it findarea[{ch, rh, ah, lineh, intersecth}, q] and only the first two arguments matter?

-
maybe. $\phantom{}$ – rm -rf Nov 15 '12 at 0:00
Well, you could write something like, g[ch_?NumericQ, rh_?NumericQ, (* other args *)] := findarea[ch, (* other args *)][[{1, 2}]]... – 0x4A4D Nov 15 '12 at 0:01
It would help to have the full definitions of all variables used, otherwise, there's no way we can debug it. When in doubt, restart the kernel and try again. There could be an old definition hanging around. – tkott Nov 15 '12 at 14:53