Could someone explain to me why the gradient operator in $x$ below "consumes" the square of the norm from the denominator and minus sign? How are the two expressions equivalent?
$$\frac{d^2x}{dt^2}=-G\int \frac{x-x'}{\|x-x'\|^3}\rho(x')d^3x'=\nabla[G\int\frac{\rho(x')}{\|x-x'\|}d^3x'] $$
$x$ and $x'$ are vectors of course. Thank you in advance!
Working in summation convention, we can calculate $$ \begin{align} \left[ \nabla \lVert x-a \rVert^n \right]_i &= \frac{\partial}{\partial x_i} ((x_j-a_j)(x_j-a_j))^{n/2} \\ &= 2\delta_{ik}(x_k-a_k) \frac{n}{2} ((x_j-a_j)(x_j-a_j))^{n/2-1} \\ &= n(x_i-a_i) \lVert x-a \rVert^{n-2}, \end{align} $$ and putting $n=-1$, $$\nabla \frac{1}{\lVert x-a \rVert} = - \frac{x-a}{\lVert x-a \rVert^3}$$