A real polynomial $f(x\_1,\ldots, x\_n)$ in several variables is a *sum of squares* if there are polynomials $g\_1,\ldots, g\_k$ such that $f=g\_1^2+\cdots +g\_k^2$.


Fix a positive number $d>0$. The collection of real polynomials of degree d ${\mathbb{R}}[x\_1,\ldots, x\_n]\_d$ has the structure of a finite-dimensional real vector space. This enables us to this collection with the standard vector space topology.


Is the set of sums of squares closed under this topology? If so, given a sequence $\{f\_n\}$ of sums of squares, can we express the limit $\lim f\_n$ as a sums of squares in a constructive way from the sums of squares expressions of individual terms $f\_n$? 



Is the set of polynomial sum of squares closed under limits?
The cone of sums of squares $\Sigma^2 \subset \mathbb R[x\_1,\dots,x\_n]$ is closed in the finest locally convex topology. This is equivalent to the assertion that the intersection of this cone with the space of polynomials up to degree $d$ is closed in the usual euclidean topology for every $d$. 


The argument goes as follows. If $p$ is a sum of squares of degree $d$, then
$$ p = f\_1^2 + \cdots f\_n^2.$$
The contributions of the $f\_i$ of maximal degree are positive and cannot cancel. Hence, each $f\_i$ has to have degree $\leq d/2$. A first consequence is that $p$ is a convex combination of squares coming from a finite-dimensional vector space. By Caratheodory's theorem, his means that you can bound the number of summands in terms of $d$.


You may now pick some norm (for example the $L^2$-norm with respect to some probability measure with rapid decay on $\mathbb R^n$ and full support) to bound the size of the coefficients of the polynomials $f\_i$ as well. There are various ways to see this. If one uses a measure like the one I described, then 
$$\|f\_i\|^2 \leq \int\_{\mathbb R^n} f\_1^2 +\cdots f\_n^2 d\mu = \int\_{\mathbb R^n} p d\mu.$$


Hence, the norm of $f\_i$ is bounded and $f\_i$ lies in a compact set since any bounded set in a finite-dimensional vector space is compact. This gives a bound on the size of the coefficients of the $f\_i$ in terms of the size coefficients of $p$.


The conclusion is that $n$ is bounded and the $f\_i$'s lie in some compact set.


This implies that any limit of sums of squares of degree at most $d$ is again a sum of squares of degree $d$. Hence the intersection of $\Sigma^2$ with the set of polynomials with degree at most $d$ is closed.


This cone is not closed in various other topologies. Usually it is dense in a suitable set of positive elements.


EDIT: I explained some part of argument in more detail.


