Let $f$ be continuous and differentiable for $x$ in $[a,b]$

Let $$f(x)$$ be continuous and differentiable on $$[a,b]$$. Show that if $$f'(x)\leq 0$$ for $$x\in [a,\eta)$$ and $$f'(x)\geq 0$$ for $$x\in (\eta,b]$$, then $$f$$ never takes a value smaller than $$f(\eta)$$.

$$\textbf{First approach:}$$ Since $$f'(x)\leq 0$$ for $$x\in [a,\eta)$$, then $$f$$ is decreasing on this interval. On the other hand, $$f'(x)\geq 0$$ for $$x\in (\eta,b]$$, then $$f$$ is increasing on this interval. According to this, $$f(\eta)$$ attains a minimum at $$\eta$$, and I just need to verify that $$f'(\eta)=0$$.\

$$\textbf{Second approach:}$$ Suppose that there exist $$\eta_{0}$$ such that $$f(\eta_{0})< f(\eta)$$ and continue to get a contradiction.

What approach should I follow?

• @drhab: That is the “mean-value theorem.” – Martin R Jun 10 at 7:50
• @MartinR Ah, yes. Thank you. My memory is not so good anymore :-). – drhab Jun 10 at 7:52

Since $$f$$ is decreasing in $$[a,\eta)$$ and continuous it follows that $$f(x) \geq f(\eta)$$ in this interval. Similarly, $$f(x) \geq f(\eta)$$ in $$[\eta,b]$$ also. Hence $$f(x) \geq f(\eta)$$ for all $$x$$ which shows that we cannot have $$f(x) at any point.
[To see that $$f(x) \geq f(\eta)$$ for $$x$$ in $$[a, \eta]$$ note that $$f(x) \geq f(\eta -\frac 1 n)$$ (for $$n$$ so large that $$\eta -\frac 1 n \in [a,\eta)$$). Then let $$n \to \infty$$].
If $$x\in[a,b]-\{\eta\}$$ then the mean value theorem tells us that:$$f(x)=f(\eta)+f'(\xi)(x-\eta)\tag1$$for some $$\xi$$ in the interval that has $$x$$ and $$\eta$$ as endpoints.
• $$f'(\xi)(x-\eta)\geq0$$ if $$x>\eta$$ and consequently $$f'(\xi)\geq0$$.
• $$f'(\xi)(x-\eta)\geq0$$ if $$x<\eta$$ and consequently $$f'(\xi)\leq0$$.
So according to $$(1)$$ we have $$f(x)\geq f(\eta)$$ for every $$x\in[a,b]-\{\eta\}$$.