[Math] Divergence and directional derivative

vector analysisvectors

I found the divergence formula:

\begin{align}
\nabla \cdot \boldsymbol{u} = \left(\frac{\partial}{\partial x},\frac{\partial}{\partial y}\right) \cdot (u_1,u_2) = \frac{\partial u_1}{\partial x} + \frac{\partial u_2}{\partial y}
\end{align}
while the formula of directional derivative of a scalar field $f$ in the direction of $\boldsymbol{u}$ is:

\begin{align}
\nabla f \cdot \boldsymbol{u} = \left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right) \cdot (u_1,u_2) = u_1\frac{\partial f}{\partial x} + u_2\frac{\partial f}{\partial y}
\end{align}
My question is, why don't we have, in the second formula,

\begin{align}
\nabla f \cdot \boldsymbol{u} = \left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\right) \cdot (u_1,u_2) = \frac{\partial (fu_1)}{\partial x} + \frac{\partial (fu_2)}{\partial y}?
\end{align}
Is it because the direction vector $\boldsymbol{u}=(u_1,u_2)$ in the latter is constant?

Best Answer

Usually $\nabla$ only acts on the object immediately to its right. Another indication that that can't be the correct interpretation is that "$\cdot$" is an operation on two vectors, and $f$ is a scalar, while $\nabla f$ is a vector, so $f \cdot u$ doesn't make sense.

Yes, the convention with $\nabla$ can be a bit confusing, so you may prefer to write the directional derivative as $\mathbf{u} \cdot \nabla f$, or $(\nabla f) \cdot \mathbf{u}$. (You also find it written as $(\mathbf{u} \cdot \nabla)f$ to emphasise that $\mathbf{u} \cdot \nabla$ is the directional derivative operator, which sends scalar fields to scalar fields.) If you think an expression can be ambiguous, it's always best to bracket it carefully, just as $\sin{x}y$ could mean either $(\sin{x})y$ or $\sin{(xy)}$.

(The object you have written on the right-hand side of the last displayed equation is actually the divergence of the vector field $f\mathbf{u}$, i.e. $\nabla \cdot (f\mathbf{u})$.)

Related Question