$f:\Bbb R \to \Bbb R$ is continuous and bounded then $f$ attains maximum or minimum?

199 Views Asked by At

Is it true that a function $f:\Bbb R \to \Bbb R$ is continuous and bounded then $f$ attains maximum or minimum? I think it's not true but cannot find any counterexample.

1

There are 1 best solutions below

0
On BEST ANSWER

No. For a counterexample, consider $f(x) = \arctan(x)$ where $\sup f = \sup_{x \in \mathbb{R}} f(x) = \frac{\pi}{2}$ but the supremum is not attained. Similarly for the infimum.