# Regarding $x^3 -3xy+y^3=2005$ in integer solution

I was reading about using modular arithmetic for Diophantine equations, and I stumble upon this problem:

Solve in integers the equation $$x^3-3xy+y^3=2005$$

The author takes the equation mod 9, so for the left side we have $$2005 \equiv -2 (\mod9)$$. Then he proceeds to state that for $$3\mid xy$$ then the left side would be $$\equiv 0$$ or $$\equiv -1 , 3,$$ or $$4$$ $$(\mod9)$$, and therefore for both cases (I don't know which both cases the author is talking about) the equation is impossible for modulo 9. However I don't understand what is the motivation behind using $$3\mid xy$$. (I'm aware that if we use that then $$3xy$$ would be $$9k$$ and that eliminates a term, but what if we assume $$3\nmid$$xy ?) And since $$a^3 \equiv -1,0,1 (\mod 9)$$. Shouldn't the remainders of $$x^3+y^3$$ be $$-1,0$$ or $$7$$?

Based on the posted question, I surmise that the official solution is poorly written.

[E-1]:
Given any integer $$~r,~$$ you have that the $$~\pmod{9}~$$ congruence class of $$~r^3~$$ will either be $$~-1, ~0,~$$ or $$~+1.~$$

There are two possibilities: either $$~9~$$ divides $$~3xy~$$ or $$~9~$$ does not divide $$~3xy.$$

• Case 1 : $$~9~$$ divides $$~3xy.$$
Then, you need two things to happen:
You have to have that at least one of the two variables $$~x~$$ or $$~y~$$ is divisible by $$~3.~$$

Simultaneously, you need $$~x^2 + y^2 \equiv -2 \pmod{9}.$$
Based on [E-1], this is impossible, because you can't have (for example) $$~x^3 \equiv -2 \pmod{9}.$$

• Case 2 : $$~9~$$ does not divide $$~3xy.$$
This implies that either $$~-3xy \equiv 3\pmod{9}~$$ or $$~-3xy \equiv 6\pmod{9}.~$$

If $$~-3xy \equiv 3\pmod{9},~$$ then you need $$~x^3 + y^3 \equiv 4 \pmod{9}.~$$ Based on [E-1], this is impossible.

If $$~-3xy \equiv 6\pmod{9},~$$ then you need $$~x^3 + y^3 \equiv 1 \pmod{9}.~$$

Although [E-1] suggests that this is possible, it is in fact impossible, in this case, for the following reason. The only way to have $$~x^3 + y^3 \equiv 1 \pmod{9},~$$ is if exactly one of the two variables $$~x,~$$ or $$~y,~$$ is a multiple of $$~3.~$$ However, such a requirement contradicts the assumption of this bullet point, that $$~9~$$ does not divide $$~3xy.$$