7-14

Question: 
Prove that \phi is convex on (a,b) if and only if it is continuous and 
\phi \left(\frac{x_1+x_2}{2}\right) \leq \frac{\phi(x_1)+\phi(x_2)}{2}
for x_1,x_2 \in (a,b). 
Answer: 
\Rightarrow If \phi is convex, by definition, 
\phi \left(p_1x_1+p_2x_2\right) \leq p_1\phi(x_1)+p_2\phi(x_2) 
where p_1+p_2=1 . 
Choose p_1=p_2=\frac{1}{2} , then 
\phi \left(\frac{x_1+x_2}{2}\right) = \phi \left(\frac{1}{2}x_1+\frac{1}{2}x_2\right) \leq \frac{1}{2}\phi(x_1)+\frac{1}{2}\phi(x_2) = \frac{\phi(x_1)+\phi(x_2)}{2}. 
Since \phi is convex, the slope \frac{\phi(x+h)-\phi(x)}{h}, \quad h>0 decreases when h decreases. 
Also for any h, k \geq 0 , we have 
\frac{\phi(x+h)-\phi(x)}{h}\geq\frac{\phi(x)-\phi(x-k)}{k}. 
This means that D^+ \phi(x)= \lim_{h\to 0^+} \frac{\phi(x+h)-\phi(x)}{h} exists and finite by monotone convergence theorem. 
By similar approach, we can show that D^- \phi(x) = \lim_{k\to0^-} \frac{\phi(x)-\phi(x-k)}{k} exists and finite. Then 
-\infty < D^- \phi(x) \leq D^+ \phi(x)<\infty. 
So \lim_{h\to0^+} \phi(x+h) - \phi(x) =0 , and \lim_{k\to0^-} \phi(x) - \phi(x-k) =0 . This guarantees that \phi is continuous. 
\Leftarrow If \phi is continuous, and \phi \left(\frac{x_1+x_2}{2}\right) \leq \frac{\phi(x_1)+\phi(x_2)}{2} for x_1,x_2 \in (a,b) , 
So \phi \left( \frac{x_1+x_2+\dots+x_{2^n}}{2^n} \right) \leq \frac{\phi(x_1)+\phi(x_2)+\dots+\phi(x_{2^n})}{2^n}. Let f = x_i for 1\leq i \leq m, and g = x_i for m+1 \leq i \leq 2^n where 1\leq m \leq 2^n is a integer. 
Then we obtain 
\phi \left( \frac{m}{2^n}f + \left(1-\frac{m}{2^n}\right)g \right) \leq \frac{m}{2^n}\phi(f) + \left(1-\frac{m}{2^n}\right) \phi(g). 
Since the number \frac{m}{2^n} with integers m,n and 1\leq m \leq 2^n is dense in [0,1] . And by the continuity, we prove that \phi is convex.