Could someone please check this proof for me?

Question: If f(x) is continuous and differentiable in [a,b], show that if $\displaystyle f'(x) \le 0 $ for $\displaystyle a \le x < \xi $ and $\displaystyle f'(x) \ge 0 $ for $\displaystyle \xi < x \le b $, the function is never less than $\displaystyle f(\xi) $.

Proof:

Note that f is continuous in [a,b] and so it must possess a minimum in the interval. Assume that the minimum for the function f in [a,b] occurs at a point x = c such that $\displaystyle c \neq \xi $. We can suppose that $\displaystyle a \le c < \xi $.

By hypothesis $\displaystyle f(c) < f(\xi) $. And so $\displaystyle f(c) - f(\xi) < 0 $. Since $\displaystyle c - \xi < 0 $ then $\displaystyle \frac{f(c) - f(\xi)}{c - \xi} > 0 $. By the MVT there exists a point C in $\displaystyle (c, \xi) $ such that $\displaystyle f'(C) = \frac{f(c) - f(\xi)}{c - \xi} > 0 $, contradicting the fact that f'(x) must be negative or 0 for all x satisfying $\displaystyle a \le x < \xi $. The same proof can be applied if we suppose that $\displaystyle \xi < c \le b $. QED