Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 13 down vote accepted

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.

share|improve this answer
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).

share|improve this answer

Quoting from the introduction of Brumfiel's book Partially Ordered Rings and Semi-Algebraic Geometry (1979, CUP LMS Lecture Notes 37):

As a final remark on the birational interpretation of Artin's solution of Hilbert's 17th problem, consider a different category, that of smooth manifolds and smooth real valued functions. Then Paul Cohen has shown me that (i) there exist nowhere negative smooth functions on any manifold which are not finite sums of squares of smooth functions (in fact, the zero set can be a single point) and (ii) given any nowhere negative smooth $f$, there are $h$, $g$, both smooth and $h$ not a zero divisor, such that $h^2f = g^2$. The zero divisors are, of course, the smooth functions which vanish on some open set.

If the statement is correct ("on any manifold"), then there should be a counterexample on $\mathbb{R}$. I would love to see how it is constructed! But it does not seem to have been published, because in the 2005 paper ("Sommes de carrés de fonctions dérivables", Bull. Soc. Math. France, 133, 619–639) in which he proves (inter alia) that at least a $C^\infty$ function $f$ on $\mathbb{R}$ that is nonnegative can be written as $g^2 + h^2$ where $g$ and $h$ are $C^m$ for $m$ arbitrarily large but finite, Jean-Michel Bony mentions these counterexamples and asserts that, as far as he knows, they have not been published (he points to the aforementioned book, and also the book Real Algebraic Geometry by Bochnak, Coste and Roy, where a similar statement is attributed to P. Cohen and D. Epstein: see §6.6.4).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.