# Divergence operator and integrals

When is it alright to put the divergence operator into an integral?

For example, would the following be right:

$$\nabla\cdot\int {1\over |\vec{r}-\vec{u}|}d\vec{u}=\int \left(\nabla\cdot{1\over |\vec{r}-\vec{u}|}\right)d\vec{u}=\int \left({\vec{r}-\vec{u}\over |\vec{r}-\vec{u}|^3}\right)\cdot d\vec{u}$$?

Thanks.

EDIT: I don't hink this is correct since I've just realized that $$\left(\nabla\cdot{1\over |\vec{r}-\vec{u}|}\right)\neq \left({\vec{r}-\vec{u}\over |\vec{r}-\vec{u}|^3}\right)$$ I have mistakenly taken the gradient instead. But then what is the divergence?

-
Wasn't the divergence an operator acting on vector fields? en.wikipedia.org/wiki/Divergence – Siminore May 4 '12 at 12:35

What we can say is

$$\begin{array}{c l} \nabla_{\rm x}\cdot\int_D \mathrm{F(x,r)}dV & =\nabla_{\rm x}\cdot\int_D\big(f_1(\mathrm{x,r}),\cdots,f_n(\mathrm{x,r})\big) dV \\ & = \nabla_{\rm x}\cdot\left(\int_Df_1(\mathrm{x,r})dV,\cdots,\int_Df_n(\mathrm{x,r})dV\right) \\ & = \frac{\partial}{\partial x_1}\left(\int_Df_1(\mathrm{x,r})dV\right)+\cdots+\frac{\partial}{\partial x_n}\left(\int_Df_n(\mathrm{x,r})dV\right) \\ & = \int_D \frac{\partial}{\partial x_1}f_1(\mathrm{x,r})dV+\cdots+\int_D\frac{\partial}{\partial x_n}f_n(\mathrm{x,r})dV \\ & = \int_D\left( \frac{\partial}{\partial x_1}f_1(\mathrm{x,r})+\cdots+\frac{\partial}{\partial x_n}f_n(\mathrm{x,r})\right)dV \\ & = \int_D\nabla_{\rm x}\cdot\mathrm{F(x,r)}dV. \end{array}$$

Remarks.

• $\mathrm{x}=(x_1,\cdots,x_n)$ is a vector and its components.
• $\mathrm{F(x,r)}=\big(f_1(\mathrm{x,r}),\cdots,f_n(\mathrm{x,r})\big)$ is a vector function of both $\rm x$ and $\rm r$. It is $\Bbb R^n\times D\to\Bbb R^n$.
• $\nabla_{\rm x}\,\cdot=\mathrm{div}_{\rm x}$ is with respect to $\rm x$ and only applies to vector functions, not scalar functions.
• The integration over the region $D$ involves the dummy vector $\rm r$.
• This works whenever the partial differentials and integration can be interchanged.

Also, similarly,

$$\nabla_{\rm x} \int_D f(\mathrm{x,r})dV=\int_D \nabla_{\rm x} f(\mathrm{x,r})dV$$

for a scalar function $f$. Note the difference between the divergence $\nabla\cdot$ and gradient $\nabla$.

-

I'll (try to) answer your last question. Consider any vector field $V \colon \mathbb{R}^n \to \mathbb{R}^n$. Its divergence is $\operatorname{div}V=\sum_{j=1}^n \frac{\partial V_j}{\partial x_j}$. It is the trace of the Jacobian matrix of $V$, if you prefer. This is the basic definition, and you can then move to vector fields on manifolds, to the weak divergence, and so on.

-