# Show $f(x)\geq 0$ for all $x$ if and only if it has even degree and is of the form $f(x)=r(x)^2(x^2+a_1x+b_1)(x^2+a_2x+b_2) \cdots (x^2+a_nx+b_n)$

Suppose $f(x)$ is a polynomial with real coefficients. Show that $f(x)$ is nonnegative for all real numbers $x$ if and only if it has even degree and is of the form $$f(x)=r(x)^2(x^2+a_1x+b_1)(x^2+a_2x+b_2) \cdots (x^2+a_nx+b_n)$$ where the discriminant of each of the quadratic factor is negative.

The fact above is obtained from the book Putnam and Beyond, question $83$ solution.

I would like to know its proof. Can anyone supply it?

• Which field are the coefficients of $f$ in? Are $a_i$,$b_i$ arbitrary (of course not)? Your statement is very incomplete. – guest Jun 14 '15 at 7:07
• This is indeed a very simple use of fundamental theorem of algebra. – user99914 Jun 14 '15 at 7:15

The "if" part is clear. Now, for the "only if" part :

Suppose that $f(t)\geq 0$ for every real $t$. Then we cannot have $\lim_{t\to+\infty}f(t)=-\infty$, so the leading coefficient $l$ of $f$ must be $>0$ (except in the trivial case when $f$ is zero).

If $f$ has odd degree, then $g(t)=f(t)+1$ satisfies $\lim_{t\to-\infty}g(t)=-\infty,\lim_{t\to+\infty}g(t)=+\infty$ so by the Intermediate Value Theorem, $g$ must have a zero.

It follows that $f$ has even degree. Next, $f$ has distinct real roots $\lambda_1 < \lambda_2 < \ldots < \lambda_s$ with multiplicities $m_1,\ldots,m_s$ and non-real complex roots appearing in (not necessarily distinct) conjugate pairs, $c_1+d_1i, \ldots, c_t+d_ti$.

By the fundamental theorem of algebra,

$$\begin{array}{lcl} f(t) &=& l\Bigg(\prod_{i=1}^{s}(t-\lambda_i)^{m_i}\Bigg) \prod_{j=1}^{t} (t-(c_j+id_j))(t-(c_j-id_j)) \\ &=& l\Bigg(\prod_{i=1}^{s}(t-\lambda_i)^{m_i}\Bigg) \prod_{j=1}^{t} ((t-c_j)^2+d_j^2) \end{array}$$

It is easy to see that $(t-\lambda_i)^{m_i}$ has constant sign in a neighborhood of $\lambda_i$ iff $m_i$ is even. Your result then follows, by putting $r(t)=\sqrt{l}\prod_{i=1}^s (t-\lambda_i)^{\frac{m_i}{2}}$.

• Actually, you also need to also account for a leading coefficient. – steven gregory Jun 14 '15 at 7:42
• @StevenGregory corrected, thanks – Ewan Delanoy Jun 14 '15 at 7:48
• @ChristianBlatter My "w" key is becoming sticky on my keyboard ... – Ewan Delanoy Jun 14 '15 at 9:43