$A=\{\frac ab | a,b \in Z^+ , \frac{a^2}{b^2}<2 \}$ 
Show that the set $$A=\left\{\frac ab | a,b \in Z^+ , \frac{a^2}{b^2}<2 \right\}$$ has a least upper bound $L$

My try:
$$\frac{a^2}{b^2}<2$$
$$\frac{a^2}{b^2}<(\sqrt2)^2$$
$$-\sqrt2<\frac{a}{b}<\sqrt2$$
But $a,b >0$ so $\frac ab >0$
Thus, we get
$$0<\frac ab<\sqrt2$$
which implies
$$\sup A = \sqrt 2 = L$$
So, $L$ exists. Hence proved.

I wonder is my proof correct or not ? Or is there any other specific way to solve it using definitions in the real analysis


In your attempt you only prove that $L = \sqrt 2$ is an upper bound, but it remains to be shown that $\sqrt 2$ is indeed the least upper bound.
Let's go at follows: assume there exists a lesser upper bound $L_\epsilon = \sqrt 2 - \epsilon$ for $\epsilon>0$. We must prove that there exists an element $x\in A$ such that $x>L_\epsilon$.
Let $x = \frac{a}{\sqrt 2 a -\epsilon/2}$, and ask that $a> 1/2$. It can be checked that $x\in A$. In order to make sure that $x>L_\epsilon$, observe that
$$(\sqrt 2 - \epsilon)a = \sqrt2 a -\epsilon a> \sqrt 2 a - \epsilon/2, 
$$
so $x>L_\epsilon$, as we wanted. Thus, $L_\epsilon$ is not a lower bound no matter how small $\epsilon$ is.
