Can there be such a function:
$f \colon \mathbb R \to \mathbb R$ is continuous and non-constant. It has a local maxima everywhere, i.e., for all $x \in \mathbb R$ there is some $\delta_x>0$ such that $f(x)\geq f(y)$ for all $y \in B(x,\delta_x)$. And, yet $f$ has no global maxima?
Thank you.
PS: $\mathbb R$ is with the usual topology. This is true for $\mathbb R$ with upper-limit topology.