If the derivative approaches zero then the limit exists

I have a homework question, looks simple but I can't figure out a way to solve it. Any clue or help will be helpful.

Let $f: [0,\infty)\rightarrow\mathbb R$ be a differentiable function such that $\lim_{x\rightarrow\infty}f'(x)=0$.

Prove or disprove: $\lim_{x\rightarrow\infty}f(x)$ exists (infinite limit is also considered as a limit).

Thanks a lot!

• Differentiable implies continuous. – Wintermute Mar 28 '13 at 17:51
• Look for a counterexample. The one I have in mind is messy, involves splicing. – André Nicolas Mar 28 '13 at 17:54

Picture a sinusoidal curve, but stretched in the horizontal direction more and more as $x\rightarrow\infty$. The amplitude is fixed but the velocity decreases. Something like $\sin (\sqrt{x})$.