IMHO it would be clearer to just use throughout (except in the very first equation). What really confused me was that the sum of squares was not really a sum of squares (until I figured out that you replaced with ).

]]>Now, concerning your question at the end, there is a well-known algorithm that determines whether a positive polynomial is a sum of squares. Have you already tested it, say for ?

]]>