Mean Value of Convex Real Function

Theorem
Let $$f$$ be a real function which is continuous on the closed interval $$\left[{a \,. \, . \, b}\right]$$ and differentiable on the open interval $$\left({a \, . \, . \, b}\right)$$.

Convex Function
Let $$f$$ be convex on $$\left({a \, . \, . \, b}\right)$$.

Then:
 * $$\forall \xi \in \left({a \, . \, . \, b}\right): f \left({x}\right) - f \left({\xi}\right) \ge f^{\prime} \left({\xi}\right) \left({x - \xi}\right)$$.

Concave Function
Let $$f$$ be concave on $$\left({a \, . \, . \, b}\right)$$.

Then:
 * $$\forall \xi \in \left({a \, . \, . \, b}\right): f \left({x}\right) - f \left({\xi}\right) \le f^{\prime} \left({\xi}\right) \left({x - \xi}\right)$$.

Proof
By the Mean Value Theorem:
 * $$\exists \eta \in \left({x \, . \, . \, \xi}\right): f^{\prime} \left({\eta}\right) = \frac {f \left({x}\right) - f \left({\xi}\right)} {x - \xi}$$.

Proof for Convex Function
Let $$f$$ be convex.

Then its derivative is increasing.

Thus:
 * $$x > \xi \implies f^{\prime} \left({\eta}\right) \ge f^{\prime} \left({\xi}\right)$$;
 * $$x < \xi \implies f^{\prime} \left({\eta}\right) \le f^{\prime} \left({\xi}\right)$$.

Hence:
 * $$f \left({x}\right) - f \left({\xi}\right) \ge f^{\prime} \left({\xi}\right) \left({x - \xi}\right)$$.

Proof for Concave Function
Let $$f$$ be concave.

Then its derivative is decreasing.

Thus:
 * $$x > \xi \implies f^{\prime} \left({\eta}\right) \le f^{\prime} \left({\xi}\right)$$;
 * $$x < \xi \implies f^{\prime} \left({\eta}\right) \ge f^{\prime} \left({\xi}\right)$$.

Hence:
 * $$f \left({x}\right) - f \left({\xi}\right) \le f^{\prime} \left({\xi}\right) \left({x - \xi}\right)$$.