5
$\begingroup$

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.

  • 3
    What is the source of this problem? Such $f$ must be constant.2011-04-08

3 Answers 3

11

No such function exists. If $f$ is continuous and has a local maximum everywhere, then $f$ is constant. To see this, let $a$ be a real number. By continuity, $\{x:f(x)\leq f(a)\}$ is closed, and by the hypothesis on local maxima, $\{x:f(x)\leq f(a)\}$ is open. The set is nonempty because it contains $a$, so it is all of $\mathbb{R}$ by connectedness. Therefore, for all $a$ and $b$ in $\mathbb{R}$, $f(b)\leq f(a)$ and similarly $f(a)\leq f(b)$.

  • 0
    what if $f$ is not a continuous function?2011-04-08
  • 1
    Then the proposition does not hold. Try f(x) = 1 if rational, 0 if irrational.2011-04-08
  • 2
    @Gortaur: There would be examples if you didn't require the function to be continuous. E.g., take $f(n)=n$ for each positive integer $n$, and $f(x)=0$ otherwise. If you didn't care about having a global maximum, the characteristic function of any proper nonempty closed set would be a nonconstant function with a local maximum everywhere.2011-04-08
  • 1
    @user7530: What is that example supposed to show?2011-04-08
  • 1
    @user7530: for this function there are no local maximas.2011-04-08
  • 0
    @Jonas Meyer - I guess that for any characteristic function I know the global maximum a priori.2011-04-08
  • 0
    @Gortaur: Sure, as long as you know whether or not it is the characteristic function of the empty set. But if instead you wanted to construct more examples where there is no global maximum, take an unbounded positive locally constant function on a closed set $C$ ("locally" relative to the subspace topology on $C$), and extend to $\mathbb{R}$ by having it be $0$ on $\mathbb{R}\setminus C$.2011-04-08
  • 0
    Sorry, I missed your words "if you didn't care about having a global maximum". As for me, your first example is sufficient.2011-04-09
5

Surprisingly enough, there are a few papers on this (like here). So other people have considered variations of this problem.

I think that you should also be familiar with a related but incredibly interesting fact: it is possible to have a continuous function that has a local maxima/minima at every rational number. That's a dense subset, which is astounding enough as it is. (One should note that having a countable number of local maxima is all one can ask for. To see this, note that around every maxima one can assign an interval over which it is the maximum, from the definition of a local maximum. But there is a rational number in this interval, and so there can be at most countably many).

One such function is the Weierstrass function. It seems not so hard to alter this so that it has countably many maxima and minima, but no global maxima or minima.

  • 0
    (+1); concerning paragraphs 2-3, it is worth recalling http://math.stackexchange.com/questions/42944/is-it-possible-for-function-f-mathbbr-to-mathbbr-have-a-maxima-at-ever/42948#429482011-06-10
3

To extend the answer Jonas gave, let me note that if $f$ is continuous and has a local minimum or maximum everywhere, then $f$ is constant. See Problem2010-4/B here for a proof (very recently published).

EDIT (elaborating). If $f$ has a local minimum or maximum everywhere, then the range of $f$ is countable (a proof is provided in the above link; see also here). Hence if $f$ is further continuous it must be constant, for otherwise, by the intermediate value theorem, the range of $f$ would be uncountable, a contradiction.