If $\lim_{x\to+\infty}f(x)=a$, $\lim_{x\to+\infty}f'(x)=b$, then $\lim_{x\to+\infty}f'(x)=0$

I'm trying to solve this question:

Let $f:(c,+\infty)\to \mathbb R$ be differentiable. If the limits $\lim_{x\to+\infty}f(x)=a$ and $\lim_{x\to+\infty}f'(x)=b$ exist with $a\in \mathbb R$, then $b=0$.

There is a hint, it says $f(n+1)-f(n)=f'(x_n)$, where $x_n\to \infty$

I didn't understand this hint.

I need help, any clue is welcome.

Thanks a lot

-
The question title seems to make a stronger claim than the one in the question body (and the stronger claim is wrong.) – Trevor Wilson Feb 7 '13 at 1:46
Counterexample showing that the condition $\lim_{x\to\infty}f'(x) = b$ is necessary: $f(x) = \frac{1}{x}\sin(x^2)$. – Ayman Hourieh Feb 7 '13 at 9:29

Apply the mean value theorem to $[n, n+1]$ to find $x_n \in (n, n+1)$ so that: $$f'(x_n) = \frac{f(n+1) - f(n)}{(n+1) - n} = f(n+1) - f(n)$$

Now evaluate: $$\lim_{n\to\infty} f'(x_n) = \lim_{n\to\infty}\left(f(n+1) - f(n)\right)$$

Since $\lim_{x\to\infty} f'(x)$ exists, what do you conclude?

-
then we have $\lim_{n\to\infty}f'(x_n)=\lim_{n\to\infty}\left(f(n+1) - f(n)\right)= a-a=0$? – user42912 Feb 7 '13 at 1:58
@user42912 Yes! – Ayman Hourieh Feb 7 '13 at 2:14
thank you very much for your answer! – user42912 Feb 7 '13 at 3:13
Nice answer (+1). – Mhenni Benghorbal Feb 7 '13 at 7:05

Just to understand this result intuitively, suppose $b>0$. Then $b>b/2>0$ and so from some point onwards on the $X$ axis the derivative satisfies $f'(x)>b/2$ and so from that point onwards the function $f$ is increasing at a rate of no less then $b/2>0$. Clearly such a function will thus tend to $\infty$ and not to a finite $a$ as given. The case $b<0$ is treated similarly.

The hint suggested a very clear solution as the other answers show. For diversity, and since I like formal solutions that follow an intuitively clear informal argument, here is a solution along the lines in the preceding paragraph.

Assume to the contrary that $b\ne 0$. It will suffice to consider the case $b>0$ as the case $b<0$ will follow by considering the function $g(x)=-f(x)$. Since $\lim _{x\to \infty }f'(x)=b$ there exists $x_0$ such that for all $x>x_0$ holds that $f'(x)>b/2$ (take $\epsilon = b/2$ in the definition of limit). Consider any $y>x_0$ and apply the Mean Value Theorem on $[x_0,y]$ to obtain some $x_0<t<y$ such that $f'(t)=(f(y)-f(x_0))/(y-x_0))$. Rearrange to get $f(y)=f'(t)(y-x_0)+f(x_0)$. Recalling that $f'(t)>b/2$ we obtain $f(y)>y-x_0+f(x_0)$. As $x_0$ is fixed it follows that $\lim _{y\to \infty }f(y)=\infty$, a contradiction.

-