Are These Two Definitions of a Disconnected Set Equivalent? I found two definitions of a disconnected set $E \subset \mathbb R$.  $E$ is disconnected if:
(1)  there are disjoint open sets $A, B$ such that $A \cap E$, $B \cap E \ne \emptyset$, and $(A \cap E) \cup (B \cap E) = E$. 
(2)  there exist nonempty sets $C, D$ such that $E = C \cup D$, and $\overline{C} \cap D = \emptyset = C \cap \overline{D}$.
So I am wondering if the two definitions are equivalent.  I already got (1) $\rightarrow$ (2).  Specifically, set $C = A \cap E, D = B\cap E$.  Let $q \in D = B \cap E$.  Since $A, B$ are disjoint, $q \notin C = A \cap E$.  Furthermore, as an element in $B, q$ has a $\delta$ such that $N(q, \delta) \subset B$.  If $q$ is a limit point of C, $N(q, \delta) \cap A$ is nonempty, creating a contradiction.  This proves that $\overline{C} \cap D = \emptyset$.  Similarly $C \cap \overline{D} = \emptyset$.
However, I am not having much success with the converse.  My best attempt is as follows:
$ A = \bigcup_{p \in C} N(p, \delta_p)$ where $N(p, \delta_p) \subset D^C$. 
$ B = \bigcup_{q \in D} N(q, \delta_q)$ where $N(q, \delta_q) \subset C^C$.
Let $q \in D$ be given.  Since $D \cap \overline{C} = \emptyset$, there is a $\delta_q$ such that $N(q, \delta_q) \subset C^C$.  So the existence of $B$ as defined is guaranteed.  The only problem is that how do I get $A, B$ to be disjoint?
 A: The two definitions are equivalent.
If in $(1)$, the two sets $A,B$ are meant to be relatively open (open in $E$), then the implication $(2)\implies (1)$ is trivial: sets $C$ and $D$ satisfying $(2)$ are open in $E$.
If in $(1)$, the two sets $A,B$ are meant to be open in the ambient space ($\mathbb{R}$ here), then the two conditions are only equivalent for some ambient spaces, but not in general. Generally, the two open sets in $(1)$ would have to satisfy $A\cap B\cap E = \varnothing$ instead of being disjoint.
However, for metric spaces, we can find disjoint open sets $A,B$ in the ambient space such that $C = E\cap A$ and $D = E\cap B$.
The trick is to choose the radii of the balls appropriately. For $p\in C$, let
$$\delta_p = \frac{1}{2} \operatorname{dist}(p,D) = \frac{1}{2} \inf \left\{ \lvert p-d\rvert : d \in D \right\},$$
and for $q\in D$ define $\delta_q$ analogously. Since $C\cap \overline{D} = \varnothing$, we have $\delta_p > 0$ for all $p\in C$, and symmetrically $\delta_q > 0$ for all $q\in D$.
Then $A$ and $B$ as defined in the question are the desired open sets (they are of course not unique, so the use of the definite article is not entirely justified).
It is clear that the two sets are open, and $C\subset A,\; D \subset B$. The only remaining condition to check is $A\cap B = \varnothing$. So suppose there were an $x\in A\cap B$. Then there are $p\in C$ and $q\in D$ with $x\in N(p,\delta_p) \cap N(q,\delta_q)$. Let without loss of generality $\delta_p \leqslant \delta_q$. Then
$$\inf \left\{\lvert c-q\rvert : c\in C \right\} \leqslant \lvert p-q\rvert \leqslant \lvert p-x\rvert + \lvert x-q\rvert < \delta_p + \delta_q \leqslant 2\delta_q = \inf \left\{\lvert c-q\rvert : c\in C \right\}$$
is a contradiction.
