How to prove with Lagrange theorem How can I prove that:
if $f: \Bbb R \rightarrow \Bbb R$ is convex and differentiable, such that $y = 0$ is an asymptote for $x \rightarrow \infty$, then $f(x) \ge 0, \forall x \in \Bbb R$
How can I prove that $f(x) \ge 0$ with the Lagrange theorem?
 A: This is a possible solution to the problem (but i'd also like to see some of yours):
My Try: 
Given the following theorem:
TEO. Is $f$ differentiable in an interval $I$. Then $f$ is concave (convex) in $I$, if and only if $f'$is increasing (decreasing) in I.
For the previous theorem we have that $f'(x)$ it is growing broadly.
So, reasoning by contradiction, we suppose that exists $x_0 \in \Re: f(x) < 0$, then we set $\epsilon = \frac{|f(x)|}{3}$.
For the definition of asymptote $\rightarrow \lim _{x\to \infty \:}\left(f(x)\right)=1$, then by definition of limit, we have that exists $M \in \Re: |f(x)|<\epsilon, \forall x > M$.
At this point, we choose $x_1 > max\{x_0, M\}$, then we set
$$L_1 = \frac{f(x_1)-f(x_0)}{x_1-x_0}$$
Then, we choose $x_2>x_1$ so that $x_2-x_1>x_1-x_0$ from which it follows that:
$$L_2 = \frac{f(x_2)-f(x_1)}{x_2-x_1} \le \frac{2\epsilon}{x_2-x_1}< \frac{2\epsilon}{x_1-x_0}<\frac{f(x_1)-f(x_0)}{x_1-x_0} = L_1$$
where the last inequality follows from the fact that $f(x_0) = -3\epsilon$ and $f(x_1)> -\epsilon$.
So is $L_2<L_1$. On the other hand, for the Lagrange's theorem applied to the function $f$ initially restricted in $[x_0,x_1]$ and then in $[x_1,x_2]$ you get $L_1=f'(c_1)$ and $L_2=f'(c_2)$, where $c_1, c_2$ are chosen so that $x_0<c_1<x_1$ and $x_1<c_2<x_2$.
So $c_1 < c_2$ and $f'(c_1) = L_1 > L_2 = f'(c_2)$ for which you get a
contradiction to the growth in the broad sense of the first derivative function. 
A: Let $x_0$ such that $y_0 = f(x_0) < 0$ and consider $x_1 > x_0$.  I claim that $f(x_1) \leq y_0 < 0$.  If this is true, it's a contradiction since $x_1$ was general, which shows that $y=0$ can not be an asymptote.  
To prove the claim, assume $f(x_1) > y_0$, so $\frac{f(x_1) - y_0}{x_1 - x_0} > 0$.  Note that since $y=0$ is an asymptote ( or, just that there is any horizontal asymptote ), as $x\to \infty$, we have $\frac{f(x)-y_0}{x-x_0} \to 0$, so in particular we can find $x_2 > x_1$ such that $\frac{f(x_2) - y_0}{x_2 - x_0} < \frac{f(x_1)-y_0}{x_1 - x_0}$, which means that $(x_1,f(x_1))$ lies above the line connecting $(x_0,f(x_0))$ and $(x_2,f(x_2))$, which is not possible since $f$ is convex.  
A: Since $f$ is convex, its derivative is nondecreasing. In particular, the limit
$$
\lim_{x\to\infty}f'(x)
$$
exists (finite or infinite). By l'Hôpital's theorem,
$$
\lim_{x\to\infty}f'(x)=\lim_{x\to\infty}\frac{f(x)}{x}=0
$$
Therefore $f'(x)\le0$, for every $x$. Thus $f$ is nonincreasing. Then, if $f(x_0)<0$, for some $x_0$, we have $f(x)\le f(x_0)$, contradicting
$$
\lim_{x\to\infty}f(x)=0
$$
Proposition. If $f$ is differentiable and convex over $\mathbb{R}$, then $f'$ is nondecreasing.
Proof. Let $a<b$. The line through $(a,f(a))$ and $(b,f(b))$ can be written as
\begin{gather}
y=\frac{f(b)-f(a)}{b-a}(x-a)+f(a)\\
y=\frac{f(b)-f(a)}{b-a}(x-b)+f(b)
\end{gather}
By Lagrange's theorem (mean value theorem),
$$
\frac{f(b)-f(a)}{b-a}=f'(c)
$$
for some $c\in(a,b)$. Then, for $t\in(a,b)$, convexity says that
\begin{gather}
f(t)\le f'(c)(t-a)+f(a)\\
f(t)\le f'(c)(t-b)+f(b)
\end{gather}
so we derive
$$
\frac{f(t)-f(a)}{t-a}\le f'(c)\le\frac{f(t)-f(b)}{t-b}
$$
and, taking the limits for $t\to a$ and for $t\to b$,
$$
f'(a)\le f'(c)\le f'(b)
$$
proving $f'(a)\le f'(b)$. QED
Proposition. Let $f$ be differentiable over $\mathbb{R}$. If $f'(x)\le0$, for every $x$, then $f$ is nonincreasing.
Proof. Let $a<b$. Then
$$
\frac{f(b)-f(a)}{b-a}=f'(c)\le0
$$
by Lagrange's theorem. Thus $f(a)\ge f(b)$. QED
