<s>[INST] 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}$.
 [/INST] 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.
</s>