Why do I get one extra wrong solution when solving $2-x=-\sqrt{x}$? I'm trying to solve this equation: 
$$2-x=-\sqrt{x}$$
Multiply by $(-1)$:
$$\sqrt{x}=x-2$$
power of $2$:
$$x=\left(x-2\right)^2$$
then:
$$x^2-5x+4=0$$
and that means:
$$x=1, x=4$$

But $x=1$ is not a correct solution to the original equation.
Why have I got it? I've never got a wrong solution to an equation before. What is so special here?
 A: Others have said that you picked up a spurious solution when you squared.  They're incorrect.  You already have two solutions at $\sqrt{x} = x - 2$, although perhaps this is not so easy to see: $$\begin{align}
    \sqrt{x} &= x - 2 \\
    x - \sqrt{x} - 2 &= 0 \\
    \sqrt{x} &= \frac{1 \pm \sqrt{1+8}}{2} \\
    \sqrt{x} &= \frac{1 \pm 3}{2} \\
    \sqrt{x} &\in \{-1,2\}.
\end{align}$$  Of course, if $x$ is real, $\sqrt{x} \neq -1$.  However, if you square these two solutions, you get the two (corrected) solutions you got:  $x \in \{1,4\}$.
When we say "if $x$ is real, $\sqrt{x} \neq -1$", we're using the fact that $\sqrt{x} \geq 0$, which is equivalent in the original equation to $x-2 \geq 0$, or $x \geq 2$.  This fact allows us to apply the additional restriction ("additional equation"?) that $\sqrt{x}$ is real (because $x-2$ is).  With this second equation, we can eliminate one solution, leaving the other.
A: To make life easier, set $\sqrt{x} = t$ with the constraint $t \geq 0$. Your equation will become $t^2 - t - 2=0$ and the undesirable root is quickly deleted. 
A: Squaring can change the set of solutions
Consider $x=3$ and $x^2=9$
A: It is a correct derivation of $\sqrt{x} \in \lbrace -1,2 \rbrace$.  Both values satisfy the equation.
Whether the negative square root is "wrong" or "spurious" depends on the conventions in use, and on the application.  There are questions where the "wrong" solution is meaningful, or is a correct answer for the problem being solved.
In this question, the equation selects a different sign of $\sqrt{x}$ for the two possible solutions, $x=1$ and $x=4$.  Whether that should be forbidden is dependent on context.  It is not a result that is necessarily wrong.
A: We have $\sqrt x=x−2$, and we know that square root is always positive
and we have $\sqrt x$ equal to $x-2$, which means that $x-2$ is positive
thus $x\geq2$, so we should only take the solutions that are bigger than or equal to $2$.
A: Such an interesting question! let's do a 'backwards' reasoning. 
It's true that $x=1$ satisfy $x^2-5x+4=0$, and then clearly $x=\left(x-2\right)^2$, since $1 = (1-2)^2=(-1)^2$. 
The problem appears when you take square roots, since it is not still true that $\sqrt{(-1)^2}=-1$, in fact, $\sqrt{x^2}= |x|$ so in this case $\sqrt{(-1)^2}=|-1|=1$, which is not equal to $x-2$ when $x=1$.
A: You correctly deduced that
$$\sqrt{x}=x-2.$$
You then wrote
$$x=(x-2)^2.$$
This is true, but it is not as precise as what you started with.
If you were to try to derive the original equation from this statement,
you could not correctly do so, because
$\sqrt{(x-2)^2}$ is not necessarily $x - 2$.
Actually,
$$\sqrt{(x-2)^2} = \lvert x - 2 \rvert.$$
So when you write $x=(x-2)^2$, it implies only that
$\sqrt x = \lvert x - 2 \rvert$, which means
$$\sqrt x = \begin{cases}
 x - 2 & \text{if $x \geq 2$,} \\
 2 - x & \text{if $x < 2$.} \\
\end{cases}$$
Since $0 \leq \sqrt x$ whenever $\sqrt x$ is a real number,
the original equation, $\sqrt{x}=x-2$, implies that $x \geq 2$,
and the "if $x \geq 2$" case of the equation above applies.
In that case the only solution is $x = 4$.
But in the other case, "if $x < 2$,"
you end up solving for $x$ in $\sqrt x =  2 - x$.
The result $x = 1$ is in fact a correct solution of that equation:
$$ \sqrt 1 = 2 - 1. $$
It is just not the equation you were supposed to solve.
A: A pitfall always with square roots.
While seeking solution of
$$ 2-x=-\sqrt{x} \tag1 $$
you can expect the solution of
$$2-x=+\sqrt{x} \tag2$$
intruding as well... as a mirror solution.
We have extra $x=4$ for (1) in addition to  $x=1$ for (2).
I.e., if we have  $ u=\sqrt{x}$, then
$$ u+u^2-2= ( u-1)(u+2) =0\to u=(1,-2), \; u^2=x=(1,4)$$
These can be seen as roots on different y-branches of an oblique parabola
$$ y = x \pm \sqrt{x}-2. $$

A: This is because the equation $\;\sqrt x=x-2$  is not equivalent to $x=(x-2)^2$, but to
$$x=(x-2)^2\quad\textbf{and}\quad x\ge 2.$$
Remember $\sqrt x$, when it is defined, denotes the non-negative square root of $x$, hence in the present case, $x-2 \ge 0$, i.e. $x$ must be at least $2$.
A: Your confusion arises from not specifically stating the flow of the logic. Write in all the "$\implies$' and "$\iff$" and you have $$2-x=-\sqrt x \iff \sqrt x=x-2\implies$$ $$\implies x=(x-2)^2\iff  x^2-5 x+4=0 \iff  x\in \{1,4\}.$$  Notice that the "$\implies$" in the line above only points one way. You have therefore $$2-x=-\sqrt x\implies x\in \{1,4\}$$ which is true, but the reverse implication is false: It is not true that all members of $\{1,4\}$ satisfy the original equation. This happened because  you had an equation of the form $A=B$ and an inference of the form $A=B\implies A^2=B^2$. But the reverse implication may not be valid.For example $A=2\implies A^2=4$ .But $A^2=4$ does not imply $A=2$.
A: As Peter said, you introduced another solution when you squared both sides of the equation. Your original equation had a square root function, whose domain is all $x$ greater than or equal to $0$. However, the domain of a parabola such as $x^2-5x+4$, is all real numbers. 
Also, $x^2-5x+4=(x-4)(x-1)$, so your solutions should be $x=1,4$
A: Well, to take a sort of complex analysis point of view, you may want to consider the following:
$$\sqrt{1}=1$$$$\sqrt{1}=-1$$
Now where did we get this negative answer?  We call it another branch.  In fact, with algebra/precalculus, we usually stick to the primary branch where we have:
$$\sqrt{1}=1,\sqrt{1}\ne-1$$
This is simply used for less confusion to those who aren't well into complex analysis and similar things.
As for the solutions to your quadratic, I note that if we have the following:
$$x^2-5x+4=0$$
Then the solution is:
$$x=1,4$$
But, more interestingly, let me point at something more interesting: the quadratic formula:
$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
Ever wonder why we have a $\pm\sqrt{}$ ?  It is because, when dealing with something like a quadratic or any other polynomial, we are interested in ALL solutions, in particular, we are interested in both branches of the square root.
So plugging in $x=1,4$ may not appear to work for your original problem, but in a way, it does:
$$2-1=-\sqrt{1}$$
$$1=-\sqrt{1}$$
As I have noted all the way at the top of my answer, $\sqrt{1}=1,-1$ if we include all branches, such that we have:
$$1=-(-1)$$
This checks out.
However:
$$1\ne-(1)$$
Because that is simply the wrong branch.  When we solved the quadratic using the quadratic formula, $x=1$ came when we used the square root as a negative.  What this means is that to use $x=1$ as a solution, all square roots must come out negative.
For $x=4$, we must use positive square roots:
$$2-4=-\sqrt{4}$$
$$-2=-(2)$$
If we tried to use the wrong square root, we'd get the wrong answer:
$$-2\ne-(-2)$$
However, in a regular classroom environment or a class that does not involve high amounts of complex numbers or different roots, use only positive square roots because it is considered the primary branch.
A: Overshoot, with subsequent back-tracking to the destination, is sometimes the easiest path, a common example being the fact that, due to tricky lane changes and / or confusing roadway signage, it could well be easier to overshoot the destination and then wend your way back to it.  The phenomenon of such overshoot is just a special case of the fact that a larger footprint is easier than a smaller footprint. (cf: ‘collateral damage’, and cf: “I would have written a shorter letter, but I didn’t have the time.” -- Blaise Pascal) An example of mathematically necessary overshoot is the fact that the vertical coordinate of the brachistochrone overshoots the vertical coordinate of the destination, and, even more famously, that ‘the shortest distance between two truths in the real domain often passes through the complex domain’ – the passing through the complex domain being a stratospheric instance of overshoot, two examples of which are the explanation of the radius of convergence of 1/(1 + x^2), and the proof of the fact that the product of two numbers, each representable as the sum of two squares, is itself representable as the sum of two squares. A very common example is the squaring of both sides of an equation (in order to remove a radical), which may introduce an ‘extraneous’ root. You then ‘pull back’ to the actual solution set by inspecting each root of the second equation individually.
A: Here is a geometric vision of what happens here. The original equation corresponds to the intersection of the lower half of the parabola and the line. The squared equation $(2-x)^2=x$ corresponds to the intersection of the entire parabola and the line.
Two halves of a parabola & line
