# Convex closed and unclosed functions and (lower semi)continuity

I'm grappling a bit with lower semicontinuity and convex functions. Let me consider convex functions as functions to $\mathbb{R}$ and not to $\mathbb{R}\cup \{\pm\infty\}$.

By Rockafellar's book ("Convex Analysis"), it seems to me that the following holds:

• A convex function is closed (i.e. its epigraph is closed) iff it is lower semicontinuous.
• A convex function can be made into a closed, convex function.

Furthermore, at least in finite dimensions (how about infinite dimensions?), a closed convex function defined on an open set is necessarily Lipschitz continuous on any closed set contained in the open set and hence in particular continuous.

Now, I thought about the following example. Let $\mathcal{C}:=\{(x,y)\in\mathbb{R}^2|x\geq 0, y\geq 0, x+y\leq 1\}$. This is a triangle and hence a compact, convex set. Now I define:

$$f:\mathcal{C}\to\mathbb{R}; f(x):=\begin{cases} x^2/(1-y)^2 & y\neq 1 \\ 1 &\mathrm{else} \end{cases}$$

Now since the Hessian is positive semidefinite, this function is convex in the interior and it is easily seen to be convex also on the boundary. Now the function is continuous but in (x,y)=(0,1). Since $f(0,1)=1$ and $f(0,y)=0$ for all $y\neq 1$, the function is not lower-semicontinuous. However, it seems to me that this function cannot be made into a closed, convex function, because in order to make it lower-semicontinuous, we have to set $f(0,1)=0$, but then, it's not convex anymore, since the line from (0,1) to (1,0) lies below the graph of $f$.

Where is my mistake? If there is a mistake in the example, is it possible to give an example of a lower-semicontinuous convex function on a compact set that cannot be made into an everywhere continuous function by changing some points on the boundary?

Your function is not convex: the determinant of its Hessian is $-4x^2/(1-y)^4$ which is negative everywhere. You can also plot it on the line $y=0.9(1-x)$ to see for yourself.

As Rockafellar explains, taking closure of a convex function amounts to taking closure of its epigraph. The closure of a convex set is always a convex set. Thus, we obtain a lower semicontinuous function $\operatorname{cl} f$ that is convex, satisfies $\operatorname{cl} f \le f$, and majorizes any other function with these properties.

Is it possible to give an example of a lower-semicontinuous convex function on a compact set that cannot be made into an everywhere continuous function by changing some points on the boundary?

Consider $f(x,y) = x^2/y$. This function is convex on the open halfplane $y>0$. Restrict it to the set $\{y\ge x^2\}$. It still has to be defined at $(0,0)$ somehow; lower semicontinuity dictates $f(0,0)\le 0$, but approaching along the parabola $y=x^2$ we get the limit of $1$. Thus, $f$ is not continuous at $(0,0)$ and this cannot be fixed.

It can be made lower semicontinuous (and still convex) by setting $f(0,0)=0$, which is what the closure operation does.