I have to solve the following equation for $x$, for all values of $a$: $$x+\sqrt{a+\sqrt{x}}=a$$
Clearly $x\gt0$
For $a\lt0,x\in\phi$ as RHS$\lt0$ but LHS$\gt0$.
$a=0\Rightarrow x=0$
Now for $a\gt0$ $$a-x=\sqrt{a+\sqrt{x}} ,x\in(0,a)$$ $$(a-x)^2=a+\sqrt{x}.....(1)$$ Now plotting the graphs for $$y=(a-x)^2...a\gt0,x\in(0,a)$$ $$y=a+\sqrt{x}$$ For $a\in(0,1)$ the graphs don't intersect$\Rightarrow x\in\phi$. Also, $a=1\Rightarrow x=0$.
For $a\gt1$ the graphs intersect so $$a^2-a+x^2-2ax=\sqrt{x}...from (1)$$Squaring and rearranging $$x^4-4ax^3+6a^2x^2-2ax^2-4a^3x+4a^2x+a^4-2a^3+a^2=x$$ which I am not able to solve further.