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$?


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$.
