Derivation Verification for an Algebraic Expression This problem comes from a MathOverFlow thread. Inside the thread the user Per Alexandersson mentions how they learned a technique to "simplify" $\sqrt{7+\sqrt{3}}$ from the book Algebra for Beginners, by Todhunter.
Greg Martin replied with the following formula:
$\sqrt{a+\sqrt b} = \sqrt{\frac{a-\sqrt{a^2-b}}{{2}}}+\sqrt{\frac{a+\sqrt{a^2-b}}{{2}}}$
I have three questions around this,
Question 1: Is the below derivation correct? If not, could someone show me how to patch it up?
Derivation:
\begin{align}
\sqrt{a+\sqrt b} &= \sqrt{\frac{a-\sqrt{a^2-b}}{{2}}}+\sqrt{\frac{a+\sqrt{a^2-b}}{{2}}} \\
\left(\sqrt{a+\sqrt b}\right)^{2} &= \bigg(\sqrt{\frac{a-\sqrt{a^2-b}}{{2}}}+\sqrt{\frac{a+\sqrt{a^2-b}}{{2}}}\bigg)^{2} \\
{a+\sqrt b} &= \frac{a-\sqrt{a^2-b}}{{2}} + 2\bigg(\sqrt{\frac{a-\sqrt{a^2-b}}{{2}}}\sqrt{\frac{a+\sqrt{a^2-b}}{{2}}}\bigg) + \frac{a+\sqrt{a^2-b}}{{2}} \\
{a+\sqrt b} &= \frac{a-\sqrt{a^2-b}}{{2}} + \frac{a+\sqrt{a^2-b}}{{2}} + 2\bigg( \sqrt{\frac{a-\sqrt{a^2-b}}{2}\cdot \frac{a+\sqrt{a^2-b}}{2}}\bigg)  \\
{a+\sqrt b} &= \frac{a-\sqrt{a^2-b}+a+\sqrt{a^2-b}}{2}+  2\bigg(\frac{\sqrt{b}}{\sqrt{4}}\bigg) \\
{a+\sqrt b} &= \frac{2a}{2} +  2\bigg(\frac{\sqrt{b}}{2}\bigg) \\
{a+\sqrt b} &= a +  \sqrt{b}
\end{align}
Question 2: I assume that the above is if each step is reversible. But my question is (assuming the derivation is correct), how do we know each step is reversible when there are square roots involved?
Question 3: Regardless if the above derivation is correct or not, could someone show me another derivation and include the steps/explanations of how these are equal? I figure another approach might enlighten me as to how the longer expression was derived from  $\sqrt{a+\sqrt b}$.
 A: The equation
$$\sqrt{a \pm \sqrt b} = \sqrt{\frac{a + \sqrt{a^2-b}}{{2}}} \pm \sqrt{\frac{a - \sqrt{a^2-b}}{{2}}} \tag{1}$$
is really two equations with proper choice of signs.
What we mean by that is that each square root of a positive real has two values, one positive and one negative.
There is one square root on the left side and on the right side is the sum/difference of two square roots. But given $\,0<b<a^2\,$ positive and the positive square root on the left, then the first square root on the right is greater than the second square root. Their sum must be the same as the left square root with the $+$ sign and the difference must be the same as with the $-$ sign.
When we replace $\,b\,$ with $\,-b,\,$ equation $(1)$ becomes
$$\sqrt{a \pm \sqrt -b} = \sqrt{\frac{a + \sqrt{a^2 +b}}{{2}}} \pm \sqrt{\frac{a - \sqrt{a^2+b}}{{2}}} \tag{2}$$
which is the well known formula for the square root of a complex number. In both cases, the equations can be verified by squaring both sides and simplifying and accounting for negative square roots as needed.
A: Answer 1: Your thoughts are correct.
Answer 2: If the signal of both sides are equal, then the step of squaring both sides (say, the first step in your proof) is invertible.
Answer 3: The way the author expects you to derive this equation might be to find an $x$ and $y$ such that
$$
\begin{align}
x^2+y^2&=2a\tag{1}\label{1},\\
xy&=\sqrt{b}\tag{2}\label{2}.
\end{align}
$$
Then,
$$
\sqrt{a+\sqrt{b}}=\sqrt{\frac{2a+2\sqrt{b}}{2}}=\sqrt{\frac{(x+y)^2}{2}}=\frac{|x|}{\sqrt{2}}+\frac{|y|}{\sqrt{2}}.
$$
This is how you simplify $\sqrt{7+\sqrt{3}}$. Solving $(1)$ and $(2)$, you will find that the $x$ and $y$ are exactly $\sqrt{a-\sqrt{a^2-b}}$ and $\sqrt{a+\sqrt{a^2-b}}$.
