Solution:
First we exclude −1 and 2:
x=2 implies y=2 implies z=2 implies x=2
x=−1 implies y=−1 implies z=−1 implies x=−1
In both these cases we have x+y+z being an integer. So henceforth we assume none of x,y,z are 2 nor −1. Now let x,y,z be the roots of the following cubic equation.
(λ−x)(λ−y)(λ−z)=λ3−Aλ2+Bλ−C.
Applying Viete's formula to this cubic gives us A=x+y+z, B=xy+yz+zx and C=xyz. This means that x2+y2+z2=(x+y+z)2−2(xy+yz+zx)=A2−2B. Now sum the three given equations (x2=y+2 and y2=z+2 and z2=x+2) to get
A2−2B=x2+y2+z2=(y+2)+(z+2)+(x+2)=A+6.
A2−A−2B=6.(1)
Next rearrange the equations to be x2−1=y+1 and y2−1=z+1 and z2−1=x+1. These can then be multiplied to get
(x2−1)(y2−1)(z2−1)=(y+1)(z+1)(x+1)
(x−1)(x+1)(y−1)(y+1)(z−1)(z+1)=(y+1)(z+1)(x+1)
(x−1)(y−1)(z−1)=1
xyz−(xy+yz+zx)+(x+y+z)−1=1
B−A+2=C(2)
In the above algebraic manipulation, we are allowed to cancel the (x+1)(y+1)(z+1) factor because none of x,y,z are equal to −1. Finally rearrange the equations to be x2−4=y−2 and y2−4=z−2 and z2−4=x−2. These can then be multiplied to get
(x2−4)(y2−4)(z2−4)=(y−2)(z−2)(x−2)
(x−2)(x+2)(y−2)(y+2)(z−2)(z+2)=(y−2)(z−2)(x−2)
(x+2)(y+2)(z+2)=1
xyz+2(xy+yz+zx)+4(x+y+z)+8=1
C+2B+4A=−7
C=−4A−2B−7(3)
In the above algebraic manipulation, we are allowed to cancel the (x−2)(y−2)(z−2) factor because none of x,y,z are equal to 2. Combining equations (2) and (3) gives us B−A+2=C=−4A−2B−7 which rearranges to give us B=−A−3. Substituting this into 1 gives us.
A2−A−2B=6
A2−A−2(−A−3)=6
A(A+1)=0.
Therefore A=0 or A=−1 both of which are integers. Since A=x+y+z we are done.
Consider the polynomial P defined by
P(λ)=λ8−8λ6+20λ4−16λ2−λ+2
=(λ+1)(λ−2)(λ3−3λ+1)(λ3+λ2−2λ−1).
If we substitute z=y2−2 into z2=x+2 gives us (y2−2)2=x+2. Then substitute y=x2−2 to get ((x2−2)2−2)2=x+2. Expanding gives
x8−8x6+20x4−16x2−x+2=0.
Therefore x is a root of the polynomial P. By symmetry we must have all of x,y,z being roots of P. Now we consider cases:
Case 1: at least one of x,y,z is equal to −1. Wlog assume x=−1. Using y=x2−2 we get y=−1. Then using z=y2−2 we get z=−1. In this case we get (x,y,z)=(−1,−1,−1) which has sum −3 which is an integer.
Case 2: at least one of x,y,z is equal to 2. Wlog assume x=2. Using y=x2−2 we get y=2. Then using z=y2−2 we get z=2. In this case we get (x,y,z)=(2,2,2) which has sum 6 which is an integer.
Case 3: at least one of x,y,z is a root of (λ3−3λ+1). Wlog assume x3−3x+1=0. Note that z=y2−2=(x2−2)2−2=x4−4x+2. Now consider the sum of x and y=x2−2 and z=x4−4x2+2,
x+y+z=x+(x2−2)+(x4−4x2+2)=x4−3x2+x=(x3−3x+1)x.
But since x3−3x+1=0 this means x+y+z=0 in this case.
Case 4: some two of x,y,z are the same. Wlog assume x=y therefore x=y=x2−2. Hence
0=x2−x−2=(x−2)(x+1).
and so x=−1 or x=2, and this was covered in cases 1 and 2.
Case 5: Since x,y,z are all roots of P, the only remaining possibility is that x,y and z are distinct roots of λ3+λ2−2λ−1. By Viete's formula this means that the sum of the roots is −1 in this case.
In all cases we conclude that x+y+z is an integer.