Smoothness of $f(\sqrt x)$ I found that I need to use the following facts in a paper that I am writing.
Let $f\in C^\infty(\mathbb R)$, then


*

*If $f(0)=0$, then $f(x)=x g(x)$ for some $g\in C^\infty(\mathbb R)$.

*If $f$ is even, i.e. $f(-x)=f(x)$ for all $x$, then $f(x)=g(x^2)$ for some $g\in C^\infty(\mathbb R)$.
These facts are trivial for analytic functions (just look at the Taylor series). In the smooth case, one can prove them by analyzing the derivatives of $f(x)/x$ and $f(\sqrt x)$, respectively, and showing that they have certain limits at 0. However this is somewhat cumbersome (especially if one wants to analyze how $g$ depends on $f$). This is not a problem for me because the facts fall into the category "you should be able to prove this yourself if you are reading my paper". But I would like to know if there is a nicer proof.
For the first statement, I know the following trick (which can be found in textbooks): define
$$
 g(x) = \int_0^1  f'(tx) \ dt
$$
and observe that $f(x)=xg(x)$, and $g\in C^\infty$ since the function $t\mapsto f'(tx)$ under the integral is smooth in the parameter $x$. As a bonus, this argument also shows easily that $g$ (as a point of $C^\infty$) depends smoothly on $f$. (This is another fact that I need to use.)
Is there a similarly nice proof of the second statement? And, by the way, is there a textbook reference for it?
Added. Here is a more precise mathematical question that more or less formalizes what I mean. The function $g$ such that $f(x)=g(x^2)$ is uniquely defined only on $\mathbb R_+$, and its extension to negative arguments involves some choice.
Is there a canonical way to associate $g$ to $f$? Even more precisely, can one make a mapping $f\mapsto g$ which is linear, preserves the pointwise multiplication, and is continuous as a map from $C^\infty$ to $C^\infty$?
 A: One way that creates an (obviously) continuous linear operator $T:C^\infty_{\text{even}}\to C^\infty$ such that $f(x)=(Tf)(x^2)$ for all even $f$ is to use the Fourier transform. 
Take any smooth even cutoff $\phi$ that is $1$ on $[-1,1]$ and split $f=f\phi+f(1-\phi)=f_1+f_2$. $g_2=f_2(\sqrt x)$ is obviously $C^\infty$ if extended by $0$ to the negative semiaxis. Now write $f_1(x)=\int_0^\infty \widehat f_1(y)\cos(yx)dy$. Note that $\cos \sqrt z$ is analytic and real on $\mathbb R$. Also its derivatives are bounded for $z>0$ but grow fast for $z<0$. To cope with the latter, put $V(z)=\Phi(z)\cos\sqrt z$ where $\Phi$ is some cutoff that is $1$ on the positive semiaxis and define $g_1(x)=\int_0^\infty \widehat f_1(y)V(y^2x)dy$. Finally, put $g=g_1+g_2$.
The pointwise multiplication is a bit trickier to preserve because every positive even function is a square of another even function but if the value at $0$ is small but the second derivative is large, the first derivative of $g$ must be also large and $g$ has a very strong desire to attain negative values (if you require linearity, look at $f(x)=1+Ax^2$ with large $A$ to make this a formal proof of impossibility in the class of real-valued functions)
A: Apparently this fact was first proved by Hassler Whitney and can be found in the Duke Journal 1943, volume 10 no 1 p.159-160 under the title Differentiable Even Functions.
A: There are general results on $C^\infty$ functions of several variables which are invariant under the action of a group, many of them due to Georges Glaeser. One of most beautiful is the following: take a $C^\infty$ function $f(x_1,\dots,x_n)$ which is symmetric, i.e. such that
for all permutations $\sigma$ of $\{1,\dots,n\}$,
$$
f(x_{\sigma(1)},\dots,x_{\sigma(n)})=f(x_1,\dots,x_n).
$$
Then it is a $C^\infty$ function $F$ of the standard symmetric functions
$$
\sum x_j,\dots,\prod x_j.
$$
This result is elementary for polynomials ($f$ polynomial, then $F$ polynomial) but the above result is highly non-trivial for smooth non-analytic functions.
A: The answer has been given in the MO question Integral representation of higher order derivatives by P. Majer. The formula is that if $u$ is even, then the derivatives of the function $w$ defined by $w(x):=u(\sqrt x)$ satisfy
$$w^{(k)}(x^2)=\frac{\\ (2x)^{-2k+1}}{(k-1)!\\ }\\ \int_0^x (x^2-t^2)^{k-1}u^{(2k)}(t) dt\\ $$
A: See the answer 
(here) for more information: Smooth functions which are invariant under a compact Lie group representation factor smoothly over the basic invariant polynomials.
The factorization operator can be chosen linear and continuous.
Not mentioned in the answer above is the fact, that a certain subanalytic property of the image of the basic polynomial invariant mappings is responsible for the result: The most general version is in:
MR1637671 (2000c:32027)
Bierstone, Edward(3-TRNT); Milman, Pierre D.(3-TRNT)
Geometric and differential properties of subanalytic sets. 
Ann. of Math. (2) 147 (1998), no. 3, 731–785. 
