Solve the equation $$x+\sqrt{a+\sqrt{x}}=a$$ for all real $x$ and nonzero parameter $a$, prove that the equation has a solution if and only if $a\ge 1$.
My attempts and thoughts.
$$\sqrt {a+\sqrt x}=a-x$$
$$a+\sqrt x=(a-x)^2$$
$$\sqrt x =(a-x)^2-a$$
$$x=\big((a-x)^2-a\big)^2$$
$$x=(a^2-2ax+x^2-a)^2$$
But the last expansion seems terrible.
I haven't been able to prove why $a\ge 1$ has to be. My other concern is that not all roots of the last equation may be valid.For example, say $\sqrt {x}=-1$. We have $x=1$ but $x=1$ doesn't satisfy $\sqrt {x}=-1$.
My questions. Is there a method that doesn't square the equation and works easily in general? How can we get rid of excess roots? How can we prove that $a\ge 1$ ?



$$x = a - \sqrt{a +\sqrt x}$$
$$= a - \sqrt{a + \sqrt{a - \sqrt{a + \sqrt{x}}}} $$
=$ a - \sqrt{a + \sqrt{a - \sqrt{a + \sqrt{a ....}}}}$till infinity
let $y$= $\sqrt{a + \sqrt{a - \sqrt{a + \sqrt{a - ...}}}}$till infinity
$y^2 = a + \sqrt{a - \sqrt{a +.......}}$
$(y^2 - a )^2 = a - \sqrt{a + \sqrt{a...}}$
$$y^4 + a^2 -2ay^2 - a = -y$$
therefore $ y^4 - 2ay^2 + y + a^2 - a = 0$, $ y > 0$, $a - y > 0$, $a > 0$
But I'm sorry this is still an incomplete solution but I can't comment so I posted my idea. Hope it will help some other person to solve this. Sorry again:(