TITLE: When is the Composite with Cube Root Smooth
QUESTION [10 upvotes]: Let $f:\mathbf R\to \mathbf R$ be a smooth map and $g:\mathbf R\to \mathbf R$ be defined as $g(x)=f(x^{1/3})$ for all $x\in \mathbf R$.

Problem. Then $g$ is smooth if and only if $f^{(n)}(0)$ is $0$ whenever $n$ is not an integral multiple of $3$.

One direction is easy. Assume $g$ is smooth. Then we have $f(x)=g(x^3)$ for all $x$. Differentiating and using the chain rule gives that the required derivatives of $f$ vanish.
I am struggling with the converse. Assume $f^{(n)}(0)=0$ whenever $n$ is not an integral multiple of $3$. We need to show that $g$ is smooth. Since $x^{1/3}$ is smooth at all points except $x=0$, we see that $g$ too is so. So the only problem is at $0$. I am only able to show that the first derivative of $g$ at $0$ exists. Here is what I have done.
Let $x>0$ be arbitrary. By Taylor we know that
$$f(x)= f(0)+f'(0)x+ \frac{f''(0)}{2}x^2+ \frac{f'''(\lambda_x x)}{6}x^3$$
for some $0<\lambda_x<1$.
This gives by hypothesis that
$$f(x) - f(0) = \frac{f'''(\lambda_x x)}{6}x^3$$
Thus
$$g(x)-g(0)=\frac{f'''(\lambda_{x^{1/3}} x^{1/3})}{6} x$$
and therefore
$$\frac{g(x)-g(0)}{x}=\frac{f'''(\lambda_{x^{1/3}} x^{1/3})}{6}$$
Since $\lim_{x\to 0}f'''(\lambda_{x^{1/3}} x^{1/3}))$ exists, we see that $g'(0)$ exists.
But I am not able to extend this argument to show that $g''(0)$ etc. also exist.

REPLY [3 votes]: Just wanted to cover up the $\implies$ case, where the other answers doesn't addressed, and the OP just explained vaguely "differentiating and using the chain rule gives that the required derivatives of $f$ vanish". As stated in a similar question, it is not just that simple.
Let's show that if $f \circ \psi^{-1}\colon \widetilde{\mathbb{R}}\to \mathbb{R}$ is smooth, 
  where $\psi^{-1}(x) = x^{\frac{1}{3}} $, then $f^{(n)} (0) = 0$ for all $n \nmid 3$.
  We can express $f = (f \circ \psi^{-1}) \circ \psi)$, and apply the combinatorial
  form of the Faà di Bruno's formula to express the $n$-th derivative:
  $$
  \frac{d ^n}{d x^n} (\varphi \circ \psi) (x)=
  \sum_{\pi \in \Pi}
    \frac{d^{|\pi|} \varphi}{d x^{|\pi|} }  \left( \psi(x) \right) \cdot
    \prod_{B \in \pi} \frac{d^{|B|} \psi}{d x^{|B|} } (x)\,,
  $$
  where $\varphi = f \circ \psi^{-1}$, $\pi$ runs throught $\Pi$, which is the
  collection of all partitions of the set $\{i\}_{i=1}^n$, and $B$ runs through
  all blocks of partition $\pi$. The values of $\psi^{(n)} (0)$ are all $0$, except
  for $n = 3$. So, the product is positive only if $|B| = 3$ for all $B \in \pi$.
  It follows that the formula above can only give non-zero values if $n$ is divisible
  by $3$.