Is the set of polynomial sum of squares closed under limits? 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$? 
 A: 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.
