I was dealing with this equation today

$ x - k = \sqrt{x^2 + y^2} + \sqrt{(x-a)^2 + y^2}$

Where $a$ and $k$ are constants. I wanted to get rid of the square roots, so I squared the equation. Then I realised that squaring the above equation creates a set of extraneous solutions, so, my question is, is there a way that I can get rid of the extraneous solutions in this equation ? How do I do that ?

Thank you in advance.

  • 3
    $\begingroup$ Plug the solutions in the actual question and see which of them satisfy. $\endgroup$
    – user1012971
    Feb 21, 2022 at 14:34
  • $\begingroup$ My question is, is there a way in which i can modify the above equation, so that I can get rid of the extraneous solutions ? Not just for this example, but how do you extend that for higher degree polynomials ? $\endgroup$ Feb 21, 2022 at 14:35
  • 2
    $\begingroup$ You “get rid” of extraneous solutions by solving equations in a two-step process. First see what numbers are possible solutions and then check which ones work. A standard (incomplete) approach to solving equations in school is to ignore or play down the need for that second step, as if you could prove two sets are equal by showing one is a subset of the other and ignore checking the reverse containment. Another idea to consider is to always check if your algebraic steps are reversible. Failure to be fully attentive to this is part of what leads to the “extraneous solution” concept. $\endgroup$
    – KCd
    Feb 21, 2022 at 14:36
  • $\begingroup$ @KCd could you please take a look at math.stackexchange.com/questions/4387687/divisibility-of-ideals where your write-up is a reference.. Several things seem off, including the possibility that the OP's version of the supervisor's definitions is simply incorrectly recorded. Will $ \; \; \; \; $ $\endgroup$
    – Will Jagy
    Feb 21, 2022 at 23:23
  • $\begingroup$ @WillJagy okay, I did. $\endgroup$
    – KCd
    Feb 23, 2022 at 17:00

2 Answers 2


You need to add condition before squaring.

$$x−k=\sqrt{x^2+y^2}+\sqrt{(x−a)^2+y^2}\Leftrightarrow$$ $$x-k-\sqrt{x^2+y^2}=\sqrt{(x−a)^2+y^2}\Leftrightarrow$$ $$\left(x-k-\sqrt{x^2+y^2}\right)^2=(x−a)^2+y^2 \land x-k-\sqrt{x^2+y^2}\geq 0\Leftrightarrow$$ $$x^2-2kx+k^2+x^2+y^2-2(x-k)\sqrt{x^2+y^2}=x^2-2ax+a^2+y^2 \land \\ x-k\geq\sqrt{x^2+y^2}\Leftrightarrow$$ $$x^2+2(a-k)x+k^2-a^2=2(x-k)\sqrt{x^2+y^2} \land x-k\geq\sqrt{x^2+y^2}\Leftrightarrow$$ $$(x^2+2(a-k)x+k^2-a^2)^2=4(x-k)^2(x^2+y^2) \land x^2+2(a-k)x+k^2-a^2 \geq 0 \land \\ x-k\geq\sqrt{x^2+y^2}$$

You can solve equation and check for inequalities. IMHO, the problem is too hard to solve it generally.

  • $\begingroup$ Thank you very much! $\endgroup$ Feb 22, 2022 at 5:02

Direct answer

You can test each one to see which solutions are 'legitimate' and which solutions are extraneous.

But surely there are there other methods?

There are some methods to filter them out. For example in your case, $x-k > 0$ since it is the sum of two square roots. So the first filter you could apply is $x>k$.

Can you show me an example?

Consider the following.

$\begin{align*}\sqrt{4x+5}&=x \\ 4x+5 &= x^2 \\ x^2-4x-5 &= 0 \\ x &= -1, \, 5 \end{align*}$

We have two conditions. The fact that $x$ is equal to a square root implies $x \geq 0$. But also the inside of the square root must be positive so $x \geq -\dfrac{5}{4}$. The intersection of these two conditions is $x \geq 0$ and so the only valid solution is $x=5$. Thus, we have filtered out the extraneous solution without brute force substituting.

  • $\begingroup$ I think the OP means to ask how to avoid extraneous solutions in the first place, as opposed to having to discard them (filter them out, get rid of them) after having created them. $\endgroup$
    – ryang
    Feb 21, 2022 at 14:50

You must log in to answer this question.

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