TITLE: Square root of smooth function f(0)=0, f'(0)=0, f''(0)>0 is smooth?
QUESTION [5 upvotes]: $\newcommand{\nc}{\newcommand} \nc{\BR}{\mathbb R}$ Let $f: U \to \BR$ be a smooth function where $U$ is a neighborhood of $0\in \BR$ and $f$ is smooth. Furthermore, $f(0) = 0$, $f'(0) = 0$, and $f''(0) > 0$. From this we can shrink $U$ to a set on which $f$ is nonnegative, so the square root is well-defined. I wish to show (conjecture) that $g(t) = \pm \sqrt{f(t)}$ is a smooth function. (where $g(t) = -\sqrt{f(t)}$ for $t<0$, $g(t) = \sqrt{f(t)}$ for $t \geq 0$)
Clearly the only issue is smoothness at 0. I read this link which might be related, but in the counterexamples given $f''(0) = 0$, whereas I am assuming $f''(0) > 0$. I have shown directly (using limits) that $g'(0) = \frac{1}{2}f''(0)$ and that $g''(0) = g'''(0) = 0$. However, the form of $g^{(n)}(t)$ quickly grows very complicated to work with, so I am stuck with proving it in the general case.
Context: I wish to prove the Morse lemma in dimension 1. If I can show that $g$ is smooth, then its inverse $g^{-1}$ is a smooth change of coordinates near 0 (smooth by Inverse Function Theorem) such that $f(g^{-1}(t)) = t^2$.

REPLY [6 votes]: For fixed $x$, since $f(0) = 0$, using the helper function $h_x(t) = f(t\cdot x)$, we can write
\begin{align}
f(x) &= h_x(1) - h_x(0)\\
&= \int_0^1 h_x'(t)\,dt\\
&= \int_0^1 f'(t\cdot x)\cdot x\,dt\\
&= x\cdot \underbrace{\int_0^1 f'(tx)\,dt}_{f_1(x)}.
\end{align}
Since $f$ is smooth, we can differentiate under the integral as often as we wish, hence $f_1$ is also smooth.
Now $f_1(0) = f'(0) = 0$, so we can make the same construction with $f_1$,
$$f_1(x) = x\cdot \underbrace{\int_0^1 f_1'(tx)\,dt}_{f_2(x)}.$$
By the same argument as above, $f_2$ is smooth. With
$$f_1'(x) = \int_0^1 s\cdot f''(sx)\,ds,$$
we can write
$$f_2(x) = \int_0^1 f_1'(tx)\,dt = \int_0^1 \int_0^1 s f''(stx)\,ds\,dt,$$
which shows
$$f_2(0) = \frac{1}{2} f''(0) > 0,$$
and by continuity $f_2(x) > 0$ on some neighborhood $V$ of $0$. On $V$, we have $g(x) = x\cdot \sqrt{f_2(x)}$, and as the square root of a strictly positive smooth function, $\sqrt{f_2(x)}$ is smooth. It follows that $g$ is smooth on $V$.