If $f$ is convex and concave on interval $I$, then $f$ is affine on $I$

analysisconvex-analysisreal-analysis

Prove that if $f$ is convex and concave on interval $I$, then $f$ is affine on $I$.

Attempt. Although this topic has been discussed before, i would like to point out some technique issues.

1) Let $I=[a,b]$. Then $x= \frac{b-x}{b-a}\,a+\frac{x-a}{b-a}\,b\in [a,b]$ and since $f$ is simultaneously convex and concave:
$$f(x)= \frac{b-x}{b-a}\,f(a)+\frac{x-a}{b-a}\,f(b)=\frac{bf(a)-af(b)}{b-a}+\frac{f(b)-f(a)}{b-a}\,x.$$

2) Let $I=\mathbb{R}$. Then $g=f-f(0)$ satisfies the Cauchy functional equation $g(x+y)=g(x)+g(y)$ for all $x,~y\in I$: easily $g(0)=0$ so $g\big(\lambda y\big) = \lambda g(y)$ for all $\lambda \in [0,1]$. Therefore for all $x,\,y\in \mathbb{R}$:
$$g(x+y)=g\left(\frac{1}{2}\,2x+\frac{1}{2}\,2y\right)=\frac{1}{2}g(2x)+\frac{1}{2}g(2y)=g\left(\frac{1}{2}\,2x\right)+g\left(\frac{1}{2}\,2y\right)=g(x)+g(y).$$ Since $g$ is convex defined on open interval $\mathbb{R}$, by a classic result, $g$ is continuous and therefore $g$ is linear (continuous solutions of Cauchy equation are the linear functions), so $f$ is affine.

3) Let $I=(a,b)$. According to $1$, $f$ is locally affine. How can we conclude that $f$ is affine on all $I$? One thought is that $f$ can be continuously extended as $\tilde{f}$ (why?) on $[a,b]$, so $\tilde{f}$ is affine and so $f$ is affine.

4) Let $I$ be unbounded ($\neq \mathbb{R}$). In that case we cannot work as on $2$. How can we conclude that $f$ is affine on all $I$?

Thanks in advance for the help.

Best Answer

Let $a,b\in I,$ and let $l_1(x)$ be the line through $(a,f(a)), (b,f(b)).$ Suppose $c>b$ and $f(c)>l_1(c).$ Then the line $l_2(x)$ through $(a,f(a)), (c,f(c))$ lies above $l_1$ on $[a,c].$ Thus $f(b)<l_2(b).$ This contradicts the concavity of $f$ on $[a,c].$ Therefore $f(c)\le l_1(c).$ Similar contradiction if $f(c)<l_1(c).$ Therefore $f(c)= l_1(c)$ for all $c>b, c\in I.$ The argument is the same for $c<a.$ Thus $f(c) = l_1(c)$ for all $c\in I$ as desired.