Finding an irreducible polynomial of degree $n$ in $\mathbb Q[X]$ with real roots

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

  1. $P(x- i a) \in \mathbb{Z}[x]$ has all the roots in the upper half plane.

  2. $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 $$


Take a polynomial with large integer coefficients with $n$ real roots. Then perturb the coefficients slightly (add or subtract one from some of them) to make the polynomial reduce modulo $2$ to an irreducible polynomial modulo $2$. Your new polynomial is irreducible over $\Bbb Q$ and unless you have been unlucky or careless, will still have $n$ real roots.


I am assuming that by "real roots in $\mathbb{C}$" you mean real roots (from $\mathbb{R}$). One possible family of polynomials that satisfy all these criteria (for $n\geq5$):

$$ f_n(x)=(x-1)(x-2)\cdots(x-n)+1. $$

Proof. Ad (i) and (iv) Trivial.

Ad (ii) This polynomial is well known to be irreducible, it follows nicely from irreducibility criterion of Pólya, see for example Prove that the polynomial $(x-1)(x-2)\cdots(x-n) + 1$, $ n\ge1 $, $ n\ne4 $ is irreducible over $\mathbb Z$ and/or linked questions.

Ad (iii) (sketch) This is a bit technical but can be done (holds for $n\geq 4$). Idea is that we have $f_n(i)=1$ for $i=1\dots n$. Now if we look at $f_n(k/2)$ for $k=1,3,\dots,2n-1$, we get another $n$ points, out of which $\lceil n/2 \rceil$ are negative. So by examining sign changes, we can reach the conclusion that $f(x)$ has exactly $n$ real roots.

Remark: The polynomial can be also slightly modified to avoid the limitation $n \geq 5$, for example $5\cdot (x-1)(x-2)\cdots(x-n)+1$ can be shown to satisfy all the conditions for $n \geq 1$.