Question: regard $\mathbb{Q}$ as a metric space with $d(p,q)=|p-q|$. Let $E$ be the set of all $p\in \mathbb{Q}$ such that $2<p^2<3$. Show that $E$ is closed and bounded, but $E$ is not compact. Also show that $E$ is open.
My attempt: given set $E$ is,
$$E=\{p\in \mathbb{Q} : 2<p^2<3\}$$
Clearly, $E=(\sqrt 2, \sqrt 3)\cap \mathbb{Q}$ where $(\sqrt 2, \sqrt 3)$ is open set in $\mathbb{R}$. Hence $E$ is open in $\mathbb{Q}$.
Similarly $E$ is closed because $E=[\sqrt 2, \sqrt 3]\cap \mathbb{Q}$.
$E$ is bounded is obvious.
I don't know ** how to show $E$ is not compact in $\mathbb{Q}$ **. I know I have to find an open cover of $E$ which do not have finite subcover. But, is there is any other easy way to show $E$ is not compact in $\mathbb{Q}$?
Further, is my solution for showing $E$ is open, closed in $\mathbb{Q}$ is correct?
Please help.
Proof of non compacity using sequential compactness
Consider the sequence defined by induction: $u_{n+1} = \frac{1}{2}\left(u_n+\frac{2}{u_n}\right)$ with $u_1=\frac{3}{2}$.
It is a sequence of rational numbers, decreasing and converging to $\sqrt{2}$ in $\mathbb R$. Hence $u_n \in E$ for all $n \in \mathbb N$.
$E$ is sequentially compact space as it is a metric space. As $(u_n)$ is a bounded sequence, it would have a converging subsequence if $E$ was compact. But that can't be as the limit is unique. So the limit would be $\sqrt{2}$ which doesn't belong to $E$.
Regarding your proof for openness, you missed the fact that $E$ has a negative part. So you should say $$E=((-\sqrt 3, -\sqrt 2) \cap \mathbb Q) \cup ((\sqrt 2, \sqrt 3) \cap \mathbb Q).$$ And the union of open subspaces is open. Same for closeness as a finite union of closed subspaces is closed.