What is the gradient of the inverse of the magnitude of a difference vector? This is a follow-up to a question I recently asked on Math.SE which was about the math in particular: Proof of the gradient of the inverse magnitude of a vector? - Mathematics Stack Exchange. It is presented here for those curious about this result, which appears in Jackson's Classical Electrodynamics (link). The problem is showing that the following is true:
$$-\nabla \left[\frac{1}{||\vec{x} - \vec{x}'||}\right] = \frac{\vec{x} - \vec{x}'}{||\vec{x} - \vec{x}'||^3}$$
Where $\vec{x}$ is a variable independent (position) vector, and $\vec{x}'$ is a constant vector. 
 A: For a given vector field $\vec{v}(x,y,z)$ and a constant vector $\vec{v}'$, we would like to show that the negative gradient of the inverse of the magnitude of the difference of these vectors is the difference vector divided by the magnitude cubed. 
$$-\nabla \left[\frac{1}{||\vec{v} - \vec{v}'||}\right] = \frac{\vec{v} - \vec{v}'}{||\vec{v} - \vec{v}'||^3}$$
Here, the vertical bars imply magnitude, or norm of the vector, and the vectors $\vec{v},\vec{v}' \in \mathbb{R}^3$. One can begin the problem by letting the vector field $\vec{x}$ be the difference vector of any vector field and a constant vector, so the problem becomes:
$$-\nabla \left[\frac{1}{||\vec{x}||}\right] = \frac{\vec{x}}{||\vec{x}||^3}$$
Where
$$\vec{x} = \vec{v} - \vec{v}'$$
(Which is also equivalent to setting $\vec{v}' = \vec{0}$, a special case of the original identity. )
To prove it, begin by expanding, and calculating the components, like so:
$$\nabla \left[\frac{1}{||\vec{x}||}\right] = \frac{\partial}{\partial x} \frac{1}{||\vec{x}||} \mathbf{i} + \frac{\partial}{\partial y} \frac{1}{||\vec{x}||} \mathbf{j} + \frac{\partial}{\partial z} \frac{1}{||\vec{x}||} \mathbf{k} $$
Then for the first component:
$$\frac{\partial}{\partial x} \frac{1}{||\vec{x}||} = \frac{\partial}{\partial x} (x_1^2 + x_2^2 + x_3^2)^\frac{-1}{2}$$ 
$$ = \frac{-1}{2||\vec{x}||^3}\frac{\partial}{\partial x} (x_1^2 + x_2^2 + x_3^2) $$
$$ = \frac{-1}{||\vec{x}||^3} (x_1 \frac{\partial}{\partial x} [x_1] + x_2 \frac{\partial}{\partial x} [x_2] + x_3 \frac{\partial}{\partial x} [x_3]) $$
Which, continuing for all components, gives the expected factor of $\frac{1}{||\vec{x}||^3}$, implying that, for each component,
$$x_i = (x_1 \frac{\partial}{\partial n} [x_1] + x_2 \frac{\partial}{\partial n} [x_2] + x_3 \frac{\partial}{\partial n} [x_3])$$
Where $n$ is $x$, $y$, or $z$ for $i = 1,2,3$ respectively. Written out, we have:
$$x_1 = (x_1 \frac{\partial}{\partial x} [x_1] + x_2 \frac{\partial}{\partial x} [x_2] + x_3 \frac{\partial}{\partial x} [x_3])$$
$$x_2 = (x_1 \frac{\partial}{\partial y} [x_1] + x_2 \frac{\partial}{\partial y} [x_2] + x_3 \frac{\partial}{\partial y} [x_3])$$
$$x_3 = (x_1 \frac{\partial}{\partial z} [x_1] + x_2 \frac{\partial}{\partial z} [x_2] + x_3 \frac{\partial}{\partial z} [x_3])$$
Which can be written more succinctly as:
$$x_1 = \left(\frac{\partial}{\partial x}\vec{x}\right) \circ \vec{x}$$
$$x_2 = \left(\frac{\partial}{\partial y}\vec{x}\right) \circ \vec{x}$$
$$x_3 = \left(\frac{\partial}{\partial y}\vec{x}\right) \circ \vec{x}$$
Where $\circ$ represents the dot product. Better yet, using the gradient of a vector (a tensor), we can say that:
$$\nabla \vec{x} = \mathbf{I}$$
Where $\mathbf{I}$ is the identity tensor of order 2.
These relations do not hold for many vector fields. For example, $\vec{r} = x^2 \mathbf{i} +  x^2 \mathbf{j} + x^2 \mathbf{k}$ has $\left(\frac{\partial}{\partial x}\vec{x}\right) \circ \vec{x} = 6x^3$. However, considering the particular case of a position vector, $\vec{r} = x\mathbf{i} + y\mathbf{j} + z\mathbf{k}$, we find that the above are true, and we can say:
$$\nabla \left[\frac{1}{||\vec{x}||}\right] = -\frac{\vec{x}}{||\vec{x}||^3}$$
Which is our desired result. When we consider the difference of the position vector and a constant vector $\vec{x}'$, we can see that the relations still hold, and therefore:
$$-\nabla \left[\frac{1}{||\vec{r} - \vec{v}'||}\right] = \frac{\vec{r} - \vec{v}'}{||\vec{r} - \vec{v}'||^3}$$
And so the statement is true, in the particular case of the position vector.
