While studying electrodynamics, I got confused by one specific step that as been used in the book when calculating the magnetic momentum under a closed curve (current wire) $\partial F$:
$$ \int_{\partial F} \textbf{r}\times\mathrm{d}\textbf{r} = e_\textbf{z}\mathrm{vol}\:F $$
This seems like some kind of stokes theorem, but when expanding the surface, it would say
$$ \int_{\partial F} \textbf{r}\times\mathrm{d}\textbf{r} = \int_F \textbf{r} \cdot \textrm{d}\textbf{n} $$
But isn't Stoke's theorem the other way around, having the cross product (or exterior derivative) on the side of the surface?
Q1: What is the confusion here?
EDIT:
F is a surface in $\mathbb{R}^2 \times \{0\}$, which makes $\partial F$ a closed curve in said space. $\mathbf{r}$ denotes the position vector. $\mathbf{e_z}$ is the third vector of the standard basis of $\mathbb{R}^3$.
The first part will probably be trivial to answer, but since I often get confused by such details, I'd like to take the approach using differential forms and the exterior derivative.
So I tried to calculate, $r$ being a 1-form:
$$ \mathrm{d}(\textbf{r}\wedge\mathrm{d}\textbf{r}) = \mathrm{d}\textbf{r} \wedge \mathrm{d}\textbf{r} + (-1)^1 \textbf{r}\wedge\mathrm{d}\mathrm{d}\textbf{r} = 0 + 0 = 0 $$ Using that $\wedge$ is bilinear and $\mathrm{d}^2=0$. That cannot be true though, since the integral is nonzero.
Q2: where does the mistake of that approach lie?
The key to understanding what's going on here is to realize that for two vectors $u,v$ in the plane, $$u\times v \cdot e_z = u\cdot Jv$$ where $J$ is the perpendicular operator $J=\left[\begin{array}{cc}0 & 1\\-1 & 0\end{array}\right]$.
Therefore $e_z r\times dr = r\cdot \hat{n}$ as required, assuming that $r$ is arclength-parameterized so that $\|dr\|=1$. Also this means that the original volume formula is off by a factor of 2.
Now for your second question: first, you are trying to integrate a 3-form along a one-dimensional curve, which is not going to work. Second to apply Stokes's theorem you will need to extend $r\times dr$ to a form inside all of $F$. Of course it is easy to extend $r$ itself, but $dr$ is only well-defined on $\partial F$. You might be able to do the calculation this way if you write $\partial F$ as a level set of a function that foliates $F$.