Would you help me to demonstrate the following lemma:
Consider a real-valued function which is convex on a proper open interval $(a,b)$. If $x, y, z \in (a,b)$ and $x < y < z$, then
$$ \frac{f(y)-f(x)}{y-x} \leq \frac{f(z)-f(x)}{z-x} \leq \frac{f(z)-f(y)}{z-y} $$
Thank you.
You can get an idea of the proof from a sketch. Let me prove the second equality (the first one is similar). Let $\lambda \in (0,1)$ such that $y = \lambda x + (1-\lambda)z$. By definition of convexity, $f(y) \leq \lambda f(x) + (1-\lambda)f(z)$. I will use this in the rewritten form $-\lambda f(x) \leq (1-\lambda)f(z) - f(y)$: $$\frac{f(z)-f(x)}{z-x} = \frac{\lambda(f(z)-f(x))}{\lambda(z-x)} = \frac{\lambda f(z) - \lambda f(x)}{z-(\lambda x + (1-\lambda)z)}\leq \frac{\lambda f(z)+(1-\lambda)f(z) - f(y)}{z-y}.$$