User:TakuyaMurata/Sandbox

A function $$\phi$$ from an interval $$I$$ to $$\mathbb{R}$$ is said to be convex if for every $$K \subset\subset I$$ and any affine function $$f$$ on $$K$$, $$\phi \le f$$ on $$\partial K$$ implies that $$\phi \le f$$ on $$K$$.

Theorem ''Let $$\phi$$ be a real-valued function on an interval $$I$$. The following are equivalent:
 * (a) $$\phi$$ is convex.
 * (b) The difference quotient
 * $${\phi(x + h) - f(x) \over h}$$ increases as $$h$$ does.
 * (c) If $$d\mu \ge 0$$ and is supported by a compact set $$K$$ such that $$\int d\mu = 1$$, then we have: for any $$x:K \to I$$ such that $$\int x(t)d\mu(t)$$ is in $$I$$.
 * $$\phi \left( \int x(t)d\mu(t) \right) \le \int \phi \circ x(t)d\mu(t)$$ (Jensen's inequality)
 * (d) If the interval $$[a, b] \subset I$$, then
 * $$\phi ((1 - \lambda) a + \lambda b) \le (1 - \lambda) \phi(a) + \lambda \phi(b)$$ for any $$\lambda \in [0, 1]$$.
 * (e) $$\phi$$ is integrable on $$I$$.

Proof: Suppose (a). For each $$x \in [a, b]$$, there exists some $$\lambda \in [0, 1]$$ such that $$x = \lambda a + (1 - \lambda) b$$. Let $$A(x) = A(\lambda a + (1-\lambda) b) = \lambda f(a) + (1-\lambda) f(b)$$, and then since $$\mbox{b}[a, b] = \{a, b\}$$ and $$(f - A)(a) = 0 = (f - A)(b)$$,

Thus, (a) $$\Rightarrow$$ (b). Now suppose (b). Since $$\lambda = {x - a \over b - a}$$, for $$\lambda \in (0, 1)$$, (b) says:
 * $$|f(x)| = |f(x) - A(x) + A(x)|$$
 * $$\le \sup \{|f(a) - A(a)|, |f(b) - A(b)|\} + A(x)$$
 * $$=\lambda f(a) + (1-\lambda) f(b)$$
 * }
 * $$=\lambda f(a) + (1-\lambda) f(b)$$
 * }
 * }

Since $$a - x < b - x$$, we conclude (b) $$\Rightarrow$$ (c). Suppose (c). The continuity follows since we have:
 * $$(b - x)f(x) + (x - a)f(x)$$
 * $$\le (b -x)f(a) + (x - a)f(b)$$
 * $${f(a) - f(x) \over a - x}$$
 * $$\le {f(b) - f(x) \over b - x}$$
 * }
 * $$\le {f(b) - f(x) \over b - x}$$
 * }
 * $$\lim_{h > 0, h \to 0}f(x + h) = f(x) + \lim_{h > 0, h \to 0}h{f(x + h) - f(x) \over h}$$.

Also, let $$x = 2^{-1}(a + b)$$ such that $$a < b$$, for $$a, b \in K$$. Then we have:

Thus, (c) $$\Rightarrow$$ (d). Now suppose (d), and let $$E = \{ (x, y) : x \in [a, b], y \ge f(x) \}$$. First we want to show
 * $${f(a) - f(x) \over a - x}$$
 * $$\le {f(b) - f(x) \over b - x}$$
 * $$f(x) - f(a)$$
 * $$\le f(b) - f(x)$$
 * $$f \left( {a + b \over 2} \right)$$
 * $$\le {f(a) + f(b) \over 2}$$
 * }
 * $$f \left( {a + b \over 2} \right)$$
 * $$\le {f(a) + f(b) \over 2}$$
 * }
 * $$f\left({1 \over 2^n} \sum_1^{2^n} x_j \right) \le {1 \over 2^n} \sum_1^{2^n} f(x_j)$$.

If $$n = 0$$, then the inequality holds trivially. if the inequality holds for some $$n - 1$$, then


 * $$f \left( {1 \over 2^n} \sum_1^{2^n} x_j \right)$$
 * $$=f \left( {1 \over 2} \left( {1 \over 2^{n - 1}} \sum_1^{2^{n - 1}} x_j + {1 \over 2^{n - 1}} \sum_1^{2^{n - 1}} x_{2^{n - 1} + j} \right) \right)$$
 * $$\le {1 \over 2} f \left( {1 \over 2^{n - 1}} \sum_1^{2^{n - 1}} x_j \right) + {1 \over 2} f \left( {1 \over 2^{n - 1}} \sum_1^{2^{n - 1}} x_{2^{n - 1} + j} \right)$$
 * $$\le {1 \over 2^n} \sum_1^{2^{n - 1}} f(x_j) + {1 \over 2^n} \sum_1^{2^{n - 1}} f(x_{2^{n - 1} + j}) $$
 * $$= {1 \over 2^n} \sum_1^{2^n}f(x_j)$$
 * }
 * $$\le {1 \over 2^n} \sum_1^{2^{n - 1}} f(x_j) + {1 \over 2^n} \sum_1^{2^{n - 1}} f(x_{2^{n - 1} + j}) $$
 * $$= {1 \over 2^n} \sum_1^{2^n}f(x_j)$$
 * }
 * $$= {1 \over 2^n} \sum_1^{2^n}f(x_j)$$
 * }
 * $$= {1 \over 2^n} \sum_1^{2^n}f(x_j)$$
 * }

Let $$x_1, x_2 \in [a, b]$$ and $$\lambda \in [0, 1]$$. There exists a sequence of rationals number such that:
 * $$\lim_{j \to \infty} {p_j \over 2q_j} = \lambda$$.

It then follows that:

Thus, (d) $$\Rightarrow$$ (e). Finally, suppose (e); that is, $$E$$ is convex. Also suppose $$K$$ is an interval for a moment. Then
 * $$f(\lambda x_1 + (1 - \lambda) x_2)$$
 * $$\le \lim_{j \to \infty} {p_j \over 2q_j} f(x_1) + \left( 1 - {p_j \over 2q_j} \right) f(x_2)$$
 * $$= \lambda f(x_1) + (1 - \lambda) f(x_2)$$
 * $$\le \lambda y_1 + (1 - \lambda) y_2$$.
 * }
 * $$= \lambda f(x_1) + (1 - \lambda) f(x_2)$$
 * $$\le \lambda y_1 + (1 - \lambda) y_2$$.
 * }
 * $$\le \lambda y_1 + (1 - \lambda) y_2$$.
 * }
 * $$f(\lambda a + (1 - \lambda) b) \le \lambda f(a) + (1 - \lambda) f(b)$$. $$\square$$