Subdifferential of a convex function

639 Views Asked by At

How would I find a convex function $f: \mathbb{R} \to \mathbb{R}$ such that $\partial f(0) = [0,1]$

A subdifferential is just the collection of vectors $w \in \mathbb{R}^n$ such that

$f(y) \geq f(x_0) + \langle w,y-x_0\rangle$, $\forall y \in \mathbb{R}^n$ and $\partial f(x_0) \neq \emptyset$.

I am unsure how to extend this definition to my question, and would appreciate any help.

1

There are 1 best solutions below

0
On

The key trick would be to introduce a discontinuity in the derivative of the function $f$ at $x=0$.

Let $f$ be of the form

$$ f(x) = \begin{cases} g(x),&\text{ if } x \leq 0 \\ h(x),&\text{ if } x > 0 \end{cases} $$ such that both $g$ and $h$ are differentiable, $g(0) = h(0)$, $g'(0) = 0$, $h'(0) = 1$, any choice of smooth $g$ and $h$ would fit the bill.

$$ f(x) = \begin{cases} 0,&\text{ if } x \leq 0 \\ x,&\text{ if } x > 0 \end{cases} $$ suggested by @giulio-binosi fits the bill.

So does a more complicated $$ f(x) = \begin{cases} \frac{1}{3}x^3,&\text{ if } x \leq 0 \\ \frac{1}{2}x^2 + x,&\text{ if } x > 0 \end{cases} $$