Divergence and directional derivative

1.8k Views Asked by At

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?

2

There are 2 best solutions below

3
On 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})$.)

0
On

If $\mathbf u$ is a unit vector of constants $(u_x, u_y)$, not a function vector $(u_x(x,y), u_y(x,y))$, then the first equation $\nabla\cdot{\mathbf u} = 0$. The third equation is the same as the second one because $u_x$ and $u_y$ are constants as you said.

$$\begin{align} D_{\mathbf u}f(x,y) &= \nabla f(x,y) \cdot{\mathbf u} = (\frac{\partial f}{\partial x} ,\frac{\partial f}{\partial y})\cdot(u_x, u_y)\\&=\frac{\partial f}{\partial x}u_x+\frac{\partial f}{\partial y}u_y = \frac{\partial f u_x}{\partial x}+\frac{\partial fu_y}{\partial y} \end{align}$$ For example, to find the directional derivative of $f(x,y) = 2x^2 + 3y^2$ in the direction of $(-3, 4)$ at the point (2, 1), we first get the gradient $$\nabla f(x,y)=(\frac{\partial f}{\partial x} ,\frac{\partial f}{\partial y})=(4x,6y)$$Therefore, the gradient at (2,1) is $\nabla f(2,1)=(8,6)$. The unit vector in the direction of (-3,4) is $$\mathbf u= \frac {(-3,4)}{||(-3,4)||}=\frac {(-3,4)}{\sqrt{(-3)^2+4^2}}=(\frac {-3}{5},\frac{4}{5})$$ $$ D_{\mathbf u}f(2,1) = \nabla f(2,1)\cdot{\mathbf u}=(8,6)\cdot(\frac {-3}{5},\frac{4}{5})=(\frac{24}{5})(-1,1)$$ The magnitude of the gradient is the maximal directional derivative, which is $||(8,6)||=\sqrt{8^2+6^2}=10$.