# Electromagnetic fields derivation

1. Jul 21, 2015

### barefeet

1. The problem statement, all variables and given/known data
In a book I find the following derivation:
$$\int (J \cdot \nabla ) \frac{\bf{r} - \bf{r}'}{|\bf{r} - \bf{r}'|^3} d^3\mathbf{r'}= -\sum_{i=1}^3 \int J_i \frac{\partial}{\partial r_i'} \frac{\bf{r} - \bf{r}'}{|\bf{r} - \bf{r}'|^3} d^3\mathbf{r'} \\ = -\sum_{i=1}^3 \int J_i \frac{\bf{r} - \bf{r}'}{|\bf{r} - \bf{r}'|^3} d^2r_{j\neq i}'\bigg|_{r_i' = -\infty}^\infty + \int \frac{\bf{r} - \bf{r}'}{|\bf{r} - \bf{r}'|^3} \nabla' \cdot \mathbf{J} d^3\mathbf{r'}$$

2. Relevant equations
None

3. The attempt at a solution
I understand the first line, but in the second line I don't understand how the second term comes about. I dont see how the divergence of J is taken as the nabla operator doesnt operate on it. If I calculate for example one of the three terms:
$$\int J_x \frac{\partial}{\partial x'} \frac{\bf{r} - \bf{r}'}{|\bf{r} - \bf{r}'|^3} d^3\mathbf{r'}$$
I don't see how a term with $\frac{\partial J_x}{\partial x'}$ comes out of this?

2. Jul 21, 2015

### jasonRF

Here is a hint: integration by parts

3. Jul 21, 2015

### cpsinkule

the x component of j*grad (r/r3) is j*grad(rx/r3), not jxgrad(rx/r3) you then use the vector calculus identity