Which vector calculus theorem applies here?
Green's, Stokes', Divergence, or the Fundamental Theorem for Line Integrals — one family, four faces.
All four are the same idea — what happens on a region's BOUNDARY is controlled by what happens throughout its INTERIOR — specialized to a different dimension and a different kind of integral. Match your integral's shape to a row below rather than trying to remember four unrelated formulas.
A curve is the boundary — of what?
Let C be a smooth curve from point A to point B, parametrized by \mathbf{r}(t) for t \in [a,b] with \mathbf{r}(a) = A, \mathbf{r}(b) = B. If f is differentiable and \nabla f is continuous on an open region containing C, then \int_C \nabla f \cdot d\mathbf{r} = f(B) - f(A).
Example
Show proof
By the chain rule, \dfrac{d}{dt}f(\mathbf{r}(t)) = \nabla f(\mathbf{r}(t)) \cdot \mathbf{r}'(t). So \int_C \nabla f \cdot d\mathbf{r} = \int_a^b \nabla f(\mathbf{r}(t)) \cdot \mathbf{r}'(t)\, dt = \int_a^b \frac{d}{dt}f(\mathbf{r}(t))\, dt = f(\mathbf{r}(b)) - f(\mathbf{r}(a)) = f(B) - f(A), the last step being the ordinary single-variable Fundamental Theorem of Calculus applied to the scalar function t \mapsto f(\mathbf{r}(t)).
Theorem
Green's Theorem
Let C be a positively oriented (counterclockwise), piecewise-smooth, simple closed curve in the plane, and let R be the region it encloses. If P and Q have continuous first partial derivatives on an open region containing R, then \oint_C P\,dx + Q\,dy = \iint_R \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right) dA.
Equivalently, writing \mathbf{F} = P\,\mathbf{i} + Q\,\mathbf{j}, the circulation form is \oint_C \mathbf{F}\cdot d\mathbf{r} = \iint_R \operatorname{curl} \mathbf{F}\, dA, trading a circulation integral around the boundary for a curl integral over the whole enclosed region.
Example
Show proof
Sketch for a region R that is both x-simple and y-simple (the general case patches finitely many such regions together, with the shared interior edges canceling since each is traversed once in each direction). Write R = \{(x,y) : a \le x \le b,\ g_1(x) \le y \le g_2(x)\}. Then \iint_R -\frac{\partial P}{\partial y}\, dA = -\int_a^b \big[P(x,g_2(x)) - P(x,g_1(x))\big]\, dx, by the single-variable Fundamental Theorem applied to the inner integral. The right side is exactly \oint_C P\,dx, splitting C into its bottom piece y=g_1(x) (traversed left to right) and top piece y=g_2(x) (traversed right to left, contributing the minus sign). The same argument with R described as y-simple gives \iint_R \frac{\partial Q}{\partial x}\, dA = \oint_C Q\,dy. Adding the two established identities gives the theorem.
A closed curve as the boundary of a surface
Theorem
Stokes' Theorem
Let S be an oriented, piecewise-smooth surface bounded by a simple, closed, piecewise-smooth curve C, with C's orientation matching S's unit normal \mathbf{n} by the right-hand rule. (Curl the fingers of the right hand along C's direction of travel, and the thumb points along \mathbf{n}.) If \mathbf{F} has continuous first partial derivatives on an open region containing S, then \oint_C \mathbf{F}\cdot d\mathbf{r} = \iint_S \operatorname{curl} \mathbf{F}\cdot d\mathbf{S}, trading a curve's circulation for a surface's curl-flux.
Example
Show proof
Sketch for S a graph z=g(x,y) over a region R in the xy-plane, with C the boundary of R lifted onto the graph. Parametrize S by (x,y)\mapsto(x,y,g(x,y)), so d\mathbf{S} = (-g_x,-g_y,1)\,dA. Writing out \operatorname{curl}\mathbf{F}\cdot d\mathbf{S} in terms of P, Q, R and their partials, then substituting z=g(x,y) throughout, the right side reduces — after applying the multivariable chain rule to track how P and Q change along the lifted curve — to exactly \oint_{\partial R} \big[P(x,y,g(x,y))+R(x,y,g(x,y))g_x\big]\,dx + \big[Q(x,y,g(x,y))+R(x,y,g(x,y))g_y\big]\,dy, which the circulation form of Green's Theorem converts into a double integral over R identical to the one obtained by substituting z=g(x,y) into the left-hand side's curl-flux integrand directly. A general piecewise-smooth S is patched together from finitely many such graphs, with shared interior edges canceling since each is traversed once in each direction.
A closed surface as the boundary of a solid
Let E be a solid region in space bounded by a closed, piecewise-smooth surface S=\partial E, oriented outward. If \mathbf{F} has continuous first partial derivatives on an open region containing E, then \oiint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E \operatorname{div} \mathbf{F}\, dV, trading a closed surface's flux for a solid's divergence integral.
Example
Show proof
Sketch for E a solid that is simultaneously x-simple, y-simple, and z-simple (a general E patches together finitely many such pieces, with shared interior faces canceling since each is traversed with opposite outward normals from the two adjoining pieces). It suffices to prove the three component identities separately and add them; take the z-component. Write E=\{(x,y,z): (x,y)\in R,\ h_1(x,y)\le z\le h_2(x,y)\}. Then \iiint_E \frac{\partial R}{\partial z}\, dV = \iint_R \big[R(x,y,h_2(x,y)) - R(x,y,h_1(x,y))\big]\, dA by the single-variable Fundamental Theorem applied to the inner integral. The right side is exactly the flux of R\,\mathbf{k} through S's top piece z=h_2(x,y) (outward normal has positive z-component) plus its bottom piece z=h_1(x,y) (outward normal has negative z-component, contributing the minus sign) — the side faces of E, if any, are vertical and contribute nothing to a \mathbf{k}-component flux. The same argument for the other two components, summed, gives the theorem.
Seeing all four as one theorem
Section