show/hide this revision's text 1 [made Community Wiki]

One other case that seems to be missing from the comments above (but most likely not from the references in there) is the 1888 result of Hilbert that all nonnegative ternary quartic forms (and bivariate quartic polynomials) are sums of squares of polynomials.

Of the same flavor of the type of questions you have raised, it is an open problem to determine if a polynomial with rational coefficients that is a sum of squares of polynomials (with possibly real coefficients) can also be written as a sum of squares of polynomials with rational coefficients. See e.g. Section 3 of http://www.msri.org/people/members/chillar/files/rationallmisos.pdf