Derivatives of 3D Scalar/Vector Functions
Theorem
When the 3D scalar function $f : \mathbb{R}^{3} \to \mathbb{R}^{1}$ is $f(x(t), y(t), z(t)) = f$, $\dfrac{df}{dt}$ is as follows.
$$ \dfrac{d f}{d t} = \dfrac{\partial f}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f}{\partial z}\dfrac{dz}{dt} $$
When the 3D vector function $\mathbf{f} : \mathbb{R}^{3} \to \mathbb{R}^{3}$ is $\mathbf{f}(x(t), y(t), z(t)) = (f_{1}, f_{2}, f_{3})$, $\dfrac{d \mathbf{f}}{dt}$ is as follows.
$$ \begin{align*} \dfrac{d \mathbf{f}}{d t} =&\ \left( \dfrac{d f_{1}}{d t}, \dfrac{d f_{2}}{d t}, \dfrac{d f_{3}}{d t} \right) = \dfrac{d f_{1}}{d t}\hat{\mathbf{x}} + \dfrac{d f_{2}}{d t}\hat{\mathbf{y}} + \dfrac{d f_{3}}{d t}\hat{\mathbf{z}} \\[1em] =&\ \left( \dfrac{\partial f_{1}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{1}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{1}}{\partial z}\dfrac{dz}{dt} \right)\hat{\mathbf{x}} + \left( \dfrac{\partial f_{2}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{2}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{2}}{\partial z}\dfrac{dz}{dt} \right)\hat{\mathbf{y}} \\[1em] &+ \left( \dfrac{\partial f_{3}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{3}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{3}}{\partial z}\dfrac{dz}{dt} \right)\hat{\mathbf{z}} \end{align*} $$
Explanation
When the multivariable vector function $\mathbf{f} : \mathbb{R}^{n} \to \mathbb{R}^{m}$ is $\mathbf{f} = \left( f_{1}, f_{2}, \dots, f_{m} \right)$, the total derivative is as follows.
$$ \mathbf{f}^{\prime} = \begin{bmatrix} D_{1}f_{1} & D_{2}f_{1} & \cdots & D_{n}f_{1} \\ D_{1}f_{2} & D_{2}f_{2} & \cdots & D_{n}f_{2} \\ \vdots & \vdots & \ddots & \vdots \\ D_{1}f_{m} & D_{2}f_{m} & \cdots & D_{n}f_{m} \end{bmatrix} $$
Therefore, when $n=3$ and $m=1,3$, it is as follows.
$$ f^{\prime} = \begin{bmatrix} D_{1}f & D_{2}f & D_{3}f \end{bmatrix} = \begin{bmatrix} \dfrac{\partial f}{\partial x} & \dfrac{\partial f}{\partial y} & \dfrac{\partial f}{\partial z} \end{bmatrix} $$
$$ \mathbf{f}^{\prime} = \begin{bmatrix} D_{1}f_{1} & D_{2}f_{1} & D_{3}f_{1} \\ D_{1}f_{2} & D_{2}f_{2} & D_{3}f_{2} \\ D_{1}f_{3} & D_{2}f_{3} & D_{3}f_{3} \end{bmatrix} = \begin{bmatrix}\dfrac{\partial f_{1}}{\partial x} & \dfrac{\partial f_{1}}{\partial y} & \dfrac{\partial f_{1}}{\partial z} \\[1em] \dfrac{\partial f_{2}}{\partial x} & \dfrac{\partial f_{2}}{\partial y} & \dfrac{\partial f_{2}}{\partial z} \\[1em] \dfrac{\partial f_{3}}{\partial x} & \dfrac{\partial f_{3}}{\partial y} & \dfrac{\partial f_{3}}{\partial z} \end{bmatrix} $$
Now, let’s say $g(t) = \left( x(t), y(t), z(t) \right)$. Then
$$ f\left( x(t), y(t), z(t) \right) = f\left( g(t) \right) = f \circ g (t) $$
$$ \mathbf{f} \left( x(t), y(t), z(t) \right) = \mathbf{f} \left( g(t) \right) = \mathbf{f} \circ g (t) $$
Then, by the chain rule of the total derivative,
$$ \dfrac{df}{dt} = f\left( g(t) \right) = f^{\prime}(g(t)) g^{\prime}(t) = \begin{bmatrix} \dfrac{\partial f}{\partial x} & \dfrac{\partial f}{\partial y} & \dfrac{\partial f}{\partial z} \end{bmatrix} \begin{bmatrix} \dfrac{dx}{dt} \\[1em] \dfrac{dy}{dt} \\[1em] \dfrac{dz}{dt} \end{bmatrix} = \dfrac{\partial f}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f}{\partial z}\dfrac{dz}{dt} $$
$$ \dfrac{d\mathbf{f}}{dt} = \mathbf{f}^{\prime}(g(t)) g^{\prime}(t) = \begin{bmatrix} \dfrac{\partial f_{1}}{\partial x} & \dfrac{\partial f_{1}}{\partial y} & \dfrac{\partial f_{1}}{\partial z} \\[1em] \dfrac{\partial f_{2}}{\partial x} & \dfrac{\partial f_{2}}{\partial y} & \dfrac{\partial f_{2}}{\partial z} \\[1em] \dfrac{\partial f_{3}}{\partial x} & \dfrac{\partial f_{3}}{\partial y} & \dfrac{\partial f_{3}}{\partial z} \end{bmatrix} \begin{bmatrix} \dfrac{dx}{dt} \\[1em] \dfrac{dy}{dt} \\[1em] \dfrac{dz}{dt} \end{bmatrix} = \begin{bmatrix} \dfrac{\partial f_{1}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{1}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{1}}{\partial z}\dfrac{dz}{dt} \\[1em] \dfrac{\partial f_{2}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{2}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{2}}{\partial z}\dfrac{dz}{dt} \\[1em] \dfrac{\partial f_{3}}{\partial x}\dfrac{dx}{dt} + \dfrac{\partial f_{3}}{\partial y}\dfrac{dy}{dt} + \dfrac{\partial f_{3}}{\partial z}\dfrac{dz}{dt} \end{bmatrix} = \begin{bmatrix} \dfrac{df_{1}}{dt} \\[1em] \dfrac{df_{2}}{dt} \\[1em] \dfrac{df_{3}}{dt} \end{bmatrix} $$