### Green, Gauss, Stokes: the classical theorems of integral calculus (part I)

In this series of posts I will present the classical theorems of integral calculus in a unified, geometric perspective; later I will show how this generalizes to differential forms, the exterior derivative and the general Stokes theorem. The objective here is not to be rigorous, but to emphasize the geometric intuition in these topics.

Let's start off easy, with the ordinary derivative of a function $f : \mathbb{R} \to \mathbb{R}$. Here's an unusual way to think about it: given an interval $[a, b]$, oriented positively (from $a$ to $b$), we can think of its boundary $\partial [a, b]$ as the discrete collection of points $\{a, b\}$, with a twist: $b$ is positively oriented, and $a$ is negatively oriented (it'll become clear what this means). If we integrate the function $f$ along the boundary of $[a, b]$, since an integral over a discrete set is really just a sum we get (keeping in mind the orientations) $\int_{\partial [a, b]} f = f(b) - f(a)$ The 'volume' of $[a, b]$ is just $\text{vol}([a, b]) = b - a$. Therefore we can interpret the ordinary derivative $f'(x)$ as: $f'(x) = \lim_{h \to 0} \frac{1}{\text{vol}([x, x+h])} \int_{\partial [x, x+h]} f$ You might think I'm needlessly complicating a simple thing, but you'll see! This perspective is what generalizes to higher dimensions (it becomes the exterior derivative).

Theorem (The Fundamental Theorem of Calculus): If $f'$ is continuous, then $\int_{[a, b]} f' = f(b) - f(a)$ Proof (heuristic): Subdivide the interval $[a, b]$ into many tiny segments: $a = x_0 < x_1 < x_2 < \cdots < x_n = b$. If this subdivision is fine enough, then over each segment $[x_k, x_{k+1}]$ we will have $f(x_{k+1}) - f(x_k) \approx f'(x_k) \text{vol}([x_k, x_{k+1}])$ Since $f'$ is continuous, it'll be nearly constant over the very small interval $[x_k, x_{k+1}]$. Therefore $\int_{[x_k, x_{k+1}]} f' \approx f'(x_k) \text{vol}([x_k, x_{k+1}]) \approx f(x_{k+1}) - f(x_k)$ So in the end we get a telescoping sum: $\int_{[a, b]} f' = \sum_{k = 0}^{n-1} \int_{[x_k, x_{k+1}]} f' \approx \sum_{k=0}^{n-1} \left[ f(x_{k+1}) - f(x_k) \right] = f(b) - f(a)$ Since the result $f(b) - f(a)$ of this approximation remains constant as the subdivision gets finer and finer, it holds true in the limit. $\square$

The divergence theorem

Let's move on to higher dimensions, and talk about the divergence theorem (also known as Gauss's theorem). Picture a vector field $V$ (in Euclidean space) as the velocity field of some fluid. The divergence of $V$ at a point $p$ tells you the rate at which fluid diverges away from that point (if it's negative, the fluid is converging onto the point).

To quantify this, consider $D(p; \epsilon)$ a (closed) disk of radius $\epsilon$ around $p$, whose boundary sphere we orient with the outward normal $\hat{n}$. The rate at which fluid flows out of the disk is simply $\int_{\partial D(p; \epsilon)} V \cdot \hat{n}\ dS$ This is because, over an infinitesimal region of the sphere, $V \cdot \hat{n}$ will give you the velocity of the fluid in the outward direction, and multiplying by the area $dS$ of said region will give you the volume that flows out per unit time; integrating over the sphere then gives the total rate of flow. Inspired by our previous interpretation of the ordinary derivative, we define $(\text{div}\ V)(p) = \lim_{\epsilon \to 0} \frac{1}{\text{vol}(D(p; \epsilon))} \int_{\partial D(p; \epsilon)} V \cdot \hat{n}\ dS$ Exercise: Show that, for $V = (V^1(x^1, \ldots, x^n), \ldots, V^n(x^1, \ldots, x^n))$, $\text{div}\ V = \frac{\partial V^1}{\partial x^1} + \cdots + \frac{\partial V^n}{\partial x^n}$ For simplicity, do it in dimension $n = 2$. You can take $p = (0, 0)$ without loss of generality, and make use of the Taylor approximation $V(x, y) \approx V(0, 0) + \left( x \frac{\partial V^1}{\partial x}(0, 0) + y \frac{\partial V^1}{\partial y}(0, 0), x \frac{\partial V^2}{\partial x}(0, 0) + y \frac{\partial V^2}{\partial y}(0,0) \right)$
Although we have defined the divergence by taking a limit of the flow out of disks centered at $p$, we could have used any type of piecewise differentiable region $\Delta$ shrinking down to the point $p$: we'd still have $(\text{div}\ V)(p) = \lim_{\text{diam}(\Delta) \to 0} \frac{1}{\text{vol}(\Delta)} \int_{\partial \Delta} V \cdot \hat{n}\ dS$ We can now understand the divergence theorem in a way closely analogous to our proof of the fundamental theorem of calculus.

Theorem (Gauss): If $U$ is a region with piecewise differentiable boundary, oriented with the outward normal, and $V$ a $C^2$ vector field (so that, in particular, $\text{div}\ V$ is continuous) then $\int_{U} \text{div}\ V\ d^n x = \int_{\partial U} V \cdot \hat{n}\ dS$ Proof (heuristic): For psychological comfort we will picture the case of dimension $n = 2$, though the general proof is exactly the same. Subdivide the region $U$ into very small (possibly curvy) triangles, all oriented counter-clockwise as in the picture: Over each triangle $\Delta$ (where $\text{div}\ V$ is nearly constant) we will have the approximation $\text{div}\ V \approx \frac{1}{\text{vol}(\Delta)} \int_{\partial \Delta}V \cdot \hat{n}\ dS$ and hence $\int_{\Delta} \text{div}\ V\ d^n x \approx \int_{\partial \Delta}V \cdot \hat{n}\ dS$ Therefore $\int_{U} \text{div}\ V\ d^n x = \sum_{\Delta} \int_{\Delta} \text{div}\ V\ d^n x \approx \sum_{\Delta} \int_{\partial \Delta}V \cdot \hat{n}\ dS$ For each side of a triangle, over which we integrate $V \cdot \hat{n}$, the same side will belong to another triangle receiving the opposite orientation, and so those integrals cancel out. Only the (curvy) sides belonging to the boundary don't cancel out, so that in the end (after taking the limit as the subdivision gets finer) we obtain $\int_{U} \text{div}\ V\ d^n x = \int_{\partial U} V \cdot \hat{n}\ dS$ as desired. $\square$

Next time we'll talk about the Green and Stokes theorems.

Notes

 The validity of using this approximation can be justified by the remainder formula.

 We need $C^2$ to have control over the remainder term in the Taylor approximation for this approach to work, though in general $C^1$ would be enough.