Line integrals and Green's theorem: work, potentials and circulation
Ten problems on line integrals and Green's theorem: the mass of a semicircular wire with ds = |r′(t)| dt, the work of a force along a parabola, one field integrated along two paths with different answers, the cross-partials test and a potential function, the fundamental theorem for line integrals on an awkward curve, the circulation around the unit circle by Green's theorem, the area of an ellipse from ½∮(x dy − y dx), outward flux and the divergence, the field around a hole that circulates 2π, and gradient descent against the rotating field of a two-player game, with worked solutions and the mistakes of dropping |r′(t)|, a clockwise boundary, the curl written backward, a zero curl read as a conservative field and dx = dt with dy left alone.
Before you start
A line integral adds something up along a curve instead of across an interval. With respect to arc length it totals a density along a wire; with a vector field it totals the work a force does on an object moving along the path. Every one is computed the same way: parametrize the curve, rewrite everything in the parameter ,t, and do an ordinary integral. Two shortcuts save most of the work. If the field is a gradient, ,F=∇f, the work depends only on the endpoints, and it is .f(end)−f(start). If the curve is closed, Green's theorem trades the line integral for a double integral over the region inside:
∮CPdx+Qdy=∬R(∂x∂Q−∂y∂P)dA.
The same ideas explain why gradient descent can never go in circles while the simultaneous updates of a two-player game can. These ten problems compute line integrals directly, test fields for being conservative, use potentials and Green's theorem, and end with that contrast.
A curve C is given by r(t)=(x(t),y(t)) for ,a≤t≤b, traced from r(a) to .r(b). Its speed is ∥r′(t)∥=x′(t)2+y′(t)2 and its arc-length element is .ds=∥r′(t)∥dt.
Scalar line integral..∫Cgds=∫abg(r(t))∥r′(t)∥dt. It does not depend on the direction of travel.
Work integral. For ,F=(P,Q),,∫CF⋅dr=∫CPdx+Qdy=∫abF(r(t))⋅r′(t)dt, with dx=x′(t)dt and .dy=y′(t)dt. Reversing the direction changes its sign.
Conservative fields.F is conservative if F=∇f for some potential .f. Then ∫CF⋅dr=f(r(b))−f(r(a)) for every path, and the integral around every closed curve is .0. On a region with no holes, F is conservative exactly when .∂P/∂y=∂Q/∂x.
Green's theorem. For a closed curve C traced counterclockwise (the region R on the left) and ,P,Q with continuous partial derivatives on all of :R:.∮CPdx+Qdy=∬R(Qx−Py)dA. Taking ,P=−2y,Q=2x gives .Area(R)=21∮Cxdy−ydx.
Flux form. With n the outward unit normal, ,∮CF⋅nds=∮CPdy−Qdx=∬R(Px+Qy)dA, the integral of the divergence.
A wire lies along the upper half of the circle ,x2+y2=9, and its density is .ρ(x,y)=y. Find the mass of the wire.
·
Find the work done by F(x,y)=(x2,xy) on an object moving along the parabola y=x2 from (0,0) to .(1,1).
··
Let .F(x,y)=(y,−x). Compute ∫CF⋅dr from (0,0) to (1,1) along the line y=x and along the parabola .y=x2. What does the difference say about ?F? Check the difference with Green's theorem.
··
Show that F(x,y)=(2xy+3,x2+4y) is conservative and find a potential f with .∇f=F.
··
For F of Problem 4, compute ∫CF⋅dr along ,r(t)=(1+t2,t3),,0≤t≤1, both with the potential and directly. Then give the integral of F around any closed curve.
··
Use Green's theorem to compute ,∮C(x−y3)dx+(x3+y)dy, where C is the unit circle traced counterclockwise. Check it directly.
·
Use Area=21∮Cxdy−ydx to find the area inside the ellipse .9x2+4y2=1.
··
Find the outward flux of F(x,y)=(x+y2,2y+x) across the circle ,x2+y2=4, by the divergence form of Green's theorem and directly.
···
Let ,F(x,y)=(x2+y2−y,x2+y2x), defined everywhere except the origin. Show that ,Qx=Py, compute ∮F⋅dr counterclockwise around the unit circle, and find it around the circle of radius 1 centered at (3,0) and around the ellipse of Problem 7.
···
Gradient descent on L(w1,w2)=21(w12+4w22) moves along the field .V=−∇L. A two-player game where one player minimizes and the other maximizes w1w2 moves along .G=(−w2,w1). Compute ∫V⋅dr along the segment from (2,1) to (0,0) and compare it with .L. Then compute the circulation of V and of G counterclockwise around the circle of radius 2 about the origin, and say what each means for the dynamics.
Answers
Mass =18
W=1511≈0.7333
0 along the line, −31 along the parabola: F is not conservative
f(x,y)=x2y+3x+2y2 (plus any constant)
;∫CF⋅dr=9; around any closed curve it is 0
∮C=23π≈4.712
Area =6π≈18.85
Outward flux =12π≈37.70
∮=2π around the unit circle, 0 around the circle centered at ,(3,0), and 2π around the ellipse
;∫V⋅dr=4=L(2,1)−L(0,0); circulation 0 for V and 8π≈25.13 for G
Worked solutions
Problem 1
A wire lies along the upper half of the circle ,x2+y2=9, and its density is .ρ(x,y)=y. Find the mass of the wire.
,r(t)=(3cost,3sint),0≤t≤πThe upper half of the circle of radius .3.
r′(t)=(−3sint,3cost) and ∥r′(t)∥=3The speed is the radius, so .ds=3dt.
∫Cyds=∫0π3sint⋅3dtSubstitute y=3sint and .ds.
=9[−cost]0π=9⋅2.−cosπ+cos0=2.
Mass =18The wire is heaviest at the top, where .y=3. Leaving out ∥r′(t)∥ gives ,6, a third of the mass (Mistake 1).
Problem 2
Find the work done by F(x,y)=(x2,xy) on an object moving along the parabola y=x2 from (0,0) to .(1,1).
,r(t)=(t,t2),,0≤t≤1, so dx=dt and dy=2tdtUse x itself as the parameter.
P=x2=t2 and Q=xy=t⋅t2=t3Everything in terms of .t.
∫CPdx+Qdy=∫01(t2+t3⋅2t)dt=∫01(t2+2t4)dtF⋅r′(t) with .r′(t)=(1,2t).
=31+52Integrate each power.
W=1511≈0.7333Writing dy as dt too gives 127 (Mistake 5).
Problem 3
Let .F(x,y)=(y,−x). Compute ∫CF⋅dr from (0,0) to (1,1) along the line y=x and along the parabola .y=x2. What does the difference say about ?F? Check the difference with Green's theorem.
Line: ,r(t)=(t,t),,r′=(1,1),,F⋅r′=t−t=0, so the integral is 0The field is perpendicular to the line at every point.
Parabola: ,r(t)=(t,t2),,r′=(1,2t),F⋅r′=t2−t⋅2t=−t2P=y=t2 and .Q=−x=−t.
∫01−t2dt=−31The two paths give different work.
Out along the parabola and back along the line is a closed loop around the region ,x2≤y≤x, traced counterclockwise, with ∮=−31−0=−31The parabola runs below the line, so the region is on the left.
0 along the line, −31 along the parabola: F is not conservativeGreen: ,Qx−Py=−1−1=−2, and the region has area ,∫01(x−x2)dx=61, so ,∬R−2dA=−31, as found.
Problem 4
Show that F(x,y)=(2xy+3,x2+4y) is conservative and find a potential f with .∇f=F.
Py=2x and Qx=2xEqual on the whole plane, which has no holes, so F is conservative.
f=∫(2xy+3)dx=x2y+3x+g(y)Integrate P in ;x; the constant of integration may depend on .y.
,fy=x2+g′(y)=x2+4y, so g′(y)=4yMatch fy to .Q. The x's must cancel here, and they do because of step 1.
g(y)=2y2Any constant can be added.
f(x,y)=x2y+3x+2y2 (plus any constant)Check: fx=2xy+3 and .fy=x2+4y.
Problem 5
For F of Problem 4, compute ∫CF⋅dr along ,r(t)=(1+t2,t3),,0≤t≤1, both with the potential and directly. Then give the integral of F around any closed curve.
r(0)=(1,0) and r(1)=(2,1)Only the endpoints matter for a gradient field.
f(2,1)−f(1,0)=(4+6+2)−(0+3+0)=12−3=9The fundamental theorem for line integrals, with .f=x2y+3x+2y2.
Directly: ,r′=(2t,3t2),,P=2(1+t2)t3+3,Q=(1+t2)2+4t3The long way, to confirm.
∫01[(2t3+2t5+3)2t+(1+2t2+t4+4t3)3t2]dt=∫01(6t+3t2+4t4+6t4+12t5+4t6+3t6)dtExpand F⋅r′ and collect: .6t+3t2+10t4+12t5+7t6.
;∫CF⋅dr=9; around any closed curve it is 0Step 4 is .3+1+2+2+1=9. A closed curve ends where it starts, so .f(end)−f(start)=0.
Problem 6
Use Green's theorem to compute ,∮C(x−y3)dx+(x3+y)dy, where C is the unit circle traced counterclockwise. Check it directly.
,P=x−y3,,Q=x3+y, so Qx−Py=3x2−(−3y2)=3x2+3y2Differentiate Q in ,x, then subtract P differentiated in .y.
∬R3(x2+y2)dA=∫02π∫013r2⋅rdrdθPolar coordinates over the unit disk, with the r in .rdrdθ.
=2π⋅43.∫013r3dr=43.
Directly: ,x=cost,,y=sint, and ∫02π[(cost−sin3t)(−sint)+(cos3t+sint)cost]dt=∫02π(sin4t+cos4t)dtThe terms −sintcost and sintcost cancel; each fourth power integrates to .43π.
∮C=23π≈4.712Writing the integrand as Py−Qx gives −23π (Mistake 3).
Problem 7
Use Area=21∮Cxdy−ydx to find the area inside the ellipse .9x2+4y2=1.
,x=3cost,,y=2sint,0≤t≤2πCounterclockwise, starting at .(3,0).
dx=−3sintdt and dy=2costdtBoth differentials in .t.
xdy−ydx=(6cos2t+6sin2t)dt=6dt.cos2+sin2=1.
21∫02π6dt=6πA constant integrand.
Area =6π≈18.85In general .πab. Tracing the ellipse clockwise gives −6π (Mistake 2).
Problem 8
Find the outward flux of F(x,y)=(x+y2,2y+x) across the circle ,x2+y2=4, by the divergence form of Green's theorem and directly.
divF=Px+Qy=1+2=3The y2 and x terms do not survive.
∬R3dA=3⋅π⋅22=12πA constant divergence times the area of the disk of radius .2.
Directly: ,r=(2cost,2sint),n=(cost,sint) and ds=2dtOn a circle the outward normal points along the radius.
F⋅n=(2cost+4sin2t)cost+(4sint+2cost)sint=2cos2t+4sin2t+4sin2tcost+2sintcostThe last two terms integrate to 0 over a full turn, and the first two to .2π+4π=6π.
Outward flux =12π≈37.706π times the 2 from .ds=2dt.
Problem 9
Let ,F(x,y)=(x2+y2−y,x2+y2x), defined everywhere except the origin. Show that ,Qx=Py, compute ∮F⋅dr counterclockwise around the unit circle, and find it around the circle of radius 1 centered at (3,0) and around the ellipse of Problem 7.
Qx=(x2+y2)2(x2+y2)−2x2=(x2+y2)2y2−x2 and Py=−(x2+y2)2(x2+y2)−2y2=(x2+y2)2y2−x2Quotient rule on each.
Unit circle: F=(−sint,cost) and ,r′=(−sint,cost), so F⋅r′=1 and ∮=2πOn the unit circle .x2+y2=1.
Green's theorem does not apply to the unit disk: F is undefined at the origin, inside itThat is how a field with Qx−Py=0 can still circulate.
The circle centered at (3,0) does not enclose the origin, so Green's theorem applies on its disk and gives ∬0dA=0No hole inside, no circulation.
∮=2π around the unit circle, 0 around the circle centered at ,(3,0), and 2π around the ellipseGreen's theorem on the ring between the ellipse and the unit circle (where F is smooth) says the two loops around the origin give the same value. F is the gradient of the polar angle ,θ, which increases by 2π once around the origin, so no single-valued potential exists on the punctured plane (Mistake 4).
Problem 10
Gradient descent on L(w1,w2)=21(w12+4w22) moves along the field .V=−∇L. A two-player game where one player minimizes and the other maximizes w1w2 moves along .G=(−w2,w1). Compute ∫V⋅dr along the segment from (2,1) to (0,0) and compare it with .L. Then compute the circulation of V and of G counterclockwise around the circle of radius 2 about the origin, and say what each means for the dynamics.
,V=(−w1,−4w2), and ,r(t)=(2−2t,1−t),r′=(−2,−1)The straight segment, .0≤t≤1.
,V⋅r′=2(2−2t)+4(1−t)=8(1−t), and ∫018(1−t)dt=4Equal to :L(2,1)−L(0,0)=21(4+4)=4: the work of −∇L is the drop in loss, along any path.
Circulation of :V:,Qx−Py=0−0=0, so ∮V⋅dr=0V is a gradient on the whole plane.
Circulation of :G:,Qx−Py=1−(−1)=2, so ∮G⋅dr=2⋅π⋅22=8πGreen's theorem; directly, G⋅r′=4sin2t+4cos2t=4 around the circle, and .4⋅2π=8π.
;∫V⋅dr=4=L(2,1)−L(0,0); circulation 0 for V and 8π≈25.13 for GA gradient field cannot push an iterate around a loop, because each step lowers .L. The game field has nonzero circulation, so it is not the gradient of any loss, and its updates rotate around the equilibrium at the origin instead of settling into it.
Where this goes wrong
1. Dropping |r′(t)| from ds
The arc-length integral is written as if ds were .dt.
,r(t)=(3cost,3sint),,0≤t≤π, and the density is y=3sintRight so far: Problem 1.
“.∫Cyds=∫0π3sintdt.”The step that causes the mistake: ,ds=∥r′(t)∥dt=3dt, because t is an angle, not a length.
Mass =6A third of the true mass. The answer changes with the parametrization: r(t)=(3cos2t,3sin2t) on [0,2π] would give .3. With the speed included it is 18 either way.
2. Going around the boundary clockwise
The ellipse is parametrized in the direction that first comes to mind, from the top.
Area=21∮Cxdy−ydx for the ellipse 9x2+4y2=1Right so far: Problem 7.
“,x=3sint,.y=2cost.”This starts at (0,2) and moves to the right, so it runs clockwise, with the region on the right.
,xdy−ydx=−6dt, so the area is −6πAn area cannot be negative. Green's theorem needs the counterclockwise direction; reversing it flips the sign of every line integral. The area is .6π.
3. P_y − Q_x instead of Q_x − P_y
The two partial derivatives of Green's theorem are subtracted in the order they are written down.
,P=x−y3,,Q=x3+y,,Py=−3y2,Qx=3x2Right so far: Problem 6.
“The integrand is .Py−Qx=−3y2−3x2.”The order is :Qx−Py: the x-derivative of the dy coefficient first.
∮C=−23πThe direct computation around the circle gives ,∫02π(sin4t+cos4t)dt=23π, positive. A test that catches the order: for ,F=(−y,x), which turns counterclockwise, .Qx−Py=2>0.
4. Zero curl read as conservative on a region with a hole
The cross-partials test is applied without checking where the field is defined.
Qx=Py=(x2+y2)2y2−x2 for the field of Problem 9Right so far.
“,Qx−Py=0, so by Green's theorem every closed integral is .0.”Green's theorem needs P and Q smooth on the whole region inside the curve, and the unit disk contains the origin, where F is undefined.
∮F⋅dr=0 around the unit circleThe direct computation gives F⋅r′=1 at every point and .∮=2π≈6.283. The test proves a field conservative only on a region with no holes; around the origin, F is the gradient of the angle, which does not come back to its starting value.
5. dx = dt, and dy left as dt too
After choosing ,x=t, both differentials are replaced by .dt.
,r(t)=(t,t2),,P=t2,Q=t3Right so far: Problem 2.
“.∫CPdx+Qdy=∫01(t2+t3)dt.”dx=dt is right, but dy=2tdt because .y=t2.
W=31+41=127≈0.5833The integral of F⋅r′(t) needs the whole of .r′(t)=(1,2t). With dy=2tdt the integrand is t2+2t4 and .W=1511≈0.7333.