Proof of First-order condition in convex functions (4)From Jensen Inequality:f((1−t)x+ty)≤(1−t)f(x)+tf(y)t⋅f(y)≥−(1−t)f(x)+f((1−t)x+ty)t⋅f(y)≥t⋅f(x)−f(x)+f((1−t)x+ty)f(y)≥f(x)+1t[f(x+t(y−x))−f(x)]f((1-t)x+ty) \le (1-t)f(x) + t f(y) \\ t \cdot f(y) \ge -(1-t)f(x) + f((1-t)x+ty) \\ t \cdot f(y) \ge t\cdot f(x) - f(x) + f((1-t)x + ty) \\ f(y) \ge f(x) + \frac{1}{t}[f(x+t(y-x)) - f(x)] \\ f((1−t)x+ty)≤(1−t)f(x)+tf(y)t⋅f(y)≥−(1−t)f(x)+f((1−t)x+ty)t⋅f(y)≥t⋅f(x)−f(x)+f((1−t)x+ty)f(y)≥f(x)+t1[f(x+t(y−x))−f(x)]We can force t(y−x)t(y-x)t(y−x) to be Δx\Delta xΔxAnd thereforef′(x)(y−x)=limt→0f(x+t(y−x))−f(x)tf'(x)(y-x) = \lim_{t \rightarrow 0} \frac{f(x+t(y-x))-f(x)}{t}f′(x)(y−x)=t→0limtf(x+t(y−x))−f(x)Thereforef(y)≥f(x)+f′(x)(y−x)f(y) \ge f(x) + f'(x)(y-x)f(y)≥f(x)+f′(x)(y−x) The other direction:If FOC holds, then f is convexWe knowf(x)≥f(z)+f′(z)(x−z)f(x) \ge f(z) + f'(z)(x-z)f(x)≥f(z)+f′(z)(x−z)f(y)≥f(z)+f′(z)(y−z)f(y) \ge f(z) + f'(z)(y-z)f(y)≥f(z)+f′(z)(y−z)Thenθf(x)+(1−θ)f(y)≥f(z)+f′(z)[θx+(1−θ)y−z]=f(z)\begin{split} \theta f(x) + (1-\theta)f(y) &\ge f(z) + f'(z)[\theta x + (1-\theta)y-z] \\ &\quad = f(z) \end{split} θf(x)+(1−θ)f(y)≥f(z)+f′(z)[θx+(1−θ)y−z]=f(z)