If the limit of a function at infty is equal to its value in some point then it has an inflection point 
Let $f:[a,\infty)\to \mathbb{R}$ be two times differentiable.
If $\lim_{x\to \infty} f(x)=f(a)$ then there exists $x\in [a,\infty)$ such that $$f^"(x)=0.$$

I tried to show that it is, for example, convex and get contradiction, however I got nowhere.
Any comment?
 A: Suppose $f''(x) \neq 0$ for all $x$. Since any derivative has IVP it follows that $f''(x) >0$ for all $x$ or $f''(x) <0$ for all $x$. The second case can be reduced to the first by changing $f$ to $-f$ so assume that $f''(x) >0$ for all $x$. This means $f$ is  convex. Let $a <b <\infty$. Convexity implies that $f(x) \geq f(b)+f'(b)(x-b)$ for all $x$. If $f'(b) >0$ this leads to the contradiction that $f(x) \to \infty$ as $x \to \infty$. Hence $f'(b) \leq 0$ for all $x$. Thus $f$ is decreasing. This, together with the hypothesis that $f(x) \to f(a)$ as $x \to \infty$ implies that $f$ is a constant and $f''(x)\equiv 0$!
A: Higlights - Try to fill in details:
Assume $\;f\;$ isn't constant (otherwise the claim is trivially true), then $\;f\;$ must either decrease from $\;a\;$ and then increase towards $\;f(a)\;$ when $\;x\to\infty\;$ , or increase from $\;a\;$ and decrease towards $\;f(a)\;$ when $\;x\to\infty\;$ . It doesn't matter whether $\;f(x)\xrightarrow[x\to\infty]{}f(a)\;$ from above, from below or from both sides afinire or infinite number of times, what matters is that $\;f\;$ increases and decreases (or the other way around) within tis domain.
The above means that $\;f'(x)\;$ changes sign from $\;-\;$ to $\;+\;$ or the other way around at least once, and since $\;f'(x)\;$ is continuous (why?), this means it must have at least a maximum or minimum point somewhere. Finish now the argument (further hint: what happens with $\;\lim\limits_{x\to\infty} f'(x)\;\ldots\;$? You may want to use MVT) 
