The divergence of a function $u: \mathbb{R}^n \rightarrow \mathbb{R}$

165 Views Asked by At

By definition, if we have a function $u: \mathbb{R}^n \rightarrow \mathbb{R}^n$, then it's divergence is given by: $$\triangledown u = \sum^n_{i=1}\frac{\partial u_i}{\partial x_i} $$ In my class sheet, there is a exercise where $u : \mathbb{R}^3 \rightarrow \mathbb{R}$, and I should be able to calculate $\triangledown u$. How does the formula look then? Does it make any sense?

1

There are 1 best solutions below

1
On BEST ANSWER

I think that you are mixing up the definition of gradient with that of divergence.

For a real-valued function $u(x,y,z)$ on $\mathbb R^3$, the gradient $\nabla u(x,y,z) $ is a vector-valued function on $\mathbb R^3$, that is, its value at a point $(x,y,z)$ is the vector

$$\nabla u(x,y,z)=\left(\frac{\partial u}{\partial x},\frac{\partial u}{\partial y},\frac{\partial u}{\partial z}\right)=\frac{\partial u}{\partial x}i+\frac{\partial u}{\partial y}j+\frac{\partial u}{\partial z}k$$

in $\mathbb R^3$, where each of the partial derivatives is evaluated at the point $(x,y,z)$. So in this way, you can think of the symbol $\nabla$ as being “applied” to a real-valued function $u$ to produce a vector $\nabla u$.

It turns out that the divergence can also be expressed in terms of the symbol $\nabla$. This is done by thinking of $\nabla$ as a vector in $\mathbb R^3$ , namely

$$\nabla = \frac{\partial }{\partial x}i+\frac{\partial }{\partial y}j+\frac{\partial }{\partial z}k$$

Here, the symbols $\dfrac{\partial }{\partial x},\dfrac{\partial }{\partial y}$, and $\dfrac{\partial }{\partial z}$ are to be thought of as “partial derivative operators” that will get “applied” to a real-valued function, say $u(x,y,z)$, to produce the partial derivatives $\dfrac{\partial u}{\partial x},\dfrac{\partial u}{\partial y}$, and $\dfrac{\partial u}{\partial z}$.

Is $\nabla$ really a vector? Strictly speaking, no, since $\dfrac{\partial }{\partial x},\dfrac{\partial }{\partial y}$, and $\dfrac{\partial }{\partial z}$ are not actual numbers. But it helps to think of $\nabla$ as a vector, especially with the divergence. The process of “applying” $\dfrac{\partial }{\partial x},\dfrac{\partial }{\partial y},\dfrac{\partial }{\partial z}$ to a real-valued function $u(x,y,z)$ is normally thought as multiplying the quantities

$$\left(\frac{\partial}{\partial x}\right)(u)=\frac{\partial u}{\partial x},~~\left(\frac{\partial}{\partial y}\right)(u)=\frac{\partial u}{\partial y},~~\left(\frac{\partial}{\partial z}\right)(u)=\frac{\partial u}{\partial z}$$

For this reason, $\nabla$ is often referred to as the “del operator”, since it “operates” on functions.

This is why is often convenient to write the divergence $\text{div}~ u$ as $\nabla\cdot u$, since for a vector field $$u(x,y,z)=u_1(x,y,z)i+u_2(x,y,z)j+u_3(x,y,z)k$$ the dot product of $u$ with $\nabla$ (thought of as a vector) makes sense

\begin{align} \nabla \cdot u &= \left(\frac{\partial }{\partial x}i+\frac{\partial }{\partial y}j+\frac{\partial }{\partial z}k\right)\cdot \left(u_1(x,y,z)i+u_2(x,y,z)j+u_3(x,y,z)k\right)\\&= \left(\frac{\partial}{\partial x}\right)(u_1)+\left(\frac{\partial}{\partial y}\right)(u_2)+\left(\frac{\partial}{\partial z}\right)(u_3)\\&= \frac{\partial u_1}{\partial x}+\frac{\partial u_2}{\partial y}+\frac{\partial u_3}{\partial z}\\&= \text{div }u \end{align}

Because of this, the result of the divergence is a scalar function. In summary:

  1. The gradient is what you get when you “multiply” $\nabla$ by a scalar function

$$\nabla u(x,y,z)=\left(\frac{\partial u}{\partial x},\frac{\partial u}{\partial y},\frac{\partial u}{\partial z}\right)=\frac{\partial u}{\partial x}i+\frac{\partial u}{\partial y}j+\frac{\partial u}{\partial z}k$$

where the result of the gradient is a vector field. We can say that the gradient operation turns a scalar field into a vector field.

  1. The divergence is what you get when you “dot” $\nabla$ with a vector field

$${\text{div }} \mathbf{u} = \nabla\cdot\mathbf{u} = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z} \right) \cdot (u_1,u_2,u_3) = \frac{\partial u_1}{\partial x}+\frac{\partial u_2}{\partial y}+\frac{\partial u_3}{\partial z}$$

where the result of the divergence is a scalar function. We can say that the divergence operation turns a vector field into a scalar field.