Possible values for infinum of polynomial with integer coefficients I'am trying to find all natural numbers $a\in\mathbb{N}$ such that there is polynomial with integer coefficients $P\in \mathbb{Z}[x]$ with
$$\inf_{x\in\mathbb{R}}\, P(x) = \sqrt{a}.$$
If $a=b^2$ for $b\in\mathbb{N}$ we obviously can take $P(x)=x^2 + b$, but what about $a$ that are not perfect squares? I have tried to find any but not succeed.

The polynomial
$$P(x) = (2a)^8x^8-(2a)^5x^6-(2a)^5x^4+6a^2x^2+a^2$$
satisfies
$$\min_{x\in\mathbb{R}} P(x) = \sqrt{a}.$$
If there is a polynomial of lower degree with the same property, then it must have degree $6$ (see below), assuming $a$ is not a perfect square.
There is however the degree-$4$ polynomial
$$R(x) = -(2a)^4x^4+(2a)^2x^3+(2a)^3x^2-3ax-a^2$$
that satisfies
$$\max_{x\in\mathbb{R}} R(x) = \sqrt{a},$$
leading to the surprising conclusion that achieving a minimum of $\sqrt{a}$ requires a strictly higher degree than achieving a maximum of $\sqrt{a}$.

Note that any $P(x)$ satisfying the original requirements necessarily has even degree. To see why $P(x)$ cannot have degree $4$, let $\beta$ be one of the real algebraic numbers where $P(x)$ achieves its minimum of $\sqrt{a}$. Then $\sqrt{a} = P(\beta)$ is an element of the field $\mathbb{Q}(\beta)$. Moreover, if there is an automorphism $\sigma$ of $\mathbb{Q}(\beta)$ satisfying
$$\sigma(\sqrt{a}) = -\sqrt{a} \qquad \text{and} \qquad \sigma(\beta) \in \mathbb{R},$$
then
$$P(\sigma(\beta)) = \sigma(P(\beta)) = \sigma(\sqrt{a}) = -\sqrt{a},$$
meaning $\sqrt{a}$ is not actually the minimum of $P(x)$. (This is the step where the asymmetry between minimum and maximum becomes apparent.)
In summary, any automorphisms of $\mathbb{Q}(\beta)$ that send $\sqrt{a}$ to $-\sqrt{a}$ must send $\beta$ to a non-real number. In particular, $\beta \not \in \mathbb{Q}(\sqrt{a})$, so $\mathbb{Q}(\sqrt{a})$ is a proper subfield of $\mathbb{Q}(\beta)$. Since degrees of field extensions are multiplicative, this means that the degree of $\mathbb{Q}(\beta)/\mathbb{Q}$ is even and strictly greater than $2$; so $\beta$ has degree at least $4$. Finally, since $P'(\beta) = 0$, $P(x)$ must have degree greater than $4$.

Here's how I found $P(x)$:
The simplest $\beta$ that satisfies the above restrictions on $\mathbb{Q}(\beta)$ is $\beta = \sqrt[4]{a}$. I first constructed a polynomial $Q(x)$ with rational coefficients to have minimum $\sqrt{a}$ at $x=\pm\sqrt[4]{a}$. Here $Q(x)$ necessarily has the form
$$Q(x) = (x^4-a)q(x)+x^2$$
such that $q(x)$ has positive leading coefficient and $Q'(x)$ is divisible by $x^4-a$. This quickly leads to
$$Q(x) = (x^4-a)^2 -\frac{1}{2a}x^2(x^4-a) + x^2.$$
Finally, to get integer coefficients without affecting the minimum, we scale $Q(x)$ horizontally; $P(x) = Q(2ax)$ does the job.
