6

Problem statement : Let $x,y$ be integers, show that if $xy$ divides $x^2 + y^2$ then $x=\pm y.$

What I have tried:

I can reduce this to the case where $\gcd(x,y)=1$, since if $x$ and $y$ have a common factor, $d$ say, then $d^2$ divides through both $xy$ and $x^2 + y^2$

This then allows me to introduce another equation $1=ax+by$ for some $a, b.$

But I then get stuck ...

user3203476
  • 1,753

5 Answers5

4

It makes little sense if either of $x,y$ is zero.

I will continue with $x,y \neq 0.$

If $x^2 + y^2 = kxy$ for nonzero integer $k,$ we have $$ x^2 - k xy + y^2 = 0 $$ We are taking $y \neq 0,$ so we may divide through by $y^2,$ define $r = \frac{x}{y},$ giving $$ r^2 - kr + 1 = 0 $$ with integer $k$ and rational $r.$

So: what are the roots $r$ of $$ r^2 - kr + 1 = 0 \; ? \; $$ Can the roots actually be rational? For what values of $k$ can the roots be rational?

Will Jagy
  • 139,541
  • Thank you. My text (The Mathematical Ollympiad handbook - A. Gardiner) recommends avoiding introducing rationals if possible, which is why i will accept the alternative answer. – user3203476 Dec 19 '18 at 04:44
  • You ought to have included that in the main body of the question, @user3203476. – Shaun Dec 19 '18 at 05:09
  • @user3203476 That's not a wise recommendation in this case. The Rational Root Test is a fundamental result in number theory and algebra and its use should be encouraged, not discouraged. – Bill Dubuque Dec 21 '18 at 03:42
3

Suppose that $\gcd(x,y)=1$ and $(xy)\mid(x^2+y^2)$. Then $y^2\equiv0\pmod x$. If $1=ax+by$ then $by\equiv1\pmod x$ and so $1\equiv(by)^2=b^2y^2\equiv0\pmod x$. So $x=\pm1$. Likewise, $y=\pm1$.

Angina Seng
  • 158,341
3

Suppose $xy|x^2+y^2$. Then $xy|x^2+y^2+2xy=(x+y)^2$. But if $\gcd(x,y)=1$, then also $$ 1=\gcd(x,x+y)=\gcd(y,x+y)=\gcd(xy,x+y)=\gcd(xy,(x+y)^2) $$ from which it then follows that $xy=\pm 1$.

Micah
  • 38,108
  • 15
  • 85
  • 133
2

If $(x,y)=d,$ and $\dfrac xX=\dfrac yY=d$ so that $(X,Y)=1$

So, we need $XY$ to divide $X^2+Y^2$

$\implies X|(X^2+Y^2)\iff X|Y^2$ with $(X,Y)=1$ which is possible only if $X=\pm1$

Similarly $Y=\pm1$

2

Rational Algebraic Integer Approach

Suppose that $$ \frac{x^2+y^2}{xy}=\frac xy+\frac yx\in\mathbb{Z}\tag1 $$ Note that if $q=\frac xy\in\mathbb{Q}$ and $q+\frac1q=n\in\mathbb{Z}$, then $$ \left(q-\frac1q\right)^2=n^2-4\in\mathbb{Z}\tag2 $$ This means that $z=q-\frac1q$ is a rational solution to $z^2-(n^2-4)=0$; that is, $z$ is a rational algebraic integer. Thus, $z\in\mathbb{Z}$ (see this answer). Therefore, $(n+z)(n-z)=4$ is an integer factorization of $4$ where both factors have the same parity. That is, $n+z=n-z=\pm2$, which means $n=\pm2$ and $q-\frac1q=z=0$. Thus, $\frac{x^2}{y^2}=q^2=1$, and therefore, $x=\pm y$.


Bezout Approach

Let $d=(x,y)$ and $u=x/d$ and $v=y/d$. Then, there exist $a,b$ so that $au+bv=1$. Suppose that $$ \begin{align} n &=\frac{x^2+y^2}{xy}\\ &=\frac{u^2+v^2}{uv}\\ &=\frac{b^2u^2+(1-au)^2}{bu(1-au)}\\ &=\frac{\left(a^2+b^2\right)u^2-2au+1}{bu-abu^2}\tag3 \end{align} $$ Then $$ \frac1u=n(b-abu)+2a-\left(a^2+b^2\right)u\in\mathbb{Z}\tag4 $$ Thus, $u\cdot\frac1u=1$ is an integral factorization of $1$. That is, $u=\pm1$. Similarly, $v=\pm1$.

Therefore, $x=\pm d$ and $y=\pm d$, which means that $x=\pm y$.

robjohn
  • 345,667