<s>[INST] How to solve system equation $x^3+y^3+z^3=x+y+z, x^2+y^2+z^2=xyz$ for $x,y,z\in\mathbb{R}$? How to solve system equation $\left\{\begin{matrix}x^3+y^3+z^3=x+y+z&\\x^2+y^2+z^2=xyz&\end{matrix}\right.$ , $x,y,z\in\mathbb{R}$ ?
 [/INST] Express all of the terms in terms of the symmetric polynomials $s_1=x+y+z, s_2=xy+yz+zx$ and $s_3=xyz$.
You get $s_1^3-3s_1s_2+3s_3=x^3+y^3+z^3=x+y+z=s_1$ and $s_1^2-2s_2=x^2+y^2+z^2=xyz=s_3$.
Putting the second equation into the first gives $s_1^3-3s_1s_2+3s_1^2-6s_2=s_1$, which simplifies to $s_2=(s_1^3+3s_1^2-s1)/(3s_1+6)$ and $s_3=s_1^2-2s_2$.
Then the solutions to the original equations are the roots of the polynomial $x^3-s_1x^2+s_2x-s_3$ where $s_2$ and $s_3$ are given according to the previous paragraph.
However, for almost all values of $s_1$, 2 of these roots are complex, so these are not real solutions.
In order to get real solutions, you need the discriminant of $x^3-s_1x^2+s_2x-s_3$ to be non-negative. This simplifies to $s_1^2(s_1+2)(648+536s_1+426s_1^2+117s_1^3+12s_1^4-6s1^5-6s1^6+s1^7)$ being non-positive, and the only $s_1$'s for which this is satisfied are $s_1=0$ ($x,y,z=0$) and $-2.16821<=s_1<-2$.
Example non-0 solution are the roots to $100x^3+210x^2-2023x-4487$
</s>