Suppose $f$ is a convex function and differentiable everywhere on $(0, \infty)$ and satisfies $$\lim_{x \rightarrow\infty}{f(x)}=A$$ where $A$ is an arbitrary real number. Show that $$\lim_{x\rightarrow\infty}{f'(x)}=0$$
My attempt: Suppose $f'(x_0)>0$ for $x_0 \in (0, \infty)$ such that $$f(x) \geq f(x_0)+f'(x_0)(x-x_0)$$ Taking limit that tends to infinity on both sides obtain $$A=\lim_{x \rightarrow \infty}{f(x)} \geq \lim_{x \rightarrow \infty}{[f(x_0)+f'(x_0)(x-x_0)]}=\infty$$ which contradicts the fact that $A$ is finite. Similar to the case when $f'(x_0)<0$, Hence, $f'(x_0)=0$ for $x_0 \in (0, \infty)$. Take $x_0 \rightarrow \infty$ and it follows the conclusion.
Note: Any constant function $f$ is a trivial case on this question.
In this question, I illustrated an example $f(x)=e^{-x}$ and referring to its geometry interpretation of derivative, but I hope to know that if my attempt is wrong as I make $x_0\rightarrow \infty$ in my last progess, which is weird and correct it.
Hint: You've successfully come up with a contradiction if $f'(x_0) > 0$ for any $x_0 \in (0,\infty)$. Therefore, $f'(x) \le 0$ for all $x \in (0,\infty)$.
Now, since $f$ is convex, i.e. $f'(x)$ is increasing. Since $f'(x)$ is increasing and bounded above by $0$, $\displaystyle\lim_{x \to \infty}f'(x)$ exists. Can you find a contradiction if this limit is less than zero?