TITLE: does derivative of convergent function go to 0?
QUESTION [8 upvotes]: My question: if $f$ is differentiable and $\lim_{x \to \infty} f(x) = M$, does this imply that $\lim_{x \to \infty} f'(x) = 0$?
My thinking: there exists $X$ such that $\forall x,y>X$, $|f(x)-f(y)|<\epsilon$ by the Cauchy criterion. Thus $\frac{|f(x)-f(y)|}{x-y} = f'(d)< \epsilon$ for $d$ between $x$ and $y$.
I worry this won't hold if $x$ is extremely close to $y$ though.

REPLY [4 votes]: As already shown, you can easily find a function that fits your condition but whose derivative is unbounded as $x \to \infty.$
A more borderline case is $f(x) = \dfrac{\sin (x^2)}{x}.$
It is easy to show (by the squeeze theorem) that $\lim_{x \to \infty} f(x) = 0,$
but
$$ f'(x) = 2 \cos(x^2) - \frac{1}{x^2}\sin (x^2). $$
This quantity is bounded for large $x$ but it never converges.