Fundamental Theorem of Line Integrals

The following conditions for a vector field ๐…(x,y) are equivalent:

  • โˆซ๐…โ‹…d๐ฌ is path independent,
  • โˆ‡ร—z๐…=0 in the region (which is simply connected, i.e. no holes),
  • ๐…=โˆ‡f for some scalar field f(x,y).

When these conditions hold, ๐… is called conservative. Then โˆซC1๐…โ‹…d๐ฌ=โˆซC2๐…โ‹…d๐ฌ for two paths C1 and C2 from ๐ฉ to ๐ช, and ๐…=โˆ‡f for a scalar field f(x,y).

(Note: when the domain is not simply connected, then the curl condition is not strong enough, but the first and last conditions are still equivalent to each other and the word โ€˜conservativeโ€™ applies when these two conditions hold.)

The Fundamental Theorem of Line Integrals gives the value that is common to these line integrals over various paths:

FT of Line Integrals

For ๐’ž any path from point ๐ฉ to point ๐ช, we have:

โˆซ๐’žโˆ‡fโ‹…d๐ฌ=f(๐ช)โˆ’f(๐ฉ).

If f(x,y) gives the elevation on a mountain at point (x,y), then โˆ‡f gives the rate of incline in the direction of steepest ascent. The line integral of f along any hiking path ๐’ž then gives the total change in elevation.

Derivation of FT of Line Integrals

Take any parametrization ๐ซ(t) of ๐’ž given for tโˆˆ[a,b]. Now โˆ‡fโ‹…d๐ฌ=โˆ‡fโ‹…๐ซโ€ฒ(t)dt. By the chain rule for paths (in reverse), this is equal to ddtf(๐ซ(t)). So can apply the ordinary FTC:

โˆซ๐’žโˆ‡fโ‹…d๐ฌ=โˆซab(โˆ‡f)(๐ซ(t))โ‹…๐ซโ€ฒ(t)dt=โˆซabddtf(๐ซ(t))dt=f(๐ซ(b))โˆ’f(๐ซ(a))=f(๐ช)โˆ’f(๐ฉ).
Exercise 14A-01

FT of Line Integrals: elevation gain

Consider the vector field ๐…=(2x+y,x). Choose any path between (0,0) and (2,3). Verify the FT for line integrals by computing the elevation gain on your chosen path in two ways (computing both sides of the FT). For the right side, you will need to first find a field f(x,y) such that โˆ‡f=๐….

Line integrals III: vector fields, across

The across vector line integral is the integral of a vector field over a curve according to its alignment with the normal vector to the curve. It measures how much the vector field flows across the curve. It does not depend on the chosen parametrization (i.e. on the speed), but its sign depends on the direction traveled along the curve. It is given for a parametric curve ๐ซ(t) that traverses its image ๐’ž one time, together with a vector field ๐…, by the formula:

โˆซ๐’ž๐…โ‹…๐ž๐งds=โˆซ๐’ž๐…(๐ซ(t))โ‹…๐ง(t)dt.

Here ds is a scalar, and ๐ง(t) is ๐ซโ€ฒ(t) after rotating clockwise by 90โˆ˜. If ๐ซ(t)=(x(t),y(t)), then ๐ซโ€ฒ(t)=(xโ€ฒ(t),yโ€ฒ(t)), and ๐ง(t)=(yโ€ฒ(t),โˆ’xโ€ฒ(t)). Also ๐ž๐ง=1|๐ง|๐ง.

The integrand ๐…โ‹…๐ž๐ง is the scalar projection of ๐… onto the direction perpendicular to the curve ๐’ž at each point on that curve. (The positive direction means: rotate the orientation of ๐’ž clockwise by 90โˆ˜.)

The quantity computed by this line integral is sometimes called the flux across the curve.

This line integral is defined for curves in the plane, since the normal vector ๐ง defined as a clockwise rotation of ๐ซโ€ฒ(t) only makes sense for plane curves. (Rotation around the z-axis.) In 3D, one computes the flux across a surface, and the โ€œacross vector line integralโ€ is replaced by an โ€œacross vector surface integralโ€. On the other hand, the โ€œaligned vector line integralโ€ does make sense in 3D (or nD).

Example

Vector line integral: flux across a path

Problem: Suppose ๐…=(ey,2xโˆ’1). Compute the flux of ๐… across the curve y=x2 for xโˆˆ[0,1] (oriented left to right). Solution: Use ๐ซ(t)=(t,t2) for tโˆˆ[0,1]. Then ๐ซโ€ฒ(t)=(1,2t) and ๐ง(t)=(2t,โˆ’1). At ๐ซ(t), ๐… has the value (et2,2tโˆ’1). So ๐…โ‹…๐ง(t)=2tet2โˆ’2t+1, and โˆซ๐’ž๐…โ‹…๐ž๐งds=โˆซ012tet2โˆ’2t+1dt=eโˆ’1.

Exercise 14A-02

Vector line integral: flux across a path

Let ๐…=(x2,y2), and ๐’ž the line segment from (3,0) to (0,3). Compute the flux of ๐… across ๐’ž.

Divergence

Divergence as a derivative operator

Start with a vector field ๐… with vector components ๐…=(F1,F2), where F1(x,y) and F2(x,y) are functions of points in space.

From this ๐… we create a scalar field called the divergence of ๐…, written โˆ‡โ‹…๐…. This field is calculated with the formula:

โˆ‡โ‹…๐…=โˆ‚F1โˆ‚x+โˆ‚F2โˆ‚y.

One can remember this formula using the โ€œvectorโ€ โˆ‡=(โˆ‚โˆ‚x,โˆ‚โˆ‚y); the formula expresses a dot product of โˆ‡ and ๐….

This formula naturally extends to higher dimensions. For example, in 3D we have:

โˆ‡โ‹…๐…=โˆ‚F1โˆ‚x+โˆ‚F2โˆ‚y+โˆ‚F3โˆ‚z.

Example

Divergence of vector fields

Consider the vector field ๐…=(x,y). This is a radial field where each vector has length r. โˆ‡โ‹…๐…=+2 everywhere.

Now consider the vector field ๐…=(xx2+y2,yx2+y2)=1r2(x,y). We have โˆ‡โ‹…๐…=0 except at (0,0), where it is infinity (undefined).

In physics it is common to use polar (or cylindrical or spherical) coordinates because many problems have rotational symmetry. The derivative operators of vector calculus can be expressed in these coordinate systems.

Example

Divergence in polar coordinates

Let ๐…=Fr๐žr+Fฮธ๐žฮธ give a vector field in polar coordinates. Here Fr and Fฮธ are scalar coordinate functions, ๐žr=(xr,yr) is the unit vector in the radial direction, and ๐žฮธ=(โˆ’yr,xr) is the unit vector in the +ฮธ direction. Problem: Find a formula for the divergence โˆ‡โ‹…๐… in polar coordinates.

Solution: Write โˆ‡โ‹…๐…=โˆ‚F1โˆ‚x+โˆ‚F2โˆ‚y in terms of polar coordinates. We have in Cartesian coordinates:

๐…=(xFrrโˆ’yFฮธr,yFrr+xFฮธr)

so:

โˆ‡โ‹…๐…=โˆ‚F1โˆ‚x+โˆ‚F2โˆ‚y=Frr+xโˆ‚โˆ‚x(Frr)โˆ’yโˆ‚โˆ‚x(Fฮธr)+Frr+yโˆ‚โˆ‚y(Frr)+xโˆ‚โˆ‚y(Fฮธr).

The chain rule gives us formulas to convert derivatives:

โˆ‚fโˆ‚x=โˆ‚fโˆ‚rโˆ‚rโˆ‚x+โˆ‚fโˆ‚ฮธโˆ‚ฮธโˆ‚x=xrโˆ‚fโˆ‚r+โˆ’yr2โˆ‚fโˆ‚ฮธโˆ‚fโˆ‚y=โˆ‚fโˆ‚rโˆ‚rโˆ‚y+โˆ‚fโˆ‚ฮธโˆ‚ฮธโˆ‚y=yrโˆ‚fโˆ‚r+xr2โˆ‚fโˆ‚ฮธ.

So we obtain, after some cancellation and rearranging:

โˆ‡โ‹…๐…=2Frr+x2+y2rโˆ‚โˆ‚r(Frr)+y2+x2r2โˆ‚โˆ‚ฮธ(Fฮธr)=2Frr+rโˆ‚โˆ‚r(Frr)+1rโˆ‚โˆ‚ฮธFฮธ=1rโˆ‚โˆ‚r(rFr)+1rโˆ‚โˆ‚ฮธFฮธ.

Polar divergence looks different

Given a vector field with polar coordinates Fr and Fฮธ, its divergence is given by:

โˆ‡โ‹…๐…=1rโˆ‚โˆ‚r(rFr)+1rโˆ‚โˆ‚ฮธFฮธ
Exercise 14A-03

Polar divergence

Suppose ๐…=1rn(โˆ’y,x) are the Cartesian components for ๐… with n some integer. Write this vector field using polar coordinates, and compute โˆ‡โ‹…๐… using the polar formula for divergence. Repeat the exercise with ๐…=1rn(x,y).

Divergence as measure of expansion

The divergence can be explained as a measure of expansion of the vector field at each point in space. (Negative divergence means contraction.) If the vector field corresponds to the velocity of a fluid flow, then divergence measures the rate at which fluid flows out of (or into) each point. We can verify this interpretation by using a vector line integral to measure the flow out of a circular loop, and then shrink the loop down to an infinitesimal loop.

Suppose ๐…=(F1,F2) is given. Let ๐’žr be a circle of radius r centered at ๐ฉ=(a,b), oriented counter-clockwise. We will compute the vector line integral across ๐’žr in the limit as rโ†’0.

โˆซ๐’žr๐…โ‹…๐ž๐งds.

Calculate this integral using linear approximations for F1 and F2. Let ๐ซ(t)=(a+rcosโก(t),b+rsinโก(t)), and write q1=F1(๐ฉ) and q2=F2(๐ฉ).

We have:

  • F1(๐ซ(t))โ‰ˆq1+โˆ‚F1โˆ‚xrcosโก(t)+โˆ‚F1โˆ‚yrsinโก(t),
  • F2(๐ซ(t))โ‰ˆq2+โˆ‚F2โˆ‚xrcosโก(t)+โˆ‚F2โˆ‚yrsinโก(t), where the partial derivatives are evaluated at ๐ฉ.

Now ๐ซโ€ฒ(t)=(โˆ’rsinโก(t),rcosโก(t)) and ๐ง(t)=(rcosโก(t),rsinโก(t)), so the line integral becomes:

โˆซ๐’žr๐…โ‹…๐ž๐งdsโ‰ˆโˆซ02ฯ€(q1+โˆ‚F1โˆ‚xrcosโก(t)+โˆ‚F1โˆ‚yrsinโก(t))rcosโก(t)+(q2+โˆ‚F2โˆ‚xrcosโก(t)+โˆ‚F2โˆ‚yrsinโก(t))rsinโก(t)dt=(F1โˆ‚x+F2โˆ‚y)ฯ€r2=(โˆ‡โ‹…๐…)ฯ€r2.

In the limit as rโ†’0, this becomes โˆ‡โ‹…๐…dA, where dA is the infinitesimal area of the circle.

Divergence Theorem

The calculation showing that divergence measures flow out of a loop can be done for a box-shaped loop instead of a circle. When two boxes are glued side-by-side, flow out of one box and into the other contributes positively to the line integral around the first box, and negatively to the line integral around the second box, so these contributions cancel in the sum. By subdividing a region into infinitesimal boxes, writing โˆ‡โ‹…๐…dA for the total flow out of each box, summing the flow across all the box walls, and observing the inner cancellation of adjacent boxes, one obtains the divergence theorem:

Divergence Theorem

When ๐’Ÿ is a region of the xy-plane enclosed by its boundary curve โˆ‚D, then:

โˆฌ๐’Ÿโˆ‡โ‹…๐…dA=โˆฎโˆ‚๐’Ÿ๐…โ‹…๐ž๐งds.

The way to think about this theorem is that โˆ‡โ‹…๐… measures local expansion of a fluid that is flowing with velocity vectors ๐…. Then โˆฌ๐’Ÿโˆ‡โ‹…๐…dA measures the total expansion of fluid in the region ๐’Ÿ. The theorem says that the total expansion in ๐’Ÿ must exactly match the total egress of fluid from the region ๐’Ÿ by flowing across the boundary โˆ‚๐’Ÿ. Net expansion exactly matches net outflow.

When โˆ‡โ‹…๐…=0 in a region, then ๐… is said to be divergence free. An incompressible fluid flowing in a closed container is divergence free. This concept is the analogue of being conservative, with โˆ‡ร—z๐… replaced by โˆ‡โ‹…๐…. Here is one mathematical application. For a divergence-free field, the flux between points ๐ฉ and ๐ช can be calculated using any path from ๐ฉ to ๐ช and does not depend on the chosen path. The reason is that any two paths create a loop, and the total flux across the loop is zero, so the flux into the loop on one side (the first path) equals the flux out of the loop on the other side (the second path). This is an analogue of path independence but for โ€œacrossโ€ line integrals instead of โ€œalignedโ€ line integrals.

Greenโ€™s theorem revisited

In 2D, it turns out that the divergence theorem and Greenโ€™s Theorem are actually restatements of the same fact about pairs of scalar functions.

Suppose ๐…=(F1,F2). Then Greenโ€™s Theorem says that:

โˆฌ๐’Ÿโˆ‚F2โˆ‚xโˆ’โˆ‚F1โˆ‚ydA=โˆฎโˆ‚๐’ŸF1dx+F2dy.

Now rotate the vector field clockwise by 90โˆ˜ around each individual point (x,y), and call the new field ๐†. As we have seen with the components of ๐ง, the components of ๐† are given by ๐†=(F2,โˆ’F1). Now the divergence of ๐† is the same as the curl of ๐…:

โˆ‡โ‹…๐†=โˆ‚F2โˆ‚x+โˆ‚(โˆ’F1)โˆ‚y=โˆ‚F2โˆ‚xโˆ’โˆ‚F1โˆ‚y=โˆ‡ร—z๐….

Furthermore, ๐ž๐งdt=(dy,โˆ’dx), so:

๐†โ‹…๐ž๐งds=(F2,โˆ’F1)โ‹…(dy,โˆ’dx)=F2dy+F1dx=๐…โ‹…d๐ฌ.

Putting this together, the two sides of the divergence theorem become:

โˆฌ๐’Ÿโˆ‡โ‹…๐†dA=โˆฌ๐’Ÿโˆ‡ร—z๐…โˆฎโˆ‚๐’Ÿ๐†โ‹…๐ž๐งds=โˆฎโˆ‚๐’Ÿ๐…โ‹…d๐ฌ.

So, in 2D, Greenโ€™s Theorem and the divergence theorem express the same relationship about the functions F1 and F2 on the region ๐’Ÿ and its boundary โˆ‚๐’Ÿ. Greenโ€™s Theorem packages this relationship in terms of a vector field (F1,F2), and the divergence theorem packages this relationship in terms of the rotated vector field (F2,โˆ’F1).

Problems

Problem 14-01

Faster calculation of line integral using divergence

Let ๐’Ÿ be the box in the xy-plane defined by xโˆˆ[0,2] and yโˆˆ[0,3]. Let ๐…=(x2,ey). Compute the line integral โˆฎโˆ‚๐’Ÿ๐…โ‹…๐ž๐งds in two ways:

  • (a) using separate line integrals over the four sides of the box,
  • (b) using a double integral over the interior of the box.
Problem 14-02

Heat equation

Suppose the temperature in a region is given by the scalar field T(x,y). Heat flows from hot to cold, following the negative temperature gradient โˆ’โˆ‡T.

The rate of total heat flow into a microscopic disk Dr(a,b) enclosed by the circle Cr(a,b) (radius r, centered at (a,b)) is the vector integral of heat flow across the loop Cr, namely: โˆฎCr(โˆ’โˆ‡T)โ‹…๐ž๐งds. Furthermore, the rate of change of T(a,b) is proportional to the net heat flow into Dr(a,b) (assuming r is small enough).

Suppose that all temperatures are static in a region ๐’Ÿ. (This doesnโ€™t mean all temperatures are equal, since there could be a source or sink of heat on the boundary โˆ‚๐’Ÿ and a temperature gradient across ๐’Ÿ.) This implies that the net heat flowing into and out of any disk Dr(x,y) fully contained within ๐’Ÿ is zero.

Using the divergence theorem, explain why the temperature across ๐’Ÿ must satisfy the partial differential equation ฮ”T=0. (Recall that the Laplacian operator ฮ” applied to T gives โˆ‚2Tโˆ‚x2+โˆ‚2Tโˆ‚y2.)

Problem 14-03

Electric field: loop detector of contained charge

The planar electric field ๐„ generated by a point charge at the point ๐ฉ=(a,b) has the form:

๐„=(xโˆ’a(xโˆ’a)2+(yโˆ’b)2,yโˆ’b(xโˆ’a)2+(yโˆ’b)2).

Find the total electric flux exiting any given loop ๐’ž in the plane. Your answer should be one value for any loop that encloses the point ๐ฉ, and another value for loops that do not.

For any loop that does not enclose ๐ฉ, consider the value of โˆ‡โ‹…๐„ in the region of the loop and apply the divergence theorem.

You cannot apply the divergence theorem to a region containing the point ๐ฉ because ๐„ is not defined at ๐ฉ. So, for a loop that does enclose ๐ฉ, you should first compute the answer directly for a small circular loop inside the given loop, and then apply the divergence theorem to the region enclosed between the larger given loop and your small circular loop.