Let $0\leq f\in\mathscr{D}(\mathbb{R}^n)$. As shown e.g. by J.-M. Bony, F. Broglia, F. Colombini and L. Pernazza, *Nonnegative functions as squares or sums of squares*, J. Funct. Anal. **232** (2006) 137-147 (see also this MO question and this math.SE question), not every such an $f$ is of the form $f=g^2$ for $g\in\mathscr{D}(\mathbb{R}^n)$ or even a finite sum of such. On the other hand, as mentioned in the paper above, C. Fefferman and D. H. Phong sketched a proof (*On positivity of pseudo-differential operators*, Proc. Natl. Acad. Sci. U.S.A. **75** (1978) 4673-4674) of the fact that any $0\leq f\in\mathscr{C}^\infty(\mathbb{R}^n)$ can be written as a sum of squares $$f=\sum^k_{j=1}g_j^2$$ with $g_j\in\mathscr{C}^{1,1}(\mathbb{R}^n)$ (i.e. $g_j$ is a differentiable function whose derivatives are locally Lipschitz) for all $1\leq j\leq k$ for some $k\in\mathbb{N}$. This fact was a key ingredient of the proof of the important inequality for scalar pseudodifferential operators with non-negative symbols that bears their name. For a modern, more detailed proof of the above formula, see N. Lerner, *Some Facts About the Wick Calculus*, in L. Rodino, M.W. Wong (eds.), *Pseudodifferential Operators: Quantization and Signals*, Lectures given at the C.I.M.E. Summer School held in Cetraro, Italy June 19–24, 2006 (Springer Lecture Notes in Mathematics **1949**, 2008), pp. 135-174, particularly Theorem 5.2, pp. 167-172, and the discussion right after Theorem 1.1 in the paper by Bony *et alii* above on page 139. It immediately follows by multiplication by squares of smooth bump functions that the $g_j$'s may be chosen to be compactly supported if $f\in\mathscr{D}(\mathbb{R}^n)$. Bony *et alii* showed above that this regularity for $n\geq 4$ is sharp.

All this leads naturally to the following

Question:Is every $0\leq f\in\mathscr{D}(\mathbb{R}^n)$ thelimit of a sequenceof sums of squaresin$\mathscr{D}(\mathbb{R}^n)$ in the latter's topology?

In other words, is the cone of non-negative elements of $\mathscr{D}(\mathbb{R}^n)$ the (sequential) closure of the cone of sums of squares in $\mathscr{D}(\mathbb{R}^n)$?

I am particularly interested in arguments that do not rely on the result by Fefferman and Phong.

EDIT - Follow-up subquestion:(suggested by André Henriques) Is every $0\leq f\in\mathscr{D}(\mathbb{R}^n)$ the limit of anincreasingsequence of sums of squares in $\mathscr{D}(\mathbb{R}^n)$ in the latter's topology? Particularly, can $f$ be written as $$f=\sum^\infty_{j=1}g_j^2$$ with $g_j\in\mathscr{D}(\mathbb{R}^n)$ for all $j$ and convergence in $\mathscr{D}(\mathbb{R}^n)$?

increasinglimit of a sequence of sums of squares in $\mathscr{D}(\mathbb{R}^n)$? Or, even better, whether it can be written as $f=\sum_{j=1}^\infty g_j^2$. $\endgroup$ – André Henriques Dec 23 '17 at 22:056more comments