Let $f : \left]0, +\infty\right[ \to \mathbb R$ a differentiable and bounded function such that $$\lim_{x \to +\infty} f'(x) = l$$ Show that $l = 0$.
My attempt is the following : Suppose that $l>0$, then $\forall \epsilon > 0, \exists x_0 > 0, \text{ such that } \forall x>x_0, \lvert f'(x) - l \rvert \leq \epsilon $. Taking $\epsilon = \frac{l}{2}$, we have that $\frac{l}{2} \leq f'(x)$ $\forall x > x_0$.
Then by the mean value theorem, we can say that $\forall x > x_0, f(x) \geq \frac{l}{2}(x-x_0) + f(x_0)$.
Hence, $\lim_{x \to +\infty}f(x)= +\infty$. I guess we can do the same for $l < 0$ and deduce that $\lim_{x \to +\infty}f(x)= -\infty$. So if $f$ is bounded then $l=0$.
Is it correct ? Is there any direct proof ?