TITLE: Finding an irreducible polynomial of degree $n$ in $\mathbb Q[X]$ with real roots
QUESTION [7 upvotes]: Context.
I was trying to prove that for a given $n$, there exist a totally real number field of degree $n$.
I understood that it was equivalent to find a polynomial $P$ such that
(i) $P\in\mathbb Q[X]$ ;
(ii) $P$ is irreducible ;
(iii) $P$ only has real roots in $\mathbb C$ ;
(iv) $P$ has degree $n$.
I succeeded in my initial problem thanks to this and this two MSE questions.
But the construction is abstract, and I can not deduce from it an explicit polynomial satisfying the four conditions.
The question.

For a given $n$, do you know how can I construct an explicit polynomial $P$ satisfying (i), (ii), (iii) and (iv)?

REPLY [4 votes]: Take an Eisenstein polynomial ( link ) $P(x)$ with integer coefficients for a prime $p$. Now consider $a$ integer such that $a+ Im(x_k)>0$ for all roots $x_k$ of $P(x)$ and moreover $a\equiv 0 \bmod{p^2}$. Then 

$P(x- i a) \in \mathbb{Z}[x]$ has all the roots in the upper half plane. 
$Re(P(x- i a))$ is  an Eisenstein polynomial for $p$.

Denote by $Q(x)=Re(P(x-ia))$.
From 1.  $Q(x)$ has all the roots real (and distinct) (see link )
From 2.  $Q(x)$ is irreducible over $\mathbb{Q}$. 
Example: $P(x) = x^n+3$, $\ \ p=3$, $a=9$.
$$
Q(x)=1/2(\ (x+9i)^n+(x-9i)^n)+3 $$