2. For real numbers $x$ and $y$, the following holds:

$$
x^{3}+x^{2}+x y+x+y+2=0 \quad \text { and } \quad y^{3}-y^{2}+3 y-x=0
$$

Determine the value of the expression $x-y$.
I/2. 1. method. We subtract the equations to get

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

We rearrange the left side

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

Since $x^{2}+x y+y^{2}+2=\frac{1}{2}\left(x^{2}+(x+y)^{2}+y^{2}\right)+2>0$, it must be that $x-y+1=0$. The value of the expression $x-y$ is -1.

2. method. From the second equation, we express $x=y^{3}-y^{2}+3 y$ and substitute it into the first equation and simplify to get

$$
y^{9}-3 y^{8}+12 y^{7}-18 y^{6}+34 y^{5}-19 y^{4}+21 y^{3}+11 y^{2}+4 y+2=0
$$

With considerable skill, we can factor the left side of the equation

$$
\left(y^{3}-y^{2}+2 y+1\right)\left(y^{6}-2 y^{5}+8 y^{4}-7 y^{3}+13 y^{2}+2\right)=0
$$

Since

$$
\begin{aligned}
y^{6}-2 y^{5}+8 y^{4}-7 y^{3}+13 y^{2}+2 & =y^{4}\left(y^{2}-2 y+1\right)+7 y^{2}\left(y^{2}-y+\frac{1}{4}\right)+\frac{45}{4} y^{2}+2= \\
& =y^{4}(y-1)^{2}+7 y^{2}\left(y-\frac{1}{2}\right)^{2}+\frac{45}{4} y^{2}+2>0
\end{aligned}
$$

it must be that $y^{3}-y^{2}+2 y+1=0$ or $y=y^{3}-y^{2}+3 y+1$. Therefore,

$$
x-y=\left(y^{3}-y^{2}+3 y\right)-\left(y^{3}-y^{2}+3 y+1\right)=-1 \text{. }
$$

## 1. method:

Subtracting the equations $\qquad$ $x-y=-1$ 1 point

2. method:

Polynomial in one variable