Let $f$ be continuous on $I=[a,b]$ such that $f(a)<0, f(b)>0, W= \{x\in I: f(x)<0\}$, $w=\sup W$ Prove that $f(w)=0$
[I can see that this is an alternate proof for the Location of roots theorem]
My progress:
If possible, let $f(w)>0$. Since $f$ is continuous at $w, \exists \delta_1>0$ such that $f(x)>0, \forall x\in V_{\delta_1}(w)$.
Similarly, letting let $f(w)<0,\exists \delta_2>0$ such that $f(x)<0, \forall x\in V_{\delta_2}(w)$.
[I have been able to prove the existence of such $\delta_1, \delta_2$.]
I know I'm supposed to arrive at a contradiction here, but I can't figure out what the contradiction is. Please help!