Solution (source code)

= Solution

For an oriented piecewise smooth surface $S$ and a continuously differentiable <vector field> on a neighborhood of it, <Stokes theorem> states
$$
\boxed{\int_S(\nabla\times\mathbf F)\cdot d\mathbf S
=\oint_{\partial S}\mathbf F\cdot d\mathbf x.}
$$
The <oriented surface element> and boundary direction must agree by the right-hand rule. Every boundary component is included; for an upward-oriented graph over an <annulus> the outer boundary is anticlockwise and the inner boundary clockwise when viewed from above.