Question 549954
<pre>
Wow! The other tutor didn't solve anything.  I don't know where he got that.
</pre>
The equation x³ + 3xy + y³ = 1 is solved in integers. Find the possible values
of x-y. 
 
x³ + 3xy + y³ - 1 = 0
<pre> 
We must factor that!  That's gonna be tough:

Let's try to factor this in the form:
 
(Ax + By + C)(Dx² + Ey² + Fxy + Gx + Hy + I) = 0
 
where, A,B,C,D,E,F,G,H, and I are all integers
 
Then this must be an identity
 
x³ + 3xy + y³ - 1 = (Ax + By + C)(Dx² + Ey² + Fxy + Gx + Hy + I)  
 
The coefficient of x³ on the left is 1.  
The coefficient of x³ on the right is AD
So AD = 1
 
The coefficient of x² on the left is 0.  (Since there are no terms in x²)  
The coefficient of x² on the right is AG + CD
So AG + CD = 0
 
The coefficient of xy on the left is 3.   
The coefficient of xy on the right is AH + BG + CF
So AH + BG + CF = 3
 
The coefficient of y³ on the left is 1.  
The coefficient of y³ on the right is AD
So BE = 1
 
The coefficient of x on the left is 0.  (Since there are no terms in x)  
The coefficient of x on the right is AI + CG
So AI + CG = 0
 
The coefficient of y on the left is 0.  (Since there are no terms in y)  
The coefficient of y on the right is BI + CH
So BI + CH = 0
 
The constant term on the left is -1,
The constant term on the right is CI
So CI = -1
 
AD = 1
BE = 1
AG + CD = 0
AH + BG + CF = 3
BI + CH = 0
CI = -1
 
All those letters are either 1 or -1. If you make A = 1, then a little 
reasoning tells you all the letters are 1 except C and F, which are -1.
 
So the factorization of your equation is 
 
(Ax + By + C)(Dx² + Ey² + Fxy + Gx + Hy + I) = 0
 
becomes
 
(1x + 1y - 1)(1x² + 1y² - 1xy + 1x + 1y + 1) = 0
 
or 
 
(x + y - 1)(x² - xy + x + y² + y + 1) = 0
 
Whew!  Factoring that sure was hard!

We set each factor equal to 0,
 
Setting the first factor = 0,

               x + y - 1 = 0
                   x + y = 1
 
Setting the second factor = 0,
 
 x² - xy + x + y² + y + 1 = 0

y² + (1-x)y + (x²+x+1) = 0
 
Solving for y:

y = {{{(-b +- sqrt( b^2-4*a*c ))/(2*a) }}} 

y = {{{(-(1-x) +- sqrt( (1-x)^2-4*a*(x^2+x+1) ))/(2*1) }}}


y = {{{(-1+x +- sqrt(1-2x+x^2-4x^2-4x-4))/2 }}}

y = {{{(-1+x +- sqrt(-3x^2-6x-3))/2 }}}
 
y = {{{(-1+x +- sqrt(-3(x^2+2x+1) ))/2 }}}

y = {{{(-1+x +- sqrt(-3(x+1)^2 ))/2 }}}

y = {{{(-1+x +- i*sqrt(3)(x+1))/2 }}}

That will be imaginary unless the i-term
is zero.  So we set it = 0

i*sqrt(3)(x+1) = 0
           x+1 = 0 
             x = -1

Then substituting that 

y = {{{(-1+(-1) +- i*sqrt(3)(-1+1))/2 }}}
   
y = {{{(-1-1 +- 0)/2 }}}

y = {{{(-2)/2}}}

y = -1

So we end up with all solutions

{(x,y) | x + y = 1}  plus the one solution (x,y) = (-1,-1)    

Now if you were asking about x+y instead of x-y, the answer would be

x+y is always either 1 or -2.

Are you sure you didn't make a typo and you were asking about x+y and 
not x-y?  That would have made a more interesting problem.

But since you are asking about x-y, then taking the first solution

x + y = 1

let x = integer n:

n + y = 1 

    y = 1 - n

So all those solutions are (x,y) = (n,1-n) 
   
So x-y = n-(1-n) = n-1+n = 2n-1, which can represent any odd number.

So x-y can be any odd number or the one even number 0 when

(x,y) = (-1,-1), for then x-y will be (-1)-(-1) = 0.

Answer:  

x-y can be any odd number or 0.

but x+y can only be 1 or -2

Edwin</pre>