TITLE: Zeros of a cubic polynomial with rational coefficients
QUESTION [8 upvotes]: While discussing a related problem, one of my friends came out with a question as follows:
Is it possible that a cubic polynomial $p(x) \in \Bbb{Q}[x]$ has all of its zeros to be both real and irrational? That is, can $p(x)$ be factored into the following form?
$$ p(x) = a (x - \alpha_1)(x - \alpha_2)(x - \alpha_3), \quad a \in \Bbb{Q}, \ \alpha_{i} \in \Bbb{R} \setminus \Bbb{Q} $$
We struggled with this problem for a moderate time but failed to find any clue for its validity or invalidity.  I guess that this is impossible, but currently I have no idea how to attack this. Can you enlighten me by showing a valid direction?

REPLY [8 votes]: It is possible. For example, given a prime number $p$ and $a,b\in\mathbb Z$ with $a+b\le-2$, let
$$f(x)=x^3+pax^2+pbx+p\in \mathbb Z[x].$$
Then by Eisenstein's criterion, $f$ is irreducible in $\mathbb Q[x]$, i.e. $f$ has no rational root. However, since $f(0)=p>0$ and $f(1)=1+(a+b+1)p<0$, $f$ has three distinct real root located in $(-\infty,0)$,  $(0,1)$ and $(1,+\infty)$ respectively.

REPLY [5 votes]: The condition for the cubic $x^3 + px + q$ to have 3 real roots is $4p^3+27q^2 \leq 0.$ This condition can be proved algebraically (search for Discriminants of a polynomial) or by calculus: A cubic has 3 real roots if and only if it has a local minimum and a local maximum and the product of those two values is $\leq 0.$
So as Potato mentioned in the comments, $x^3-3x+1$ has $3$ real roots, yet none of them are rational ( the rational root theorem says the only candidates are $\pm 1$ which are easily ruled out).