# Convex and continuous function on compact set implies Lipschitz

Let the function $f: C \rightarrow \mathbb{R}$ be convex and continuous, where $C \subset \mathbb{R}^n$ is a compact set.

Prove or disprove that $f$ is Lipschitz continuous on $C$.

Comments: If $f$ were defined on an open set $O$, then I can show that it is Lipschitz continuous on every compact subset of $O$, see Proving that a convex function is Lipschitz for the scalar case. In this case, however, I need to exploit the assumption that $f$ is continuous also on the boundary of $C$ - continuity of $f$ in the interior of $C$ already follows from the convexity assumption.

• Take for simplicity $C\subset \mathbb R^1$, where $C=[-1,1]$ and $f$ to be the lower semicircle of the unit sphere in $\mathbb R^2$, i.e $f=-\sqrt{1-x^2}$. This function is convex and continuous, but not Lipschitz. The problem arises on the boundary of the set, where the derivatives can be unbounded. – Svetoslav Mar 3 '16 at 18:18
• This is correct, thank you. – user284439 Mar 3 '16 at 19:48

As noted by Svetoslav in a comment, the statement is false: a counterexample is given by $f(x) = -\sqrt{1-x^2}$ on $[-1,1]$.
A slightly simpler counterexample is $f(x) = -\sqrt{x}$ on $[0,1]$.
In both cases, the issue is that $f'$ is not bounded. A function with unbounded derivative cannot be Lipschitz.