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?

  • 55
    $\begingroup$ $x=1$ has a single solution. Squaring, we have $x^2=1,$ which yields as extra solution $x=-1.$ $\endgroup$
    – Lucian
    Commented Jan 19, 2016 at 22:01
  • 24
    $\begingroup$ The incorrect solution that was introduced when you squared both sides is called an extraneous solution. $\endgroup$ Commented Jan 19, 2016 at 22:06
  • 13
    $\begingroup$ How did you even get $x=1,x=2$??? I used the quadratic formulae and got $x=1,x=4$ $\endgroup$ Commented Jan 19, 2016 at 22:20
  • 14
    $\begingroup$ In fact $x=2$ is also a wrong solution...it should be $x=4$ $\endgroup$
    – Alex
    Commented Jan 19, 2016 at 22:41
  • 9
    $\begingroup$ You showed that $2 - x = -\sqrt{x}$ implies that $x = 1$ or $x = 4$, which is true. You didn't prove the converse. Specifically, in going from the second to the third line, the implication only works in one direction. $\endgroup$
    – anomaly
    Commented Jan 20, 2016 at 18:53

15 Answers 15


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$.

  • 20
    $\begingroup$ To make it blatantly obvious: $ \sqrt x \ge 0 \implies x - 2 \ge 0 \implies x \ge 2 $. $\endgroup$
    – jpmc26
    Commented Jan 20, 2016 at 22:35
  • 4
    $\begingroup$ A very insightful thing. I would never take x >=2 seriously when I was in school. $\endgroup$
    – Saikat
    Commented Jan 21, 2016 at 4:36
  • 3
    $\begingroup$ It might be helpful if you add a line like "Since we know the square root of a number can't be negative it means that x must be greater than or equal to 2" $\endgroup$ Commented Jan 21, 2016 at 14:50
  • $\begingroup$ @Dean MacGregor: Done! $\endgroup$
    – Bernard
    Commented Jan 21, 2016 at 17:34
  • 6
    $\begingroup$ @jpmc26 To someone who already doesn't understand that you can't just "square both sides", your comment is anything but obvious. $\endgroup$
    – corsiKa
    Commented Jan 21, 2016 at 17:50

Squaring can change the set of solutions

Consider $x=3$ and $x^2=9$

  • 11
    $\begingroup$ More precisely, it can have a larger set of solutions. $\endgroup$
    – Bernard
    Commented Jan 20, 2016 at 22:39
  • $\begingroup$ In fact by squaring we have changed the original function which now has larger range set. $\endgroup$
    – CodeYogi
    Commented Mar 16, 2016 at 14:26

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$.


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.


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$.

  • $\begingroup$ Very good answer. $\endgroup$
    – Soheil
    Commented Dec 15, 2020 at 10:36
  • 2
    $\begingroup$ @soheil . For many teachers, the methods of solving such problems has become so automatic that they may describe it as a series of actions: "multiply by $(-1)$ ... "square both sides", etc. But a student to whom this is new may fail to understand it because the details of the logic were not stated. $\endgroup$ Commented Dec 15, 2020 at 11:51
  • $\begingroup$ Yes I agree. it is the only answer logically showed what happened in the calculation and why one root doesn't satisfy the equation. also it is easy to understand the answer:) $\endgroup$
    – Soheil
    Commented Dec 15, 2020 at 12:02
  • 1
    $\begingroup$ @soheil . I think math is hard to teach well and easy to teach poorly, as it is hard for a teacher to see a student's difficulty that the teacher never experienced. I had the experience of tutoring someone and not knowing why what I had said was not understood. $\endgroup$ Commented Dec 15, 2020 at 14:04
  • $\begingroup$ Yes . I completely agree with you. I am not a math teacher but I experienced that It is hard to explain something which is obvious for myself to someone else and sometimes they would ask some questions that I never thought about ! therefor teaching is a good way to notice whether I understood the concept well or not. $\endgroup$
    – Soheil
    Commented Dec 15, 2020 at 14:26

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$

  • $\begingroup$ No one saw that. $\endgroup$
    – Daniel
    Commented Jan 19, 2016 at 22:30
  • 1
    $\begingroup$ No one saw what? $\endgroup$
    – zz20s
    Commented Jan 19, 2016 at 22:35
  • $\begingroup$ Sorry for not clarifying. No one saw the mistake with the root $x=2$. $\endgroup$
    – Daniel
    Commented Jan 19, 2016 at 22:38
  • $\begingroup$ No problem. I just thought that I'd point it out for the OP, in addition to answering their question. $\endgroup$
    – zz20s
    Commented Jan 19, 2016 at 22:43
  • $\begingroup$ @SolidSnake I saw it. $\endgroup$ Commented Jan 19, 2016 at 22:56

Well, to take a sort of complex analysis point of view, you may want to consider the following:


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:


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:


Then the solution is:


But, more interestingly, let me point at something more interesting: the quadratic formula:


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:



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:


This checks out.



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:



If we tried to use the wrong square root, we'd get the wrong answer:


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.

  • $\begingroup$ Indeed, I'm sorry for not noticing that ;) $\endgroup$
    – Daniel
    Commented Jan 19, 2016 at 22:57
  • $\begingroup$ @SolidSnake :) No regrets! $\endgroup$ Commented Jan 19, 2016 at 22:58

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.

  • $\begingroup$ Wait, isn't $-1$ a square root of $1$? $\endgroup$
    – tomasz
    Commented Jan 19, 2016 at 23:58
  • $\begingroup$ @tomasz See my answer $\endgroup$ Commented Jan 20, 2016 at 0:21
  • 1
    $\begingroup$ @tomasz : It is the case that $(-1)^2 = 1$. However, the symbols $\sqrt{1}$ mean precisely and only $1$ by convention. If you want the other root, you have to insert the minus sign by hand. $\endgroup$ Commented Jan 20, 2016 at 6:01

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.


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.


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 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. $$

enter image description here


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.


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


The simplest way to understand this is by taking a look at the graphs! Note that $\sqrt{x}$ is taking the positive root of $x$ and is defined for all $x \geq{0}$, hence in mathematical terms $\forall\ {x}\in\mathbb{Z}_{\geq{0}},\sqrt{x} \geq{0} $

You also know how the graph of $y = x - 2$ exists in the cartesian space. So the value of $x$ at the intersection is what you are looking for! Now you realise that $x = 1$ is impossible since the graph of $y = x - 2$ is below the $x$ axis at $x = 1$ and the graph of $y = \sqrt{x}$ is above the $x$ axis at all times!

enter image description here

  • $\begingroup$ This does not answer the question. The question is not why $x=1$ is not a solution, but why the algebraic manipulation led to $x=1$. $\endgroup$ Commented Mar 13, 2023 at 15:56
  • $\begingroup$ Ah thank you for pointing that out @ArturoMagidin! I just showed a way of understanding why $x = 1$ is not a valid solution. $\endgroup$
    – anon
    Commented Mar 13, 2023 at 15:58
  • $\begingroup$ Which doesn't answer the question. The OP knew (7+ years ago) that it wasn't a solution. There is no question it is not a solution. There are no doubts that it is not a valid solution. There is no need to a new answer that gives a way to understand why it is not a valid solution: everyone already knew it was not a valid solution. The question is about why the algebraic manipulations produced $x=1$ as a potential solution. And your reply does not come anywhere near the vicinity of answering that question. That's why you go a downvote and a delete vote. Because you are missing the point $\endgroup$ Commented Mar 13, 2023 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .