If $f$ is continuous, why is $f$ with the property $f\left(\frac{x+y}{2}\right)\le \frac{1}{2}f(x)+\frac{1}{2}f(y)$ is convex? 
If $f$ is continuous, why is $f$ with the property
  $$f\left(\frac{x+y}{2}\right)\le \frac{1}{2}f(x)+\frac{1}{2}f(y),$$ where $0\le x,y\le 1$
  is convex?


By induction we can prove that: if $k,m, l\in\mathbb{N} , k+m=2^l , x,y\in \mbox{domain} f $ then $$f\left( \frac{k}{2^l} \cdot x +\frac{m}{2^l} \cdot y \right)\leq \frac{k}{2^l} \cdot f(x) +\frac{m}{2^l} \cdot f(y). $$
Indeed the asertion is true when $l=1 .$ Suppose that it is true for some $l\geq 1 .$ And let $k+m=2^{l+1} , k=2^l +s , m=2^l-s ,s\in\mathbb{N} . $ We have:
$$f\left( \frac{k}{2^{l+1}} \cdot x +\frac{m}{2^{l+1}} \cdot y \right) =f\left( \frac{1}{2} \cdot x +\frac{1}{2}\cdot \left(\frac{s}{2^l} \cdot x+\frac{2^l -s}{2^l} \cdot y\right) \right) \leq \frac{1}{2} \cdot f(x) +\frac{1}{2} \cdot  f\left(\frac{s}{2^l} \cdot x+\frac{2^l -s}{2^l} \cdot y\right)\leq \frac{1}{2} \cdot f(x) +\frac{1}{2} \cdot  \frac{s}{2^l} \cdot f(x)+\frac{1}{2}\cdot\frac{2^l -s}{2^l} \cdot f(y) = \frac{k}{2^{l+1}} \cdot f(x) +\frac{m}{2^{l+1}} \cdot f(y) .$$
Hence  by Induction the asertion holds true for any $l\in\mathbb{N} .$
Now let $1>\alpha >0 , $ and let $\frac{k_l}{2^l} \rightarrow \alpha $ as $l\to \infty .$ Since $f$ continuous we have $$f(\alpha x +(1-\alpha )y ) =\lim_{l\to\infty } f\left(\frac{k_l}{2^l} \cdot x + \left(1-\frac{k_l}{2^l} \right) y\right) \leq \lim_{l\to\infty } \left(\frac{k_l}{2^l} \cdot f(x) + \left( 1-\frac{k_l}{2^l} \right) f(y)\right) =\alpha f(x) +(1-\alpha )f(y) .$$ 
