$S$ is a supremum of a set $ E = \{x \in \mathbb{Q} : x > 0, x^2 < 5 \}$ And I want to prove that $ s^2 = 5 $. So I was trying to show that $ s^2 \geq 5 $ and $ s^2 \leq 5 $. It follows that $s^2 = 5$
I proved that $ s^2 \leq 5 $
But I couldn't prove that $ s^2 \geq 5 $.
I was trying to prove by contradiction. So I started with the assumption that $s^2 < 5 $. But I couldn't find any $x \in E$ such that $ s^2 < x^2 < 5 $.
I think it's hard because I don't know whether s is a rational or not.
It's easy when s is a rational number, otherwise I can't solve this problem.
Help me please.
First show that $x \in \mathbb{R}$ is an upper bound for $E$ if and only if $x^2 \ge 5$.
If $x^2 \ge 5$ then for any $t \in E$ we have $t^2 < 5 \le x^2$ which implies $t \le x$, as needed.
If $x$ is an upper bound for $E$ and $x^2 < 5$, then take $n \in \mathbb{N}$ such that $\frac2n + \frac1{n^2} < 5-x^2$. We have
$$\left(x + \frac1n\right)^2 = x^2 + \frac2n + \frac1{n^2} < 5$$
Now because of density of rationals in the reals, there exists $q \in \langle x, x + \frac1n\rangle \cap \mathbb{Q}$. Clearly $q \in E$ which is a contradiction with $x$ being an upper bound for $E$. Hence $x^2 \ge 5$.
Now you can conclude $s^2 \ge 5$, since supremum is an upper bound.
For the other implication, if $s^2 > 5$, then for $m \in \mathbb{N}$ such that $\frac2n < s^2 - 5$ we have
$$\left(s - \frac1n\right)^2 = s^2 - \frac2n + \frac1{n^2} > s^2 - \frac2n > 5$$
so $\left(s - \frac1n\right)^2 < s$ is also an upper bound. A contradiction with the fact that $s$ is the least upper bound, so we conclude $s^2 \le 5$.
Thus $s^2 = 5$.