If $f:\mathbb{N}\to\mathbb{R}$ and $g:\mathbb{N}\to\mathbb{R}$ are arbitrary functions, I want to calculate this equation with Mathematica:
$$\small{\begin{equation} c=\inf\left\{|1-\mathbf{c_1}|:\forall(\epsilon>0)\exists(\mathbf{c_1}>0)\forall(r\in\mathbb{N})\exists(v\in\mathbb{N})\left(\left|\frac{f(r)}{g(v)}-\mathbf{c_1}\right|<\varepsilon\right)\right\}, \end{equation}}$$
Here is what it does:
To obtain $c$, we want $\mathbf{c_1}$ must satisfy the following:
- $\mathbf{c_1}$ is positive
- $\mathbf{c_1}$ satisfies 1. and the quantified statement in Equation
- $\mathbf{c_1}$ satisfies 1. and 2., and has the smallest absolute difference from $1$.
Here is what I tried:
Clear["Global`*"]
F[r_] := F[r] = r! + 1
G[v_] := G[v] = 2 v! + 1 (* G can be any arbitrary function *)
c[r_] := FindMinimum[{N[1 - RealAbs[1 - F[r]/G[v]]],
Between[v, {1, 10000}] && v \[Element] Integers}, {v}]
Limit[c[r], r -> Infinity]
However, I get the following error message:
During evaluation of In[552]:= FindMinimum::eqineq: Constraints in {v\[Element]\[DoubleStruckCapitalZ],1<=v,v<=10000} are not all equality or inequality constraints. With the exception of integer domain constraints for linear programming, domain constraints or constraints with Unequal (!=) are not supported.
Out[556]=
\!\(\*UnderscriptBox[\(\[Limit]\), \(r \[Rule] \[Infinity]\)]\)
FindMinimum[{N[1 - RealAbs[1 - F[r]/G[v]]],
Between[v, {1, 10000}] && v \[Element] Integers}, {v}]