Say I have a quartic polynomial $f(x) = ax^4 + bx^3 + cx^2 + d$. I am told that $f(x)$ is nonnegative iff it can be expressed as a sum of squares as follows. $f(x) = \sum_{i=1}^4 q_i(x)^2$. As an intermediate step, I am trying to prove that if $f(x) >= 0$ for all $x \in R$, then $f(x) = p_0 ((x-a_1)^2 + b_1^2)((x-a_2)^2 + b_2^2)$.
However, I am having trouble with this. Could someone give me a hint in the right drection?
Hint: If the complex roots of $f$ are $z_1$ through $z_4$, then $f(x)=a(x-z_1)(x-z_2)(x-z_3)(x-z_4)$. But since $f$ has no real roots, its complex roots come in conjugate pairs, so the linear factors combine together two and two to form upwards-pointing parabolas.
$$ f(x) = a((x-a_1)^2+s)(x-a_2)^2+t) $$
for some $a_1,a_2\in \mathbb R$ and $s,t> 0$.