Topologist's sine curve is connected

If the graph $X$ of the topologist's sine curve were not connected, then there would be disjoint non-empty open sets $A,B$ covering $X$. Let's assume a point $(x,\ \sin(1/x))\in B$ for some $x>0$. Then the whole graph for positive $x$ is contained in $B$, only leaving the point $(0,0)$ for the set $A$. But any open set about $(0,0)$ would contain $(1/n\pi,\ \sin(n\pi))$ for large enough $n\in\mathbb N$, thus $A$ would intersect $B$.


Call the topologist's sine curve $T$, and let $A = \{(x,\sin 1/x)\in\mathbb{R}^2\mid x\in\mathbb{R}^+\}$, $B = \{(x,\sin 1/x)\in\mathbb{R}^2\mid x\in\mathbb{R}^-\}$. Then $T \subseteq \overline{A\cup B} = \overline{A}\cup\overline{B}$. It isn't difficult to show that $A$ and $B$ are connected (even path connected!) and then you just need two lemmas to show that $T$ is connected:

Lemma 1: If $A\subseteq X$ is a connected subset of a metric space $X$ and $A\subseteq B\subseteq \overline{A}$, then $B$ is also connected. Edit: Stefan H. reminds us that this result also holds when $X$ is a general topological space, not just a metric space.

Lemma 2: If $A$ and $B$ are connected, and $A\cap B\neq\emptyset$, then $A\cup B$ is also connected.

And neither of these should be too hard to show (Hint: use the fact that if $X$ is connected and $f : X\to\{0,1\}$ is continuous, then $f$ is constant).


It's clear that two of the "pieces" of this set are connected--path connected, in fact. So what we need to argue is that there is no separation between them. That is, it is not possible to find a pair of disjoint open sets such that the "$\sin$" part of the curve is contained in one and the origin is in the other.

So it will suffice to show that any open set that contains the origin will also intersect the other piece. What happens if you consider a small ball centered at $0$?