I'm trying to show that $\mathbb{Q}$ is disconnected. I will use the two sets $O_1 = \{x\in\mathbb{Q}: x^2 <2\}$ and $O_2=\{x \in \mathbb{Q}: x^2 >2\}$.
I think this is the right approach. However, I find it surprisingly hard to show that these two sets are open by finding an appropriate $\epsilon>0$ so that for all $y \in B(x, \epsilon)$ we have that $y^2 < 2$ or the other way for the other set.
For the first set I tried to deal with $0<x<\sqrt{2}$ first and then $-\sqrt{2}<x<0$.
For $x>0$ use $\epsilon<\sqrt{2} - x$ and for any $y \in B(x, \epsilon)$ we have that $$|y| \leq d(y,x) + d(x,0) \leq \sqrt{2} - x + |x| = \sqrt{2}$$
For $x<0$ use $\epsilon< x + \sqrt{2}$ and for any $y \in B(x, \epsilon)$ we have that $$|y| \leq d(y,x) + d(x,0) \leq x + \sqrt{2} + |x| = \sqrt{2}$$
The idea for set $O_2$ is similar. Maybe there is a mistake in the above, but find it extremely non elegant, and I imagine there is a better idea of how to solve this.
Do any of you have any tips for a better idea? Only hints no solutions pls.
You can observe that $O_1=f^{-1}(-2,2)$, with $f(x)=x^2$. Since $f$ is continuous and $(-2,2)$ is open, $O_1$ is an open set. The same argument shows that $O_2$ is an open set.