Show that $A=\sqrt{\left|40\sqrt2-57\right|}-\sqrt{\left|40\sqrt2+57\right|}$ is a whole number Show that $A$ is a whole number: $$A=\sqrt{\left|40\sqrt2-57\right|}-\sqrt{\left|40\sqrt2+57\right|}.$$
I don't know if this is necessary, but we can compare $40\sqrt{2}$ and $57$: $$40\sqrt{2}\Diamond57,\\1600\times2\Diamond 3249,\\3200\Diamond3249,\\3200<3249\Rightarrow 40\sqrt{2}<57.$$ Is this actually needed for the solution? So $$A=\sqrt{57-40\sqrt2}-\sqrt{40\sqrt2+57}.$$ What should I do next?
 A: $$A=\sqrt{57-40\sqrt2}-\sqrt{40\sqrt2+57} = \sqrt{(4\sqrt2-5)^2} - \sqrt{(4\sqrt2+5)^2} $$
$$ = (4\sqrt2-5) - (4\sqrt2+5) = -10$$
So $A$ is the integer $-10$.
It's just written in some slightly convoluted form.
A: That number is $-10$. In fact, if you try to express $\sqrt{57-40\sqrt2}$ as $a+b\sqrt2$, you solve the system$$\left\{\begin{array}{l}a^2+2b^2=57\\2ab=-40.\end{array}\right.$$You will get that $a=5$ and that $b=-4$. By the same method, you will get that $\sqrt{57+40\sqrt2}=-5+4\sqrt2$. So$$\sqrt{57-40\sqrt2}-\sqrt{57+40\sqrt2}=-5+4\sqrt2-\left(5+4\sqrt2\right)=-10.$$
A: The check you're doing is indeed necessary in order to remove the absolute value.
However, when you arrive at $3200\mathrel{\Diamond}3249$ you can realize that the difference is a square, which is precisely the condition for a radical of the form
$$
\sqrt{a\pm\sqrt{b}}
$$
can be “denested”. Let's see why. Suppose $\sqrt{a+\sqrt{b}}=\sqrt{x}+\sqrt{y}$; after squaring we get
$$
a+\sqrt{b}=x+y+\sqrt{4xy}
$$
and if we equate the two parts we get
$$
\begin{cases} x+y=a \\[6px] 4xy=b \end{cases}
$$
Hence $(x-y)^2=(x+y)^2-4xy=a^2-b$. So, in order to find the integers $x,y$, we need that $a^2-b$ is a square. Once we have it, we can determine $x$ and $y$.
Note that the same holds for $\sqrt{a-\sqrt{b}}=\sqrt{x}-\sqrt{y}$.
In your case $a=57,b=3200$ and $a^2-b=49=7^2$, so you get
$$
x+y=57,\quad x-y=7
$$
and therefore $x=32,y=25$, from which
$$
\sqrt{57\pm40\sqrt{2}}=\sqrt{32}\pm5
$$
and you can finish.
A: Actually it is not necessary to know if $\;40\sqrt2\;$ is greater or less than $\;57$.
Moreover we do not need to square $\;A\;$ or to solve any system of equations.
The check that the original poster does about the comparison between $\;40\sqrt2\;$ and $\;57\;$ is not necessary, indeed just the same we can remove the absolute value inside the first radical as soon as we get the square of a subtraction.
$\begin{align}
A&=\sqrt{\left|40\sqrt2-57\right|}-\sqrt{\left|40\sqrt2+57\right|}=\\
&=\sqrt{\left|40\sqrt2-32-25\right|}-\sqrt{40\sqrt2+32+25}=\\
&=\sqrt{\left|40\sqrt2-\left(4\sqrt2\right)^2-5^2\right|}-\sqrt{40\sqrt2+\left(4\sqrt2\right)^2+5^2}=\\
&=\sqrt{\left|\left(4\sqrt2\right)^2+5^2-40\sqrt2\right|}-\sqrt{\left(4\sqrt2\right)^2+5^2+40\sqrt2}=\\
&=\sqrt{\left|\left(4\sqrt2-5\right)^2\right|}-\sqrt{\left(4\sqrt2+5\right)^2}=\\
&=\sqrt{\left(4\sqrt2-5\right)^2}-\sqrt{\left(4\sqrt2+5\right)^2}=\\
&=\left|4\sqrt2-5\right|-\left(4\sqrt2+5\right)=\\
&\underset{\color{blue}{\overbrace{\text{but }\;4\sqrt2-5=\sqrt{32}-\sqrt{25}>0}}}{=}\left(4\sqrt2-5\right)-\left(4\sqrt2+5\right)=\\
&=-10\;.
\end{align}$
Hence $A$ is the integer $-10$.
