<s>[INST] Double radical proof I'm trying to prove that
$$
\sqrt{A+\sqrt{B}}=\sqrt{\frac{A+C}{2}}+\sqrt{\frac{A-C}{2}}
$$
With
$$
C=\sqrt{A^2 - B}
$$
How can I handle this?
Edit: obviously is easy that this holds when you know the r.h.s., but my question is: how to get the r.h.s. when you only know the l.h.s.
 [/INST] In what follows, I will show how to start from the l.h.s. written as
\begin{equation*}
\sqrt{A+\sqrt{B}}
\end{equation*}
and arrive to the r.h.s written as 
\begin{equation*}
\sqrt{\frac{A+C}{2}}+\sqrt{\frac{A-C}{2}},\ \ \ \ with\ \ \ C=\sqrt{A^{2}-B}.
\end{equation*}
To this end, make use of the following standard identities of algebra 
\begin{eqnarray*}
x^{2}-y^{2} &=&(x+y)(x-y) \\
(x+y)^{2} &=&x^{2}+y^{2}+2xy
\end{eqnarray*} 
Note that this second identity can be written as follows 
\begin{equation}
xy=\frac{1}{2}(x+y)^{2}-\frac{1}{2}x^{2}-\frac{1}{2}y^{2}  \tag{K}
\end{equation} 
Consider a rectangle triangle with the longest side $A$ and the others are $ 
\sqrt{B,}$ and $C.$ So, by the Pythagorean theorem one has,$\ $ 
\begin{equation}
A^{2}=B+C^{2},  \tag{P}
\end{equation}
then$\ \sqrt{B}=\sqrt{A^{2}-C^{2}},$ therefore, 
\begin{eqnarray*}
\sqrt{A+\sqrt{B}} &=&\sqrt{A+\sqrt{A^{2}-C^{2}}} \\
&=&\sqrt{A+\sqrt{(A+C)(A-C)}} \\
&=&\sqrt{A+\sqrt{A+C}\sqrt{A-C}},\ let\ x=\sqrt{A+C},\ and\ y=\sqrt{A-C},\
and\ apply\ (K) \\
&=&\sqrt{A+\frac{1}{2}\left( \sqrt{A+C}+\sqrt{A-C}\right) ^{2}-\frac{1}{2}%
\left( \sqrt{A+C}\right) ^{2}-\frac{1}{2}\left( \sqrt{A-C}\right) ^{2}} \\
&=&\sqrt{A+\frac{1}{2}\left( \sqrt{2}\sqrt{\frac{A+C}{2}}+\sqrt{2}\sqrt{%
\frac{A-C}{2}}\right) ^{2}-\frac{1}{2}(A+C)-\frac{1}{2}\left( A-C\right) } \\
&=&\sqrt{A+\frac{1}{2}(\sqrt{2})^{2}\left( \sqrt{\frac{A+C}{2}}+\sqrt{\frac{%
A-C}{2}}\right) ^{2}-A} \\
&=&\sqrt{\left( \sqrt{\frac{A+C}{2}}+\sqrt{\frac{A-C}{2}}\right) ^{2}} \\
\sqrt{A+\sqrt{B}} &=&\sqrt{\frac{A+C}{2}}+\sqrt{\frac{A-C}{2}},\ \ \ with\ C=%
\sqrt{A^{2}-B},\ from\ (P).
\end{eqnarray*}
</s>