Tutorials › Calculus III › Deriving the Graph Version from Green’s Theorem

Stokes’ Theorem · Tutorial 930 of 999

Deriving the Graph Version from Green's Theorem

Learn how Green’s theorem yields Stokes’ theorem for an upward-oriented graph, including the chain-rule terms and orientation needed for the formula.

Advanced 10 min read

What You'll Learn

  • Set up the graph parametrization and its upward-oriented vector area element.
  • Express circulation along the lifted boundary as a planar line integral.
  • Apply Green’s theorem to the pullback of the vector field.
  • Track the chain-rule terms that produce the curl-flux integrand.
  • Check the formula and its orientation using explicit examples.

From a Planar Boundary Integral to Curl Flux

Stokes’ theorem relates the circulation of a vector field around a surface boundary to the flux of its curl through the surface. For a surface that is a graph, the relationship can be derived directly from Green’s theorem in the \(xy\)-plane. The key is to express the circulation along the lifted boundary as a planar line integral, then keep the chain-rule terms when differentiating the field restricted to the graph.

This derivation also makes the orientation visible. A counterclockwise boundary in the \(xy\)-plane lifts to the boundary orientation associated with the graph’s upward normal. Reversing that planar direction reverses both integrals’ signs.

Setup: Let \(D\) be a bounded planar region with piecewise smooth, positively oriented boundary \(\partial D\), and let \(z=g(x,y)\) describe a smooth graph above \(D\). For a sufficiently smooth vector field \(\mathbf{F}\), the circulation around the lifted boundary equals the upward flux of \(\nabla\times\mathbf{F}\) through the graph.

The Graph and Its Orientation

Write the vector field as \(\mathbf{F}=(P,Q,R)\), where its components are functions of \(x,y,z\). Parametrize the graph by

$$ \mathbf{r}(x,y)=(x,y,g(x,y)). $$

The tangent vectors in the coordinate directions are \(\mathbf{r}_x=(1,0,g_x)\) and \(\mathbf{r}_y=(0,1,g_y)\). Their cross product points upward because its third component is positive:

$$ \mathbf{r}_x\times\mathbf{r}_y=(-g_x,-g_y,1). $$

Thus the oriented vector area element is \((-g_x,-g_y,1)\,dx\,dy\). Equivalently, the upward unit normal is \((-g_x,-g_y,1)/\sqrt{1+g_x^2+g_y^2}\), while the surface area element is \(\sqrt{1+g_x^2+g_y^2}\,dx\,dy\). Their product gives the same vector area element.

The positive orientation of \(\partial D\) means counterclockwise when viewed from above. Its lift to the graph is the boundary orientation compatible with the upward normal, by the right-hand rule.

Pulling the Circulation Back to the Plane

Along the graph, \(z=g(x,y)\), so \(dz=g_x\,dx+g_y\,dy\). The line integral of \(\mathbf{F}\) along the lifted boundary is therefore

$$ \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} = \oint_{\partial D} \left(P(x,y,g)+R(x,y,g)g_x\right)\,dx + \left(Q(x,y,g)+R(x,y,g)g_y\right)\,dy. $$

Here \(\partial S\) denotes the lifted curve. Define the two planar coefficient functions

$$ A(x,y)=P(x,y,g(x,y))+R(x,y,g(x,y))g_x, \qquad B(x,y)=Q(x,y,g(x,y))+R(x,y,g(x,y))g_y. $$

Green’s theorem states that, for sufficiently smooth \(A\) and \(B\) on \(D\) and its positively oriented, piecewise smooth boundary,

$$ \oint_{\partial D} A\,dx+B\,dy = \iint_D\left(B_x-A_y\right)\,dx\,dy. $$

The partial derivatives \(A_y\) and \(B_x\) are derivatives of composite functions: \(P,Q,R\) are evaluated at \(z=g(x,y)\). Their \(z\)-dependence must be differentiated by the chain rule.

Deriving the Curl-Flux Integrand

Differentiate \(B\) with respect to \(x\). All component derivatives on the right are evaluated at \((x,y,g(x,y))\):

$$ B_x = Q_x+Q_zg_x + \left(R_x+R_zg_x\right)g_y + R g_{yx}. $$

Similarly, differentiating \(A\) with respect to \(y\) gives

$$ A_y = P_y+P_zg_y + \left(R_y+R_zg_y\right)g_x + R g_{xy}. $$

Because \(g\) has continuous second partial derivatives, \(g_{xy}=g_{yx}\). Subtracting the expressions cancels both the \(R_zg_xg_y\) terms and the mixed second-derivative terms:

$$ B_x-A_y = Q_x-P_y+Q_zg_x-P_zg_y+R_xg_y-R_yg_x. $$

With the standard component formula

$$ \nabla\times\mathbf{F} = (R_y-Q_z,\;P_z-R_x,\;Q_x-P_y), $$

the expression from Green’s theorem is precisely the curl dotted with the graph’s upward vector area element:

$$ (\nabla\times\mathbf{F})\cdot(-g_x,-g_y,1) = -g_x(R_y-Q_z)-g_y(P_z-R_x)+(Q_x-P_y). $$

Expanding the right-hand side gives \(Q_x-P_y+Q_zg_x-P_zg_y+R_xg_y-R_yg_x\), exactly the expression for \(B_x-A_y\). This proves the graph formula.

Theorem: Suppose \(D\) has a positively oriented, piecewise smooth boundary, \(g\) has continuous second partial derivatives on a neighborhood of \(D\), and \(\mathbf{F}\) has continuous first partial derivatives on a neighborhood of the graph over \(D\). Orient the graph upward and orient its boundary accordingly. Then $$ \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} = \iint_D(\nabla\times\mathbf{F})(x,y,g(x,y))\cdot(-g_x,-g_y,1)\,dx\,dy. $$

Worked Example: A Linear Graph and a Vertical Field

Worked Example: A Linear Graph and a Vertical Field

Let \(D=[0,1]\times[0,2]\), let \(g(x,y)=x+y\), and take \(\mathbf{F}=(0,0,x)\). We calculate both sides of the graph formula. The upward vector area element is \((-1,-1,1)\,dx\,dy\), since \(g_x=g_y=1\).

First compute the curl. Here \(P=0\), \(Q=0\), and \(R=x\), so

$$ \nabla\times\mathbf{F}=(R_y-Q_z,\;P_z-R_x,\;Q_x-P_y)=(0,-1,0). $$

Its dot product with the upward vector area element is \((0,-1,0)\cdot(-1,-1,1)=1\). The flux is therefore

$$ \iint_D 1\,dx\,dy=(1-0)(2-0)=2. $$

Now calculate the boundary circulation directly. Along the graph, \(dz=dx+dy\), and \(\mathbf{F}\cdot d\mathbf{r}=x\,dz=x(dx+dy)\). Traverse the rectangle counterclockwise in its \(xy\)-projection. On the bottom edge, \(y=0\), \(x\) goes from \(0\) to \(1\), giving \(\int_0^1 x\,dx=\tfrac12\). On the right edge, \(x=1\), \(y\) goes from \(0\) to \(2\), giving \(\int_0^2 1\,dy=2\). On the top edge, \(y=2\), \(x\) goes from \(1\) to \(0\), giving \(\int_1^0 x\,dx=-\tfrac12\). On the left edge, \(x=0\), the contribution is \(0\).

Adding the four contributions gives \(\tfrac12+2-\tfrac12+0=2\), agreeing with the flux.

Worked Example: A Field Component That Depends on Height

Worked Example: A Field Component That Depends on Height

Let \(D=[0,1]\times[0,1]\), \(g(x,y)=x^2+y\), and \(\mathbf{F}=(0,z,0)\). Since \(g_x=2x\) and \(g_y=1\), the upward vector area element is \((-2x,-1,1)\,dx\,dy\). The curl is

$$ \nabla\times\mathbf{F}=(-Q_z,0,Q_x) =(-1,0,0), $$

because \(Q=z\), so \(Q_z=1\) and \(Q_x=0\). The curl flux density is \((-1,0,0)\cdot(-2x,-1,1)=2x\). Thus

$$ \iint_0^1\int_0^1 2x\,dy\,dx = \int_0^1 2x(1-0)\,dx = [x^2]_0^1 = 1. $$

For a direct boundary check, the line integral is \(\oint_{\partial D}g\,dy\), since \(Q=z=g\) on the graph and the other field components vanish. The bottom and top edges have \(dy=0\). On the right edge, \(x=1\) and \(y\) runs from \(0\) to \(1\), so the contribution is \(\int_0^1(1+y)\,dy=\tfrac32\). On the left edge, \(x=0\) and \(y\) runs from \(1\) down to \(0\), so the contribution is \(\int_1^0 y\,dy=-\tfrac12\). The total is \(\tfrac32-\tfrac12=1\), matching the flux.

Worked Example: Checking a Sign with a Different Component

Worked Example: Checking a Sign with a Different Component

Take \(D=[0,1]\times[0,1]\), \(g(x,y)=x+y^2\), and \(\mathbf{F}=(z,0,0)\). Here \(g_x=1\), \(g_y=2y\), so the upward vector area element is \((-1,-2y,1)\,dx\,dy\). Since \(P=z\), \(P_z=1\), and all other derivatives contributing to the curl are zero,

$$ \nabla\times\mathbf{F}=(0,1,0). $$

The flux density is \((0,1,0)\cdot(-1,-2y,1)=-2y\). Integrating gives

$$ \iint_0^1\int_0^1(-2y)\,dx\,dy = \int_0^1 -2y(1-0)\,dy = [-y^2]_0^1 = -1. $$

On the lifted boundary, the circulation is \(\oint_{\partial D}g\,dx\). On the bottom edge, \(y=0\) and \(x\) increases from \(0\) to \(1\), giving \(\int_0^1x\,dx=\tfrac12\). The right and left edges have \(dx=0\), so contribute zero. On the top edge, \(y=1\), \(x\) decreases from \(1\) to \(0\), giving \(\int_1^0(x+1)\,dx=-\tfrac32\). The total is \(\tfrac12-\tfrac32=-1\), as required.

A Common Pitfall: Forgetting the Chain Rule

In the second example, the pulled-back coefficient of \(dy\) is \(B(x,y)=Q(x,y,g(x,y))=g(x,y)\). A tempting but incorrect calculation is to differentiate \(Q=z\) with respect to \(x\) while treating \(z\) as independent, conclude \(B_x=Q_x=0\), and thereby lose the contribution to Green’s theorem. But \(B\) is the composite function \(Q(x,y,g(x,y))\), so

$$ B_x=Q_x+Q_zg_x=0+1\cdot 2x=2x. $$

That missing term is exactly what produces the flux density \(2x\) in the example. The practical safeguard is to distinguish derivatives of the three-variable field components, such as \(Q_x\) and \(Q_z\), from derivatives of their restrictions to the graph.

Why This Derivation Matters

The calculation shows how the geometry of the graph and the calculus of the boundary fit together. Green’s theorem differentiates the planar coefficients of the pulled-back line integral. The chain rule converts those derivatives into the partial derivatives that make up the curl, while the graph’s tangent vectors determine the factors \(g_x\) and \(g_y\). The result is the dot product with the oriented vector area element.

The derivation also provides a reliable sign check: the upward graph element has third component \(+1\), and its boundary projects counterclockwise. If instead the graph is oriented downward, its vector area element is negated and the compatible boundary direction is reversed. Both sides of the formula then change sign.

Check Your Understanding

Use the definitions and derivation above to answer these questions.

  1. For \(g(x,y)\), what is the upward-oriented vector area element of its graph?
  2. Why must \(B_x\) include a term involving \(Q_zg_x\) when \(B=Q(x,y,g(x,y))+R(x,y,g(x,y))g_y\)?
  3. Which regularity condition on \(g\) allows the mixed second-derivative terms to cancel in the derivation?
  4. For \(\mathbf{F}=(z,0,0)\), what is the curl, and why does its flux density over the graph involve \(-g_y\)?
  5. What changes in the graph formula if the surface orientation is reversed?