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:
CPdx+Qdy=R(QxPy)dA
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 Qx or Qy?"
"Which term is subtracted again?"
I always start by thinking about this form:
CFdr=R2d-curlFdA
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 F(x,y) around a closed curve C measures the fluid rotation around that boundary C.
  • The double integral of the curl of F adds up all the tiny little bits of fluid rotation within the region R enclosed by C.
  • Intuitively, it makes sense that these should be related. And in fact, they are equal.
To get to the PQ version of the theorem, write the components of F as P(x,y) and Q(x,y):
F(x,y)=[P(x,y)Q(x,y)]
(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
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 Area


Problem: Let C represent a circle with radius 2 centered at (3,2):
If you orient C counterclockwise, compute the following line integral:
C3ydx+4xdy

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 C3ydx+4xdy, what should we substitute for P(x,y) and Q(x,y)?
P(x,y)=
Q(x,y)=

Step 3: Now compute the appropriate partial derivatives of P(x,y) and Q(x,y).
Qx=
Py=

Step 4: Finally, compute the double integral from Green's theorem. In this case, R represents the region enclosed by the circle with radius 2 centered at (3,2). (Hint, don't work too hard on this one).
R(QxPy)dA=

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
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
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(x)=(x24)(x21)
g(x)=4x2
Now consider the region between the graphs of these functions.
Let D be the clockwise-oriented boundary of this region (D for droopy). Compute the following line integral:
Dx2ydxy2dy

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(x,y) and Q(x,y) in the integral Dx2ydxy2dy?
P(x,y)=
Q(x,y)=

Step 3: Now compute the appropriate partial derivatives of P(x,y) and Q(x,y).
Qx=
Py=

Step 4: To apply Green's theorem, we will perform a double integral over the droopy region D, which was defined as the region above the graph y=(x24)(x21) and below the graph y=4x2. This double integral will be something of the following form:
x1x2y1(x)y2(x)dydx
Fill in all of those bounds:
x1=
x2=
y1(x)=
y2(x)=

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
QxPy
However, since the curve is oriented clockwise, we make this negative:
(QxPy)=PyQx
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:
Dx2ydxy2dy=

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
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:
R(QxPy)dA
Remember how in Example 1, we were lucky enough to have the following property:
(QxPy)=1
This means our integral was just computing the area of R:
R(QxPy)dARdA=Area of R
Now imagine that we didn't already know the area of R, but we wished to compute it. One thing you could do is find some pair of functions P(x,y) and Q(x,y) satisfying this curl-equals-one property:
QxPy=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
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 0t2π.
x(t)=tcos(t)y(t)=tsin(t)
Now add the line from (0,0) to (2π,0) 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(x,y) and Q(x,y).
To apply the Green's theorem trick, we first need to find a pair of functions P(x,y) and Q(x,y) which satisfy the following property:
QxPy=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:
C12ydxPdx+12xdyQdy
Or, written more cleanly,
C12(xdyydx)
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 0t2π:
x(t)=tcos(t)y(t)=tsin(t)
The other is the line between (0,0) and (2π,0). Notice, this line is purely on the x-axis. Therefore y is always 0, and dy is also 0, since there's no change in y. So consider the value of the line integral on this segment:
12(xdy0y0dx)
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(t)=tcos(t) and y(t)=tsin(t), what should we plug in for xdyydx in the line integral? Try to work it out on paper and simplify.
xdyydx=
dt

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:
Spiral12(xdyydx)=

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
  • 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:
    C12(xdyydx)

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)
      (3 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 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?
    (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
  • 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)
  • blobby green style avatar for user siahleeka
    Interesting article. I'm trying to think of some use cases of these integral concepts in science. Could you use the relation between a line integral and area to say, calculate the area of an irregularly shaped landmass from a bordering set of rivers?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • 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