Prove that $inf(S_1)=sup(S_2)$ 
$f:I \to \Bbb R$, $I=[0,1]$ continuous and differentiable on $(0,1)$ s.t $f(0)<0<f(1)$ and $f'(x)\neq 0$ $\forall x \in (0,1)$. Let $S_1=\{x \in I | f(x) >0\}$ and $S_2=\{x \in I | f(x) <0\}$. Prove that $inf(S_1)=sup(S_2)$.

My attempt:
If $\exists x\in I$ s.t $f(x)<f(0)$ then $\exists c\in I$ s.t $f(c)=f(0)$ contradiction by Rolle's thm.
So $f'(0)>0$
Claim: $f'(x)>0$, $\forall x \in (0,1)$
Suppose not then $\exists x_1\in I$ s.t $f'(x_1)<0$.
Consider, $d=inf\{x\in I|f'(x)<0\}$
If we can prove that $d \neq 0$ then $\exists a,b\in (d-\epsilon,d+\epsilon)\subseteq [0,1]$ s.t $f(a)=f(b)$ contradiction by Rolle's thm.
So,$f'(x)>0$, $\forall x \in (0,1)$ $\Rightarrow inf(S_1)=sup(S_2)$. Done.
My question is: How can we prove that $d \neq 0$?
 A: Since $f'$ has IVP and $f'(x) \neq 0$ for all $x$ it follows that $f'(x) >0$ for all $x$ or $f'(x) <0$ for all $x$. In other words, $f$ is strictly increasing or strictly decreasing. But $f(0)<f(1)$ so the second possibility is ruled out and $f$ must be strictly increasing.
Now let $a$ be the infimum of $S_1$ and $b$ be the supremum of $S_2$. $b \leq a$ because $x \in S_2, y \in S_2$ implies $x <y$. Next note that $f(a)=0$. This is an easy consequence of continuity of $f$ and I will leave it to you to check this. Hence $f(t) <0$ (and $t \in S_2$) for all $t <a$. As a consequence $b \geq t$ for any $t <a$. Hence $b \geq a$. 
A: 
Lemma 1. If $f$ is continuous on $[a,b]$, then for any $y_0 \in (N,M)$
  there exists a point $x_0 \in (a,b)$ such that $f(x_0)=y_0$, where
  $N=\min(f(a),f(b))$ and $M=\max(f(a),f(b))$.

Since $f$ is continuous, there exists a point $c\in [0,1]$ such that $f(c)=0$ (By Lemma 1). We claim that $f(x)<0$ for $x\in [0,c)$ and $f(x)>0$ for $x \in (c,1]$. 
Suppose there exists a point $c_2\in [0,c)$ such that $f(c_2)\ge 0$. Then it follows that there exists $c_3\in [0,c_2]$ such that $f(c_3)=0$ (By Lemma 1). According to Rolle's Theorem, there exists $c_4 \in [c_3,c]\subseteq [0,c]\subseteq [0,1]$ such that $f'(c_4)=0$. It is a contradiction. Hence $f(x)<0$ for $x\in [0,c)$. 
In a similar way, we have $f(x)>0$ for $x \in (c,1]$. Therefor $S_2=[0,c)$ and $S_1=(c,1]$. Finally we have $\inf{S_1}=\sup{S_2}=c$.
