I have the following recurrence equation
p[t_, s_] :=
p[t, s] = ((1 + s)*p[t - 1, s]^2 + (1 + s)*
p[t - 1, s]*(1 - p[t - 1, s]))/((1 + s)*p[t - 1, s]^2 + (1 + s)*2*
p[t - 1, s]*(1 - p[t - 1, s]) + (1 - p[t - 1, s])^2)
p[0, s_] := 0.00001
and I would like to solve for when
p[50, s] == 0.8
One approach that worked for me was to first construct a list
listvals = Table[{s, p[50, s]}, {s, 0, 0.5, 0.0025}];
Then do a polynomial fit on these
fittedfunc[s_] = Fit[listvals, Table[s^k, {k, 0, 130, 1}], s];
and then solve for when
FindRoot[fittedfunc[s] == 0.8, {s, 0.4, 0.5}]
{s -> 0.414704}
I was just wondering though if there is perhaps some other, more direct way to do this, without having to approximate the curve first? I had a try with ?NumericQ
but couldn't quite get it work.
Anybody any ideas?