I'm trying to solve these two equations numerically:
diff1[r3_] := z2 /. NDSolve[
{zed2[θ2, θ3[r2, r3]] == z2'[r2], z2[lastr2] == lastz2}
, z2
, {r2, lastr2, lastr2 + 10 bit}
][[ 1]][[1]];
diff2[r2_] := z3 /. NDSolve[
{zed3[θ3[r2, r3], θ4] == z3'[r3], z3[lastr3] == lastz3}
, z3
, {r3, lastr3, lastr3 + 10 bit}
][[ 1]][[1]];
Where for a given input value of r3 or r2 each returns an intepolation function in the opposite either r2 or r3. I've tried to solve this numerically in the following way:
FindRoot[{diff1[r3][r2] == (r2 - r1)/Tan[θ2] + z1 - t1,
diff2[r2][r3] == (t2 + z4) - (r4 - r3)/Tan[θ4]}, {{r2, 1,
r1, r4}, {r3, 1, r1, r4}}];
Where all but r2 and r3 are known. If I type say diff1[0.1][2] I get a single value as expected but FindRoot doesn't seem to like this and I can't work out why, is FindRoot not simply substituting a number in numerically or is it something like it's trying to differentiate with respect to a numerical value?
Any help would be appreciated