Multivariable Calculus · Line integral

Line integral

The line integral ∫ F·dr of a vector field F along a curve C adds up, piece by piece, F·T, the part of the force along the way: the work F does along C. Plot F·T against the distance s and the area under it is the work; in a gradient field F = ∇φ the work depends only on the ends, W = φ(B) − φ(A).

The line integral in this visualization

A force field FF pushes on an object that moves along a path CC from A to B. Over each short step of length dsds, only the part of the force along the direction of travel does work, F⋅T dsF\cdot T\,ds, where TT is the unit tangent. Adding up these pieces gives the line integral of FF along CC, the work WW.

The same work, written three ways
W=∫CF⋅dr=∫0LF⋅T ds=∫abF(r(t))⋅r′(t) dtW = \int_C F\cdot dr = \int_0^L F\cdot T\,ds = \int_a^b F(r(t))\cdot r'(t)\,dt

The yellow ticks along the path show F⋅TF\cdot T, filled and pointing forward where the force helps, hollow and pointing back where it holds back. The graph under the view plots F⋅TF\cdot T against the distance ss walked from A. Counting the hatched area below the axis as negative, the area up to the red point S is the work done so far, and the whole area is WW: the line integral has become an ordinary integral in ss.

At S the force is split into a yellow part along the path and a faint part across it, which does no work. In the radial field F=(x,y)F = (x, y), around the circle of radius 2 about the origin, the force has length 2 but points straight out, so F⋅T=0F\cdot T = 0 and W=0W = 0. Work is not the size of the force times the length of the path. Reverse traces the same path backwards, turning TT into −T-T and WW into −W-W.

In a gradient field F=∇φF = \nabla\varphi, the chain rule makes F⋅T dsF\cdot T\,ds the change in φ\varphi over the step. The work up to S is φ(S)−φ(A)\varphi(S) - \varphi(A), and when ∇φ\nabla\varphi is continuous, the work along any piecewise smooth path depends only on its ends:

The fundamental theorem for line integrals
∫C∇φ⋅dr=φ(B)−φ(A)\int_C \nabla\varphi\cdot dr = \varphi(B) - \varphi(A)

Contour lines shows why without a formula. It draws the lines where φ\varphi is an integer. From one line up to the next, φ\varphi rises by 1, so a path that climbs between them does one unit of work, gathered smoothly on the way. However a path winds, its extra crossings come in pairs, one up and one down, and cancel. Every path from A to B therefore crosses the same net number of lines, and that number, with the parts of a unit at the two ends, adds up to φ(B)−φ(A)\varphi(B) - \varphi(A).

A field whose work depends only on the ends of the path is called conservative. In such a field every closed path does zero work, because it ends where it starts.

The rotation field F=(−y,x)F = (-y, x) has no potential. From (2,0)(2, 0) to (−2,0)(-2, 0), the top half circle has F⋅T=2F\cdot T = 2 along its length of 2π2\pi, so W=4π≈12.57W = 4\pi \approx 12.57. Along the x-axis the force is across the path and W=0W = 0. Over the top and back along the axis is a closed path that does 4π4\pi of work.

The spiral staircase F=(−y,x)/(x2+y2)F = (-y, x)/(x^2 + y^2) lies in between. Its curl is zero wherever it is defined, and near any point other than the origin it is the gradient of the polar angle θ\theta. But no single angle function works all the way round, because one counterclockwise turn about the origin adds 2π2\pi. Its contour lines are rays, and the work is the change in θ\theta followed along the path: 2π≈6.282\pi \approx 6.28 once counterclockwise around the origin, and 0 around a circle that does not enclose it.

Things to notice

  • The line integral of a function with respect to arc length, ∫Cf ds\int_C f\,ds, is a different integral. It adds ff times the length of each step, like the mass of a wire, and walking the other way does not change it.

Controls

  • A new field keeps the path and S, so one path can be compared across fields. Dragging a Bézier curve’s B onto A closes the path.

Related