<s>[INST] Finding $x+y$, given $xy= 1$, $x^2+y^2=5$, $x^3+y^3=8$ This problem is from a math competition, but I think is wrong:

Find the value of $x+y$ if:
$$\begin{align}
xy &= 1 \\ 
x^2 + y^2 &= 5 \\ 
x^3+y^3 &= 8
\end{align}$$

Solution (I think is wrong):
$x^3 + y^3 = (x + y)(x^2-xy+y^2) = (x+y)(5-1) = 4(x+y)$
So we have:
$x^3+y^3 = 4(x+y)$
$x^3+y^3 = 8$
Then:
$8 = 4(x+y)$
$x+y = 2$
However if we replace that value in $(x+y)^2$ we have:
$(x+y)^2 = 2^2 =4$
$(x+y)^2 = x^2+y^2+2xy = 5 + 2 = 7$
As you can see $4 \neq 7$, what is happening?
 [/INST] Let us call $a := x + y$ and $b := xy$. Then the proposed system of equations is equivalent to
\begin{align*}
\begin{cases}
b = 1\\\\
a^{2} - 2b = 5\\\\
a^{3} - 3ab = 8
\end{cases} \Longleftrightarrow
\begin{cases}
b = 1\\\\
a^{2} = 7\\\\
a^{3} - 3a = 8
\end{cases} & \Longleftrightarrow
\begin{cases}
b = 1\\\\
a = \pm\sqrt{7}\\\\
a = 2
\end{cases}
\end{align*}
which clearly has no solutions. I think this answers your question about what is happening.
Hopefully this helps!
</s>