# Curl (Kelvin-Stokes) theorem

Let ${\mathbf {E} }({\mathbf {x} })=[E_{x}(x,y,z),E_{y}(x,y,z),E_{z}(x,y,z)]$ be a smooth (differentiable) three-component vector field on the three dimensional space and the field $\nabla \times \mathbf {E} =\left[{\frac {\partial E_{z}}{\partial y}}-{\frac {\partial E_{y}}{\partial z}},{\frac {\partial E_{x}}{\partial z}}-{\frac {\partial E_{z}}{\partial x}},{\frac {\partial E_{y}}{\partial x}}-{\frac {\partial E_{x}}{\partial y}}\right]$ is its curl then the integral of the field curl projection onto the unite length vector field $\mathbf {n} (\mathbf {x} )$ always perpendicular to the surface and pointing outside the surface over the arbitrary two dimensional surface $S$ equals to the integral over the boundary of the surface $\partial S$ of the field itself projected onto the smooth unite length vector field $\mathbf {m} (\mathbf {x} )$ always tangent to this boundary or otherwise the out of the surface edge values of the field make virtually no contributions to the integral over the surface providing that the field is sufficiently smooth that the curl exists on the surface i.e.
$\int _{S}(\nabla \times \mathbf {E} )\cdot d\mathbf {S} =\oint \limits _{\partial S}\mathbf {E} \cdot d\mathbf {l}$
where $d\mathbf {S} =\mathbf {n} dS$, $d\mathbf {l} =\mathbf {m} dl$ and the $\partial S$ is the edge of $S$.

#### Proof

We can approximate the integral of the curl over the surface by the finite sum by dividing densely the space around the surface $S$ into small cubes with the edges $dx=dy=dz$ and the corners $[x_{i},y_{j},z_{k}]$ and approximating the surface $S$ by the walls of those cubes which are the closet to the surface as well as the coordinate derivatives of the field ${\mathbf {E} }$ in the curl by their difference quotients. We will keep the edges coordinate names for the convenience even if they are equal and keep the cube corners coordinate indices $i,j,k$ even if they are constrained by the closeness to the surface.
We get
$\int _{S}(\nabla \times \mathbf {E} )\cdot d\mathbf {S} =\sum _{i,j,k}\operatorname {sgn} _{yz}(i,j,k)\left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}-{\frac {E_{y}({x_{i},y_{j},z_{k+1}})-E_{y}(x_{i},y_{j},z_{k})}{dz}}\right]dydz+$ $\operatorname {sgn} _{xz}(i,j,k)\left[{\frac {E_{x}(x_{i},y_{j},z_{k+1})-E_{x}(x_{i},y_{j},z_{k})}{dz}}-{\frac {E_{z}({x_{i+1},y_{j},z_{k}})-E_{z}(x_{i},y_{j},z_{k})}{dx}}\right]dxdz+$ $\operatorname {sgn} _{xy}(i,j,k)\left[{\frac {E_{y}(x_{i+1},y_{j},z_{k})-E_{y}(x_{i},y_{j},z_{k})}{dx}}-{\frac {E_{x}({x_{i},y_{j+1},z_{k}})-E_{x}(x_{i},y_{j},z_{k})}{dy}}\right]dxdy+\Theta (dydz)+\Theta (dxdz)+\Theta (dxdy),$
where $\operatorname {sgn} _{lm}(i,j,k)$ is the sign of the contribution depending if the wall of the cube is facing the positive or the negative direction of the perpendicular coordinate.
Note that while $dydz$ is an infinitesimal (small) element of the surface parallel to the $y-z$ plane and for the unite vector $\mathbf {n} _{x}=[1,0,0]$ perpendicular to it $\pm (\nabla \times \mathbf {E} )(x_{n},y_{j},z_{k})\cdot \mathbf {n} _{x}=\pm \left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}-{\frac {E_{y}({x_{i},y_{j},z_{k+1}})-E_{y}(x_{i},y_{j},z_{k})}{dz}}\right]$ and each term if the sum is an approximate to the growth $(\nabla \times \mathbf {E} )\cdot d\mathbf {S}$ of the surface integral $\int _{S}(\nabla \times \mathbf {E} )\cdot d\mathbf {S}$ i.e.
$\operatorname {sgn} _{yz}(i,j,k)\left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}-{\frac {E_{y}({x_{i},y_{j},z_{k+1}})-E_{y}(x_{i},y_{j},z_{k})}{dz}}\right]dydz=(\nabla \times \mathbf {E} )\cdot d\mathbf {S} +\Theta (dydz)$.
Now the essential in proving the theorem is to focus on the contribution to the finite sum approximating the curl surface integral from the one component of the $\mathbf {E}$ field itself and notice that because of the cancelation of the sign alternating term the sums reduce to only the end points. For example for $E_{z}$ and the fixed $z$-slice $k$ and its surface we have
$\sum _{i,j}\operatorname {sgn} _{yz}(i,j,k)\left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}\right]dydz-\operatorname {sgn} _{xz}(i,j,k)\left[{\frac {E_{z}({x_{i+1},y_{j},z_{k}})-E_{z}(x_{i},y_{j},z_{k})}{dx}}\right]dxdz=(E_{z}(x_{n},y_{n},z_{k})-E_{z}(x_{1},y_{1},z_{k}))dz$,
where $x_{n},y_{n},z_{k}$ and $x_{1},y_{1},z_{k}$, are the coordinates of the cubic lattice corners near the approximate surface. To notice that one may consider two cases of the pieces of the approximate surface: 1) When the piece is the long rectangle consisting of many squares with the side $dx=dy=dz$ and with one side of this length. The sign-alternating terms cancel directly in the sum of difference quotients of the type $\sum _{i,j}\operatorname {sgn} _{yz}(i,j,k)\left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}\right]dydz$ to the endpoint values which later cancel with joining contributions. 2) The piece is the "stairs" of the width $dx$ climbing up or down by $dx$. In that case the terms cross-cancel to the end points to further cancel with joining contributions between the sum
$\sum _{i,j}\operatorname {sgn} _{yz}(i,j,k)\left[{\frac {E_{z}(x_{i},y_{j+1},z_{k})-E_{z}(x_{i},y_{j},z_{k})}{dy}}\right]dydz$ and $-\operatorname {sgn} _{xz}(i,j,k)\left[{\frac {E_{z}({x_{i+1},y_{j},z_{k}})-E_{z}(x_{i},y_{j},z_{k})}{dx}}\right]dxdz$.
Also note that while $dz$ is an infinitesimal (small) linear element of the surface boundary parallel to the $z$ axis and for the unite vector $\mathbf {n} _{z}=[0,0,1]$ parallel to it $\mathbf {E} (x_{n},y_{j},z_{k})\cdot \mathbf {n} _{z}=E_{z}(x_{n},y_{n},z_{k})$ and so for the second point with the minus sign the right side is an approximate to the growth $\mathbf {E} \cdot d\mathbf {l}$ of the surface edge integral $\oint \limits _{\partial S}\mathbf {E} \cdot d\mathbf {l}$ i.e.
$(E_{z}(x_{n},y_{n},z_{k})-E_{z}(x_{1},y_{1},z_{k}))dz=\mathbf {E} \cdot d\mathbf {l} +\Theta (dz)$.
Summing up all the all the $dz$ contributions over $k$ and repeating the considerations for the field components $E_{x}$, $E_{y}$ leading to the $dx$ and the $dy$ contributions of the surface edge integral we get $\int _{S}(\nabla \times \mathbf {E} )\cdot d\mathbf {S} =\sum _{i,j,k}[E_{x}(x_{i},y_{ni},z_{ni})-E_{x}(x_{i},y_{1i},z_{1i})]dx+[E_{y}(x_{nj},y_{j},z_{nj})-E_{y}(x_{1j},y_{j},z_{1j})]dy+[E_{z}(x_{nk},y_{nk},z_{k})-E_{z}(x_{1k},y_{1k},z_{k})]dz$
and so finally prove $\int _{S}(\nabla \times \mathbf {E} )\cdot d\mathbf {S} =\oint \limits _{\partial S}\mathbf {E} \cdot d\mathbf {l}$.