$x \cdot y$ is an integer and $x - y$ is an integer. Do $x$ and $y$ both have to be integers?

If $p=xy$ and $d=x-y$ are these integers, then $x$ and $-y$ are the solutions of $$ X^2-dX-p=0.$$ These are rational (and, by the rational root theorem, automatically integer!) if and only if the discriminant $d^2+4p$ is a perfect square.


Take $x=y=\sqrt2$.${}{}{}{}{}{}$


Assume that x and y (are different) are both not integers. We use the canonical representation of real numbers as decimal fractions. Then both have a nontrivial fractional part and with are canonical multiplication on R we find that this number can never be an integer. If one of the two is no integer we can assume that x*y is an integer, but their subtraction can never be (as they have a nontrivial decimal fractional part and the other has not). Vice versa is never possible. The only cases are shown below but x and y then have to be the same number.

(This is a "non-formal" proof but you can sketch it more precisely)

Tags:

Integers