# Why do I get one extra wrong solution?

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 $1$ is not a correect 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.$ – Lucian Jan 19 at 22:01
The incorrect solution that was introduced when you squared both sides is called an extraneous solution. – N. F. Taussig Jan 19 at 22:06
How did you even get $x=1,x=2$??? I used the quadratic formulae and got $x=1,x=4$ – Simple Art Jan 19 at 22:20
In fact $x=2$ is also a wrong solution...it should be $x=4$ – Alex Jan 19 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. – anomaly Jan 20 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$. – jpmc26 Jan 20 at 22:35
A very insightful thing. I would never take x >=2 seriously when I was in school. – user230452 Jan 21 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" – Dean MacGregor Jan 21 at 14:50
@Dean MacGregor: Done! – Bernard Jan 21 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. – corsiKa Jan 21 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. – Bernard Jan 20 at 22:39
In fact by squaring we have changed the original function which now has larger range set. – CodeYogi Mar 16 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 = 2$. 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.

-

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. – Solid Snake Jan 19 at 22:30
No one saw what? – zz20s Jan 19 at 22:35
Sorry for not clarifying. No one saw the mistake with the root $x=2$. – Solid Snake Jan 19 at 22:38
No problem. I just thought that I'd point it out for the OP, in addition to answering their question. – zz20s Jan 19 at 22:43
@SolidSnake I saw it. – Simple Art Jan 19 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 ;) – Solid Snake Jan 19 at 22:57
@SolidSnake :) No regrets! – Simple Art Jan 19 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$? – tomasz Jan 19 at 23:58
@tomasz See my answer – Simple Art Jan 20 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. – Eric Towers Jan 20 at 6:01

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

-

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

you can expect the solution of

$$2-x=+\sqrt{x}$$

intruding as well... as a mirror solution.

-
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 1, "equation": 0, "x-ck12": 0, "texerror": 0}