Proof of First-order condition in convex functions (4)

From Jensen Inequality:

f((1t)x+ty)(1t)f(x)+tf(y)tf(y)(1t)f(x)+f((1t)x+ty)tf(y)tf(x)f(x)+f((1t)x+ty)f(y)f(x)+1t[f(x+t(yx))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)] \\

We can force t(yx)t(y-x) to be Δx\Delta x

And therefore

f(x)(yx)=limt0f(x+t(yx))f(x)tf'(x)(y-x) = \lim_{t \rightarrow 0} \frac{f(x+t(y-x))-f(x)}{t}

Therefore

f(y)f(x)+f(x)(yx)f(y) \ge f(x) + f'(x)(y-x)

The other direction:

If FOC holds, then f is convex

We know

f(x)f(z)+f(z)(xz)f(x) \ge f(z) + f'(z)(x-z)
f(y)f(z)+f(z)(yz)f(y) \ge f(z) + f'(z)(y-z)

Then

θf(x)+(1θ)f(y)f(z)+f(z)[θx+(1θ)yz]=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}