<s>[INST] Solving two simultaneous equations Suppose that $x$, $y$ and $z$ are three integers (positive,negative or zero)  such that we get the following relationships simultaneously


*

*$x + y = 1 - z$ and   

*$x^3 + y^3= 1 - z^2$


Find all such $x$, $y$ and $z$.
I have tried to determine the values of $x$ and $y$ by fixing some values of $z$ but it is obvious that this method will not work. I also tried to determine the bounds of $x$ and $y$ and the related terms like $xy$ and ($x$$2$ +$y$$2$) but this this method failed as well. What then is the way out?
 [/INST] If $z = 1$, then $y = -x$, and all triples $(x,-x,1)$ are solutions. So let's suppose $z \neq 1$. Then we can divide
$$x^2 - xy + y^2 = \frac{x^3+y^3}{x+y} = \frac{1-z^2}{1-z} = 1+z. \tag{3}$$
Adding $(3)$ to $(1)$ yields
$$x^2 - xy + y^2 + x + y = 2.$$
Multiplying by $2$ and adding $2$ to both sides yields
$$\begin{align}
6 &= 2x^2 - 2xy + 2y^2 + 2x +2y + 2\\
&= (x^2 -2xy+y^2) + (x^2+2x+1) + (y^2+2y+1)\\
&= (x-y)^2 + (x+1)^2 + (y+1)^2.
\end{align}$$
There aren't many combinations of $x$ and $y$ left to check.
</s>