1

Let $f: \mathbb{R}^d \rightarrow \mathbb{R}$ be a function that is twice differentiable almost everywhere. Specifically $f$ is non-differentiable only at the origin, because one term in $f$ contains $\|x\|_{2}$ (not squared). Everywhere else $f$ is twice differentiable with a PSD Hessian. Is it true that $f$ is convex, using the fact that if the Hessian is PSD then the function is convex? Where does the standard reasoning break down if there is a singe point of non-differentiablity at the origin?

1 Answers1

3

Consider $$ f(x) = \min( (x-1)^2, \ (x+1)^2 ). $$ It is twice differentiable except at the origin with $f''(x) =2$ for all $x\ne0$. Still it is non-convex.

daw
  • 54,637
  • 2
  • 44
  • 85