Reconcile the chain rule with a derivative formula I know the chain rule is like this:  $f(g(x)) = f'(g(x))g'(x)$.
However, I encountered a derivative with which I cannot reconcile the statement above.
Let $F$ be a function of $x$ and $z$, and $z$ is a function of $x$. Then by the chain rule:
$$\frac{dF}{dx} = \frac{\partial{F}}{\partial{x}} + \frac{\partial{F}}{\partial{z}}\frac{\partial{z}}{\partial{x}}$$
I'm not sure how the equation is derived. The second part of the left hand side $\frac{\partial{F}}{\partial{z}}\frac{\partial{z}}{\partial{x}}$ looks similar to the chain rule. I'm not sure where $\frac{\partial{F}}{\partial{x}}$ came from. 
 A: For a function $F=F(x,y)$ where you are going to make the dependece  $x=x(t)$ and $y=y(t)$, the total differential is
$$dF=\frac{\partial F}{\partial x}dx+\frac{\partial F}{\partial y}dy,$$ and the chain rule is
$$\frac{dF}{dt}=\frac{\partial F}{\partial x}\frac{dx}{dt}+\frac{\partial F}{\partial y}\frac{dy}{dt}.$$
But if $x=t$ then
$$\frac{dF}{dx}=\frac{\partial F}{\partial x}+\frac{\partial F}{\partial y}\frac{dy}{dx}.$$
A: People who are new to this kind of computations are easily confused by abuse of notation; indeed quite a lit of detail is hidden in the formula you asked.
Let me begin by recalling the general form of the chain rule:

If $F : \mathbb{R}^m \to \mathbb{R}^n$ and $G : \mathbb{R}^l \to \mathbb{R}^m$ are differentiable, then the derivative of the composition $F\circ G$ evaluated at $\mathrm{x} \in \mathbb{R}^l$ is given by
$$ [D(F\circ G)]_{\mathrm{x}} = [DF]_{G(\mathrm{x})}[DG]_{\mathrm{x}} $$



*

*When $l=m=n=1$, then the above formula reduces to $(f\circ g)'(x) = f'(g(x))g'(x)$.

*The assumption can be significantly weakened by restricting $F$ and $G$ to smaller domains and asking differentiability only at certain points, although it does not change the essence of the above statement.
Now, in order to make the computation in question a bit more rigorous, let us explicate the function relation between $z$ and $x$: let $g$ be such that $z = g(x)$. If we write $G(x) = (x, g(x))$, then the chain rule applied to the composition $F \circ G$ tells that
\begin{align*}
\frac{d}{dx} F(x, g(x))
&= [D(F \circ G)]_{x}
 = [DF]_{G(x)} [DG]_x \\
&= \begin{pmatrix} \frac{\partial F}{\partial x} & \frac{\partial F}{\partial z} \end{pmatrix}_{G(x)} \begin{pmatrix} \frac{dx}{dx} \\ \frac{dg(x)}{dx} \end{pmatrix}_x \\
&= \frac{\partial F}{\partial x}(x, g(x)) + \frac{\partial F}{\partial z}(x, g(x))g'(x)
\end{align*}
