MVT Help - $\lim_{x\to\infty}f(x)=f(a)$ then $f'(c)=0$ 
Suppose $f$ is a continuous function on $[a,\infty)$ and
  differentiable on $(a,\infty)$ and $\lim_{x\to\infty}f(x)=f(a)$ then
  prove that for some $c$ we have $f'(c)=0$.

I have a small doubt. At first it seemed like obvious MVT. I mean there is an $c$ such that $f'(c)=\frac{f(x)-f(a)}{x-a}$ this $c$ depends on $x$(?). So if we take limits of both sides we have $\lim_{x\to\infty}f'(c(x))=\lim_{x\to\infty}\frac{f(x)-f(a)}{x-a}=0$. Now we must show that the limit on left is finite. How do I do that?
Is my approach so far correct? Please help.
 A: Let $g:[0,1) \to [a,\infty) $ be a strictly increasing differentiable function (something like $a+1/(1-x)$ will work, for example). Then $h=f \circ g: [0,1) \to \mathbb{R} $ is differentiable on $(0,1)$, and we can extend it continuously to include $1$ by setting $h(1)=f(a)$.
We can then apply the MVT to $h$: $h$ continuous on $[0,1]$, differentiable on $(0,1)$, and $h(0)=h(1)$, so there is $c \in (0,1)$ so that $h'(c)=0$. But by the chain rule,
$$ 0 = h'(c) = f'(g(c))g'(c). $$
Since $g$ is strictly increasing, $g'(c)\neq0$, so $f'(g(c))=0$, and thus $g(c)$ is the required point.
A: Suppose the derivative does not vanish in $(a,\infty)$. By Darboux's theorem $f'$ cannot change signs in $(a,\infty)$, so either $f$ is strictly increasing, or it is strictly decreasing in $(a,\infty)$, so the limit $\lim_{x\to\infty}f(x)$ must be either strictly smaller than $f(a)$ or strictly larger than it, or else not exist at all, which contradicts the hypothesis. Therefore the derivative must vanish somewhere in $(a,\infty)$.
A: An example: $f(x) = e^{-x^2} - e^{-x}$ for $x \in [0, \infty)$ $\;\,$ ($a = 0$).
In this case, 
\begin{equation}
f(0) = 1 - 1 = 0,\;\;\;\;\, f(1) = 0, \;\, \textrm{ and } \;\lim_{x \to \infty} f(x) = 0 - 0 = 0,
\end{equation}
so we have 
$   \lim_{x \to \infty} f(x) = f(a)$, but also $f(0) = f(1)$, so by MVT, there is $c \in (0,1)$ s.t. $f'(c) = 0$.
In fact, this happens in this example also at the limit $x \to \infty$ since \begin{equation}
   \lim_{x \to \infty} f'(x) = - \lim_{x \to \infty} 2x\cdot e^{-x^2} + \lim_{x \to \infty} e^{-x} = - 0 + 0 = 0.
\end{equation} 
(This example was originally given as a counter example to show that there is no such $c \in (0, \infty)$ but $f'(c) = 0$ only at $c = \infty$, but I missed the fact $f(1) = 0$. I think the statement is true as proven above.)
A: The proof of Rolle's theorem can be modified to apply to this case also. If $f$ is constant then derivative vanishes everywhere and we are done. If $f $ is not constant then there are values of $f$ different from $f(a) $ in the interval $(a, \infty) $. Let us suppose that there is a $b>a$ such that $f(b) >f(a) $. Now $f(x) \to f(a) $ as $x\to\infty$ so there is a number $M>b$ such that $f(x) <f(b) $ for all $x\geq M$. Thus the function $f$ attains maximum value in interval $[a, M]$ at an interior point. And derivative vanishes at this point of maxima.
The case when $f$ takes some value less than $f(a) $ in $(a, \infty) $ is similar. We just have to consider minimum value of $f$ in a suitable interval $[a, M] $. 
