Confusion on Baby Rudin problem 2.16
Let's show that $E$ is closed. To achieve this result, I'll show that $E^C=\left\{q\in\Bbb Q | q^2\lt2 \lor q^2\gt3 \right\}=\left\{q\in\Bbb Q | -\sqrt2\lt q\lt\sqrt2\lor q\lt -\sqrt3\lor q\gt\sqrt3\right\}$ is open.
- If $q\lt-\sqrt3$, then, once defined $r:=\frac {|q+\sqrt3|}2$, we have that $\forall y\in B_r(q)\implies y\lt-\sqrt3$ because $d(y,q)\lt\frac{|q+\sqrt3|}2\lt |q+\sqrt3|=d(q,-\sqrt3)$, i.e. $B_r(q)\subset (-\infty,-\sqrt3)$.
- If $-\sqrt2\lt q\lt\sqrt2$, then, once defined $r:=\min\left\{d(q,-\sqrt2),d(q,\sqrt2)\right\}$, we have that $\forall y\in B_r(q)\implies y\in(-\sqrt2,\sqrt2)$ because $d(y,q)\lt \min\left\{d(q,-\sqrt2),d(q,\sqrt2)\right\}\le d(q,-\sqrt2),d(q,\sqrt2)$, i.e. $B_r(q)\subset(-\sqrt2,\sqrt2)$.
- If $q\gt\sqrt3$ we have the same argument as the first case.
So $E^C$ is open, thus $E$ is closed.
Let's show that $E$ is bounded. This comes trivially from the definition of $E$. Otherwise suppose that $E$ is not bounded. Then there must me a sequence $\left\{p_n\right\}_{n\in\Bbb N}\subset E$ such that $\lim_{n\to\infty}p_n=\infty$. But $\forall n\in\Bbb N$ we have $1\lt\sqrt2\lt |p_n|\lt\sqrt3\lt\infty$ because $p_n\in E$, thus $E$ is bounded.
Let's show that $E$ is not compact. To do this I'll find an infinite open cover of $E$ which doesn't have a finite subcover.
In fact, if we define $A_n := \left(-\sqrt3+\frac1n,-\sqrt2-\frac1n\right)\cup\left(\sqrt2+\frac1n,\sqrt3-\frac1n\right)$ for $n\in\Bbb N$ we can see that $A:=\bigcup_{n=1}^{\infty}A_n\supset E$, but any finite subcover $\overline A$ of $A$ is such that $\overline A \not\supset E$. Thus $E$ is not compact.
$E$ is open, the demonstration is similar to the one that shows $E^C$ is open, I'll leave it to you.