# Hilbert's 17th Problem for smooth functions

Consider an open subset $U \subseteq \mathbb{R}^n$ and a smooth function $f\colon U \longrightarrow \mathbb{R}$ with $f(x) \ge 0$ for all $x \in U$.

It is then known (if I remember correctly: by Michor?) that $f = g^2$ with a function $g$ which can be shown to be twice differentiable but not $C^2$ in general. In particular, a smooth square root does not exist in general.

My question is whether $f$ can be represented as a sum of squares of smooth functions, i.e. the smooth version of Hilbert's problem 17, and if so, what is the minimal number of squares needed?

-

No. Let $f=z^6 + x^4 y^2 + x^2 y^4 − 3x^2 y^2 z^2$. By the AM-GM inequality, $f$ is nonnegative.

Suppose that $f=\sum g_i^2$, with the $g_i$ smooth. Expand each $g_i$ in a Taylor series around $0$: $g_i = a_i + b_i(x,y,z) + c_i(x,y,z) + d_i(x,y,z) + O(|x|+|y|+|z|)^4$, with $a$, $b$, $c$ and $d$ homogenous polynomials of degrees $0$, $1$, $2$ and $3$.

Comparing terms of degrees $0$, $2$, $4$ and $6$ in a Talyor series around $0$, we see that $a_i=b_i=c_i=0$ and $z^6 + x^4 y^2 + x^2 y^4 − 3x^2 y^2 z^2 = \sum d_i(x,y,z)^2$. It is well known (see e.g. Wikipedia) that the left hand side is not a sum of squares of cubics.

-
Which is the Motzkin polynomial featuring in a previous MO question: mathoverflow.net/questions/53047/… –  Andrey Rekalo Jan 31 '11 at 15:11
Your Wikipedia link seems to be broken. –  Andrey Rekalo Jan 31 '11 at 15:13
Link fixed, thanks! –  David Speyer Jan 31 '11 at 15:29
@David: First of all, thanks a lot. That solves the (interesting) cases of dimension $\ge 3$. I guess there are similar examples for $n = 2$. But what happens in $n=1$? Here the Taylor expansion argument won't work (if I'm correct: Hilbert's problem is OK for polynomials in $1$ variable, right?) to produce a counter-example. Are there any other? The problem I have is that already in one dimension, the zeros of a smooth function can cluster in a rather nasty way... (?) –  Stefan Waldmann Feb 2 '11 at 13:03
I don't know what happens in $n=1$ and $n=2$. My guess would be that the answer is "yes" in those low dimensions, and that the key will be some sort of partition of unity argument. But I don't have an actual proof. –  David Speyer Feb 2 '11 at 14:21

On $\mathbb R^1$ a non-negative smooth function is a sum of two squares of $C^m$-functions for each $m$ ($m=\infty$ does not follow): Zbl 1107.26008 Bony, Jean-Michel Sums of squares of derivable functions. (Sommes de carrés de fonctions dérivables.) (French) Bull. Soc. Math. Fr. 133, No. 4, 619-639 (2006). pdf

For algebras of matrices: Zbl 05985527 Savchuk, Yurii; Schmüdgen, Konrad Positivstellensätze for algebras of matrices. (English) Linear Algebra Appl. 436, No. 3, 758-788 (2012).

For square roots of function the following is the best answer up to now: Zbl 1207.26004 Bony, Jean-Michel; Colombini, Ferruccio; Pernazza, Ludovico On square roots of class Cm of nonnegative functions of one variable. (English) Ann. Sc. Norm. Super. Pisa, Cl. Sci. (5) 9, No. 3, 635-644 (2010).

-