26

I know that convexity does not imply differentiability, for example f(x)=|x| is convex but not differentiable. However, |x| is not strictly convex. So I wonder whether strict convexity imply differentiability.

I did some search and found out the Wikipedia implicitly gives the negative answer: http://en.wikipedia.org/wiki/Convex_function#Strongly_convex_functions It says that "a strongly convex function is also strictly convex" and "a function doesn't have to be differentiable in order to be strongly convex".

Can anyone provide a concrete example? Thanks in advance.

rudi
  • 261

3 Answers3

35

$$f(x)=x^2+|x|$$ is strictly convex because of the $x^2$ term but not differentiable at $0$ because of the $|x|$ term

Henry
  • 157,058
23

Choose a strictly convex function $u$ and some sequences $(x_n)$ and $(a_n)$ such that every $a_n$ is positive and the series $\sum\limits_na_n(1+|x_n|)$ converges. Then the formula $$ v(x)=\sum\limits_na_n|x-x_n| $$ defines a proper function $v$ such that $u+v$ is strictly convex, and not differentiable at any $x_n$.

The countable set of points $X=\{x_n\}$ may be dense. The function $v$ is differentiable at every $x$ not in $X$, with $$ v'(x)=\sum\limits_na_n\,\mathrm{sgn}(x-x_n). $$

Did
  • 279,727
  • 1
    This might actually be already the most general case: I don't think it's possible for a function to be strictly convex and non-differentiable on more than a null set. – leftaroundabout Sep 27 '11 at 11:32
  • @left, that is interesting. Would you have a reference? (But null sets may be uncountable.) – Did Sep 27 '11 at 12:20
  • I'm not sure about it, I only vaguely remember some argument with Sobolev spaces. But you're right, as null sets can be uncountable it doesn't proove your example is the most general one. – leftaroundabout Sep 27 '11 at 12:34
  • 1
    @Didier Piau: Every convex function $f:I \rightarrow {\mathbb R}$, where $I$ is an open interval, is finitely differentiable at co-countably many points in $I.$ In fact, the following stronger result holds: both unilateral derivatives exist finitely at each point in $I.$ Moreover, this result is sharp in the sense that every countable subset of $\mathbb R$ can be the set of non-differentiability for a convex function. Also, the 2nd derivative of a convex function exists (finitely) almost everywhere (Lebesgue measure). For more, see http://groups.google.com/group/sci.math/msg/ab1cdc66df05b84d – Dave L. Renfro Sep 27 '11 at 16:34
  • @Dave, thanks a lot. I should have seen the co-countability myself, this is the old argument that any summable family of nonnegative real numbers contains at most countably many positive elements. The fact that every co-countable subset of $\mathbb R$ can be the set of non-differentiability stems from the example in my post, I think. Thanks again for your comment. – Did Sep 27 '11 at 16:57
  • @Did So you've proved that the set of non-diffrentiable points of a convex function can be at most countable and may well be dense. Is it only true for $\Bbb R$ or we can generalize it for general ${\Bbb R}^n$ or other metric spaces ? –  Jan 05 '18 at 05:01
  • Rademacher's theorem says that every locally Lipschitz continuous function is differentiable at least in a set of full measure. Since convex functions on $\mathbb{R}^{n}$ are locally Lipschitz continuous, all convex functions are differentiable in a set of full measure. That type of analysis comes from Clarke's sense of differentiable function, see https://encyclopediaofmath.org/wiki/Clarke_generalized_derivative – R. W. Prado Sep 08 '22 at 18:10
13

The function $$f(x)=\max(e^x,e^{-x})$$ is strictly convex but not differentiable at $0$.

  • 3
    The maximum of two strictly convex functions is strictly convex, so taking any two such functions whose graphs intersect at a point where the slopes differ should work as well. – Zarrax Sep 27 '11 at 17:58
  • 4
    Also your $f$ can be seen as $f(x)=\max(e^x,e^{-x})=e^{\max(x,-x)}=e^{|x|}$. – Jeppe Stig Nielsen Oct 05 '13 at 12:36