Real Analysis – Proof Every Convex Function Is Continuous (Spivak Problem 10)

convex-analysisproof-verificationreal-analysis

I am working on exercise 10 of the appendix between chapters 11 and 12 of Spivak's Calculus. The problem is to show that a convex function must be continuous.
I would like to check my proof as it is different from the ones I have found so far.

Let $f$ be a function that is convex in $ (a,b)$.
Let us assume that $f$ is not continuous in the point $a$.

By the definition of convexity, we have:
$ \dfrac{f(x)-f(a)}{x-a}<\dfrac{f(b)-f(a)}{b-a}$

To remove the inequality let $ \dfrac{f(x)-f(a)}{x-a} +h(x) = \dfrac{f(b)-f(a)}{b-a} ~(1)$, where $h(b)=0$ and $h(a)=\dfrac{f(b)-f(a)}{b-a}$

Now let's rearrange equation 1:
$ f(x)-f(a) = (x-a)\left(\dfrac{f(b)-f(a)}{b-a} – h(x)\right)$

Taking $lim_{x\to a^+}$ on both sides:

$ lim_{x\to a^+} (f(x)-f(a)) = lim_{x\to a^+} (x-a)\left(\dfrac{f(b)-f(a)}{b-a} – h(x)\right)= 0$

So $~lim_{x\to a^+} f(x)= f(a)$

Thus $f(x)$ is right continuous on $a$

I can use a similar argument to prove that $f(x)$ is left continuous on $b$

Since $f$ is convex in $(a,b)$, it is also convex in $(a+h,b)$ with $h< b-a$. And by letting $h \to b-a$, I prove right continuity over the whole interval.

Similarly, as $f$ in convex in $(a,b)$, it is also convex in $(a,b-k)$ with $k > b-a$. And by letting $k \to b-a$, the whole interval is left continuous.

As any $x_0 \in (a,b)$ can be uniquely expressed as $x_0= a+h = b-k$ and $f$ is right continuous for $a+h$ and left continuous for $b-k$ then $f$ is continuous in $x_0 \in (a,b)$

While writing the question, I have cleaned the logic from what I had initially drafted, so I am more confident about it. Still I am not sure if this logic is correct, as it is longer than any other answer I have found.

Best Answer

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.