It is known that given any closed and bounded $X \subseteq \mathbb{R}^n$ and a bounded continuous function $f : X \to \mathbb{R}$, $f(X)$ has a minimum value and maximum value. This can be proved by noting that $X$ is compact and so its continuous image $f(X)$ is also compact.

However, if $f$ is continuous at all points in $X$ except for a finite number of singularities, does $f(X)$ still necessarily have a minimum value and maximum value?

2 Answers
2

From David Mitra's comment, just take $f(x)=x$ for $0<x<1$ and define $f(0)=f(1)=1/2$. There is no maximum since for every $\varepsilon>0$, the set $(1-\varepsilon,1)\neq\varnothing$ and similarly for no minimum.