Consider a function $f: [0,1] \to [0,1]$ defined as \begin{equation} f(x) := \begin{cases} x \quad \text{ if } x \neq 1-\frac{1}{k}, \text{ for integer } k \geq 2 \\ \frac{1}{k} \quad \text{otherwise} \end{cases} \end{equation}
I have couple of confusions.
I am a little confused about the uniqueness of the minimizer. It is clear that $x=0$ is a global minimizer and the minimum value $f(0) = 0$. Is this minimizer considered unique? The value $f(1-\frac{1}{k})$ converges to $f(0) = 0$ as $k \to \infty$. But $f(1) \neq 0$. What am I missing here? probably something related to definitions?
The set $[0,1]$ is clearly compact. Does this mean that $\inf_{x\in[0,1]} f(x) = \min_{x\in[0,1]} f(x) = 0$ (The infimum exists?). Fix arbitrary small $\epsilon>0$; is the difference $\displaystyle \left\{\left(\inf_{x\in[\epsilon,1]} f(x)\right) - f(0)\right\}$ > 0.
We have $f(0)=0$ and $f(x)>0$ for all $x\ne0$. The minimum is attained only at $x=0$, so $x=0$ is the unique global minimizer.
For the second question, take into account that $f$ is not continuous. Even if its domain is compact, it may not have a minimum (this is not the case in this example.) And for any $\epsilon>0$, we have $$ \inf_{\epsilon\le x\le1}f(x)=0, $$ since $1-1/k>\epsilon$ for all $k$ large enough. But the infimum is not reached on $[\epsilon,1]$.