Correctness of Proof The Problem:
Suppose that $f$ is continuous on $[a,b]$ and that $c$ is an interior point of the interval. Show that if $f'(x)\leq 0$ on $[a,c)$ and $f'(x) \geq 0$ on $(c,b]$, then $f(x)$ is never less than $f(c)$ on $[a,b]$.
My Proof:
For $x_1$, $x_2$ in the interval $[a,c)$, by mean-value-theorem
$$
\exists \text{ } k \in [x_1,x_2] \text{ | } f'(k)=\frac{f(x_2)-f(x_1)}{x_2-x_1} \leq 0 \text{ (given)}
$$
Since $x_2>x_1$
$$
f(x_2) \leq f(x_1)
$$
Let
$$
x_2=c-\delta \text{ | } \delta>0 \text{ & } x_1=x \in [a,c-\delta] \\
f(c-\delta) \leq f(x)
$$
I've taken $c-\delta$ because I'm applying MVT in $[a,c)$. Since $f$ is continuous
$$
\lim_{\delta \rightarrow 0}f(c-\delta)=f(c)
$$
Utilizing this result in the previous inequality, we get
$$
f(c) \leq f(x) \text{ } \forall \text{ } x \in [a,c)
$$
Repeat the same on the interval $(c,b]$ to obtain
$$
f(c) \leq f(x) \text{ } \forall \text{ } x \in (c,b]
$$
Hence
$$
f(x) \geq f(c) \text{ } \forall \text{ } x \in [a,b]
$$
I don't see any shortcomings in this proof. Is this proof without any holes?
 A: Since you are looking for corrections and not for a faster proof, here are some minor details:

*

*In the first sentence, you should indicate "for $x_1$ and $x_2$ verifying $x_1 < x_2$ in the interval ..." to avoid to have $x_1-x_2 = 0$ when you are using the mean-value theorem after (and also to have $[x_1,x_2] ≠ \emptyset$). And also, this will allow you to write "Since $x_1<x_2$" on the line after.

*To define variables, one usually does not use symbols such as | and &. But more importantly, you should add a connector such as "Then" before $f(c-d) < f(x)$.

*You need $δ ∈ (0,c-a)$ to avoid $c-δ < a$.

*The way you wrote it, the $x_1=x\in[a,c-\delta]$ implies that $x$ depends on $\delta$. For example the only possible $x$ if $\delta = c-a$ is $x=a$. You should rather define first $x$ and then $\delta$, which will allow you to make $\delta\to 0$ without problems with the generality of the $x$. So you should rather write for example:

"
Let $x\in[a,c)$. Let $x_1 = x$ and $x_2 = c-\delta$ with $\delta\in (0,c-x)$. Then ..."
(Notice that since $x≥ a$, you will get $a≤ x≤ c-\delta\leq c$ as expected, and you do not have to add the additional assumption that $\delta<c-a$.)

*

*Last remark: the standard syntax is $\forall x, P(x)$ and not $P(x)\, ∀ x$.

Everything else seems fine ;)
