# Generalizing the Fundamental Theorem of Calculus

We've seen many analogues between multivariable and single variable calculus. For some single-variable concepts, like the derivative, we've found several higher-dimensional analogues, like the gradient, curl, and divergence. The same is true for the fundamental theorem of calculus. In this lecture we will be examining three theorems which relate the integral of the derivative of a function over a region, to the integral of the function itself on the boundary of that region.

In later courses, you will learn that all these different concepts are the same thing: the single variable derivative, the curl, divergence, and gradient are all examples of something called the exterior derivative, and the various versions of the fundamental theorem of calculus we're about the study are all examples of the generalized Stoke's theorem.

Although the proofs of these theorems below may look technical and complicated, what they are all stating is actually very common-sense and simple

Green's theorem states that the amount of rotation on the border of a flat region is simply the sum of all the rotation going on inside the region. This seems perfectly intuitive: it would be very odd for a fluid to be racing around a perimeter, yet perfectly irrotational inside!

Gauss' theorem, also called the divergence theorem, states that the amount of sources (or sinks) of liquid inside any region is equal to the amount of fluid flowing out of (or into) the boundary of that region. This makes perfect sense: the amount of water leaving a bathtub through drain is certainly equal to the amount of water pouring over the lip of the drain, right?

Stokes' theorem, also known as the curl theorem or the Kelvin-Stoke's theorem, is basically just Green's theorem, except now the region remains two dimensional, but maybe not flat anymore. It is perhaps less obvious than the first two, but as we will see in the exercises, the first two theorems are in some way special cases of Stoke's theorem.

# Green's Theorem

The first of the higher-dimensional analogues of the fundamental theorem of calculus is Green's theorem. It equates the integral of a vector field around a closed curve to the integral of a kind of derivative of that field in the interior of the region enclosed by the curve. Suppose we have a vector field in the plane $\vec{v}(x,y)=F(x,y)\vec{i}+G(x,y)\vec{j}$ and some closed curve C, oriented counterclockwise (ie, increasing t means moving counterclockwise around the curve), whose interior is called D. Then Green's theorem states:

$\oint_{C} (Fdx + Gdy) = \iint_{D} \left(\frac{\partial G}{\partial x} - \frac{\partial F}{\partial y}\right)dA$

Here, we will only demonstrate the theorem for rectangular regions in the $xy \$-plane. The Riemann-sum nature of the double integral should convince the reader of the truth of the theorem for arbitrary regions. Curious readers may consult the proof page.

Let $R = \left\{{(x,y)|a\leq x\leq b, c \leq x \leq d }\right\} \$ be a rectangular region and its boundary $C \$ oriented counterclockwise.

We break the boundary into $4 \$ pieces: $C_1, \$ which runs from $(a,c) \$ to $(b,c) \$, $C_2, \$ which runs from $(b,c) \$ to $(b,d) \$, $C_3, \$ which runs from $(b,d) \$ to $(a,d) \$, and $C_4, \$ which runs from $(a,d) \$ to $(a,c) \$.

Then:

$\iint_R \frac{\partial B}{\partial y} dxdy = \int_c^d \int_a^b \frac{\partial B}{\partial x} dxdy = \int_c^d \left({ B(b,y)-B(a,y) }\right) dy = \int_c^d B(b,y)dy + \int_d^c B(a,y)dy = \int_{C_2} B dy + \int_{C_4} Bdy \$.

We note that $y \$ is constant along $C_1 \$ and $C_3 \$, so $\int_{C_1} Bdy = \int_{C_3} Bdy = 0 \$, hence:

$\int_{C_2} B dy + \int_{C_4} Bdy = \int_{C_1} Bdy + \int_{C_2} B dy + \int_{C_3} Bdy + \int_{C_4} Bdy = \oint_C Bdy \$

A similar argument demonstrates that:

$\iint_R \frac{\partial A}{\partial y} dxdy = - \oint_C Adx \$

and hence:

$\oint_{C} (A\, dx + B\, dy) = \iint_{R} \left(\frac{\partial B}{\partial x} - \frac{\partial A}{\partial y}\right)\ dxdy \$

# Gauss' Theorem

Gauss' theorem, also called the divergence theorem, states that if $U \$ is a subset of $\R^3 \$ satisfying a few simple conditions (ie, connected, smooth boundary), and ff $\vec{F}:\R^3 \to \R^3 \$ is a smooth vector function defined on an open set containing $U \$, then we have

$\iiint\limits_U\left(\nabla\cdot\vec{F}\right)dV=\iint\limits_{\part U} \vec{F} \cdot \vec{n}\ dS \$

where $\vec{n} \$ is the normal to the boundary of $U \$, which we denote $\partial U \$.

We will only prove the theorem for rectangular prisms; the Riemann-sum nature of the triple integral then should convince the reader of the proof of the theorem for arbitrary regions. Curious readers may consult the proof page

Let $R = \left\{{(x,y,z)|a_1 \leq x \leq a_2, b_1 \leq y \leq b_2, c_1 \leq z \leq c_2 }\right\} \$ and let $S = \partial R \$, oriented outward.

Then $S = A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5 \cup A_6 \$, where $A_1, A_2 \$ are those sides perpendicular to the $x \$-axis, $A_3, A_4 \$ perpendicular to the $y \$ axis, and $A_5, A_6 \$ are those sides perpendicular to the $z \$-axis, and in all cases the lower subscript indicates a side closer to the origin.

Let $\vec{F} = M\vec{i}+N\vec{j}+P\vec{k} \$, where $M,N,P:\R^3 \to \R \$. Then

$\iiint_R \nabla \cdot \vec{F} dV = \iiint_R \left({ \frac{\partial M}{\partial x} + \frac{\partial N}{\partial y} + \frac{\partial P}{\partial z} }\right) dx dy dz = \iiint_R \frac{\partial M}{\partial x} dxdydz + \iiint_M \frac{\partial N}{\partial y} dxdydz + \iiint_M \frac{\partial P}{\partial z} dxdydz$

$= \int_{c_1}^{c_2} \int_{b_1}^{b_2} \left({ M(a_2,y,z)-M(a_1,y,z) }\right) dydz + \int_{c_1}^{c_2} \int_{a_1}^{a_2} \left({ N(x,b_2,z)-N(x,b_1,z) }\right) dxdz + \int_{b_1}^{b_2} \int_{a_1}^{a_2} \left({ P(x,y,c_2)-P(x,y,c_1) }\right) dxdy \$

But note that this is precisely

$=\iint_{A_2} M dydz - \iint_{A_1} M dydz + \iint_{A_4} N dxdz - \iint_{A_3} N dxdz + \iint_{A_6} P dxdy - \iint_{A_5} P dxdy \$

We turn now to examine $\vec{n} \$. On $A_1, \vec{n} = (-1,0,0) \$; on $A_2, \vec{n} = (1,0,0) \$; on $A_3, \vec{n} = (0,-1,0) \$; on $A_4, \vec{n} = (0,1,0) \$; on $A_5, \vec{n} = (0,0,-1) \$; on $A_6, \vec{n} = (0,0,1) \$.

Hence on $A_1, \vec{F} \cdot \vec{n} = -M \$; on $A_2, \vec{F} \cdot \vec{n} = M \$; on $A_3, \vec{F} \cdot \vec{n} = -N \$; on $A_4, \vec{F} \cdot \vec{n} = N \$; on $A_5, \vec{F} \cdot \vec{n} = -P \$; on $A_6, \vec{F} \cdot \vec{n} = P \$.

We also have, on $A_1 \$ and $A_2 \$, the area element is $dS=dydz \$; on $A_3 \$ and $A_4 \$, the area element is $dS = dxdz \$, and on $A_5 \$ and $A_6, dS= dxdy \$. This is true because each side is perfectly flat, and constant with respect to one coordinate.

Hence

$\iint_{A_2} Mdydz= \iint_{A_2} \vec{F} \cdot \vec{n} dS \$

and in general

$=\iint_{A_2} M dydz - \iint_{A_1} M dydz + \iint_{A_4} N dxdz - \iint_{A_3} N dxdz + \iint_{A_6} P dxdy - \iint_{A_5} P dxdy = \sum_{i=1}^6 \iint_{A_i} \vec{F}\cdot \vec{n} dS$

and so

$\iiint_R \nabla \cdot \vec{F} dV = \iint_{\partial R} \vec{F}\cdot \vec{n} dS \$

# Stokes' Theorem

Suppose we have a surface S with boundary curve B, floating in space $\mathbb{R}^3$. As always, we assume the surface is "nice" - no holes, no self-intersection, smooth everywhere. Suppose further that we have a vector function $\vec{F}$ defined in space, and in particular, on S. Then

$\int_S \nabla \times \vec{F} \cdot dS = \oint_B \vec{F} \cdot d \vec{r}$

To prove this, let $\vec{r}:\R^2 \to \R^3, \vec{r}(s,t) \$ be a smooth parametrization of $S \$ from some region $R \$ in the $st \$-plane, so that $\vec{r}(R) = S \$ and $\vec{r}(\partial R) = \partial S \$.

First, we convert the left hand side into a line integral

$\oint_{\partial S} f_1dx+f_2dy+f_3dz = \oint_{\partial S} \vec{F} \cdot d\vec{r} = \oint_{\partial R} \vec{F}\cdot \frac{\partial \vec{r}}{\partial s} ds + \vec{F} \cdot \frac{\partial \vec{r}}{\partial t} dt \$

so that if we define

$\vec{G}=(G_1, G_2)= \left({ \vec{F}\cdot \frac{\partial \vec{r}}{\partial s}, \vec{F} \cdot \frac{\partial \vec{r}}{\partial t} }\right) \$,

then

$\int_{\partial S} \vec{F} \cdot d\vec{r} = \int_{\partial R} \vec{G} \cdot d\vec{s} \$

where $\vec{s} \$ is the position vector in the $st \$-plane.

We turn now to the right-hand expression and write it in terms of $s \$ and $t \$:

$\iint_S \left({ \nabla \times \vec{F}}\right) \cdot \vec{n}dA = \iint_R \nabla \times \vec{F} \cdot \left({ \frac{\partial \vec{r}}{\partial s} \times \frac{\partial \vec{r}}{\partial t} }\right) dsdt$

$= \iint_R \left({ \frac{\partial G_2}{\partial s} - \frac{\partial G_1}{\partial t} }\right) dsdt \$

By Green's Theorem, this can be written as

$\int_{\partial R} \vec{G} \cdot d\vec{s} \$

Hence both sides of the theorem equation are equal.

# Applications

All three of these theorems have applications for any field which studies the distribution of quantities in space.