# Nondifferentiable convex function whose subdifferential admits a continuous selection

Is there a convex function $$F$$ that is not differentiable, but whose subdifferential admits a continuous selection, i.e. a continuous $$g$$ with $$g(x) \in \partial F(x)$$ for all $$x$$ in the domain?

In one dimension I think I can prove there is not: if $$|\partial F(x)| > 1$$ then it contains an open set, whose inverse image under $$g$$ is an open set, so $$g$$ is not a selection after all - I think it maps some $$y \neq x$$ to a point in the interior of $$\partial F(x)$$, which cannot be a subgradient at $$y$$.

See Rockafellar's Convex Analysis, part V.

First, let $$D$$ be the set of points where $$F$$ is differentiable. Theorem 25.5 proves that $$D$$ is dense in the interior of the domain of $$F$$, with measure zero complement. And that $$\nabla F$$ is a continuous mapping on $$D$$.

Next, if the domain of $$F$$ has non-empty interior, then at every interior point the subdifferential has the property (Theorem 25.6):

$$\partial F(x) = \mathrm{cl} ( \mathrm{conv}(S(x)))$$

where $$S(x)$$ is the set of limits of all sequences of the form $$\nabla F(x_i)$$ where $$x_i \to x$$ and $$x_i \in D$$.

Now if $$\partial F$$ admits a continuous section $$g$$, then for every $$x$$ in the interior of the domain of $$F$$, we have that for every sequence $$x_i \in D$$ such that $$x_i \to x$$ it holds that $$g(x_i) \to g(x)$$ (continuity of $$g$$); but since $$\partial F(x_i) = g(x_i)$$ is unique, this implies that $$S(x) = \{g(x)\}$$.

And hence $$F$$ is differentiable at $$x$$.