# Prove that if $\lim \limits_{n \to \infty} f(n)=2$ and $\lim \limits_{x \to \infty} f'(x)=0$, then $\lim \limits_{x \to \infty} f(x)=2$.

Let $f: \Bbb{R}\rightarrow\Bbb{R}$ be a differentiable function and let $\lim \limits_{n \to \infty} f(n)=2$ ($n$ runs for Natural numbers), and $\lim \limits_{x \to \infty} f^\prime(x)=0$. Show that: $$\lim \limits_{x \to \infty} f(x)=2,$$

do you have any suggestions what I should do here? I tried to apply Heine theorem but didn't work. and I'm not sure this is the right direction.

Hint: Notice that $$f(x) = f\left(\lfloor x \rfloor\right) + \int_{\lfloor x \rfloor}^x f'(x) dx.$$

Now since $|f'(x)| \to 0$ and $x - \lfloor x \rfloor \leq 1$, it follows that $f(x) - f\left(\lfloor x \rfloor\right) \to 0$ as $x \to \infty$.

EDIT: If you need to proceed without integrals, you can use the Mean Value Theorem to obtain that there exists some $y \in (\lfloor x \rfloor, x)$ such that $$\frac{f(x) - f\left(\lfloor x \rfloor\right)}{x - \lfloor x \rfloor} = f'(y),$$ or $f(x) - f\left(\lfloor x \rfloor\right) = f'(y)(x - \lfloor x \rfloor).$ Now use the same reasoning as above.

• I didn't learn Integrals yet, any other way? – Firas Ali Abdel Ghani Mar 4 '15 at 19:47
• @FirasAliAbdelGhani: Did you learn the Mean Value Theorem? – Pedro M. Mar 4 '15 at 19:51
• Of course:) how would than help here? – Firas Ali Abdel Ghani Mar 4 '15 at 19:53
• @FirasAliAbdelGhani The point is that you want an integer that is close to $x$, so $\lfloor x \rfloor$ and $\lceil x \rceil$ are natural choices. – Pedro M. Mar 4 '15 at 20:12
• @FirasAliAbdelGhani : Well, you know that $f$ tends to $2$ for natural numbers. Floor helps you to "catch" the closest natural. Then you can use the fact that $f'$ tends to $0$. – servabat Mar 4 '15 at 20:12

$$\lim\limits_{x\to\infty}f'(x)=0 \iff \forall \varepsilon > 0, \exists \alpha\in\mathbb{R} \text{ s.t. } \forall x > \alpha, \left|f'(x)\right| < \varepsilon$$

Using the mean-value theorem, $\forall(a,b)\in\mathbb{R}^2, \alpha < a < b$ : $$\left|f(b) - f(a)\right|\leq \varepsilon\left|b-a\right|$$

Let $\epsilon > 0$. $$\forall x> \alpha + 1, \left|f(x)-2\right| = \left|f(x)-f(\lfloor x \rfloor) + f(\lfloor x \rfloor) - 2)\right| \leq \left|f(x)-f(\lfloor x \rfloor)\right| + \left|f(\lfloor x \rfloor) - 2)\right|$$

Using the mean-value theorem deduction, we got : $$\left|f(x)-2\right| \leq \varepsilon + \varepsilon\left| x - \lfloor x \rfloor \right| = \varepsilon(\{x\}+1)\leq2\varepsilon$$