Unique local extremum is absolute extremum for continuous functions

Proof by contradiction : Suppose $d\in (a,b)$ with $d\ne c$ and $f(d)\geq c$. Without loss of generality let $d>c$.

Let $e\in (0,d-c)$ such that $x\in (c,e)\implies f(x)\leq f(c)$. We cannot have $x\in (c,e)\implies f(x)=f(c)$, otherwise any $x\in (c,e)$ would be a local extremum for $f$.

So take $e'\in (c,e)$ with $f(e')<f(c)$. Now take $e''\in [c,d]$ such that $f(e'')=\min \{f(x):x\in [c,d]\}$ Note that $e''$ exists because $f$ is continuous. We have $c\ne e''\ne d$ because $f(e'')\leq f(e')<f(c)\leq f(d).$

Therefore $e''$ is a local mimimum for $f$, because $e''\in (c,d)$ and $x\in (c,d)\implies f(x)\geq f(e'').$ But $e''\ne c$ so $ e''$ is not a local extremum for $f$, a contradiction.