Sorry to bother you guys yet again with (what I imagine are) relatively basic questions, but I was wondering if there is a "proper" or "best" way to evaluate a computationally difficult limit. The code I have so far is: (NOTE: This is an updated version of the code, thanks to the suggestions I received in the comments)
Clear[prob, h, f, fp, u, z, ud, dn, uc, cn, dnf, cnf, ratio]
prob[h_, f_] := Binomial[f, h]
fp[prob_] := prob^(1/2)
u[z_] := z
ud[fp_, u_, prob_, f_] := u[(f/2)] - Sum[fp[Sum[prob[j, f], {j, 0, i}]](u[(-f/2 + i + 1)] - u[(-f/2 + i)]), {i, 0, f - 1}]
dn[ud_, f_] := ud/f
What I'd like to do is find the limit for the function $dn(ud,f)$ as $f \rightarrow \infty$ To do so, I was using:
N[Limit[dn[ud[fp, u, prob, f], f], f -> Infinity], 10]
Which yields he result I'm currently getting:
Limit[(1/f)(0.5000000000 f - 1.000000000 Sqrt (2.000000000^f f - 1.000000000 DifferenceRoot[Function[{\[FormalY], \[FormalN]}, {(1 + \[FormalN] - f) \[FormalY][\[FormalN]] + (-\[FormalN] + 2 f) \[FormalY][1 + \[FormalN]] + (-3 - \[FormalN] - f) \[FormalY][2 + \[FormalN]] + (2 + \[FormalN]) \[FormalY][3 + \[FormalN]] == 0, \[FormalY][0] == 0, \[FormalY][1] == 1, \[FormalY][2] == 2 + f}]][f])), f -> \[Infinity]]
(Which itself is a sizable improvement over previous versions, so thanks for your help already!)
In reality, I don't need a super precise number for the limit, just something that's "close enough" (I leave that definition intentionally somewhat open- the more precise, the better, but getting an answer is the most important thing). Is there something I can do to allow Mathematica to be less precise (and so return an actual 'close' value for the limit)? Or is there a better way to code/find the operation?
Any ideas of what's going on/how to interpret the result?
If there's anything else I can include to make this question more clear, just let me know!
Thanks so much for everything guys!!!
Binomial[]
is built-in? Also, yourfp
is justSqrt
, no? $\endgroup$Binomial[]
is less likely to overflow than computing with explicit factorials, so changing it is a good idea. Forfp
: the0.5
, being an inexact number, throws a wrench into symbolic stuff; use1/2
, if you really need to make the power explicit. $\endgroup$(1/2)
in the exponent---just1/2
will be parsed as(prob^1)/2
. $\endgroup$