If we have a differentiable function $f:(0,∞) \rightarrow \mathbb{R}$ such that derivative $f'(t)$ tends to zero as $t \rightarrow ∞$ and for $n \in \mathbb{Z}, f(n) \rightarrow l$ (finite) as $n \rightarrow ∞$, then how do we show that $f(t) \rightarrow l$ as $t (\in \mathbb{R}) \rightarrow ∞$.
What I don't understand is that if for $n \in \mathbb{Z}, f(n) \rightarrow l$ as $n \rightarrow ∞$, then shouldn't this hold for any real number $t$ as well? We can always find an integer greater than any real number. What is the use of limit of derivative in solving this question?
We have that $\forall x\in[n,n+1]$ by MVT
$$\frac{f(x)-f(n)}{x-n}=f'(c) \quad c\in(n,n+1) \implies |f(x)-f(n)|=(x-n)|f'(c)|\le |f'(c)|\to 0$$