# Is a composition of functions differentiable at all orders if both functions are?

Suppose that, $\text{ }f: \mathbb{R} \rightarrow \mathbb{R}$ has derivatives of all orders. Prove that the same is true of $F(x) := \exp({f(x)})$.

I have an idea of using the chain rule as discussed here. I am curious as to whether this result can be generalised for the composition of any two infinitely differentiable functions? And if so, how can one seek to prove it?

At any given order, unless I am mistaken we can express $\displaystyle F^{n}(x) = \exp(f(x))\left[\sum_{i}P_n(x)\right]$ where $P_n$ is some function of the derivatives of $f$ up until the $n$th derivative. Which would make the idea of induction feasible. Except the jump from a natural number order of differentiability to infinite differentiability seems like a very obscure jump.

It seems that utilising the chain rule is fairly straightforward for the first few orders, would it be sufficient to prove the claim by induction for some finite $n$th order and then argue for infinite differentiability from there?

Hint

Leibniz formula + induction

Proof

Given two differentiable functions $f,g:\mathbb{R}\to\mathbb{R}$, we know that so is $g\circ f$; furthermore the chain rule asserts that :

$$\forall x\in\mathbb{R},(g\circ f)'(x)=g'(f(x))\,f'(x)\tag{1}$$

Now suppose (induction assumption) that, for some $n\ge1$, if $f,g$ are $n$ times differentiable, then so is $g\circ f$.

Consider a pair $f,g$ of $(n+1)$ times differentiable functions. Using (1) and the induction assumption, we see that $g'\circ f$ is $n$ times differentiable. Then, by Leibniz formula, $(g'\circ f)\times f'$ is also $n$ times differentiable. Finally, still using (1), we conclude that $g\circ f$ is $(n+1)$ times differentiable.

Corollary 1

If $f,g$ are infinitely differentiable, i.e. are $n$ times differentiable for all $n\ge 1$, then $g\circ f$ is also infinitely differentiable.

Corollary 2

If $f$ is infinitely differentiable, then so is $\exp\circ f$.

This looks like a job for Faà di Bruno's formula: in the special case where the outer function is $e^x$, the expression can be given by $$\frac{d^n}{dx^n} e^{g(x)} = \sum_{k=1}^n e^{g(x)} B_{n,k}\left(g'(x),g''(x),\dots,g^{(n-k+1)}(x)\right),$$ where $B_{n,k}(x_1,\dotsc,x_{n-k+1})$ is the (exponential) incomplete Bell polynomial.