0

Let $f: \mathbb{R}\to\mathbb{R}$ be a continuous function such that $f$ is a local maximum at any $x\in\mathbb{R}$. Show that $f$ is constant. Show the same if the the function is local minima at any $x\in\mathbb{R}$.

Does this proof works ?
If function has local maxima at say some region $(a-delta , a]$ then $f(x) \leq f(a)$ now choose a point say f(b) in that region only which gives $f(b) \leq f(a)$ but then f is not a local maxima at x= b so contradiction hence it should be always equal to f(a) hence constant ,similar for local minima one?

Orion_Pax
  • 451

1 Answers1

1

That is the general idea, but (1) you should be using $<$ instead of $\leq$ to get the contradiction, and (2) so far you proved that $f$ is locally constant, which does not (yet) imply that $f$ is constant everywhere. Basically, if you try to draw a locally constant function but make it nonconstant somewhere, there will be a tipping point where the values first begin to change, then there you will find the contradiction. A precise argument* could go like this:

Proof by contradiction. Suppose $f$ is not constant, that is, there exists $a<b$ such that $f(a)\neq f(b)$. Suppose $f(a)<f(b)$; the other case is left to you.

Define the set $C:=\{x\geq a: f(a)<f(x)\}$. By our assumptions $b\in C$ so it is nonempty, and has a lower bound $a$, so the infinimum $c:=\inf C$ exists. Clearly $c\geq a$, and for any $a\leq x<c$ we must have $f(x) \leq f(a)$. By continuity, we have $f(c)\leq f(a)$ as well.

However there must exist $\delta>0$ such that $f(c)$ is a local maximum on $(c-\delta,c+\delta)$. That is, for $x\in (c-\delta,c+\delta)$, $f(x)\leq f(c) \leq f(a)$ which implies that none of the values in $(c-\delta,c+\delta)$ are actually in $C$. Thus $\inf C \geq c+\delta$, contradicting the definition $c:=\inf C$.

(*) This is at an introductory analysis course level. The statement "locally constant implies constant" is true in general for connected topological spaces, so it does not actually require the infinimum argument. See also Locally Constant Functions on Connected Spaces are Constant

Juno Kim
  • 620