Suppose the function $f$ is infinitely differentiable on $\mathbb{R}$, and the function $g$ is differentiable on the open interval $(a,b)$ satisfying $$g'(x)=f \circ g \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space \space x\in(a,b)$$ Prove that the function $g$ is infinitely differentiable on $(a,b)$.
I have showed that since both functions are differentiable on $(a,b)$ implies that they are continuous on $(a,b)$, thus $g'(x)$ is continuous. Besides that, $g''(x)=f' \circ g \cdot g'$ is also continuous. Of course, this process can be done infinitely and hence show that $g^{(n)}(x)$ is continuous. How do I show it is infinitely differentiable, because continuous does not imply differentiable.
For a precise argument prove the following statement by induction: for every $n$ $g^{(n)}$ exists and it is a finite sum of finite products of the functions $f,f',\cdots,f^{(n-1)},g,g',\cdots, g^{(n-1)}$.