Proof every convex function is continuous (Problem 10 Convex Functions Spivak)

Solution 1:

Let $x<y$ be arbitrary points in $[c,d] \subset (a,b)$. Take $\delta >0$ such that $a+\delta < c < d < b-\delta$.

If $f$ is convex on $(a,b)$, then it is easy to show that it is bounded on any closed subinterval. Hence, there exist bounds $m$ and $M$ such that $m \leqslant f(x) \leqslant M$ for all $x\in [a+\delta,b- \delta].$

Take a fixed $z$ such that $d < z \leqslant b-\delta$ and define $\lambda = \frac{y-x}{z-x}$. It follows that $0 < \lambda < 1$ and $y = \lambda z + (1-\lambda)x$, and by convexity

$$f(y) \leqslant \lambda f(z) + (1-\lambda)f(x) = f(x) + \lambda(f(z) - f(x))$$

Hence,

$$f(y) - f(x) \leqslant \lambda(f(z) - f(x)) \leqslant \lambda (M - m) = \frac{y-x}{z-x} (M-m) < \frac{y-x}{z-d} (M-m) < \frac{M-m}{z-d}|y-x|$$

Switching variable names $x$ and $y$ we get

$$-[f(y) - f(x)] = f(x) - f(y) \leqslant \frac{M-m}{z-d}|x- y| = \frac{M-m}{z-d}|y- x|,$$

and this implies

$$|f(y) - f(x)| \leqslant \frac{M-m}{z-d} |y-x|.$$

Therefore, $f$ is continuous on $(a,b)$ as well as Lipschitz continuous on any closed subinterval.