Derivation of the formula of the vector potential I'm trying to derive the formula for vector potentials,
$$\vec{A} = \frac{\mu_{0}}{4{\pi}} \int \frac {\vec{j} (\vec{r}')} {\lvert \vec{r} - \vec{r}' \rvert} \mathrm{d} \vec{r}' $$
from the Biot and Savart formula
$$\vec{B} = \frac{\mu_{0}}{4{\pi}} \int \frac {\vec{j} (\vec{r}') \times ( \vec{r} - \vec{r}' ) } {{\lvert \vec{r} - \vec{r}' \rvert}^{3} } \mathrm{d} \vec{r}' .$$
I saw that the key of the derivation is to write
$$ {\vec{\nabla}}_{\vec{r}} \times \frac {\vec{j} (\vec{r}')} {\lvert \vec{r} - \vec{r}' \rvert} = \frac { {\vec{\nabla}}_{\vec{r}} \times \vec{j} (\vec{r}') } { \lvert \vec{r} - \vec{r}' \rvert } - \vec{j} (\vec{r}') \times \left ( {\vec{\nabla}}_{\vec{r}} \times \frac {1} { \lvert \vec{r} - \vec{r}' \rvert } \right ) =  \vec{j} (\vec{r}') \times \frac {\vec{r} - \vec {r}' } {{\lvert \vec{r} - \vec{r}' \rvert}^{3} } ,$$
but I don't understand why
$$ \frac { {\vec{\nabla}}_{\vec{r}} \times \vec{j} (\vec{r}') } { \lvert \overrightarrow{r} - \vec{r}' \rvert } - \vec{j} (\vec{r}') \times \left ( {\vec{\nabla}}_{\vec{r}} \times \frac {1} { \lvert \vec{r} - \vec{r}' \rvert } \right ) =  \vec{j} (\vec{r}') \times \frac {\vec{r} - \vec {r}' } {{\lvert \vec{r} - \vec{r}' \rvert}^{3} }. $$
Also, what is the difference between ${\vec{\nabla}}_{\vec{r}}$ and $ {\vec{\nabla}}_{\vec{r}'}$ ?
 A: The difference between ${\vec{\nabla}}_{\vec{r}}$ and $ {\vec{\nabla}}_{\vec{r}'}$ is that the former represents derivatives with respect to $\vec r$, and the latter differentiates with respect to $\vec r'$.
The formula that puzzles you,
$$ \frac { {\vec{\nabla}}_{\vec{r}} \times \vec{j} (\vec{r}') } { \lvert \overrightarrow{r} - \vec{r}' \rvert } - \vec{j} (\vec{r}') \times \left ( {\vec{\nabla}}_{\vec{r}} \color{\red}{\times} \frac {1} { \lvert \vec{r} - \vec{r}' \rvert } \right ) =  \vec{j} (\vec{r}') \times \frac {\vec{r} - \vec {r}' } {{\lvert \vec{r} - \vec{r}' \rvert}^{3} }, $$
has two things going on.


*

*One is the term in ${\vec{\nabla}}_{\vec{r}} \times \vec{j} (\vec{r}')$, which vanishes because $\vec{j} (\vec{r}') $ does not depend on $\vec r$, and therefore under the action of $\vec\nabla_\vec{r}$ it gives zero.

*The other is the gradient (not the curl!) of the relative separation, 
$${\vec{\nabla}}_{\vec{r}}  \frac {1} { \lvert \vec{r} - \vec{r}' \rvert } = -\frac {\vec{r} - \vec {r}' } {{\lvert \vec{r} - \vec{r}' \rvert}^{3} },$$
which reduces to a simple calculation. As an example, for the $x$ component of the gradient, and setting $\tilde r=\lvert \vec{r} - \vec{r}' \rvert$, we have
$$
\frac{\partial}{\partial x}\frac{1}{\tilde r} = -\frac{1}{\tilde r^2} \frac{\partial \tilde r}{\partial x},
$$
where
\begin{align}
\frac{\partial \tilde r}{\partial x}
& = \frac{\partial }{\partial x}\sqrt{(x-x')^2+(y-y')^2+(z-z')^2}
\\& = \frac{2(x-x')}{2\sqrt{(x-x')^2+(y-y')^2+(z-z')^2}}
\\& = \frac{(x-x')}{\tilde r},
\end{align}
so
$$
\frac{\partial}{\partial x}\frac{1}{\tilde r} = -\frac{x-x'}{\tilde r^3},
$$
as claimed.

