# Existence of complicated convex functions

In Stochastic Finance: An Introduction In Discrete Time (by Follmer, Schied), page 400, I found the following proposition:

Proposition A.4. Let $I\subseteq\mathbb R$ be an open interval and $f:I\to\mathbb R$ a convex function. Then
(i) $f$ is continuous in $I$
(ii) for all $x\in I$ the function $f$ admits left- and right-hand derivatives $$f_-'(x) = \lim_{y\nearrow x} \frac{f(y)-f(x)}{y-x},\quad f_+'(x) = \lim_{y\searrow x} \frac{f(y)-f(x)}{y-x}$$ (iii) $f$ is Lebesgue almost everywhere differentiable in $I$

Let $D_f$ denote the set of points $z\in I$ such that $f_-'(z)<f_+'(z)$. By (iii) the set $D_f$ must always have Lebesgue measure zero. Now $f(x)=|x|$ and $g(x)=\max(1-x,-x-1,1)$ are convex functions for which $D_f=\{0\}$ and $D_g=\{-2,2\}$ respectively.

But I am wondering whether there are more abstract convex functions such that $D$ is perhaps countable or uncountable (Cantor set?).

• Notice that $f'_{\pm}$ are increasing and differ exactly at points of jump discontinuity. Since an increasing function has at most countably many jumps, this implies that $D_f$ is at most countable. – Sangchul Lee Apr 12 '15 at 20:08

You can construct a countable infinite $D_f$ by letting $f$ be piecewise linear in the intervalls $[1-\frac{1}{n},1-\frac{1}{n+1}]$ with gradient $n$. An explicit example is given by: $$f(x) = \begin{cases} \frac{1}{x}-\frac{1}{2} & 0 < x \le \frac{1}{2} \\ n(x-1+\frac{1}{n}) + H(n) & 1-\frac{1}{n} \le x \le 1-\frac{1}{n+1}\,,\,\, n \ge 2 \end{cases}$$ where $H(n) = 1 + \frac{1}{2} + \cdots + \frac{1}{n}$.

The convexity of $f$ above follows from a somewhat more general consideration: Let $f$ be continuous on the intervall $I$. Let $\cdots< x_{n-1} < x_n < x_{n+1} < \cdots\,\,(n \in \mathbb{Z})$ be a decomposition of $I$ and suppose $f$ is piecewise linear on $[x_n,x_{n+1}]$ with gradient $g_n$ such that $g_n \le g_{n+1}$ for all $n$ (actually $f$ could be taken more general, but I want to avoid technical difficulties). Then $f$ is convex.

Proof: Let $x<y$ and suppose $x \in [x_n,x_{n+1}], \frac{x+y}{2} \in [x_k,x_{k+1}], y \in [x_m,x_{m+1}]$. Then $n \le k \le m$ and \begin{align*}f(x) &= f(x_n) + (x-x_n)g_n \\ f(y) &= f(x_n) + \sum_n^{m-1}(x_{i+1}-x_i)g_i + (y-x_m)g_m \\ &\ge f(x_n) + \sum_n^{k-1}(x_{i+1}-x_i)g_i+(y-x_k)g_k\\ 2f(\frac{x+y}{2})&=2f(x_n) + 2\sum_n^{k-1}(x_{i+1}-x_i)g_i + (x+y-2x_k)g_k \end{align*} Thus \begin{align*}f(x)& +f(y) - 2f(\frac{x+y}{2})\\ & \ge (x-x_n)g_n - \sum_n^{k-1}(x_{i+1}-x_i)g_i + (x_k -x)g_k \\ & = (x-x_n)g_n - \sum_n^{k-1}(x_{i+1}-x_i)g_i + (x_{n+1}-x)g_k + \sum_{n+1}^{k-1}(x_{i+1}-x_i)g_k\\ & \ge (x-x_n)g_n - (x_{n+1}-x_n)g_n+ (x_{n+1}-x)g_k \\ & = (x_{n+1}-x)(g_k-g_n)\ge 0. \end{align*} Finallly, by continuity, midpoint convexity implies convexity. QED

• This makes sense. If you happen to have explicit formulas at hand, please do share them. – Phil-ZXX Apr 12 '15 at 21:38