Evaluate $\sqrt{a+b+\sqrt{\left(2ab+b^2\right)}}$ Evaluate  $\sqrt{a+b+\sqrt{\left(2ab+b^2\right)}}$
My attempt:
Let $\sqrt{a+b+\sqrt{\left(2ab+b^2\right)}}=\sqrt{x}+\sqrt{y}$
Square both sides: $a+b+\sqrt{\left(2ab+b^2\right)}=x+2\sqrt{xy}+y$
Rearrange: $\sqrt{\left(2ab+b^2\right)}-2\sqrt{xy}=x+y-a-b$
That's where my lights go off.
Any leads? Thanks in advance.
 A: After taking squares, you can proceed as follows
$$(a+b)+\sqrt{\left(2ab+b^2\right)}=(x+y)+2\sqrt{xy}$$
Compare corresponding (conjugate) parts on both the sides of above equation, we get
$$x+y=a+b\tag 1$$
$$2\sqrt{xy}=\sqrt{2ab+b^2}\iff 4xy=2ab+b^2\tag 2$$
$$x-y=\pm\sqrt{(x+y)^2-4xy}=\pm\sqrt{(a+b)^2-(2ab+b^2)}=\pm a\tag3$$
Solving (1) & (3) we get $x$ & $y$ as follows
$$x=a+\frac{b}{2}, \ y=\frac b2\ \ \ \text{OR}\ \  \ x=\frac b2, \ y=a+\frac{b}{2}$$
A: By conjugates $\sqrt{a+b\pm\sqrt{2ab+b^2}}=\sqrt{x}\pm\sqrt{y}$ i.e. $a+b=x+y,\,2ab+b^2=4xy$, so $x,\,y$ are roots of $t^2-(a+b)t+ab/2+b^2/4=(t-a-b/2)(t-b/2)$.
A: Although it is not clear what range of values is acceptable for the variables, I believe I have a sense of what you are trying to do here. This is called denesting square roots.
In particular, if $a,b,c$ are positive real numbers such that $a^2-b^2 c$ is non-negative, then it holds that
$$\sqrt{a+ b\sqrt{c}}=\sqrt{\frac{a+\sqrt{a^2-b^2 c}}{2}}+ \sqrt{\frac{a-\sqrt{a^2-b^2 c}}{2}}.$$
It can be easily proven by squaring both sides and using the difference of squares factorization. There is a way of coming up with it naturally by using the same idea behind finding complex square roots, though it might not be an entirely rigorous approach.
This yields
\begin{align*}
\sqrt{a+b+\sqrt{2ab+b^2}}&=\sqrt{\frac{a+b+|a|}{2}}+\sqrt{\frac{a+b-|a|}{2}}\\
&= \begin{cases} \sqrt{a+\frac{b}{2}}+\sqrt{\frac{b}{2}} &\text{ if } a\ge 0\\ \sqrt{\frac{b}{2}}+\sqrt{a+\frac{b}{2}} &\text{ if } a<0\end{cases}.
\end{align*}
which works because $$(a+b)^2-1^2\cdot (2ab+b^2)=a^2$$ is non-negative. Both cases yield the same answer.
A: Note
\begin{align}
&\sqrt{a+b+\sqrt{\left(2ab+b^2\right)}} \\
=& \sqrt{\frac{(2a+b)+b +2\sqrt{(2a+b)b}}{2}}\\
= &\sqrt{\frac{(\sqrt{2a+b}+\sqrt b )^2}{2}}\\
= &\sqrt{\frac{2a+b}2}+\sqrt {\frac b{2}}\\
\end{align}
