I have a homework question which is:
$f(x)$ is continuous on $(0,1)$ , $\underset{x\to 0+}{\mathop{\lim }}\,f(x)=-1$ and $\underset{x\to 1-}{\mathop{\lim }}\,f(x)=1$
Let $A=\{x\in(0,1)|f(x)=0\}$. We will mark $\operatorname{sup} A = s$.
prove that $f(s)=0$.
Obviously this means we need to prove that $A$ has a maximum. I find this fairly reasonable and intuitive and I think I might have written a correct proof but I am sure there is a much better way to do it then what I have tried.
Could someone please help me with this question? Thanks :)
EDIT: This is what I did roughly lined out:
1)Because of the limits exists a left area of 1 where $f(x)>0$ and a right area of $0$ where $f(x)<0$
2) choose $y_0$ and $y_1$ in those areas so and use the interval $[y_0,y_1]$ to show that $A$ is a subset of $[y_0,y_1]$ which is a subset of $(0,1)$
3)$y_1$ is that maximum of $[y_0,y_1]$ but does not belong to $A$ because $f(y_1)>0$ so choose the first $x$ in $A$ which is smaller then that and that is the maximum of $A$.
4) because $A$ has a maximum then s is equal to it and then also $f(s)=0$
What do you guys think?