Suppose ftsoc that \([0,1]\subseteq \mathbb{R}\) is disconnected. Then there exist open sets \(U,V\subseteq [0,1]\) such that \([0,1]=U\cup V, U\cap V=\emptyset, U\neq\emptyset\) and \(V\neq \emptyset\text{.}\) Wlog, \(0\in U\) (has to be in one of them). Let \(C=\{{t\in[0,1]}\,:\,{[0,t]\subseteq U}\}\text{.}\) It's enough to show \(1\in C\text{,}\) since then \(U=[0,1]\) and \(V=\emptyset\text{,}\) a contradiction. Note that \(0\in C\) so \(C\neq \emptyset\text{.}\) Let \(t_0=\sup C\in [0,1]\text{.}\)
Claim 1: \(t_0\in C\text{.}\) Suppose not. Then \([0,t_0]\not\subseteq U\text{.}\) As \(t_0=\sup C, \exists\, (t_n)_{n=1}^\infty\subseteq C\) so that \(t_1<t_2<\dots\) and \(\lim_{n\rightarrow\infty} t_n=t_0\text{.}\) Then \([0,t_n]\subseteq U\) for all \(n\geq 1\text{,}\) and so \([0,t_0)=\cup_{n=1}^\infty[0,t_n]\subseteq U\text{.}\) This implies \(t_0\notin U\) (since \([0,t_0]\not\subseteq U\)). So \(t_0\in V\text{.}\) Since \(t_0\in V,\,\exists\,\delta>0\) with \((t_0-\delta,t_0+\delta\cap [0,1]\subseteq V\text{.}\) Let \(t_1=\max\{{t_0-\frac{\delta}{2},\frac{t_0}{2}}\}\text{.}\) Note that \(t_0>0\) since \(0\in U,t_0\notin U\text{.}\) Then \(t_1\in(t_0-\delta,t_0)\cap[0,1]\text{.}\) Also, \([0,t_1]\subseteq [0,t_0)\subseteq U\text{.}\) So \(t_1\in U\cap V\text{,}\) and hence \(U\cap V\neq \emptyset\text{.}\)
Claim 2: \(t_0=1\text{.}\) Suppose \(t_0<1\text{.}\) As \(t_0\in C,\exists \varepsilon>0\) such that \((t_0-\varepsilon,t_0+e)\cap [0,1]\subseteq U\text{.}\) Let \(t_2=\min\{{t_0+\frac{\varepsilon}{2},\frac{1+t_0}{2}}\}\text{.}\) Then \(t_2>t_0\) and \(t_2\in(t_0-\varepsilon,t_0+\varepsilon)\cap [0,1]\subseteq U\text{.}\) Note that \([t_0,t_2]\subseteq (t_0-\varepsilon,t_0+\varepsilon)\cap [0,1]\subseteq U\) and as \(t_0\in C,[0,t_0]\subseteq U\text{.}\) So \([0,t_2]=[0,t_0]\cup [t_0,t_2]\subseteq U\text{.}\) Now, \(t_2\in C\) and \(t_2>t_0=\sup C\text{,}\) a contradiction.
This shows \(1\in C\text{.}\) Hence \(U=[0,1],V=\emptyset,\) a contradiction