TITLE: If $\lim_{x\to \infty }f'(x)=0$ then $\lim_{x\to \infty }f(x)$ exist.
QUESTION [5 upvotes]: I want to show that if $f:\mathbb R\longrightarrow \mathbb R$ (a derivable function) is bounded and s.t. $$\lim_{x\to \infty }f'(x)=0,$$
then $f$ has a limit in $+\infty $.
I tried as follow:
If $f$ doesn't reach his supremum (let denote it $\ell\in\mathbb R$), then I can construct a sequence $(x_n)_n$ s.t. $$\lim_{n\to \infty }f(x_n)=\ell.$$
But I can't do better. Any idea ?

REPLY [8 votes]: It's false. Counterexample: any $g\in C^1(\Bbb R)$ such that $g(x)=\sin\ln x$ for all $x>1$.

REPLY [5 votes]: I don't think that the claim is true. 
Let $f(x) = \sin (\sqrt x)$. Then 
$$
f'(x) = \frac1{2\sqrt x} \cos (\sqrt x) \rightarrow 0 \ \mathrm{as} \ x\rightarrow\infty,
$$
and $f$ is bounded, but $\lim\limits_{x\rightarrow\infty} f(x)$ does not exist. 
This has a problem that $f$ is not differentiable everywhere, e. g. at $x=0$. To avoid this problem, we modify $f$ as follows:
$$
g(x) = \begin{cases} \sin (\sqrt x) &\mbox{if} \ x\geq (\pi/2)^2\\ 1 &\mbox{if} \ x<(\pi/2)^2   \end{cases}
$$

REPLY [2 votes]: False. A counterexample is
$$
f(x)=\sin\left(\sqrt[3]{x}\right)
$$
where
$$
f'(x)=\frac{\cos\left(\sqrt[3]{x}\right)}{3\sqrt[3]{x^2}}
$$

The function above is differentiable everywhere, however its derivative at $x=0$ is $+\infty$. Although the main point of the question is the behavior near $\infty$, we can adjust the example
$$
f(x)=\sin\left(\sqrt[3]{x^2+1}\right)
$$
where
$$
f'(x)=\frac{2x\cos\left(\sqrt[3]{x^2+1}\right)}{3\sqrt[3]{x^4+2x^2+1}}
$$