# 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?

• $x=1$ has a single solution. Squaring, we have $x^2=1,$ which yields as extra solution $x=-1.$ Jan 19, 2016 at 22:01
• The incorrect solution that was introduced when you squared both sides is called an extraneous solution. Jan 19, 2016 at 22:06
• How did you even get $x=1,x=2$??? I used the quadratic formulae and got $x=1,x=4$ Jan 19, 2016 at 22:20
• In fact $x=2$ is also a wrong solution...it should be $x=4$
– Alex
Jan 19, 2016 at 22:41
• 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. Jan 20, 2016 at 18:53

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

• To make it blatantly obvious: $\sqrt x \ge 0 \implies x - 2 \ge 0 \implies x \ge 2$. Jan 20, 2016 at 22:35
• A very insightful thing. I would never take x >=2 seriously when I was in school. Jan 21, 2016 at 4:36
• 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" Jan 21, 2016 at 14:50
• @Dean MacGregor: Done! Jan 21, 2016 at 17:34
• @jpmc26 To someone who already doesn't understand that you can't just "square both sides", your comment is anything but obvious. Jan 21, 2016 at 17:50

Squaring can change the set of solutions

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

• More precisely, it can have a larger set of solutions. Jan 20, 2016 at 22:39
• In fact by squaring we have changed the original function which now has larger range set. 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$$.

• Very good answer. Dec 15, 2020 at 10:36
• @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. Dec 15, 2020 at 11:51
• 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:) Dec 15, 2020 at 12:02
• @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. Dec 15, 2020 at 14:04
• 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. 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$

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

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.

• Indeed, I'm sorry for not noticing that ;) Jan 19, 2016 at 22:57
• @SolidSnake :) No regrets! 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.

• Wait, isn't $-1$ a square root of $1$? Jan 19, 2016 at 23:58
• @tomasz See my answer Jan 20, 2016 at 0:21
• @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. 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.$$

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