1

I was presented with this problem: $$x,y \in \mathbb{Z}$$ $$k = \frac{x}{y} + \frac{y}{x}$$ $$\text{Prove that if } k \in \mathbb{Z}\text{, then } k = 2.$$ I began by rewriting the equation. $$k = \frac{x^2 + y^2}{xy}$$ I then reasoned that if k is an integer, then $$x^2 + y^2 = nxy$$ where $n \in \mathbb{Z}$. I continued to rewrite this to find some relation. $$x^2 - nxy + y^2 = 0$$ $$x^2 - 2xy + y^2 = (n-2)xy$$ $$(x-y)^2 = (n-2)xy$$ I figured this proved that $(n-2)xy \in \mathbb{Z}^2$, but I'm not sure how to use this fact to help me.

Kirk Fox
  • 1,272
  • Well, you could have $k=-2$, too :-) Write $u=x/y$, so you have $u+1/u=k$ or $$u^2-ku+1=0.$$ The discriminant of that quadratic is $k^2-4$. To get a rational solution $u$, you need $k^2-4$ to be the square of an integer. But, $k^2-4$ is too close to a square to be a square when $k>2$ (or when $k<-2$). – Jyrki Lahtonen Apr 18 '18 at 04:50
  • The result of you correct calculations is that $(n-2)xy=0 ⇒ n=k=0$ whether k is integer or no integer. – sirous Apr 18 '18 at 04:50
  • Anyway, this is an oldie. I think we must have a much older incarnation of this question, but I will go with that dupe target for now. Several good answers there. – Jyrki Lahtonen Apr 18 '18 at 04:56
  • Alternative. if $k$ is integer then $k - \frac xy = \frac {ky - x}y = \frac yx$. As $x$ and $y$ are potential denominators of the same fraction they can't be relatively prime unless they are both equal to $1$. And wolog when considering $\frac xy$ and $\frac yx$ we might as well assume the are relatively prime as all common factors factor out. – fleablood Apr 18 '18 at 05:32

1 Answers1

1

Suppose that $\gcd(x,y)=d$ and $x=dx_0$, $y=dy_0$. Then $\gcd(x_0,y_0)=1$ and

$$k=\frac{x_0}{y_o}+\frac{y_0}{x_0}$$

\begin{align*} (x_0-y_0)^2=(k-2)x_0y_0 \end{align*}

Suppose that $x_0>1$. Let $p$ be a prime factor of $x_0$, then $x_0$ is a prime factor of $(x_0-y_0)^2$ and hence is a prime factor of $x_0-y_0$. Therefore, $p$ is a prime factor of $y_0$. This leads to a contradiction.

Therefore, $x_0=1$. Skimilarly, $y_0=1$.

$k=2$.

CY Aries
  • 23,393