# Divergence of Electric Field: Moving Del Operator Inside Integral

I'm reading Griffiths E&M book (4th edition), and on page 71 he starts with the expression for the electric field of a volume charge distribution: $$\vec{E}(\vec{r}) = \frac{1}{4\pi \epsilon_0}\int_V \frac{\vec{r}-\vec{r}'}{\lvert \vec{r}-\vec{r}'\rvert^{3/2}} \rho(\vec{r}') d\tau'$$ He then takes the divergence of this expression: $$\nabla \cdot\vec{E} = \frac{1}{4\pi\epsilon_0}\nabla\cdot\int_V \frac{\vec{r}-\vec{r}'}{\lvert \vec{r}-\vec{r}'\rvert^{3/2}} \rho(\vec{r}') d\tau'$$ which he then rewrites (actually, he doesn't included the intermediate step I wrote above, so he just immediately writes $$\nabla \cdot\vec{E} = \frac{1}{4\pi\epsilon_0}\int_V \left(\nabla\cdot\frac{\vec{r}-\vec{r}'}{\lvert \vec{r}-\vec{r}'\rvert^{3/2}}\right) \rho(\vec{r}') d\tau'$$ I understand that $\rho$ is independent of $\vec{r}$ and so the $\nabla$ doesn't touch it, but I don't know how to justify moving the del operator from outside to inside the integral. How do I know (or how can I show) that is allowed? I guess it's related to the Leibniz integral rule.

• Note: I used $\vec{r}-\vec{r}'$ rather than the script r that Griffiths uses because I don't know how to make one of those. – Mike Bell Sep 6 '16 at 23:48
• This is because divergence is a linear operator: $\nabla \cdot (\mathbf{A}_1 + \mathbf{A}_2) = \nabla \cdot \mathbf{A}_1 + \nabla \cdot \mathbf{A}_2$. – knzhou Sep 7 '16 at 0:01
• @knzhou The integral is not just a normal sum, but a sum with limit. The divergence also involves limits. Is that so obvious from your simple argument that the two limits can be switched? – velut luna Sep 7 '16 at 0:17
• @velutluna Of course not! This is "physicist math", though. It'll work just fine for Griffiths. – knzhou Sep 7 '16 at 0:20

You can consider each of the partial derivatives on the divergence operator one at a time, and apply the Leibniz rule. The integrals all run from $-\infty$ to $\infty$ so the bounds of integration are constant, and the boundary terms drop out. More heuristically, you can also note (as knzhou points out) that the divergence operator distributes across sums, and an integral is like a sum of many terms.