Proving the composition of two functions having partial derivatives has a partial derivative. Let $N$ be open subset of $\Bbb R^n$,   $x \in N$
The function $f : N \to \Bbb R$ has a partial derivative at point $x$
Let $I$ be open interval in $\Bbb R$ with $f(N) \subset I $
The function $g: I \to \Bbb R$ have a derivative at $f(x)$
How do I prove that the compositon $g\circ f : N \to \Bbb R $ has a partial derivative at $x$
$\frac {\partial}{\partial x_i}(g\circ f)(x) = g'(f(x))\frac{\partial f}{\partial x_i}(x)$
with component $i$?
Please show me a clear way to solve this.
 A: Consider $h = g \circ f$. Let us calculate the partial derivative at $p \in N $ with respect to the $j$-th coordinate. Observe that $\gamma(t) = p+te_j$ gives a line in the $j$-th coordinate direction for which $\gamma(0)=p$. The partial derivative of $h$ with respect to $x_j$ at $p$ is defined by 
$$ \frac{\partial h}{\partial x_j}(p)=\frac{d}{dt} \bigl( h \circ \gamma \bigr)(t) |_{t=0}
=\lim_{t \rightarrow 0} \frac{ h(p+te_j)-h(p)}{t} $$
Consider,
$$
 \frac{d}{dt} \bigl( h \circ \gamma \bigr)(t)  = \frac{d}{dt} g( f (\gamma(t))) 
= g'(f(\gamma(t)) \frac{d}{dt}f(\gamma(t) )
$$
where I used the single-variate chain rule in the last equality. Now, if you understand the definition I used for the partial derivative, your result is obvious from what I've written. Although, I replaced $x$ with $p$.
A: Alternatively, as suggested in the comments
Let $A\subseteq\Bbb R^n$ be an open set, $f:A\to\Bbb R^m$ a differentiable function, $c\in A$ and $v\in\Bbb R^n$ some unit vector. Let $x=c+hv$. Then $$\begin{aligned}\lim_{h\to 0}\frac{\|f(c+hv)-f(c)-hDf(c)v\|}{\|hv\|}=0\iff\lim_{h\to 0}\frac{f(c+hv)-f(c)-hDf(c)v}h&=0\\\implies\frac{\partial f}{\partial v}(c)=\lim_{h\to 0}\frac{f(c+hv)-f(c)}h&=Df(c)v\end{aligned}$$ so, in your case:
$$\color{green}{\frac{\partial (g\circ f)}{\partial x_j}(c)}=\color{green}{D(g\circ f)(c)e_j}=Dg(f(c))\circ \color{blue}{Df(c)e_j}=g'(f(c))\color{blue}{\frac{\partial f}{\partial x_j}(c)}$$
