68

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?

amWhy
  • 210,739
TheLogicGuy
  • 1,036
  • 55
    $x=1$ has a single solution. Squaring, we have $x^2=1,$ which yields as extra solution $x=-1.$ – Lucian Jan 19 '16 at 22:01
  • 24
    The incorrect solution that was introduced when you squared both sides is called an extraneous solution. – N. F. Taussig Jan 19 '16 at 22:06
  • 13
    How did you even get $x=1,x=2$??? I used the quadratic formulae and got $x=1,x=4$ – Simply Beautiful Art Jan 19 '16 at 22:20
  • 14
    In fact $x=2$ is also a wrong solution...it should be $x=4$ – Alex Jan 19 '16 at 22:41
  • 2
    When other people say that you "picked up" a wrong answer when you squared, they are partially right and partially wrong. I think of it more as a restriction of the square root that causes this, not the squaring process itself, as Eric Towers has noticed. More or less, multivalued operations tend to give multiple answers, just as a function may produce the same $y$ value for different $x$ inputs. When this occurs, we may choose to go with one answer as the apparently right answer. – Simply Beautiful Art Jan 19 '16 at 23:09
  • 3
    It's related to the fact that $\sqrt{(-1)^2}\ne-1$. (Indeed, $\sqrt{(-1)^2}=\sqrt1=1$.) – Akiva Weinberger Jan 19 '16 at 23:15
  • @AkivaWeinberger If your interested in $\sqrt{(-1)^2}=-1$, read my answer. – Simply Beautiful Art Jan 19 '16 at 23:49
  • It is in general not true that performing operations on equations preserves their solutions, as a general rule. – gented Jan 20 '16 at 14:26
  • 9
    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 '16 at 18:53
  • @GennaroTedesco, sure it preserves solutions, just not the set of all solutions ;) – Carsten S Jan 22 '16 at 10:22
  • @CarstenS Yes, sure, I should have rephrased it the way you did. – gented Jan 22 '16 at 10:33
  • 2
    Quite generally, when you get a wrong solution as a result of a computation like this, you can usually pinpoint the source of the error by just substituting the wrong value, in this case $x=1$, into each step of the computation. Substituting into the original equation produces a false result ($2-1=-1$); substituting into the final step gives a true result ($1=1$ or $1=4$). Plug $x=1$ into every step and see where the transition from false to true occurs. – Andreas Blass Jan 22 '16 at 19:35
  • Why not just multiply each side by zero and "prove" that the equation is true for all x? – David Schwartz Jun 17 '16 at 22:14

15 Answers15

169

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

Bernard
  • 179,256
  • 21
    To make it blatantly obvious: $ \sqrt x \ge 0 \implies x - 2 \ge 0 \implies x \ge 2 $. – jpmc26 Jan 20 '16 at 22:35
  • 4
    A very insightful thing. I would never take x >=2 seriously when I was in school. – Saikat Jan 21 '16 at 04:36
  • 3
    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" – Frank Shmrank Jan 21 '16 at 14:50
  • @Dean MacGregor: Done! – Bernard Jan 21 '16 at 17:34
  • 6
    @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 '16 at 17:50
  • @corsiKa Hence why I thought there was value in posting it to make it even more obvious. =) I assumed Bernard thought it was sufficiently obvious; otherwise, he would have included it in the answer. – jpmc26 Jan 21 '16 at 17:53
  • 1
    What justifies the honour of a down vote? – Bernard Aug 05 '20 at 15:10
48

Squaring can change the set of solutions

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

Peter
  • 86,576
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$.

Daniel
  • 7,185
23

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.

David K
  • 108,155
13

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. – User Dec 15 '20 at 10:36
  • 3
    @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. – DanielWainfleet Dec 15 '20 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:) – User Dec 15 '20 at 12:02
  • 2
    @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. – DanielWainfleet Dec 15 '20 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. – User Dec 15 '20 at 14:26
11

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$

zz20s
  • 6,852
10

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.

7

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.

Alex
  • 19,395
7

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.

Eric Towers
  • 70,953
4

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

MickG
  • 9,085
4

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.

zyx
  • 36,077
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

Narasimham
  • 42,260
1

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.

0

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

-1

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

anon
  • 332
  • 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$. – Arturo Magidin Mar 13 '23 at 15:56
  • Ah thank you for pointing that out @ArturoMagidin! I just showed a way of understanding why $x = 1$ is not a valid solution. – anon Mar 13 '23 at 15:58
  • 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 – Arturo Magidin Mar 13 '23 at 17:19