A problem on nested radicals Find the value of $x$ for all $a>b^2$ if:
$$\large x=\sqrt{a-b\sqrt{a+b\sqrt{a-b{\sqrt{a+b.......}}}}}$$
My attempt
$$\large x=\sqrt{a-b\sqrt{(a+b)x}}$$
$$\large x^4=(a-b)^2(a+b)x$$
$$\large x=((a-b)^2(a+b))^{1/3}$$ (real root)
Question: Is my solution correct??
 A: Your approach is not right unless your original equation was: $$x=\sqrt{(a-b)\sqrt{(a+b)\sqrt{(a-b)\sqrt{(a+b)\cdots}}}}$$
However, it's almost there.
$\displaystyle\begin{align}
x & = \sqrt{a-b\sqrt{a+b\sqrt{a-b\sqrt{a+b\cdots}}}}
\\ x & =\sqrt{a-b\sqrt{a+bx}}
\\x^2 & = a-b\sqrt{a+bx}
\\(a-x^2)^2 & = b^2(a+bx) 
\\ a^2-2ax^2+x^4 & = ab^2 + b^3x
\\ 0 & = x^4-2ax^2-b^3 x +a^2-ab^2
\\ 0 & = (x^2 +bx-a+b^2)(x^2-bx-a)
\\ \therefore x & \in \left\{\frac {-b-\sqrt{4a-3b^2}}2, \frac{-b+\sqrt{4a-3b^2}}2, \frac{b-\sqrt{4a+b^2}}2, \frac{b+\sqrt{4a+b^2}}2 \right\}
\end{align}$ 
Now apply the criteria $a>b^2$ to select among them for the satisfactory answer.
A: Here's another one:
$$\text{Let} x=\sqrt{a-b\sqrt{a+b\sqrt{a-b\sqrt{a+b\cdots}}}}$$
$$\text{Let}y=\sqrt{a+b\sqrt{a-b\sqrt{a+b\sqrt{a-b\cdots}}}}$$
Now $$x^2=a-by---1$$ and $$y^2=a+bx----2$$ $$\implies x^2-y^2=-b(x+y)$$ $$\implies(x+y)(x-y+b)=0$$(Considering only positive solutions of $x$) $$y=x+b$$, putting it in eq $2$, $$x^2+bx+b^2-a=0$$, on Solving:
$$\large x=\frac{-b+\sqrt{4a-3b^2}}{2}$$
