<s>[INST] Find the smallest $n\in \mathbb Z^+$ that makes $\sqrt{100+\sqrt n}+\sqrt{100-\sqrt n}$ integer. Find the smallest $n\in \mathbb Z^+$ that makes $\sqrt{100+\sqrt n}+\sqrt{100-\sqrt n}$
Clearly if $n=0$ then we will have $20$ but I couldn't decide that how can I find the other integers. Any hint?
If I say that $x=\sqrt{100+\sqrt n}+\sqrt{100-\sqrt n}$ then we have $200+2\sqrt{10^4-n}=x^2$
 [/INST] If
$$
x=\sqrt{100-\sqrt n}+\sqrt{100+\sqrt n}\tag{1}
$$
then squaring both sides gives us
$$
x^2=200+2\sqrt{100^2-n}
$$
Rearranging and squaring again gives
$$
n=100x^2-\frac14x^4\tag{2}
$$
For this to be an integer greater than zero, $x$ must be non-zero and even.
From (1) we have that $\sqrt n\leq 100$. This gives us $x>\sqrt {200}\approx14.2$, so since $x$ is an integer, $x\geq 16$. Also from (1), $n>0$ implies that $x<20$, so again by the integer condition, $x\leq 18$.
There are only two possibilities, $x=16$ or $x=18$. (2) is decreasing for $x>10$, so we have $x=18$ as the solution, and $n=6156$.
</s>