# Chain rule proof

Let $a \in E \subset R^n, E \mbox{ open}, f: E \to R^m, f(E) \subset U \subset R^m, U \mbox{ open}, g: U \to R^l, F:= g \circ f.$ If $f$ is differentiable in $a$ and $g$ differentiable in $f(a)$, then $F$ is differentiable in $a$ and $F'(a)=g'(f(a)) f'(a)$.

I have been given a short proof, but I do not understand every step of it.

We have $f(a+h) = f(a) + f'(a)h + o(|h|)$ and $g(f(a)+k) = g(f(a)) + g'(f(a))k + o(|k|)$ as $h,k \to 0$. Thus

\begin{align} F(a+h)=(g \circ f)(a+h) &= g(f(a+h)) \\ &= g(f(a)+f'(a)h+o(|h|)) \\ &= g(f(a)) + g'(f(a))(f'(a)h+o(|h|)) + o(|f'(a)h+o(|h|)|) \\ &= (g\circ f)(a) + g'(f(a))f'(a)h+o(|h|) + o(O(|h|)) \\ &= F(a) + g'(f(a))f'(a)h+o(|h|) + o(|h|). \end{align}

That's all. I feel like there is some trickery involved with the little o en big o. My problems are:

Why does $f'(a)h+o(|h|) \to 0$ when $h\to 0$. I see that the first term tends to $0$, but how come $o(|h|) \to 0$?

$g'(f(a))o(|h|))=o(|h|)$.

$o(|f'(a)h + o(|h|)|)=o(O(|h|))$

$o(|h|) + o(|h|) = o(|h|)$.

This last one isn't included in the proof, but I expect that's would have been something trivial. I've been trying to work this out with the definitions of big o en little o, but to no prevail. It's confusion to me how I can do computations with big o and little o, since you can't really perform algebraic operations with them and it's more like a function property.

If anyone could show me how this would be done I'd be so thankful.

The symbol $o(|h|)$ is like a variable for a function $g(h)$ that satisfies $$\lim_{h \rightarrow 0} \frac{g(h)}{|h|} = 0.$$ Multiplying any such function by a constant gives you another function in that class, so we write $co(|h|) = o(|h|).$ Similarly, adding any two functions in that class gives another function in that class, so $o(|h|) + o(|h|) = o(|h|).$
$O(f(x))$ stands for any function $g(x)$ so that there is some $M$ so that $|g(x)| \leq M|f(x)$ for $x$ near 0. We want to show $f'(a)h + o(|h|)$ is $O(|h|)$. What this means is that if $g(h)$ is a function in $o(h)$, then we need a constant $M$ so that $|f'(a)h + g(h)| \leq |h|$. But $$|f'(a)h + g(h)| \leq |f'(a)||h| + |g(h)|,$$ and since the ratio $\frac{g(h)}{h}$ goes to zero, there must be a neighborhood of $0$ for which $|g(h)| \leq |h|$. So $o(|f'(a)h + o(|h|)|)$ is $o(O(|h|)$.
Now to show $o(O|h|)$ is $o(|h|)$. Suppose that $g$ is $o(O|h|)$. Then there is a function $p$ that is $O(|h|)$ with $\lim \frac{g(h)}{p(h)} = 0$. Choose $M$ so that $|p(h)| \leq M|h|$ near $0$. Then $\frac{g(h)}{|h|} \leq \frac{Mg(h)}{p(h)} \rightarrow 0$.
If you wanted to, you could easily go through the proof and replace each instance of $o$ or $O$ by an actual function with the required properties.