Ok, this is really easy and it's getting me crazy because I forgot nearly everything I knew about maths!

I've been trying to solve this equation and I can't seem to find a way out. I need to find out when the following equation is valid:

$$\frac{1}{x} - \frac{1}{y} = \frac{1}{x-y}$$

Well, $x \not= 0$, $y \not= 0$, and $x \not= y$ but that's not enough I suppose.

The first thing I did was passing everything to the left side: $$\frac{x-y}{x} - \frac{x-y}{y} - 1 = 0$$

Removing the fraction: $$xy - y² - x² + xy - xy = 0xy$$

But then I get stuck.. $$- y² - x² + xy = 0$$

How can I know when the above function is valid?

  • 2
    $\begingroup$ You have a sign error in your last line. Correct it and solve for $y$, take out the factor of $x$, and decide whether you are working with real or complex numbers. $\endgroup$ – Henry Feb 20 '12 at 23:36
  • $\begingroup$ only real numbers $\endgroup$ – Schiavini Feb 20 '12 at 23:41

Your work goes a long way towards the answer. I will assume that you are looking for solutions in real numbers $x$ and $y$. You want to solve $x^2-xy+y^2=0$. Note that $$x^2-xy+y^2=\left(x-\frac{y}{2}\right)^2 +\frac{3}{4}y^2.\qquad(\ast)$$ The above result is easy to verify by expanding the right-hand side. But it was not obtained by magic: It is a standard application of the powerful idea usually called Completing the Square. You have undoubtedly met this idea earlier in other contexts.

On the right-hand side of $(\ast)$ we have a square, namely $\left(x-\frac{y}{2}\right)^2$, plus $3/4$ of $y^2$. The square of the real number $y$ is always $\ge 0$. So the only way we can satisfy the equation $x^2-xy+y^2=0$ is by taking $y=0$ and $x-y/2=0$, meaning that $x=0$. These values are, as you pointed out, forbidden, so the original equation has no real solutions.

Remark: Through unhappy experiences, I have somewhat of an aversion to fractions, so would prefer to say that the equation $x^2-xy+y^2=0$ is equivalent to $4x^2-4xy+4y^2=0$. But $$4x^2-4xy+4y^2=(2x-y)^2+3y^2.$$ Or else, if we feel bad about breaking symmetry, we can avoid completing the square, and instead note that $$2x^2-2xy+2y^2=(x-y)^2+x^2+y^2.$$ Again, we have a sum of squares on the right, and this can be $0$ only if $x$, $y$ (and therefore $x-y$) are all $0$.

Much more mechanically, we can use the Quadratic Formula. For any fixed $y$, the solutions of $x^2-xy+y^2=0$ are $$x=\frac{y \pm\sqrt{-3y^2}}{2}.$$ If $y\ne 0$, the number under the square root sign is negative, and therefore $\sqrt{-3y^2}$ is not a real number, so $x$ is not a real number.

  • $\begingroup$ An $x$ went missing in the first inline equation. Probably a Typo. $\endgroup$ – user21436 Feb 20 '12 at 23:44
  • 1
    $\begingroup$ @Kannappan Sampath: Thank you, I found the $x$ that had gone AWOL, and persuaded it to return to duty. $\endgroup$ – André Nicolas Feb 20 '12 at 23:47
  • $\begingroup$ it does solve the problem, thanks a lot! +1 :) i did expect a different kind of solution. Is this the only way? $\endgroup$ – Schiavini Feb 21 '12 at 0:03
  • 1
    $\begingroup$ @Schiavini: I added at the end a solution I don't like as well, but that may look simpler to you, if you are familiar with the Quadratic Formula. That formula is actually obtained by completing the square, so in principle using it is harder, not easier. But it may look easier to you if you have memorized the formula. $\endgroup$ – André Nicolas Feb 21 '12 at 0:16
  • $\begingroup$ @Schiavini: You are welcome. You will see completing the square come up in fancy disguises in various branches of mathematics. $\endgroup$ – André Nicolas Feb 21 '12 at 7:05

$y=x\left(\dfrac{1 \pm\sqrt{-3}}{2}\right)$, combined with $0 \not = y\not =x\not = 0$, answers the question "when the following equation is valid". The first statement is equivalent to $x=y\left(\dfrac{1 \mp \sqrt{-3}}{2}\right)$.

It is valid for all pairs of complex numbers with this property; it is not valid for any pair of real numbers.


$x^2-xy+y^2=(x+jy)(x+j^2y)$ so $x=y(1+\sqrt{-3})/2$

  • 1
    $\begingroup$ Welcome to Math.SE! If you plan to participate, the in-house MathJax Tutorial and Quick Reference may be a handy place to get started with posting and editing math formulas. Often a one-line Answer as you've given requires some additional words to make the solution clear for future Readers. $\endgroup$ – hardmath Oct 17 '14 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.