If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Green's theorem examples

Green's theorem is beautiful and all, but here you can learn about how it is actually used.

Background

Remembering the formula

Green's theorem is most commonly presented like this:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, P, d, x, plus, Q, d, y, equals, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, d, A
This is also most similar to how practice problems and test questions tend to look. But personally, I can never quite remember it just in this P and Q form.
"Was it start fraction, \partial, Q, divided by, \partial, x, end fraction or start fraction, \partial, Q, divided by, \partial, y, end fraction?"
"Which term is subtracted again?"
I always start by thinking about this form:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, d, start bold text, r, end bold text, equals, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start text, 2, d, negative, c, u, r, l, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, d, A
I find this easier to remember because it actually has a physical meaning (see the last article for more details):
  • The line integral of a vector field start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis around a closed curve start color #bc2612, C, end color #bc2612 measures the fluid rotation around that boundary start color #bc2612, C, end color #bc2612.
  • The double integral of the curl of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 adds up all the tiny little bits of fluid rotation within the region start color #bc2612, R, end color #bc2612 enclosed by start color #bc2612, C, end color #bc2612.
  • Intuitively, it makes sense that these should be related. And in fact, they are equal.
To get to the P, Q version of the theorem, write the components of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 as P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis:
F(x,y)=[P(x,y)Q(x,y)]\begin{aligned} \blueE{\textbf{F}}(x, y) = \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \end{aligned}
(To remember that P is the x-component and Q is the y-component, think about the fact that P comes before Q in the alphabet).
And from here, expand each bit of the line integral, curl, etc. After doing this a couple times, it's natural enough to do in your head.
CFdr=R2d-curlFdAC[P(x,y)Q(x,y)][dxdy]=R2d-curl([P(x,y)Q(x,y)])dACPdx+Qdy=R(QxPy)dxdy\begin{aligned} \oint_\redE{C} \blueE{\textbf{F}} \cdot d\textbf{r} &= \iint_\redE{R} \text{2d-curl}\,\blueE{\textbf{F}}\,dA \\\\ &\Downarrow \\\\ \oint_\redE{C} \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \cdot \left[ \begin{array}{c} dx \\ dy \end{array} \right] &= \iint_\redE{R} \text{2d-curl}\, \left( \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \right) \,dA \\\\ &\Downarrow \\\\ \oint_\redE{C} P\,dx + Q\,dy &= \iint_\redE{R} \left( \dfrac{\partial Q}{\partial x} - \dfrac{\partial P}{\partial y} \right) dx\,dy \end{aligned}
Of course, this requires remembering how to compute two-dimensional curl, but this is something which ought to be remembered outside the context of Green's theorem anyway.
Warning: Green's theorem only applies to curves that are oriented counterclockwise. If you are integrating clockwise around a curve and wish to apply Green's theorem, you must flip the sign of your result at some point.

How do you know when to use Green's theorem?

"Mathematics is not a spectator sport" - George Polya
The best way to get a feel for its usefulness is to simply jump into some examples to get a feel for it. I'll debrief after each example to help extract the intuition for each one.

Example 1: Line integral \to Area


Problem: Let start color #bc2612, C, end color #bc2612 represent a circle with radius 2 centered at left parenthesis, 3, comma, minus, 2, right parenthesis:
If you orient start color #bc2612, C, end color #bc2612 counterclockwise, compute the following line integral:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, 3, y, d, x, plus, 4, x, d, y

Solution
Step 1: Is the curve in question oriented clockwise or counterclockwise?
Choose 1 answer:

I know that might feel silly to ask, given that it was just stated explicitly in the problem. But it's important to remember that you must always ask this when using Green's theorem.
Step 2: As we apply Green's theorem to this integral \oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, 3, y, d, x, plus, 4, x, d, y, what should we substitute for P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis?
P, left parenthesis, x, comma, y, right parenthesis, equals
Q, left parenthesis, x, comma, y, right parenthesis, equals

Step 3: Now compute the appropriate partial derivatives of P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis.
start fraction, \partial, Q, divided by, \partial, x, end fraction, equals
start fraction, \partial, P, divided by, \partial, y, end fraction, equals

Step 4: Finally, compute the double integral from Green's theorem. In this case, start color #bc2612, R, end color #bc2612 represents the region enclosed by the circle with radius 2 centered at left parenthesis, 3, comma, minus, 2, right parenthesis. (Hint, don't work too hard on this one).
\iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, d, A, equals

Example 1 debrief

Why did the line integral in the last example become simpler as a double integral when we applied Green's theorem? It's because the curl of the relevant function was a constant:
2d-curl([P(x,y)Q(x,y)])=2d-curl([3y4x])=x(4x)y(3y)=43=1\begin{aligned} \text{2d-curl}\left( \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \right) &= \text{2d-curl}\left( \left[ \begin{array}{c} 3y \\ 4x \end{array} \right] \right) \\\\ &= \dfrac{\partial}{\partial x}(4x) - \dfrac{\partial}{\partial y}(3y) \\\\ &= 4 - 3 \\\\ &= 1 \end{aligned}
More generally, if it looks like the partial derivative of Q with respect to x is simple, and/or that the partial derivative of P with respect to y is simple, think Green's theorem.
CP(x,y)Is y simple?dx+Q(x,y)Is x simple?dy\begin{aligned} \oint_C \overbrace{ P(x, y) }^{\text{Is $\dfrac{\partial}{\redE{\partial y}}$ simple?}}\,{\blueE{dx}} + \overbrace{ Q(x, y) }^{{\text{Is $\dfrac{\partial}{{\blueE{\partial x}}}$ simple?}}}\,\redE{dy} \end{aligned}
It was also important that we could easily compute the area of the region in question. If that were not true, the double integral might not have been simpler at all.

Example 2: Two function graphs


Problem
Consider the following two functions:
f, left parenthesis, x, right parenthesis, equals, left parenthesis, x, squared, minus, 4, right parenthesis, left parenthesis, x, squared, minus, 1, right parenthesis
g, left parenthesis, x, right parenthesis, equals, 4, minus, x, squared
Now consider the region between the graphs of these functions.
Let start color #bc2612, D, end color #bc2612 be the clockwise-oriented boundary of this region (D for droopy). Compute the following line integral:
\oint, start subscript, start color #bc2612, D, end color #bc2612, end subscript, x, squared, y, d, x, minus, y, squared, d, y

Solution
Step 1: Is the curve in question oriented clockwise or counterclockwise?
Choose 1 answer:

Since Green's theorem applies to counterclockwise curves, this means we will need to take the negative of our final answer.
Step 2: What should we substitute for P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis in the integral \oint, start subscript, start color #bc2612, D, end color #bc2612, end subscript, x, squared, y, d, x, minus, y, squared, d, y?
P, left parenthesis, x, comma, y, right parenthesis, equals
Q, left parenthesis, x, comma, y, right parenthesis, equals

Step 3: Now compute the appropriate partial derivatives of P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis.
start fraction, \partial, Q, divided by, \partial, x, end fraction, equals
start fraction, \partial, P, divided by, \partial, y, end fraction, equals

Step 4: To apply Green's theorem, we will perform a double integral over the droopy region start color #bc2612, D, end color #bc2612, which was defined as the region above the graph y, equals, left parenthesis, x, squared, minus, 4, right parenthesis, left parenthesis, x, squared, minus, 1, right parenthesis and below the graph y, equals, 4, minus, x, squared. This double integral will be something of the following form:
integral, start subscript, x, start subscript, 1, end subscript, end subscript, start superscript, x, start subscript, 2, end subscript, end superscript, integral, start subscript, y, start subscript, 1, end subscript, left parenthesis, x, right parenthesis, end subscript, start superscript, y, start subscript, 2, end subscript, left parenthesis, x, right parenthesis, end superscript, dots, d, y, d, x
Fill in all of those bounds:
x, start subscript, 1, end subscript, equals
x, start subscript, 2, end subscript, equals
y, start subscript, 1, end subscript, left parenthesis, x, right parenthesis, equals
y, start subscript, 2, end subscript, left parenthesis, x, right parenthesis, equals

Step 5: Finally, to apply Green's theorem, we plug in the appropriate value to this integral. If our original line integral was oriented counterclockwise, we would plug in
start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction
However, since the curve is oriented clockwise, we make this negative:
minus, left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, equals, start fraction, \partial, P, divided by, \partial, y, end fraction, minus, start fraction, \partial, Q, divided by, \partial, x, end fraction
Using the answers to the previous two questions, plugging in this value to the double integral you set up, find the answer to the original line integral problem:
\oint, start subscript, start color #bc2612, D, end color #bc2612, end subscript, x, squared, y, d, x, minus, y, squared, d, y, equals

Example 2 debrief

As in Example 1, part of the reason this line integral became simpler is that the terms simplified once we looked at the appropriate partial derivatives.
Cx2yIs y simple?A little bit, yes.dx+(y2)Is x simple?Very much so, yes.dy\begin{aligned} \oint_C \overbrace{ x^2 y }^{\substack{ \text{Is $\dfrac{\partial}{\redE{\partial y}}$ simple?}\\ \text{A little bit, yes.}\\ }}\,{\blueE{dx}} + \overbrace{ (-y^2) }^{\substack{ \text{Is $\dfrac{\partial}{{\blueE{\partial x}}}$ simple?} \\ \text{Very much so, yes.}\\ }}\,\redE{dy} \end{aligned}
Also, the region in question was defined by two separate curves. Computing the line integral directly requires setting up two separate line integrals for each curve. But the double integral very naturally went over the full region in one fell swoop.
Another thing to note is that the ultimate double integral wasn't exactly simple. You still had to mark up a lot of paper during the computation. But this is okay. We can still feel confident that Green's theorem simplified things, since each individual term became simpler, since we avoided needing to parameterize our curves, and since what would have been two separate line integrals was just one double integral.

Sneaky area calculations

In the previous two examples, we used Green's theorem to turn a line integral into a double integral. Here, let's do things the other way around. Take a look at the double integral from Green's theorem:
\iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, d, A
Remember how in Example 1, we were lucky enough to have the following property:
left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, equals, 1
This means our integral was just computing the area of start color #bc2612, R, end color #bc2612:
\iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, left parenthesis, start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, right parenthesis, d, A, right arrow, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, d, A, equals, start text, A, r, e, a, space, o, f, space, end text, start color #bc2612, R, end color #bc2612
Now imagine that we didn't already know the area of start color #bc2612, R, end color #bc2612, but we wished to compute it. One thing you could do is find some pair of functions P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis satisfying this curl-equals-one property:
start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, equals, 1,
According to Green's theorem, any pair of functions like this let's you compute the area of a region using a line integral:
CPdx+Qdy=R(QxPy)dA=R(1)dA=Area of R\begin{aligned} \oint_\redE{C} P\,dx + Q\,dy &= \iint_\redE{R} \left( \dfrac{\partial Q}{\partial x} - \dfrac{\partial P}{\partial y} \right) \, dA \\\\ &= \iint_\redE{R} (1) \,dA \\\\ &= \text{Area of }\redE{R} \end{aligned}
Doesn't that feel strange, computing the area of a region using a line integral around its boundary? Let' see what it looks like in action.

Example 3: Area of a seashell


Problem
Consider the spiral defined by the following parametric equations in the range 0, is less than or equal to, t, is less than or equal to, 2, pi.
x(t)=tcos(t)y(t)=tsin(t)\begin{aligned} x(t) &= t \cos(t) \\ y(t) &= t \sin(t) \end{aligned}
Now add the line from left parenthesis, 0, comma, 0, right parenthesis to left parenthesis, 2, pi, comma, 0, right parenthesis to this spiral, and consider the seashell-shaped region it encloses.
What is the area of that region?

Solution
Step 1: How is the boundary of this seashell oriented?
Choose 1 answer:

Step 2: Choose the appropriate P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis.
To apply the Green's theorem trick, we first need to find a pair of functions P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis which satisfy the following property:
start fraction, \partial, Q, divided by, \partial, x, end fraction, minus, start fraction, \partial, P, divided by, \partial, y, end fraction, equals, 1
Actually, quite a few pairs of functions satisfy this.
Concept check: Which of the following function pairs satisfies this property?
Choose all answers that apply:

You might think the second or third choices above make things simplest. Interestingly, though, it's often the last choice that makes the line integral computation work out best. This means solving the following integral:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start underbrace, minus, start fraction, 1, divided by, 2, end fraction, y, d, x, end underbrace, start subscript, P, d, x, end subscript, plus, start underbrace, start fraction, 1, divided by, 2, end fraction, x, d, y, end underbrace, start subscript, Q, d, y, end subscript
Or, written more cleanly,
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start fraction, 1, divided by, 2, end fraction, left parenthesis, x, d, y, minus, y, d, x, right parenthesis
Why is this simpler? You will see in just a moment how things nicely cancel out, and it has to do with symmetrically including both x and y into the expression. Honestly, I'm not sure how you could have seen this ahead of time; it's just really clever.
Step 3: Compute the line integral.
The boundary of our region is defined with two curves. One is the spiral, defined by these two equations in the range 0, is less than or equal to, t, is less than or equal to, 2, pi:
x(t)=tcos(t)y(t)=tsin(t)\begin{aligned} x(t) &= t \cos(t) \\ y(t) &= t \sin(t) \end{aligned}
The other is the line between left parenthesis, 0, comma, 0, right parenthesis and left parenthesis, 2, pi, comma, 0, right parenthesis. Notice, this line is purely on the x-axis. Therefore y is always 0, and d, y is also 0, since there's no change in y. So consider the value of the line integral on this segment:
integral, start fraction, 1, divided by, 2, end fraction, left parenthesis, x, start underbrace, d, y, end underbrace, start subscript, 0, end subscript, minus, start underbrace, y, end underbrace, start subscript, 0, end subscript, d, x, right parenthesis
Each part of the integrant is 0, so we can ignore it! Therefore, we can just take this line integral over our spiral and get the answer.
Concept check: Given that x, left parenthesis, t, right parenthesis, equals, t, cosine, left parenthesis, t, right parenthesis and y, left parenthesis, t, right parenthesis, equals, t, sine, left parenthesis, t, right parenthesis, what should we plug in for x, d, y, minus, y, d, x in the line integral? Try to work it out on paper and simplify.
x, d, y, minus, y, d, x, equals
d, t

Bring it on home: Use the last answer to compute the following line integral on the spiral, which will give the area of the seashell region as desired:
integral, start subscript, start text, S, p, i, r, a, l, end text, end subscript, start fraction, 1, divided by, 2, end fraction, left parenthesis, x, d, y, minus, y, d, x, right parenthesis, equals

Summary

  • Green's theorem can turn tricky line integrals into more straight-forward double integrals.
  • To know if Green's theorem will actually make a line integral simpler, ask the following two questions:
CP(x,y)Is y simple?dx+Q(x,y)Is x simple?dy\begin{aligned} \oint_C \overbrace{ P(x, y) }^{\text{Is $\dfrac{\partial}{\redE{\partial y}}$ simple?}}\,{\blueE{dx}} + \overbrace{ Q(x, y) }^{{\text{Is $\dfrac{\partial}{{\blueE{\partial x}}}$ simple?}}}\,\redE{dy} \end{aligned}
  • Also, consider if the region encompassed by the curve C will be easy to describe with a double integral, or if it has a known area.
  • You can compute the area of a region with the following line integral around its counterclockwise-oriented boundary:
    \oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start fraction, 1, divided by, 2, end fraction, left parenthesis, x, d, y, minus, y, d, x, right parenthesis

Want to join the conversation?

  • piceratops tree style avatar for user Lim Kai Zhuo
    In the summary, last bullet point, where it states that we can compute area of region using the line integral of 1/2(xdy-ydx).
    Is this option always the best of will -ydx or xdy sometimes be better?
    (14 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Aiman
    How do you know if a graph is oriented clockwise or counterclockwise just by looking at its graph?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Akash Dubey
      You can't just tell by looking at the graph (unless there are arrows that make that clear). You would need to plug t values into the parametric equations and see which way the function is going as you plug in increasing values of t.

      For example, in example 3, we can plug in t = 0 to get the coordinate (0,0) and then another one, say t = pi, to get (-pi, 0). Since we have the graph of the function, we can see that it is oriented counterclockwise. (If t=0 was (-pi,0) instead it would be clockwise since it would be turning clockwise as t increases)
      (2 votes)
  • mr pants teal style avatar for user Arman Rafian
    I'm confused about how the line integral was computed. In the second step of the explanation how does he get the (dy/dt)dt and (dx/dt)dt? Is he allowed to do that because the dts "cancel out", but then what is the purpose of that in the first place?

    Then when we plug in the definitions of x(t) and y(t) why does it become just d/dt instead of dy/dt and dx/dt? Where did dy and dx go? I know I am slow, but usually not this slow...
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Alexander Wu
    A spiral is r=θ, right? How do you parameterize this curve if you didn't know it was x=t cos(t), y=t sin(t)?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • orange juice squid orange style avatar for user apndolby297
    Is green's theorem only applicable to surfaces that are plane or can it also be applied to surfaces that are wavy....?
    (I think that it can only be applied to flat ones....
    since Green's theorem is a special case of stoke's theorem in which the surface being considered is flat and in x-y plane)
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user jsmorgan6
    HI all, I have a questions from Example 3:

    1) Why do we not include the change of variables factor ( 'r' for polar ) when converting to polar coordinates?

    Thanks!
    (1 vote)
    Default Khan Academy avatar avatar for user
  • piceratops seedling style avatar for user Rushil Thakkar
    Does the formula in the last bullet point of summary works for all cases? or Is it for specific kind of problem?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Nowshin Tabassum
    In the 3rd example,
    how did we come to the conclusion that it satisfies (dQ/dx - dP/dy) = 1??

    Also, the area under the line (0,0) to (2pi,0) is ignored because the value is 0. If it was not 0 would we've included in our calculation? I don't think we should coz the area of the seashell (spiral part) already covers it, right?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Maria Gregory
      I think, we just "make up" a vector field such that its curl = 1.
      For a vector field F=Pi+Qj, 2D-curl of 'F' = Q_x - P_y
      We are given a curve (which is independent of 'F') along which we move a particle in the 'F' field.
      From the curve parametrization, we get 'x' and 'y' as some functions of 't'
      So we make up (tailor) 'F' for the curl to be 1 everywhere along the curve...
      This way, in Green's theorem, the curl part (Q_x-P_y) = 1, and what's left is ∫∫1*dA=∫∫dA=Area.
      We want the curl to be 1, so that we can calculate the area of a region.
      (1 vote)
  • mr pants teal style avatar for user Alonso Bautista
    For problem 3 in step 3, I don't understand what the text means when it says "Each part of the integrant is 0, so we can ignore it! Therefore, we can just take this line integral over our spiral and get the answer". Wouldn't we be able to do the same thing if dy and y weren't 0 at that point?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Asmat Abbas
    Use Green’s Theorem to evaluate [(3x-4y+2)dx +(5x+6y-3)dy] , Where C is the triangle with vertices at (0,0) ,(2,4) and (4,3). please solve this question
    (0 votes)
    Default Khan Academy avatar avatar for user