# differentiable square root of nonnegative smooth function

Suppose I have a smooth function $f(x):\mathbb{R}\to\mathbb{R}\geq 0.$ Does there always exist a differentiable $g(x):\mathbb{R}\to\mathbb{R}$ with $g(x)^2 = f(x)$?

If so, clearly $g(x) = \epsilon(x)\sqrt{f(x)}$ for $\epsilon(x)\in\{\pm1\}$. Is there an explicit formula for $\epsilon$? Intuitively, I want it to flip sign each time $f$ becomes 0.

-
Here's a related thread and a related MO thread. There are quite a few articles linked in those threads, maybe you can find something in one of them. –  t.b. Sep 16 '12 at 22:34