I was trying to solve the equation, $x=1+\sqrt{x}$ for real $x$. Though I didn't correctly solve it. I'm curious as to why that is, and what else I need to initially consider in the domain of the function.
I started off by recognising that $x \geq 0$ for the square root to be real (I know when $x=0$ it is not a solution). Squaring both sides and rearranging; $$x^2 -3x + 1=0$$ Finding the solutions to this equation you obtain; $x=\frac{3\pm\sqrt{5}}{2}$. Both of these solutions to that equation are greater than zero, but only $x=\frac{3 + \sqrt{5}}{2}$ is the solution to the original. Why is that?
Is there some other "domain" restriction I must consider? Or for every question where there inolves root must I numerically test it (is there no way to get around this)?
Thanks
When you square an equation, you lose information. In your case, the equation $x -1 = \sqrt{x}$ will result in the same equation as $x-1 = -\sqrt{x}$ after squaring both sides: $(x-1)^2 = x$, regardless of the domain $x\geq 0$.
So your two roots $x = \frac{1}{2}(3 \pm \sqrt{5})$ come from one of them being a solution to $x-1 = -\sqrt{x}$ and the other $x-1 =\sqrt{x}$, even if both equations have domain $x \geq 0$.
For an answer to your last question, yes, in such cases, you'll need to check that any solution set you get from an equation after squaring it isn't a spurious solution by checking that it satisfies the original equation. To clarify this: it needn't be checking numerically - there are certain conditions you can check, for example as in law-of-fives comment, you have $x-1 =\sqrt{x} > 0$ so the only valid solution is the one that satisfies $x>1$.