# Lesson Overview

In this lesson, we'll derive a formula known as Green's Theorem. This formula is useful because it gives

us a simpler way of calculating a specific subset of line integral problems—namely, problems in which the curve is closed (plus a few extra criteria described below). We won't concern ourselves with using this formula to solve problems in this article; we'll save that for future lessons. In this lesson, we will require that the curve $$c$$ be closed plus specify some other restrictions (but even with these conditions, our analysis will be pretty general); after doing so, we'll take the line integral, then do some calculus and algebra to derive a simple formula for calculating that line integral. Although this derivation might seem pretty tedious at times, just remember that it's mostly just calculus and algebra which you are already familiar with. We derive Green's Theorem for any continuous, smooth, closed, simple, piece-wise curve such that this curve is split into two separate curves; even though we won't prove it in this article, it turns out that our analysis is more general and can apply to that same curve even if it's split into an $$n$$ number of curves.

# Green's Theorem Proof (Part 1)

This video was produced by the Khan Academy.

In this lesson, we're going to focus on proving Green's Theorem. We discussed in a previous lesson how to calculate any line integral by parameterizing the integrand and limits of integration. Solving that parameterized integral can be quite tedious sometimes but it is, in general, how we calculate any line integral. But what if we considered calculating a special subset of line integrals that involved taking the line integral of a vector field around certain types of closed curves? Well, when it comes to calculating these kinds of line integrals we don't have to use that complicated parameterized definite integrals discussed earlier. For such line integrals of vector fields around these certain kinds of closed curves, we can use Green's theorem to calculate them.

Figure 1: The curve $$C=C_1+C_2+C_3+C_4$$ is piece-wise smooth. It is "piece-wise" because it is split up into an $$n=4$$ number of separate curves with an $$n=4$$ number of "edges." It is "smooth" because each individual curve itself is smooth without any sharp edges or cusps. This curve is also positively-oriented because its direction goes counter-clockwise. Image by Cronholm 144.

These particular kinds of closed curves can be fully described by the following description: they are any arbitrary curve $$C$$ on the $$xy$$-plane that is piece-wise smooth, positively oriented, simple, and closed as illustrated in Figure 1. That description might sound like a mouthful, but let's break down the meaning of each term. A closed curve, as the name suggests, is any curve such that if you start at a point on that curve and then "walk around" that curve, you'll come back to the same point that you started at. A simple curve is any curve that doesn't criss cross and intersect itself; for example, a curve shaped like the number eight would not be a simple curve. A positively-oriented curve is one that you travel around counter-clock wise and a piece-wise-smooth curve can be subdivided into an $$n$$ number of smooth curves with an $$n$$ number of edges. Whenever we take a line integral of a vector field around these kinds of curves, it is usually easier to calculate the line integral using Green's theorem.

The kinds of vector fields that we can calculate the line integral of using Green's theorem are pretty general but must meet a few criteria: they can be any arbitrary vector field $$\vec{F}(x,y)$$ defined as

$$\vec{F}(x,y)=P(x,y)\hat{i}+Q(x,y)\hat{j},$$

so long as the vector field $$\vec{F}(x,y)$$ is differentiable at every point inside of the region $$R$$ (enclosed by the curve $$C$$) and at every point along the curve $$C$$. (We'll see why this criteria must be met as we are proving Green's theorem; Green's theorem involves taking the partial derivatives of the vector field.) Our goal is to calculate the line integral, $$∮_c\vec{F}(x,y)·d\vec{S}$$, for the particular kind of vector field and curve just described. (Notice that a circle is drawn on the integral; this is to signify that the curve $$C$$ is a closed curve.) Regardless of whether or not we were to use Green's theorem or the technique already discussed involving parameterizing the integrand and limits of integration, the first step in calculating this integral would be the same: we must first evaluate the dot product $$\vec{F}(x,y)·d\vec{S}$$. Doing so, we have

$$\vec{F}(x,y)·d\vec{S}=(P(x,y)\hat{i}+Q(x,y)\hat{j})·(dx\hat{i}+dy\hat{j}).$$

Since $$\hat{i}$$ is perpendicular to $$\hat{j}$$, the cross terms cancel. The other two terms involve the dot product $$\hat{i}·\hat{i}$$ and $$\hat{j}·\hat{j}$$ which simply just equal one since both unit vectors are parallel and have magnitudes of one. Thus, the dot product can be further simplified to

$$(P(x,y)\hat{i}+Q(x,y)\hat{j})·(dx\hat{i}+dy\hat{j})=P(x,y)dx\hat{i}·\hat{i}+Q(x,y)dy\hat{j}·\hat{j}=P(x,y)dx+Q(x,y)dy.$$

Substituting this simplified version of the dot product into the line integral $$∮_c\vec{F}(x,y)·d\vec{S}$$, we have

$$∮_c\vec{F}(x,y)·d\vec{S}=∮_c(P(x,y)dx+Q(x,y)dy)=∮_cP(x,y)dx+∮_cQ(x,y)dy.\tag{1}$$

Figure 2: We can split the curve $$c$$ into two separate curves, $$c_1$$ and $$c_2$$. This also allows us to split the function $$y(x)$$ into the two separate functions, $$y_1(x)$$ and $$y_2(x)$$.

One way to calculate the line integral in Equation (1) would be to parameterize the right-hand side of Equation (1); this would allow us to calculate any line integral. But as I previously mentioned, this process can, in general, get quite complicated. But when we consider the subset of line integrals which deal with taking the line integrals of vector fields over the kinds of closed curves we just discussed, we can can calculate the line integral by calculating $$∮_cP(x,y)dx$$ in terms of $$x$$, then calculating $$∮_cQ(x,y)dy$$ in terms of $$y$$, and then adding the two results together. Let's first start out by calculating $$∮_cP(x,y)dx$$ in terms of $$x$$. Let's start out by splitting the curve $$C$$ into two separate curves $$C_1$$ and $$C_2$$ as illustrated in Figure 2. To get everything in terms of $$x$$, let's represent each $$y$$-coordinate on each point on the curves $$C_1$$ and $$C_2$$ in Figure 2 (and also shown in the video above) as functions of $$x$$; $$y_1(x)$$ will specify each $$y$$-coordinate associated with each point on $$C_1$$ and $$y_2(x)$$ will specify each $$y$$-coordinate associated with each point on $$C_2$$. Substituting both of these functions into the integral $$∮_cP(x,y)dx$$, we have

$$∮_cP(x,y)dx=\int_{x=a}^{x=b}P(x,y_1(x))dx+\int_{x=b}^{x=a}P(x,y_2(x))dx.\tag{2}$$

(Notice that since everything in each integral is represented in terms of a single variable, the line integral simplified to a definite integral. As we discussed in the lesson on the Introduction of Line Integrals, if the integrand and limits of integration which are, in general, expressed with respect to the arclength $$S$$ can instead be represented with respect to say $$x$$ or $$y$$, then the line integral can be simplified to a definite integral.)

The limits of integration in the integral $$\int_{x=b}^{x=a}P(x,y_2(x))dx$$ go from $$x=b$$ to $$x=a$$. If we "swap" the lower and upper limits of integration of that integral to get $$\int_{x=a}^{x=b}P(x,y_2(x))dx$$, we are essentially just changing the order of subtraction of the anti-derivative; if we add a minus sign in front of the integral $$\int_{x=a}^{x=b}P(x,y_2(x))dx$$, then that integral will be the same as the integral $$\int_{x=b}^{x=a}P(x,y_2(x))dx$$. Thus, we have

$$\int_{x=b}^{x=a}P(x,y_2(x))dx=-\int_{x=a}^{x=b}P(x,y_2(x))dx.\tag{3}$$

Substituting Equation (3) into (2), we have

$$∮_cP(x,y)dx=\int_{x=a}^{x=b}P(x,y_1(x))dx-\int_{x=a}^{x=b}P(x,y_2(x))dx=\int_{x=a}^{x=b}\biggl(P(x,y_1(x))-P(x,y_2(x))\biggr)dx.$$

Thus,

$$∮_cP(x,y)dx=\int_{x=a}^{x=b}\biggl(P(x,y_1(x))-P(x,y_2(x))\biggr)dx.\tag{4}$$

The next step is to multiply the right-hand side of Equation (4) by $$(-1)·(-1)=1$$. Initially, this step might seem pretty ad hoc, but essentially what we're going to do is "build up an integral in reverse." In the next few steps, you'll see that the integrand in the right-hand side of Equation (4) can be written as an integral. Multiplying the right-hand side of Equation (4) by $$(-1)·(-1)=1$$, we have

$$(-1)·(-1)·\int_{x=a}^{x=b}\biggl(P(x,y_1(x)-P(x,y_2(x)\biggr)dx=-1·\int_{x=a}^{x=b}\biggl[-1·\biggl(P(x,y_1(x)-P(x,y_2(x)\biggr)\biggr]dx$$

$$=-\int_{x=a}^{x=b}\biggl(P(x,y_2(x)-P(x,y_1(x)\biggr)dx.$$

Thus, we have

$$∮_cP(x,y)dx=-\int_{x=a}^{x=b}\biggl(P(x,y_2(x))-P(x,y_1(x))\biggr)dx.\tag{5}$$

Notice that the integrand, $$P(x,y_2(x))-P(x,y_1(x))$$, in the right-hand side of Equation (5), is the same thing as $$\int_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dy$$ and thus

$$P(x,y_2(x)-P(x,y_1(x))=\int_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dy.\tag{6}$$

(This step can be quite confusing so let me explain why it is valid. The partial derivative, $$\frac{∂P(x,y(x))}{∂y}$$, is the same thing as taking the ordinary derivative of $$P(x,y)$$ with respect to $$y$$ with $$x$$ set equal to some constant—in other words, $$\frac{∂P(x,y(x))}{∂y}=\frac{dP(constant,y)}{dy}$$. When we evaluate the integral, or anti-derivative, of the integrand $$\frac{∂P(x,y(x))}{∂y}=\frac{dP(constant,y)}{dy}$$, we "undo the derivative" so to speak. This means that the anti-derivative (another name for the integral) of $$\frac{dP(constant,y)}{dy}=\frac{∂P(x,y(x))}{∂y}$$ is just $$P(x,y(x))$$. That would be the solution if we were taking an indefinite integral, but since we are taking the definite integral from $$y(x)=y_1(x)$$ to $$y(x)=y_2(x)$$, the solution to the integral is actually $$P(x,y(x))|_{y(x)=y_1(x)}^{y(x)=y_2(x)}=P(x,y_2(x))-P(x,y_1(x))$$.)

Substituting Equation (6) into (5), we have

$$-∫_{x=a}^{x=b}\biggl(P(x,y_2(x))-P(x,y_1(x))\biggr)dx=-∫_{x=a}^{x=b}\biggl(∫_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dy\biggr)dx.\tag{7}$$

Thus, we have

$$∮_cP(x,y)dx=-∫_{x=a}^{x=b}∫_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dydx.\tag{8}$$

Equation (8) is essentially just the volume contained between the surface $$-\frac{∂P(x(y),y)}{∂y}$$ and the region $$R$$. In other words, Equation (8) represents the infinite sum of infinitesimally skinny columns of volume $$P_y(x(y),y)dxdy$$ over the region $$R$$. The notation for writing this is

$$-∫_{x=a}^{x=b}∫_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dydx=∫∫_R-\frac{∂P(x,y(x))}{∂y}dA.\tag{9}$$

Canceling out the minus signs on both sides of Equation (9), we have

$$∫_{x=a}^{x=b}∫_{y(x)=y_1(x)}^{y(x)=y_2(x)}\frac{∂P(x,y(x))}{∂y}dydx=∫∫_R\frac{∂P(x,y(x))}{∂y}dA.$$

Finally, if we substitute this result into Equation (8), we have

$$∮_cP(x,y)dx=-∫∫_R\frac{∂P(x,y(x))}{∂y}dA.\tag{10}$$

# Green's Theorem Proof (Part 2)

Figure 3: We can break up the curve $$c$$ into the two separate curves, $$c_1$$ and $$c_2$$. This also allows us to break up the function $$x(y)$$ into the two separate functions, $$x_1(y)$$ and $$x_2(y)$$.

Equation (10) allows us to calculate the line integral $$∮_cP(x,y)dx$$ entirely in terms of $$x$$. The final step we need to complete to calculate the line integral of $$\vec{F}(x,y)$$ is to calculate the line integral $$∮_cQ(x,y)dy$$ and then add this result to Equation (10). To calculate the line integral $$∮_cQ(x,y)dy$$, we'll go through an analogous procedure to the one which we went through to calculate $$∮_cP(x,y)dy$$. First, let's split up the curve $$C$$ into the two separate curves $$C_1$$ and $$C_2$$ illustrated in Figure 3. Let's express the variable $$x$$ associated with each point on the curve $$C$$ as $$x_1(y)$$ and $$x_2(y)$$ associated with each $$x$$-value on the two curves $$C_1$$ and $$C_2$$, respectively. Analogous to what we did previously, let's write the integral $$∮_cQ(x,y)dy$$ as the sum of two line integrals of the form,

$$∮_cQ(x,y)dy=∮_{c_1}Q(x_1(y),y)dy+∮_{c_2}Q(x_2(y),y)dy.\tag{11}$$

Just like last time, our goal will be to write the right-hand side of Equation (11) as a double integral. First, we do some manipulations to write the two line integrals as a single definite integral; then, after that, we do some algebra and calculus to rewrite the integrand as another definite integral. Since the two lines integrals on the right-hand side of Equation (11) are expressed in terms of $$y$$, we can rewrite them as definite integrals to get

$$∮_{c_1}Q(x_1(y),y)dy+∮_{c_2}Q(x_2(y),y)dy=∫_{y=a}^{y=b}Q(x_1(y),y)dy+∫_{y=b}^{y=a}Q(x_2(y),y)dy.\tag{12}$$

Substituting $$∫_{y=b}^{y=a}Q(x_2(y),y)dy=-∫_{y=a}^{y=b}Q(x_2(y),y)dy$$ into the right-hand side of Equation (12) and making the same algebraic simplifications as before, we have

$$∫_{y=a}^{y=b}Q(x_1(y),y)dy+∫_{y=b}^{y=a}Q(x_2(y),y)dy=∫_{y=a}^{y=b}Q(x_1(y),y)dy-∫_{y=a}^{y=b}Q(x_2(y),y)dy$$

$$=∫_{y=a}^{y=b}\biggl(Q(x_1(y),y)-Q(x_2(y),y)\biggr)dy=∫_{y=a}^{y=b}Q(x(y),y)|_{x(y)=x_2(y)}^{x(y)=x_1(y)}dy.$$

$$=∫_{y=a}^{y=b}\biggl(∫_{x_2(y)}^{x_1(y)}\frac{∂Q(x(y),y)}{∂x}dx\biggr)dy.$$

Thus,

$$∮_cQ(x,y)dy=∫_{y=a}^{y=b}\biggl(∫_{x_2(y)}^{x_1(y)}\frac{∂Q(x(y),y)}{∂x}dx\biggr)dy.\tag{13}$$

Equation (13) is essentially just the volume contained between the surface $$\frac{∂Q(x(y),y)}{∂x}$$ and the region $$R$$. In other words, Equation (13) represents the infinite sum of infinitesimally skinny columns of volume $$Q_x(x(y),y)dxdy$$ over the region $$R$$. The notation for writing this is

$$∫_{y=a}^{y=b}\biggl(∫_{x_2(y)}^{x_1(y)}\frac{∂Q(x(y),y)}{∂x}dx\biggr)dy=∫∫_R\frac{∂Q(x(y),y)}{∂x}dA.\tag{14}$$

Let's substitute Equations (10) and (14) into (1) to get

$$∮_c\vec{F}(x,y)·d\vec{S}=∫∫_R\frac{∂Q(x(y),y)}{∂x}dA+∫∫_R-\frac{∂P(x,y(x))}{∂y}dA.$$

Simplifying the expression on the right-hand side of the above equation, we get Green's theorem which states that

$$∮_c\vec{F}(x,y)·d\vec{S}=∫∫_R\biggl(\frac{∂Q(x(y),y)}{∂x}-\frac{∂P(x,y(x))}{∂y}\biggr)dA,\tag{15}$$

or, equivalently,

$$∮_cP(x,y)dx+∮_cQ(x,y)dy=∫∫_R\biggl(\frac{∂Q(x(y),y)}{∂x}-\frac{∂P(x,y(x))}{∂y}\biggr)dA.\tag{16}$$

In the next couple of lessons, we'll use Green's theorem to solve some line integrals of vector fields over piecewise smooth, simple, closed curves.