# Second derivative of a composite function

Say, we have three Banach spaces $X, Y, Z$ and $g:X \to Y, \ \ f:Y \to Z$ are twice (Fréchet) differenciable. The question is: what is $(f \circ g)''$?

Since $(f \circ g)'':X \to \mathcal{L}^2(X,Z)$, I am interested in the most explicit form: $(f \circ g)''(a)[k, h]$ which would describe the entire action taking place.

Let's pick some $a \in X$ and get started:

\begin{align} \\ (f \circ g)''(a)[k, h] &= D_{k}D_{h}(f \circ g)(a) \\ &= D_{k} \bigg( D_{h}(f \circ g)(a) \bigg) \\ &= D_{k} \bigg( (f \circ g)'(a)[h] \bigg) \\ &= \bigg( D_{k} (f \circ g)'(a)\bigg) [h] \ \ \ \ \ \text{(by linearity)} \\ &= \bigg( D_{k} f'(g(a)) \circ g'(a)\bigg) [h] \ \ \ \ \ \text{(chain rule)} \\ &= \bigg( \frac{d}{dt} f'(g(a+tk)) \circ g'(a+tk)|_{t=0}\bigg) [h] \end{align}

I’m really confused what to do next. It looks like we’d need to apply some sort of the product rule (but there is no product here: only compositions). And whatever I do next, I immediately lose track of how it all fits with $k$ and $h$.

Any explanations (the more detailed the better) are hugely appreciated.

-

First of all consider that by the chain rule: $(g\circ f)''(z)=(g'(f(z))\circ f'(z))'$

Now, $g'(f(z))$ and $f'(z)$ are continuous linear functions because $f$ and $g$ are twice Frechet differentiable. With this, consider the function $c(a,b)=a\circ b$ for continuous linear functions $a$ and $b$. Then $c$ is a bilinear continuous functions.

So, we have that:

$$(g'(f(z))\circ f'(z))'=(c(g'(f(z)), f'(z)))'=c'(g'(f(z)), f'(z))\circ((g'\circ f(z))',f''(z))$$

And using the fact that $c$ is bilinear continuous, one has that

$$c'(g'(f(z)), f'(z))\circ((g'\circ f(z))',f''(z))=c(g'\circ f(z),f''(z))+c(g''\circ f(z)\circ f'(z),f'(z))=g'(f(z))\circ f''(z)+g''(f(z))\circ f'(z)\circ f'(z)=g''(f(z))\circ (f'(z),f'(z))+g'(f(z))\circ f''(z)$$

So $(g\circ f)''(z)=g''(f(z))\circ (f'(z),f'(z))+g'(f(z))\circ f''(z)$.

-

The composition sign in the line marked (chain rule) should be a product sign. By "normal" differentiation the final answer would be $f''(g(a))g'(a)+f'(g(a)g''(a)$.

-