5

The problem is as follows:

Let $x$ and $y$ integers which satisfy the following equations: $$x+y-\sqrt{xy}=7$$ $$x^2+y^2+xy=133$$ Find the value of $\;|x-y|.$

I'm stuck on this problem due the fact that there appears a square root of $xy$ and the squares of both $x$ and $y$, hence the system cannot be solved using the regular methods. Moreover I don't know how to approach the absolute value.

The answer which would help me the most is one which addresses some theoretical basis about absolute value and steps which would led me to find $x$ and $y$.

amWhy
  • 209,954
  • https://math.stackexchange.com/help/how-to-ask, https://math.meta.stackexchange.com/questions/1803/how-to-ask-a-homework-question?s=1|146.8702 – amWhy Dec 18 '17 at 20:57
  • @amWhy Personally I don't mind my post to be "improved" to fit stack standards. It helps me to address betters questions in the future and also to learn about how to make them more valuable but these constant edits make me to believe that there is some kind of war going on. Moreover by looking at the history of edits there is no clear explanation on the reason why is changed each time. – Chris Steinbeck Bell Dec 18 '17 at 20:58
  • 2
    @ChrisSteinbeckBell some theoretical basis One clue (which I used in my answer) is that both the equations and the required value are symmetric in $x,y$. When that's the case, often times it helps to work in terms of the elementary symmetric polynomials, instead, in this case $x+y$ and $xy$. – dxiv Dec 18 '17 at 21:01
  • @dxiv I appreciate your effort to explain about symmetric polynomial but the article in Wikipedia is rather wordy and its length and explanations are intimidating to me. Do you happen to know other source which could use more layman terms?. – Chris Steinbeck Bell Dec 18 '17 at 21:07
  • @ChrisSteinbeckBell You could look here or there as well. Also, you can recognize that the elementary symmetric polynomials are related to Vieta's formulas, which you are likely familiar with. – dxiv Dec 18 '17 at 22:03
  • @dxiv Vieta's formulas it is something which I was not aware. They seem to resemble to symmetrical polynomials as you pointed out. However I found it easier to understand by reading at the articles itself. – Chris Steinbeck Bell Dec 18 '17 at 22:28

3 Answers3

11

Notice that

$$\color{blue}{x^2+y^2+xy}=(x+y)^2-xy=(\color{red}{x+y-\sqrt{xy}})(\color{green}{x+y+\sqrt{xy}})$$ so that $$\color{green}{x+y+\sqrt{xy}}=\frac{\color{blue}{133}}{\color{red}{7}}=\color{magenta}{19}.$$

Then by half sum and half difference,

$$x+y=\frac{\color{magenta}{19}+\color{red}7}2=13,\\\sqrt{xy}=\frac{\color{magenta}{19}-\color{red}7}2=6.$$

Finally,

$$|x-y|=\sqrt{(x-y)^2}=\sqrt{(x+y)^2-4xy}=\sqrt{13^2-6^2}=5.$$

This is the only solution.

  • Can you add more steps in the final lines. I'm lost at where does the value of five comes from. – Chris Steinbeck Bell Dec 18 '17 at 21:31
  • 2
    The half sum and half difference thing you mentioned would you add an step there as I dont get the picture of what were you trying to explain. – Chris Steinbeck Bell Dec 18 '17 at 21:51
  • @ChrisSteinbeckBell: hint: when you know the values of $a+b$ and $a-b$. –  Dec 19 '17 at 11:16
  • Probably what you meant is that we know the values of $x+y$ and $\sqrt{xy}$ and all that was left to do is just build up a system of equations of $2\times2$ and by solving this system we get to those answers. The final step is not very obvious but what you did was to "factorize" the sum of squares therefore $(x+y)^2-4xy$. I think you should have added a step between those two and more importantly be more wordy in explanations as to decipher from the equations is not very clear. – Chris Steinbeck Bell Dec 19 '17 at 13:39
  • @ChrisSteinbeckBell: I added a little colors. –  Dec 19 '17 at 14:05
  • Thanks but I think you missunderstood what I meant. Maybe you should have added $\sqrt{(x-y)^2}=x^2+y^2-2xy=\sqrt{(x^2+y^2+2xy)-2xy-2xy}=\sqrt{(x+y)^2-4xy}$ and that final line is what should had been colorized the things between brackets and the $-4xy$. This is what I had problems with until I found what you meant. Mind you adding this?. :) – Chris Steinbeck Bell Dec 19 '17 at 20:20
  • @ChrisSteinbeckBell: I believe that things are already quite explicit like this. –  Dec 19 '17 at 20:28
  • Probably but not for everyone. Because to transform a difference of squares into a sum of squares should be stated unless somebody has enough experience solving this and could catch up the idea. – Chris Steinbeck Bell Dec 19 '17 at 21:00
4

Hint: let $s=x+y, p=xy$ then the system writes as:

$$ s-\sqrt{p} = 7 \\ s^2-p = 133 $$

Solving gives $s=13, p=36$ so $x, y$ are the roots of $z^2-13z+36=0$, and the absolute value of the difference between the roots of a quadratic is $\sqrt{\Delta}/|a|$.

dxiv
  • 76,497
  • By solving the quadratic equation luckily the discriminant has an exact answer and therefore the solutions are $9$ or $4$, which would be the values of $z$ in your equation but since the difference is taken by absolute value that would be $5$ right?. – Chris Steinbeck Bell Dec 18 '17 at 21:21
  • 1
    That's correct. You don't actually need to calculate the roots, the difference is $\sqrt{\Delta}/|a|=\sqrt{25}/1=5,$. – dxiv Dec 18 '17 at 21:24
  • The last part where you mention the difference between the roots of a quadratic is the square root of the discriminant divided by the absolute value of a, this part is where I'm stuck at. Mind if you could prove that?. – Chris Steinbeck Bell Dec 18 '17 at 21:28
  • 1
    @ChrisSteinbeckBell By the quadratic formula the roots of $az^2+bz+c=0$ are $\frac{-a \pm \sqrt{\Delta}}{2a},$, so their difference is $,\require{cancel} \frac{\bcancel{-a}+\sqrt{\Delta}}{2a} - \frac{\bcancel{-a}-\sqrt{\Delta}}{2a} = \frac{\cancel{2} \sqrt{\Delta}}{\cancel{2}a} = \frac{\sqrt{\Delta}}{a},$. – dxiv Dec 18 '17 at 21:52
  • But where does the absolute value in the denominator come from?.Moreover the question asks about the difference between $x$ and $y$ not the difference of the roots. That's why I am confused on why to finding the values of each one is not necessary?. If you could prove that the difference between $x$ and $y$ is equal to the difference of the roots you mentioned that would be helpful. – Chris Steinbeck Bell Dec 18 '17 at 21:56
  • @ChrisSteinbeckBell If you prefer $(x-y)^2=(x+y)^2 - 4xy=s^2-4p=13^2-4\cdot36=25,$. This is in fact entirely equivalent to the other formula using the discriminant. The absolute value turns up because you are not looking for the difference itself, but its absolute value. – dxiv Dec 18 '17 at 22:00
  • At this point my biggest question is Why $\sqrt{(x-y)^2}=|a|=5$? it is clear about the $5$ but the absolute value thing is where I'm lost at. – Chris Steinbeck Bell Dec 18 '17 at 22:19
  • @ChrisSteinbeckBell $\sqrt{(x-y)^2}=|x-y|,$ for all real $x,y$ since the real square root function $\sqrt{,\cdot,}$ is defined as returning the positive root. Or maybe I misunderstand what you meant. – dxiv Dec 18 '17 at 22:24
  • I was confused at the definition of the absolute value. Generally if you take the square root of anything I did not mind what it was inside, let's say if it was a negative the result would be a complex number and if it was a positive the result would be real. But when you say that the result of taking the square root of an squared quantity the result is its absolute value not just the value alone. – Chris Steinbeck Bell Dec 18 '17 at 22:36
  • @ChrisSteinbeckBell In this case the discriminant $\Delta$ has been determined to be a positive real, so the square root will also be a positive real. The identity $\sqrt{t^2} = |t|$ holds for all real numbers $t$ and the absolute value on the RHS is necessary in case $t$ happens to be negative, for example $\sqrt{(-1)^2}=|-1|=1,$. – dxiv Dec 18 '17 at 22:43
  • I was not taking into consideration the identity you mentioned but by reviewing this in my book it is one of the four properties of absolute value, which I had already forgotten. Thanks for explaining it. – Chris Steinbeck Bell Dec 18 '17 at 22:49
3

Let $a=x+y,b=\sqrt{xy}$. The two given equations can be rewritten as $a-b=7$ and $a^2-b^2=133$. As $a^2-b^2=(a+b)(a-b)$, $a+b=133/7=19$, so $a=(19+7)/2=13$ and $b=(19-7)/2=6$. Thus, $x+y=13$ and $xy=36$. $$|x-y|^2=(x+y)^2-4xy=13^2-4(36)=13^2-12^2=13+12=25=5^2,$$ so $|x-y|=5$.