# Denesting a nested radical where $x,y\in\mathbb{Z}$

Let $x$ be an integer. If $$\sqrt{x+\frac 12\sqrt{2011}}-\sqrt{x-\frac 12\sqrt{2011}}=y\tag{1}$$ Where $x,y\in\mathbb{Z}$, then find the value of $x$

The way I solved it was simply moving one radical to the right hand side and repeatedly squaring until no squares were left.

Then I would solve the polynomial, but I'm wondering if there is an easier and more elegant way to simplify this? Preferably a way that helps densest the radical into something simpler!

Let $a=\sqrt{2011}/2$, for simplicity. Then you have $$\sqrt{x+a}-\sqrt{x-a}=y$$ Therefore $$\frac{(x+a)-(x-a)}{\sqrt{x+a}+\sqrt{x-a}}=y$$ so $$\sqrt{x+a}+\sqrt{x-a}=\frac{2a}{y}$$ Sum up and find $$2\sqrt{x+a}=y+\frac{2a}{y}$$ Square: $$4(x+a)=y^2+4a+\frac{4a^2}{y^2}$$ that simplifies to $$4x-y^2-\frac{4a^2}{y^2}=0$$ or $$(4x-y^2)y^2=2011$$ Since $2011$ is prime…
If you just square both sides as they're given, lots of stuff cancels. It reduces to $$2x-2\sqrt{x^2-2010/4} = 2x -\sqrt{4x^2-2011}=y^2.$$
Now isolate the radical and square to get $$4x^2-4xy^2+y^4 = 4x^2-2011$$ or $y^2(y^2-4x) = -2011$. Note that $2011$ is prime and $y^2$ divides it, so $y=\pm 1$. If $y=1$ then $1-4x = -2011$ or $x=503$. If $y=-1$, then $x$ is not an integer.