In one of the "proofs" of Gauss' law in my textbook, author took divergence of the E.

$$ \mathbf E = \int_{\text{all space}} \dfrac{\hat{\mathscr r} }{{\mathscr r}^2} \rho(r^\prime) d\tau^\prime$$

Where $\mathscr r= r - r^\prime$, $r$ is where field is to be calculated, $\rho$ is charge density and $r^\prime$ is the location of $dq$ charge.

Next step is what I don't understand.

$$\nabla \cdot \mathbf E=\int_{\text{all space}} \nabla\cdot\left(\dfrac{\hat{\mathscr{r}} }{{{\mathscr r}}^2}\right) \rho(r^\prime) d\tau^\prime$$

I don't understand why it is $$\nabla\cdot\left(\dfrac{\hat{\mathscr r} }{{\mathscr r}^2}\right)$$ not $$\nabla\cdot\left(\dfrac{\hat{\mathscr r} }{{\mathscr r}^2}\rho(r^\prime) \right)$$ ?

Isn't $\nabla \cdot (f \mathbf{A}) = f\nabla \cdot (\mathbf {A}) + \mathbf{A} \cdot\nabla f$ not $\nabla \cdot (f \mathbf {A}) = f\nabla \cdot \mathbf{A}$ ?

$f$ is a real function and $\vec A$ is a vector function.

  • 2
    $\begingroup$ $\nabla$ is a derivative with respect to the components of $r$. $r^\prime$ is an integration variable, which is independent of $r$. Therefore $\rho(r^\prime)$ is a constant for the purposes of evaluating the derivative, but $r^{\prime\prime} = r-r^\prime$ is not $\endgroup$ Jul 10, 2017 at 14:20
  • $\begingroup$ @BySymmetry but $r$ is constant ? How can you take derivative wrt to a constant ? $\endgroup$ Jul 10, 2017 at 14:25
  • $\begingroup$ @123 I think BySymmetry means $r''$ in the first sentence. $\endgroup$ Jul 10, 2017 at 14:29
  • $\begingroup$ It is a constant in the integral, but $\mathbf{E}$ is in general a function of $r$ and so we can take a derivative with respect to it. $\endgroup$ Jul 10, 2017 at 14:31
  • $\begingroup$ @SRS Well the book used a weird kind of r. Capital $ r$ is suggestive of radius of a sphere, so I did not use it. I don't know bold face :((, but I will look into it. $\endgroup$ Jul 10, 2017 at 14:37

1 Answer 1


You are 100% correct, as are the expressions you're dealing with.

To see the connection, note that indeed, $$\nabla_r\cdot\left(\frac{\vec r - \vec r'}{\|\vec r - \vec r'\|^3} ~\rho(\vec r')\right) = \left(\nabla_r\cdot\frac{\vec r - \vec r'}{\|\vec r - \vec r'\|^3}\right) ~\rho(\vec r') + \left(\frac{\vec r - \vec r'}{\|\vec r - \vec r'\|^3} \right)\cdot\nabla_r\rho(\vec r'),$$ but the second term vanishes because $\vec r$ and $\vec r'$ are independent variables and therefore $\nabla_r \rho(r') = \vec 0$ is a vector of derivatives of constant expressions with respect to $\vec r$.

  • $\begingroup$ A trivial question. What is the difference between $||\vec{r}-\vec{r}^\prime||$ and $|\vec{r}-\vec{r}^\prime|$? $\endgroup$
    – SRS
    Jul 10, 2017 at 14:48
  • 2
    $\begingroup$ $|x|$ may mean many things and especially at the undergraduate level it usually refers to the absolute value function, $|q| = -q\text{ if } q < 0\text{ else } q,$ so I am using $\|\vec q\|$ to be a little more clear that I mean explicitly $\sqrt{q_x^2 + q_y^2 + q_z^2}.$ $\endgroup$
    – CR Drost
    Jul 10, 2017 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.