TITLE: Unique local extremum is absolute extremum for continuous functions
QUESTION [5 upvotes]: I was wondering if this is true.

Let $f:(a,b) \rightarrow \mathbb{R}$ be a continuous real function and suppose $c \in (a,b)$ is the unique local maximum of $f$ and that $f$ has no other local extremum. Then $c$ is also an absolute maximum of $f$. The statement is analogous for minimums. 

I have no idea how to prove this, nor have I thought of any counterexamples, though I am certain that the assumption of continuity is essential; otherwise consider something like $f:(0,\frac 32) \rightarrow \mathbb{R}$ given by
$$f(x) =
\begin{cases}
1 - \frac x2 &  x≤1 \\
\sqrt{\frac{1}{16} - (x-\frac 54)^2} &  x>1
\end{cases}$$
which admits a unique local maximum at $x=\frac 54$, no local minimum, but no absolute maximum.
Note that a similar question was asked here but the answers were not satisfactory and OP did not specify whether the interval was open or closed.

REPLY [3 votes]: 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.