Given a nonnegative polynomial $p(x)$ on $\mathbb{R}$, does there exist some $k$ such that for some polynomials $f_1,\ldots ,f_k$ we have $p(x)=\sum_{i=1}^k(f_i)^2$?
I think yes, because of the nonnegative nature of $p(x)$, but am unable to prove. Any hints. Thanks beforehand.