Is every convex function on an open interval continuous? [duplicate]
Solution 1:
You can prove $g(x)$ is decreasing over all of $(a,x_0)$. To do this, I'll use the lemma that if $\frac{a}b\ge \frac{c}d$, then $\frac{c+a}{d+b}\ge \frac{c}d$, whenever $a,b,c,d\ge0$ (this is easy to prove). Then, for any $x<y<x_0$, we have
$$ g(x)=\frac{f(x_0)-f(x)}{x_0-x}=\frac{f(x_0)-f(y)+f(y)-f(x)}{x_0-y+y-x}\ge\frac{f(x_0)-f(y)}{x_0-y}=g(y) $$ where the $\ge$ part follows from the lemma since $\frac{f(y)-f(x)}{y-x}\ge \frac{f(x_0)-f(y)}{x_0-y}$ by the convexity property. This proves $g$ is decreasing; you can also show $g$ is bounded below in this region, namely, for $x<x_0<x_2$, we always have $g(x)\ge \frac{f(x_2)-f(x_0)}{x_2-x_0}$, and then the rest of the proof goes jsut like you said.
Solution 2:
Let $x < y < z$. The inequalities: \begin{eqnarray*} \frac{f(y)-f(x)}{y-x} \le \frac{f(z)- f(y)}{z-y} \\ \frac{f(y)-f(x)}{y-x} \le \frac{f(z)- f(x)}{z-x}\\ \frac{f(z)-f(x)}{z-x} \le \frac{f(z)- f(y)}{z-y} \end{eqnarray*} are equivalent.
A function $f$ is convex if for any $x<y<z$ in the domain any of the equivalent inequalities from above hold.
It is easy to see now that if $f$ is convex and $x<y$, $x'<y'$ and $x\le x'$, $y\le y'$ then \begin{eqnarray*} \frac{f(y)-f(x)}{y-x} \le \frac{f(y')- f(x')}{y'-x'} \end{eqnarray*} (the slopes are increasing). Indeed we have \begin{eqnarray*} \frac{f(y)-f(x)}{y-x} \le \frac{f(y')- f(x)}{y'-x}\le \frac{f(y')- f(x')}{y'-x'} \end{eqnarray*} Let $[c,d]$ a closed interval contained in $(a,b)$. Let $c'< c$ and $d'>d$ so that $[c',d']\subset (a,b)$. For any $x<y$ in $[a,b]$ we have \begin{eqnarray*} \frac{f(c)- f(c')}{c - c'} \le \frac{f(y)- f(x)}{y-x}\le \frac{f(d')- f(d)}{d'-d} \end{eqnarray*} Let $M = \max \{ | \frac{f(c)- f(c')}{c - c'} |, | \frac{f(d')- f(d)}{d'-d}|\}$. It follows that \begin{eqnarray*} |\frac{f(y)- f(x)}{y-x}|\le M \end{eqnarray*} for all $x<y$ in the interval $[c,d]$ so $f$ is Lipschitz on that interval.
Note that $M$ can improved to $\max\{ |f'_{-}(c)|, |f'_{+}(d)|\}$.
In any case, $f$ is Lipschitz on any closed interval and hence continuous.