First derivative test - how to prove it from the "monotonicity theorem"?

39 Views Asked by At

Here are two related theorems. I have trouble proving the second one.

Monotonicity theorem: Let $f$ be a real valued function defined on $\mathbb R$. The function is continuous at a point $a$ and $f$ is monotonically increasing on $(a-r,a]$ and monotonically decreasing on $[a,a+r)$. Then, $f$ has a local maximum at $a$.

First derivative theorem: (which is, according to Wikipedia, a consequence of "Monotonicity theorem") Let $f: \mathbb R \rightarrow \mathbb R$ be continuous at $a\in \mathbb R$. Suppose also that $f$ is differentiable on $(a-r,a+r)\backslash \{a \}$ and that $f'(x)\geq 0$ on $(a-r,a)$ and $f'(x)\leq 0$ on $(a,a+r)$. Then, $f$ has a local maximum at $a$.

I have trouble proving the "First derivative theorem". I understand that in the case of $x\mapsto -|x|$ the theorem fits perfectly with the fact that $x\mapsto -|x|$ has a maximum at $x=0$ and is not differentiable at $x=0$.

When it comes to the proof, my idea was, since the continuity at $x=a$ gives a $\delta$ (associated with one $\epsilon$) and since there exist an $\eta$ such that $f'(x)\geq 0$ on $(a-r, a-\eta)$, my idea was to make overlap the two intervals $(a-r, a-\eta)$ and $(a-\delta,a]$.

Do you think my idea is a good start ?

If not, how do we prove the second theorem ?

Note: I understand that the continuity of $f$ at $a$ is what impedes the function to sink down on $(a-r,a]$ after an increase. I just don't know how to formally prove it.