Suppose a continuous function $f: (0,2) \to \mathbb R $ attains its minimum at $x_0 \in (0,2)$, prove that the function is not injective.
We need to show there are some $a$ and $b$ such that $f(a)=f(b)$. I think we can first notice that since $f(x_0)$ is minimal, for any $x$, we have: $$ f(x_0) \leq f(x)$$
Now what the statement is saying is that there must also be some $x_1$ such that $f(x_0) \geq f(x_1)$. I cannot use the extreme value theorem because we do not have a closed interval here. How could I proceed?
Since $x_0$ lies in the open interval $(0,2)$, there exist $a,b$ with $0 < a < x_0 < b < 2$.
If $f(a)=f(b)$ or $f(a)=f(x_0)$ or $f(b)=f(x_0)$, we are done.
If $f(a) < f(b)$, we have $f(x_0) < f(a) < f(b)$. By the intermediate value theorem for the continuous function $f$ and the interval $[x_0,b]$, there exists an $x_1$ with $x_0 < x_1 < b$ and $f(x_1)=f(a)$. By the given inequalities, we have $a < x_1$.
If $f(a) > f(b)$, we have $f(a) > f(b) > f(x_0)$. Again by the intermediate value theorem for the continuous function $f$ and the interval $[a,x_0]$, there exists an $x_1$ with $a < x_1 < x_0$ and $f(x_1)=f(b)$. By the given inequalities, we have $b > x_1$.