# A bounded differentiable function with vanishing derivative must converge?

Is it true that a bounded function differentiable on $(0,\infty)$ whose derivative vanishes at $\infty$ must converge to a limit?

In other words, given bounded differentiable $f:(0,\infty)\rightarrow \mathbb{R}$ such that $\lim_{x\to\infty} f'(x)=0$, does $\lim_{x\to\infty}f(x)$ exist?

It seems like it should but I can't prove it.

• If the bounded requirement weren't there the logarithm function would come to mind as a differentiable function with vanishing derivative that doesn't converge. Perhaps there would be a way to use squeeze theorem and something else? Nov 18, 2014 at 4:41

We produce a counterexample. Let $$f(x)=\int_0^x g(t)\,dt,$$ where $$g(t)=\frac{\sin(\ln((t+1))}{t+1}.$$ Then $f'(x)=g(x)$, and $\lim_{x\to\infty}g(x)=0$.
Integrate, making the substitution $u=\ln(t+1)$. Then $$f(x)=\int_0^{\ln(x+1)} \sin u\,du=1-\cos(\ln(x+1)).$$ Then $f$ is bounded but does not have a limit as $x\to\infty$.
Remark: We could have just given the example $1-\cos(\ln(x+1))$, or left out the $1$ minus part. But in fact the example was found by first drawing a picture, and then turning that picture into an integral. It seemed better to give some indication of how the example was found than to just write it down.
For a somewhat simpler example, we can use $\sin(\sqrt{x+1})$.