[Math] nonempty subset $E$ of $R$ closed and bounded iff every continuous real-valued function on $E$ takes a maximum value.

compactnesscontinuityreal-analysis

I need to show that a nonempty subset $E$ of $R$ is closed and bounded iff every continuous real-valued function of $E$ takes a maximum value.

  • I believe that "if $E$ is closed and bounded, then every continuous real-valued function on $E$ takes a maximum value" is the Extreme Value Theorem (correct me if I'm wrong). We proved the Extreme Value Theorem in class, so I don't need to prove this part (unless, of course, it turns out that it's not the Extreme Value Theorem. Please let me know so that I can avoid this kind of embarassment.)
  • Now, in the other direction, we must show that "Every continuous real-valued function on $E$ takes a maximum value implies that $E \subseteq \mathbb{R}$ is closed and bounded. This is where I'm having difficulty.

So far, I have the following:

Suppose that every continuous real-valued function on $E$ takes a maximum value on $E$. Then, $f(E)$ is bounded. Since $f$ is bounded on $E$, $\exists M \geq 0$ such that $|f(x)| \leq M$ $\forall x \in E$, which in turn implies that $-M \leq f(x) \leq M$. Let $x_{1}$ be the point in $E$ where $f(x_{1})=-M$ and $x_{2}$ the point in $E$ where $f(x_{2}) = M$.

Now, if $E$ were necessarily an interval, I could invoke the IVT to guarantee the existence of a point $x \in E$ such that $f(x)= x$ (actually, I suppose this would be the fixed point theorem). But, I suppose that I can't necessarily suppose $E$ is an interval. So, I'm having difficulty showing this means that $E$ is bounded.

This question is almost identical to the one I am asking, but the guy who gave the first answer (the answer I find most helpful) said that $|f(x)|\leq E$ implies that $E$ is bounded with zero justification.

I am also having trouble showing $E$ is closed. In his answer, the guy gave an example that is so incredibly simple that of course it will work. But, I need to be able to show it for a much more general function $f$, where the trick he used will not necessarily work.

Please help – and don't assume anything more advanced than the first chapter of Royden (i.e., no Tietze's theorem).

Best Answer

One way is just the $\bf{Extreme Value Theorem}$ (as you said). For the other part suppose that $E$ is not bounded then consider $e\in E$ and the map $x\mapsto d(x,e)$ which is a continuous function and it doesn't attain it's maximum.

If $E$ is not closed then can you construct some continuous function (something related to distance function) which doen not attains it's maximum ?

Related Question