In my textbook on Vector Analysis, I need to prove the following:
If $\phi$ is a differentiable function of $u$, which is in turn a differentiable function of $x_i$ ($i=1,2,3$), show that $$\nabla\,\phi=\frac{\mathrm d\phi}{\mathrm d u}\,\nabla\,u$$
Now I know that $\nabla\phi =\mathrm{grad}\,\phi=\displaystyle\frac{\partial\phi}{\partial x_i}$. But what I can't fully grasp is how the upright $\mathrm d$ differentials are going to turn up. My guess is the proof will look something like this:
$$\nabla\,\phi=\left(\frac{\partial\phi}{\partial x_1},\frac{\partial\phi}{\partial x_2},\frac{\partial\phi}{\partial x_3}\right)\stackrel{\text{somehow}}{=}\left(\frac{\partial u}{\partial x_1}\frac{\mathrm d\phi}{\mathrm d u},\frac{\partial u}{\partial x_2}\frac{\mathrm d\phi}{\mathrm d u},\frac{\partial u}{\partial x_3}\frac{\mathrm d\phi}{\mathrm d u}\right)$$
$$=\frac{\mathrm d\phi}{\mathrm d u}\left(\frac{\partial u}{\partial x_1},\frac{\partial u}{\partial x_2},\frac{\partial u}{\partial x_3}\right)=\frac{\mathrm d\phi}{\mathrm d u}\,\nabla\,u$$
Is there some aspect of the chain rule/how partial deriatives work I'm not understanding? I can't see how the equality from the second step to the third follows. I'd appreciate any help.
Suppose $\phi$ is a functions of one variable $x$ and that $f(x) = \phi(u(x))$. The chain rule states that $$\frac{df}{dx}(x) = \frac{d\phi}{du}(u(x)) \frac{du}{dx}(x).$$
Now write $f(x,y,z) = \phi(u(x,y,z))$. Treating $y$ and $z$ as fixed the chain rule mentioned above states that $$\frac{\partial f}{\partial x}(x,y,z) = \frac{ d \phi}{du}(u(x,y,z)) \frac{\partial u}{\partial x}(x,y,z).$$ Briefly, $\dfrac{\partial f}{\partial x} = \dfrac{d\phi}{du} \dfrac{\partial u}{\partial x}$. The same formula works for the other partial derivatives too. Thus $$\nabla f = \left( \dfrac{\partial f}{\partial x},\dfrac{\partial f}{\partial y},\dfrac{\partial f}{\partial z} \right) = \left( \dfrac{d\phi}{du} \dfrac{\partial u}{\partial x},\dfrac{d\phi}{du} \dfrac{\partial u}{\partial y},\dfrac{d\phi}{du} \dfrac{\partial u}{\partial z}\right) = \dfrac{d\phi}{du} \left( \dfrac{\partial u}{\partial x}, \dfrac{\partial u}{\partial y}, \dfrac{\partial u}{\partial z}\right) = \frac{d\phi}{du} \nabla u.$$
The last issue is a small abuse of notation and writing $\nabla \phi$ (interpreted as a function of three variables when composed with $u$) rather than $\nabla f$.