Vector potential of magnetic dipole When one calculates the vector potential of a magnetic dipole (current circuit), one can arrive at an integral of the form:
\begin{equation*}
    \vec{A} = \frac{I}{cR^3} \oint\limits_L {\vec{dl}} (
      {\vec{r}'} \cdot {\vec{R}}),
\end{equation*}
where $\vec{R}$ --position vector of watchpoint.
Using common formula
\begin{equation*}
\oint\limits_L  \overset{\vec{a}}{\vec{r}'}\times [\overset{\vec{b}}{d\vec{l}} \times \overset{\vec{c}}{\vec{R}}] = \oint\limits_L \overset{\vec{b}}{\vec{dl}} (
  \overset{\vec{a}}{\vec{r}'} \cdot \overset{\vec{c}}{\vec{R}}) - \oint\limits_L \overset{\vec{c}}{\vec{R}} (\overset{\vec{a}}{\vec{r}'}\cdot \overset{\vec{b}}{d\vec{l}})
\end{equation*}
So \begin{equation*}
    \vec{A} = \frac{I}{cR^3} \oint\limits_L  \vec{r}'\times [d\vec{l} \times \vec{R}].
\end{equation*}
The common answer is
\begin{equation*}
    \vec{A} = \frac{I}{cR^3}  \left( \frac12 \oint\limits_L  \vec{r}'\times d\vec{l}\right)  \times \vec{R} = \frac{\vec{m} \times \vec{R}}{R^3},
\end{equation*}
where
$$
\vec{m} = \frac{I}{2c} \oint\limits_L  \vec{r}'\times d\vec{l}
$$
Where does the ratio
\begin{equation*}
\oint\limits_L  \vec{r}'\times [d\vec{l} \times \vec{R}] = \underset{\text{area}}{\left( \frac12 \oint\limits_L  \vec{r}'\times d\vec{l}\right)}  \times \vec{R}
\end{equation*}
come from? How to prove the equation?
 A: Ok, as I mention above
\begin{equation*}
\oint\limits_L (\vec{r}'\cdot \vec{R}) d\vec{l}  = \oint\limits_L  \vec{r}'\times [d\vec{l} \times \vec{R}] .
\end{equation*}
Let's consider first integral $\oint\limits_L (\vec{r}'\cdot \vec{R}) d\vec{l} $. Multiply (by dot product) it by an arbitrary constant vector $\vec{a}$:
\begin{equation*}
\vec{a} \cdot \oint\limits_L (\vec{r}'\cdot \vec{R}) d\vec{l}  = 
 \oint\limits_L (\vec{r}'\cdot \vec{R}) \vec{a} \cdot d\vec{l}.
\end{equation*}
Now use a Stokes theorem
\begin{equation*}
 \oint\limits_L (\vec{r}'\cdot \vec{R}) \vec{a} \cdot d\vec{l} = \iint\limits_S \vec{\nabla} \times \left( (\vec{r}'\cdot \vec{R}) \vec{a}\right) \cdot d\vec{S}.
\end{equation*}
Simplify the expression $\vec{\nabla} \times \left( (\vec{r}'\cdot \vec{R}) \vec{a}\right)$:
\begin{equation*}
\vec{\nabla} \times \left( (\vec{r}'\cdot \vec{R}) \vec{a} \right) =  (\vec{r}'\cdot \vec{R}) \vec{\nabla}\times\vec{a} + (\nabla{ (\vec{r}'\cdot \vec{R})) \times \vec{a} }.
\end{equation*}
Still simplification $\nabla{ (\vec{r}'\cdot \vec{R})} = \vec{R}$
Because the $\vec{\nabla}\times\vec{a} = 0$, we have
\begin{equation*}
\iint\limits_S \vec{\nabla} \times \left( (\vec{r}'\cdot \vec{R}) \vec{a}\right) \cdot d\vec{S} = \iint\limits_S \vec{R} \times \vec{a}  \cdot d\vec{S}.
\end{equation*}
Swapping vectros (using triple product properties), we get
\begin{equation*}
 \iint\limits_S \vec{R} \times \vec{a}  \cdot d\vec{S} = \vec{a} \cdot \left( \iint\limits_S d\vec{S} \right) \times \vec{R}.
\end{equation*}
We finally received an equation
\begin{equation*}
\vec{a} \cdot \oint\limits_L (\vec{r}'\cdot \vec{R}) d\vec{l}  = 
 \vec{a} \cdot \left( \iint\limits_S d\vec{S} \right) \times \vec{R}.
\end{equation*}
Since the vector $\vec{a}$ is arbitrary:
\begin{equation*}
\oint\limits_L (\vec{r}'\cdot \vec{R}) d\vec{l}  = 
 \left( \iint\limits_S d\vec{S} \right) \times \vec{R}.
\end{equation*}
Maybe there is a simpler common way.

Using the proven identity, it is now easy to calculate the torque of Ampere force that rotates the loop wire in a homogeneous field:
\begin{equation*}
\vec{M} = \oint\limits_L  \vec{r} \times d\vec{F} = \oint\limits_L  \vec{r} \times [\frac{I}{c}d\vec{l} \times \vec{B} ] = \frac{IS}{c}\times \vec{B} = \vec{m}\times\vec{B}.
\end{equation*}
