2. Let $x, y$ be real numbers such that

$$
x^{2}+y^{2}=2 \text{ and }\left(x^{3}+y^{3}\right)^{2}=8
$$

Calculate the value of the expression $x^{4}+y^{4}$.
Solution. We have:

$$
\begin{aligned}
& 8=\left(x^{2}+y^{2}\right)^{3}=x^{6}+y^{6}+3 x^{2} y^{2}\left(x^{2}+y^{2}\right)=x^{6}+y^{6}+6 x^{2} y^{2} \\
& 8=\left(x^{3}+y^{3}\right)^{2}=x^{6}+y^{6}+2 x^{3} y^{3}
\end{aligned}
$$

so

$$
6 x^{2} y^{2}-2 x^{3} y^{3}=0
$$

or

$$
x^{2} y^{2}(3-x y)=0
$$

If $x=0$, then $y^{2}=2$, so $x^{4}+y^{4}=0+2^{2}=4$.

If $y=0$, then $x^{2}=2$, so $x^{4}+y^{4}=2^{2}+0=4$.

If $3-x y=0$, then

$$
(x-y)^{2}=x^{2}+y^{2}-2 x y=2-2 \cdot 3=-4<0
$$

which is a contradiction.

Finally, from the above considerations, it follows that $x^{4}+y^{4}=4$.