TITLE: On Glaeser's result for the square-root of a smooth non-negative function
QUESTION [6 upvotes]: One of the results due to Georges Glaeser is the following: there exists a non-negative $C^\infty$ function $f$ on the real line, flat at its zeroes, such that $\sqrt{f}$ is not $C^2$. On the other hand, $\sqrt{f}$ is $C^1$ for any such $f$.
Question 1: is it possible to find $f$ as above such that $\sqrt{f}$ is not twice differentiable at a point? In Glaeser's counterexample mentioned above, $\sqrt{f}$ is twice differentiable with an unbounded second derivative.
Question 2: is it possible to find $f$ as above such that there is no function $g$, $C^2$ on the real line such that $f=g^2$. Here $g$ is allowed to take negative values, which is not the case of $\sqrt f$.
Question 3: is it possible to find $f$ as above such that there is no $C^\infty$ function $g:\mathbb R\longrightarrow \mathbb C$ such that $f=\vert g\vert^2$.

REPLY [2 votes]: Question 1: In

Alekseevsky, Dmitri; Kriegl, Andreas; Michor, Peter W.; Losik, Mark
Choosing roots of polynomials smoothly. (English summary)
Israel J. Math. 105 (1998), 203–233.

it is shown that such an $f$ always has a twice differentiable square root. But this square root is not necessarily positive.
Question 2:
$$
f(t) = \sin^2(1/t)e^{-1/t} + e^{-2/t} \text{ for }t>0,\quad f(t) = 
0\text{ for }t\le0.
$$
This is a sum of two non-negative $C^\infty$ functions each of which
has a $C^\infty$ square root.
But the second derivative of the square
root of $f$ is not continuous at the origin. This is also a counter example to question 3.

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.

have shown that twice differentible is best possible; it cannot be improved to $C^{1,\alpha}$ for any continuity module $\alpha$.
See also

Bony, Jean-Michel; Colombini, Ferruccio; Pernazza, Ludovico
On the differentiability class of the admissible square roots of regular nonnegative functions. (English summary) Phase space analysis of partial differential equations, 45–53,
Progr. Nonlinear Differential Equations Appl., 69, Birkhäuser Boston, Boston, MA, 2006.