$f(x)=x^{3}-3 x+a$. Given that it has $3$ integer roots $\alpha, \beta, \gamma$. Find all possible values of $a$. So, I tried vieta and with some algebra, I got to the point $0=\alpha^{2}+\beta^{2}+\gamma^{2}+2(\alpha \gamma+\gamma \beta+\alpha \beta)$ where $(\alpha \gamma+\gamma \beta+\alpha \beta)=a$. I don't know how to progress from here

$$f(x) = (x - \alpha)(x - \beta)(x - \gamma) = x^3 - 3x + a$$
$$f(x) = x^3 - (\alpha + \beta + \gamma)x^2 + (\alpha\beta + \alpha\gamma + \beta\gamma)x - \alpha\beta\gamma = x^3 - 3x + a$$
Matching up the coefficients gives you the system of equations:
$$\alpha + \beta + \gamma = 0$$
$$\alpha\beta + \alpha\gamma + \beta\gamma = -3$$
$$\alpha\beta\gamma = -a$$
From the first one, we get $\gamma = -(\alpha + \beta)$.  Substitute into the other two.
$$\alpha\beta - (\alpha + \beta)(\alpha + \beta) = -3 \implies - \alpha^2 - \alpha\beta - \beta^2 = -3 \implies \alpha^2 + \beta^2 + \alpha\beta = 3$$
$$\alpha\beta(-(\alpha + \beta)) = -a \implies \alpha^2\beta + \alpha\beta^2 = a$$
Expressing the first one of these as a quadratic in terms of $\beta$, we get:
$$\beta^2 + \alpha\beta + (\alpha^2 - 3) = 0 \implies \beta = \frac{-\alpha \pm \sqrt{\alpha^2 - 4(\alpha^2 - 3)}}{2} = \frac{-\alpha \pm \sqrt{12 - 3\alpha^2}}{2}$$
This means that in order for $\beta$ to be a real number, we must have $\alpha^2 \le 4$, or $|\alpha| \le 2$.  Since we're given that $\alpha$ is an integer, it follows that $\alpha \in \{-2, -1, 0, 1, 2\}$.  But we also need $\beta$ to be an integer, so $\alpha = 0$ is not valid, as then we'd be dealing with $\sqrt{12} = 2\sqrt{3}$.
Since the equations are symmetric in $\alpha$ and $\beta$, we must also have $\beta \in \{-2, -1, 1, 2\}$.
Now, for each of the possible combinations of ($\alpha$, $\beta$), we can calculate $\gamma = -(\alpha + \beta)$, and then check if the ($\alpha$, $\beta$, $\gamma$) triple follows the constraint $\alpha\beta + \alpha\gamma + \beta\gamma = -3$.  It turns out that there are six valid combinations:

*

*$(-2, 1, 1)$

*$(-1, -1, 2)$

*$(-1, 2, -1)$

*$(1, -2, 1)$

*$(1, 1, -2)$

*$(2, -1, -1)$
From each one, we can calculate $a = -\alpha\beta\gamma$.  And it turns out that there are only two possibilities, $a = \pm 2$.
