# If $x^3+y^2$ and $x^2+y^3$ are integers, show that $x$, $y$ are integers

Given rational numbers $$x$$, $$y$$ such that $$x^3+y^2$$ and $$x^2+y^3$$ are integers, prove that $$x$$, $$y$$ are integers.

For this problem I don't even know how to start tackling it. I tried various ways:

• Letting $$x = \frac{a}{b}$$, $$y = \frac{c}{d}$$, which only makes it more complicated
• Doing operations on them: $$x^3+y^2+x^2+y^3=x^2(x+1)+y^2(y+1)$$, which I have no idea how to continue;

$$(x^3+y^2)(x^2+y^3)=x^5+y^5+x^3y^3+x^2y^2$$, and it's also probably too complex to break down

$$x^3+y^2-x^2-y^3=(x-y)(x^2+xy+y^2)+(y-x)(x+y)$$ seems more plausible, but I also can't do anything with this.

I would really appreciate any way of tackling this problem, because I have spent a while thinking about this problem.

EDIT: I have found a solution to this problem (this was edited 2 days after this was posted, so there were also answers before this):

Suppose $$x = \frac{a}{b}$$, $$y = \frac{c}{d}$$ in which $$a$$, $$b$$, $$c$$, $$d$$ are integers and $$\gcd(a,b) = \gcd(c,d) = 1$$. Then we have $$x^2+y^3=\frac{a^2}{b^2}+\frac{c^3}{d^3}=\frac{a^2d^3+b^2c^3}{b^2d^3}$$, so:

$$b^2|a^2d^3+b^2c^3$$, which means $$b^2|a^2d^3$$, and $$\gcd(a,b)=1$$ so $$b^2|d^3$$, and

$$d^3|a^2d^3+b^2c^3$$, which means $$d^3|b^2$$, so $$b^2=d^3$$.

Doing the same to $$x^3+y^2$$, we get $$b^3=d^2$$. From that we get $$b^5=d^5$$, so $$b=d$$. Substituting to $$b^2=d^3$$, we get $$b^2=b^3$$, hence $$b=d=1$$, which implies that $$x$$ and $$y$$ are integers.

• You can also consider posting your solution as an answer. Answering your own question is allowed and appreciated on this site. $\ddot\smile$ Commented Aug 20, 2021 at 18:14

Let $$x^3+y^2=a$$ and $$x^2+y^3=b$$, where $$a,b \in\mathbb Z$$, then we have

$$(a-x^3)^3=(b-x^2)^2 \\ x^9-3ax^6+x^4+3a^2x^3-2bx^2-(a^3-b^2)=0$$

and

$$(a-y^2)^2=(b-y^3)^3\\ y^9-3by^6+y^4+3b^2y^3-2ay^2+(a^2-b^3)=0.$$

Then the Rational root theorem immediately tells us $$x \mid a^3-b^2$$ and $$y \mid a^2-b^3$$. This means $$x,y\in\mathbb Z.$$

• Nice! ${}{}{}{}$ Commented Aug 17, 2021 at 18:53
• Great solution! That's not the one I expected since this is supposed to be for 14 year olds, but I have understood it and it's really nice
– Hai
Commented Aug 17, 2021 at 19:07
• Wow! Side note: rational root theorem is just Gauss' theorem (If a polynomial is irreducible in a P.I.D. then it is irreducible in the field of fractions of the P.I.D. as well) . Commented Aug 23, 2021 at 8:39

Valuations to the rescue.

Hint: Assume that at least one of $$x,y$$ is not an integer. Let $$p$$ be a prime factor appearing in one of the denominators. Without loss of generality we can assume that $$p$$ appears in the denominator of $$x$$ to at least as high a power than in the denominator of $$y$$ (otherwise swap their roles in what follows). Show that this implies that $$p^3$$ is a factor of the denominator of $$x^3+y^2$$.

• Basically an extension of the observation: If $a,b$ are integers, $a$ odd, then $a/8+b/4$ has denominator $8$. Commented Aug 17, 2021 at 18:44

Suppose $$x=a/d$$ and $$y=b/d$$ with $$d\gt0$$ and $$\gcd(a,b,d)=1$$ (i.e., write $$x$$ and $$y$$ with the smallest possible common denominator). Then $$x^2+y^3=m$$ implies $$b^3=(md^2-a^2)d$$, which implies $$d\mid b^3$$. Likewise, $$x^3+y^2=n$$ implies $$d\mid a^3$$. Thus

$$0\lt d=\gcd(a^3,b^3,d)\le\gcd(a^3,b^3,d^3)=(\gcd(a,b,d))^3=1^3=1$$

hence $$d=1$$, and so $$x$$ and $$y$$ are integers.

• Hello, Teacher $\ddot\smile$. Can I ask a question? Why, we write $x=\frac ad, y=\frac bd$? I mean, why the denominators are equal to the same $d$? For example, we can take $x=\frac 53, y=\frac 74$ and $3≠4$. Can you explain me this step? Thank you. Commented Aug 19, 2021 at 16:01
• @lonestudent, I'm writing the fractions with their least common denominator, so I would express $5/3$ and $7/4$ as $20/12$ and $21/12$, where $\gcd(20,21,12)=1$. Commented Aug 19, 2021 at 16:04
• Thank you for your explanation. I think, I understand. Commented Aug 19, 2021 at 16:31