# Stokes and relatives

• The (general) Stokes Theorem: this unique theorem puts
Green’s/Gauss/Stokes Theorems (from intermediate calculus)
under one umbrella. Let $$C$$ be a polyhedron with boundary $$\partial C$$. Then
$${\int_{\partial C} \omega = \int_C d\omega }$$
• Example: integrate the form $$\omega = y dx$$ on the boundary
of the polygon $$C = \text{conv}\{(0,0), (1,0), (3,2), (0,3)\} \subset \mathbb{R}^2$$.
Indeed, by the Stokes theorem we have
$$\int_{\partial C} \omega = \int_{C} d\omega$$
The differential of $$\omega$$ is
$$d\omega = d(ydx) = dy \wedge dx + y(d(dx)) = dy\wedge dx = – dx\wedge dy$$
which is merely the area form. Therefore
$$\int_{C} d\omega = -\int_{C} dx\wedge dy = -|\text{area}| =-6.5$$
We can verify that the line integral over the boundary has
$$\int_0^3 2(x-2) dx + \int_3^0 (3-x/3) dx + 1 = (3x-x^2)\Big |_{3}^0 +1 = -7.5+1 = -6.5$$
• Example (sum of area normals): consider a polyhedra $$P\subset R^n$$.
A common result asserts that the sum of all outward pointing
face area normals (normals whose length is the area of the fact) vanish, i.e
$$\sum_{\text{faces}} \hat n_F \cdot \text{area}(F) = 0$$
This is a direct result of the Stokes theorem: the form $$\omega = dx_2\wedge \ldots \wedge dx_n$$
(which is an area form) has
$$\int_{\partial P} \omega = \int_P d\omega$$
but $$d\omega =0$$.

• Example (Archimedes’ buoyancy principle): this well
known physical law states that the buoyant force acting on a body
equals to the weight it displaces in the fluid. Stokes theorem
provides an elegant proof for this principle.
Assume a coordinate system $$x_1,x_2,x_3$$ such that
gravity (known our vertical reference) acts along $$x_1$$.
The local vertical force acting on a small boundary patch is
$$f_1 = x_1 \rho g dx_2\wedge dx_3$$
The overall vertical component of this force is the integral over the boundary,

\begin{align} F_1 &= \int_{\partial C} f_1 = – \rho g \int_{\partial C} x_1 dx_2\wedge dx_3 \\ & = -\rho g \int_C d(x_1 dx_2\wedge dx_3\\ &= -\rho g \int_C dx_1\wedge dx_2 \wedge dx_3) \\ &= -g(\rho \text{vol}(C)) = -g \cdot \text{mass} \end{align}

• Flux Integrals: consider the form flux form
$$\omega(x) = \sum (-1)^i a_i(x)dx_{J_i},$$
here
$$J_i = (1,\ldots, i-1,i+1,\ldots, n)$$
are all the indices between $$1,\ldots,n$$ with $$i$$ omitted.
In particular, the form in $$\mathbb{R}^3$$ looks like
$$\omega(x) = a_1 dx_2 \wedge dx_3 + a_2 dx_3 \wedge dx_1 + a_3 dx_1 dx_2$$,
which is an area form ($$2$$-form)). Integral of this form over a surface $$S$$
can be interpreted the flux:
$$\int_S \omega = \int (\bar a \cdot \bar n) dS$$
here $$\bar n$$ is the unit normal pointing outwards.
Flux can be used to determine areas over surfaces: if we set, for example, $$|a|=|n|$$ then
the integral above amounts to the area of $$S$$:
$$|A| = \int_A \underbrace{x_1 dx_2\wedge dx_3 + x_2 dx_3\wedge dx_1 + x_3 dx_1\wedge dx_2}_{\omega}$$

We can use this idea to compute the area of patches on the unit sphere $$x_1^2+x_2^2 +x_3^2 =1$$.
The form must admit (by differentiating a constant) $$2x_1dx_1 + 2x_2dx_2 + 2x_3dx_3 = 0$$,
therefore
$$dx_3 = – \frac{x_1dx_2 +x_2 dx_2 }{x_3}.$$
Substitute that in $$\omega$$ above

\begin{align} \omega &= x_3 dx_1\wedge dx_2 -x_1 dx_2\wedge \frac{x_1dx_2 +x_2 dx_2 }{x_3} -x_2\frac{x_1dx_2 +x_2 dx_2 }{x_3} \wedge dx_1 \\ & = \frac{x_1^2+x_2^2+x_3^2}{x_3} dx_1\wedge dx_2 = \frac{rdr \wedge d\phi}{x_3} \end{align}
Set $$x_3 = \sin(\theta)$$ $$r = \cos(\theta)$$
$$\frac{\cos(\theta)(-\sin(\theta))}{\sin(\theta)}d\theta \wedge d\phi = d(\overbrace{\sin(\theta)}^{x_3})d\phi,$$
as though we projected the sphere to a cylinder about the $$x_3$$ axis, and measure the area
on the cylinder surface.

The Lambert projection maps the surface of earth to a Rectangular map,
maintaining areas on the expense of geographical distortion.

This gives a very easy way to compute the area of a cap of a sphere. Define
the cap by the height of the cap (from the pole down to the base),
and apparently the area is proportional to the height; the area is
$$|A| = \int_{A} dx_3 \wedge d\phi$$
and note that the differential of the form $$\alpha = x_3 d\phi$$
is precisely the area form being integrated $$d\alpha = dx_3\wedge d\phi$$.

This yields, in fact yet another application of the Stokes integral: we can compute
the area of a patch (say, a country’s area) bound by the points $$p_k = (lat_k,lon_n)$$
by the approximation
$$\int_{A} dx_3 \wedge d\phi = \int_{\partial A} x_3 d\phi \approx \sum_k \sin(lat_k)\cdot [lon_{k+1}-lon_k]$$

• Flux of Electric field: the attenuation of the electrostatic
(Coulomb force) is reciprocal squared, i.e $$|F| \sim |r|^{-2}$$.

Gauss’s law of flux asserts that the overall flux through a surface
is proportional to the amount of electric charge in it. Thus, if if no
charge is present inside a surfaace, the flux should vanish.

The integral of this force through a surface $$S$$ is in fact the Flux integral
$$\int_S \omega = \int_{S} \frac{\bar n\cdot \bar r}{|r|^3} dS .$$
described by the differential $$2$$-form:
$$\omega = \frac{\overbrace{x_1 dx_2 \wedge dx_3 + x_2 dx_3\wedge dx_1 + x_3 dx_1\wedge dx_2}^{\tilde \omega}}{|r|^3}$$
here $$|r|^2 = x_1^2+x_2^2+x_3^2$$, where
the total Flux is $$\int_S \omega$$. Differentiate $$\tilde \omega$$:
$$d(x_1 dx_2\wedge dx_3) = \underbrace{dx_1\wedge dx_2\wedge dx_3}_{\lambda} + x_1\underbrace{d(dx_2\wedge dx_2)}_{=0},$$
similarly $$d(x_2 dx_3\wedge dx_1) = dx_2\wedge dx_3 \wedge dx_1$$, and same for
the third term, resulting with $$d\tilde \omega = 3\lambda$$, the Lebesgue volume form.

For the denominator, we have
$$d|r|^{-3} = -\frac{3}{2}(|r|^2)^{-5/2} d|r|^2 = -\frac{3}{2} \frac{2(\bar r\cdot d\bar r)}{|r|^{-5}} =-3\frac{\bar r \cdot d\bar r}{|r|^5}$$
since $$d|r|^2 = 2(x_1dx_2 + x_2dx_2 + x_3dx_3)$$.

Going back to $$\omega$$
$$d\omega = d(|r|^{-3}\tilde \omega) = d|r|^{-3}\wedge \tilde \omega + |r|^{-3} d\tilde \omega = -3 \frac{\bar r d\bar r}{|r|^5}\wedge \tilde \omega + 3 |r|^{-3}\lambda = -3 \frac{|r|^2\lambda }{|r|^5} + 3 |r|^{-3}\lambda = 0$$
so that the electrostatic flux is a closed form (definition follows).

• Closed forms : if $$d\omega = 0$$ then $$\omega$$ is called closed .
Integrating over closed forms does not depend on the actual surface of integration,
a property we call robustness (as Gauss’s Law of flux we have seen earlier).
Another example, the form in $$\mathbb{R}^2$$
$$\omega = \frac{x_1 dx_2 – x_2 dx_1}{x_1^2 +x_2^2}$$
is closed, i.e $$d\omega = 0$$.

Exact vs closed: recall that a differential form $$\omega$$ is exact if
$$\omega = d\alpha$$. For example, sometimes the
Coulomb force field can be differentiated from a scalar potential field (a $$1$$-form).

Every exact form is closed, but not the other way around.
For example, the form above (that has singularity at $$x_1=x_2=0$$) is closed but not
exact: an integral over the circle equals to $$2\pi$$, whereas for exact forms
this integral (over closed path) should vanish.

• Applications in Vector Calculus : let $$A$$ be a vector field in $$\mathbb{R}^3$$, i.e
$$A(x) = (A_1(x),A_2(x),A_3(x)).$$
Classically, the rotor/curl is defined as
$$\text{curl}(A) = \left|\begin{matrix} e_1 & e_2 & e_3 \\ \frac{\partial}{\partial x_1} & \frac{\partial}{\partial x_2} & \frac{\partial}{\partial x_3}\\ A_x & A_y & A_z \end{matrix}\right|$$
and the divergence as
$$\text{div}(A) = \frac{\partial A_1}{\partial x_1} + \frac{\partial A_2}{\partial x_2} + \frac{\partial A_3}{\partial x_3}$$, and similarly the gradient for a scalar field.

In the language of differential forms, we have
$$\alpha_A = A_1 dx_1 + A_2 dx_2 + A_3 dx_3,~~~~ \beta_A = A_1 dx_2\wedge dx_3 + A_2 dx_3\wedge dx_1 + A_3 dx_1\wedge dx_2$$

For a scalar field $$u$$ the gradient field is the form
$$du = \alpha_{\text{grad}(u)}$$.
Also, for example, we have
$$\alpha_A = \beta_{\text{curl}(A)}$$
$$d\beta_A = \text{div}(A)\cdot \lambda$$

A well known identity in vector analysis is that the
curl of a gradient vanish, and indeed
$$\beta_{curl(grad(f))} = d \alpha_{grad(f)} = d(df) = 0$$

Another standard formula in vector analysis is
the curl of a vector field multiplied by a scalar field:
$$\beta_{curl(fA)} = d\alpha_{fA} = d(f\alpha_A)=df\wedge \alpha_A+fd\alpha_A = df\times A +f\text{curl}(A)$$