question related to radical sign My question is-

Let $p(x)= \sqrt{x + 2 + 3\sqrt{2x-5}} - \sqrt{x - 2 + \sqrt{2x-5}}$. Then $p(2012)^6$ equals?

Any solution for this question would be greatly appreciated.
Thank you,
 A: $a=\sqrt{2014+3\sqrt{4019}}-\sqrt{2010-\sqrt{4019}}=$?
Let us ask whether there are some nice numbers $u$, $v$ such that $\sqrt{2010-\sqrt{4019}}=u-v\sqrt{4019}$, i.e.
$$2010-\sqrt{4019}=u^2+4019v^2-2uv\sqrt{4019}.$$
After some trying, we find out that $u=v=\frac1{\sqrt2}$ work, which means
$$\sqrt{2010-\sqrt{4019}}=\frac{\sqrt{4019}-1}{\sqrt2}.$$
Similarly we can find out that
$$\sqrt{2014+3\sqrt{4019}}=\frac{\sqrt{4019}+3}{\sqrt2}.$$
So we see that $$a=\frac{\sqrt{4019}+3}{\sqrt2}-\frac{\sqrt{4019}-1}{\sqrt2}=\frac4{\sqrt2}=2\sqrt2$$
and 
$$a^6=(2\sqrt{2})^6=8^3=512.$$

This can be checked by WolframAlpha.
In fact, I kind of cheated - only after I saw the result at WA I've tried to check whether the expressions can be rewritten in the above form.
A: Compute $p(2012)=\sqrt{2014+3 \sqrt{4019}}-\sqrt{2010+\sqrt{4019}}$ and apply the formula for double square roots, noticing that $2010^2-4019 = 2009^2$ and $2014^2-9 \cdot 4019 = 2005^2$. Now you can compute the desired result. By the way, the final result is $8$.
Sorry for the italian reference, but you can easily read the formula to simplify an expression like $\sqrt{a+\sqrt{b}}$ when $a^2-b$ is a perfect square.
A: This problem can be solved using the method that is used to denest radicals of the form $\sqrt{a+c\sqrt{b}}$ so that $\sqrt{a+c\sqrt{b}}=\sqrt{d}+\sqrt{e}$.  See Stack Exchange question number 220818 for an example of this. This leads to  setting each of the  nested radicals above to equal the sum of two square roots so that $$\sqrt{x + 2 + 3\sqrt{2x-5}} =(\sqrt{a}+\sqrt{b})$$ and $$\sqrt{x - 2 + \sqrt{2x-5}}=(\sqrt{e}+\sqrt{f})$$ Let's denest the first nested radical you can do the second. I will give the result only for the second, which is below. Set  $$a+b = (x+2)$$ and $$2\sqrt{a}\sqrt{b} = 3\sqrt{2x-5}$$ Square both sides of the second equation to get $4ab=18x-45$ and solve for $b$ to get $b=\frac{18x-45}{4a}$then substitute $b$ into the first equation to get $$a+\frac{18x-45}{4a}=(x+2)$$ then multiply both sides by $a$ to get the quadratic equation $$a^2-(x+2)a+\frac{18x-45}{4}=0$$ We can now solve this using the quadratic formula to get $$\frac{x+2+\sqrt{(x+2)^2-\frac{4(18x-45)}{4}}}{2}$$ and $$\frac{x+2-\sqrt{(x+2)^2-\frac{4(18x-45)}{4}}}{2}$$ or $$\frac{x+2+\sqrt{(x-7)(x-7)}}{2}$$
and $$\frac{x+2-\sqrt{(x-7)(x-7)}}{2}$$ The two roots therefore turn out to be $\frac{2x-5}{2}$ and $\frac{9}{2}$. Because we are looking for the sum of two square roots $\sqrt{a}$ and $\sqrt{b}$ we have to take the square roots of each of the roots of the quadratic and this yields the sum $$\frac{\sqrt{4x-10}}{2}+\frac{3\sqrt{2}}{2}$$ for the first nested radical in your question.
Now use the identical procedure to denest the second nested radical  $$\sqrt{x - 2 + \sqrt{2x-5}}$$ Going through the above denesting procedure on this yields $$\frac{\sqrt{4x-10}}{2}+\frac{\sqrt{2}}{2}$$ Combining the two results we get  $$\left(\frac{\sqrt{4x-10}}{2}+\frac{3\sqrt{2}}{2}\right)
- \left(\frac{\sqrt{4x-10}}{2}+\frac{\sqrt{2}}{2}\right) = \sqrt{2}$$ So you can see that the result is $p(x) = \sqrt{2}$ for all $x$.
