Group Abstract Group Abstract

Message Boards Message Boards

0
|
24 Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to get Mathematica to calculate this variable?

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:

  1. $\mathbf{c_1}$ is positive
  2. $\mathbf{c_1}$ satisfies 1. and the quantified statement in Equation
  3. $\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}]
POSTED BY: Bharath Krishnan
2 Replies

This version does not give error messages:

 c[r_] := 
     Minimize[{1 - Abs[1 - F[r]/G[v]], 1 <= v <= 10000}, 
      Element[v, Integers]]

or else this

c[r_] := Min[Table[1 - Abs[1 - F[r]/G[v]], {v, 1, 10000}]]

but it is very much unlikely that you are going to calculate a symbolic Limit of this function.

POSTED BY: Gianluca Gorni

With AI I have (I don't know is this correct:) enter image description here

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard