TITLE: Prove that there is a first time the function is zero
QUESTION [0 upvotes]: Let $f : [0, 1] \to \mathbb R$ be continuous and satisfy $f(0) = −1$, $f(1) = 1$. 
Prove that there is a first time at which $ f $ is zero: that is, a number $s \in (0, 1)$ with
$f(s) = 0$ but $f(t) \not= 0$ if $t < s$.
I'm thinking of using the least upper bound property on the set and somehow proving it is $ 0 $ at the value?
Any hints?

REPLY [1 votes]: For an argument from first principles, try defining
$$
S = \{t \in (0, 1) : f(x) < 0 \text{ for all } x \in [0, t) \}.
$$
By the continuity of $f$ at $0$, $S$ is non-empty. By the continuity of $f$ at $1$, $S$ has an upper bound in $(0, 1)$. So $S$ has a least upper bound, $s \in (0, 1)$. Now prove (i) $s \in S$, (ii) $f(s) \leqslant 0$, (iii) $f(s) \geqslant 0$.
(I hope this is OK. You asked for a "hint", so I've left plenty of details to fill in. It's possible I've fooled myself!)
{"set_name": "stack_exchange", "score": 0, "question_id": 3090414}