TITLE: Condition for a quartic to have $4$ real roots
QUESTION [6 upvotes]: Show that there are no $4$-variable polynomials $p(a_1,a_2,a_3,a_4)$ such that the quartic $x^4+a_1x^3+a_2x^2+a_3x+a_4$ has $4$ real roots if and only if $p\ge0$.
A rather natural way to attempt this problem is to write the polynomial as a product of $2$ quadratic polynomials and then to expand, by the system I obtain gets out of hand quite fast and I'm not sure how to continue down this path. Thanks in advance for your help !

REPLY [4 votes]: Suppose that there is such a polynomial $p(a_1,a_2,a_3,a_4)$.
Then, we see that $p(a_1,a_2,a_3,a_4)$ has to satisfy the followings :
$$\small p(0,a_2,0,a_4)\begin{cases}\ge 0&\text{if ($a_2\le 0$ and $a_2^2-4a_4=0$) or $(a_2\lt 0,a_4\ge 0$ and $a_2^2-4a_4\gt 0)$}\\\\\lt 0&\text{otherwise}\end{cases}$$
Now, let us see $p(0,a_2,0,a_4)$ as a polynomial on $a_2$. Let $m$ be the degree of the polynomial and let $f(a_4)$ be the coefficient of $a_2^m$ where $m$ is a non-negative integer.

Case 1 : $m=0$It follows from $p(0,-2,0,1)\ge 0$ that $p(0,2,0,1)\ge 0$ which contradicts the fact that $p(0,2,0,1)\lt 0$.

Case 2 : $m\gt 0$Suppose that $m$ is odd. Let us consider the case when $a_4=-1$. It follows from $\displaystyle\lim_{a_2\to +\infty}p(0,a_2,0,-1)=-\infty$ that $f(-1)\lt 0$. Since it follows that $\displaystyle\lim_{a_2\to -\infty}p(0,a_2,0,-1)=+\infty$, there exists a constant $k_1\lt 0$ such that  $p(0,k_1,0,-1)\ge 0$ which contradicts the fact that $p(0,a_2,0,-1)\lt 0$ for any $a_2$. So, we see that $m$ has to be even.Next, let us consider the case when $a_4=1$. It follows from $\displaystyle\lim_{a_2\to +\infty}p(0,a_2,0,1)=-\infty$ that $f(1)\lt 0$. Since it follows that $\displaystyle\lim_{a_2\to -\infty}p(0,a_2,0,1)=-\infty$, there exists a constant $k_2\lt -2$ such that $p(0,k_2,0,1)\lt 0$ which contradicts the fact that $p(0,a_2,0,1)\ge 0$ for any $a_2\lt -2$.


From the two cases above, we see that there is no such $p(a_1,a_2,a_3,a_4)$.