Chapter 33. Work (aka line integrals), and how to compute them with bare hands

This chapter defines a so-called line integral, the first of the two purple pictures in our poster Figure 75. For now, we’ll only view this cell in isolation, so we’ll give you the definition and show you how to use it with bare-hands.

However, it’s worth saying now: there will be shortcuts to computing line integrals that bypass the work of parametrization. Those shortcuts are given by the red arrows in the Figure 75. In fact, the entire next chapter, Chapter 34, is dedicated to these shortcuts.

§33.1 [TEXT] Work

We now define the leftmost purple pictures in our poster Figure 75. When we have a vector field 𝐅:ℝ𝑛→ℝ𝑛 as a path 𝐫:ℝ→ℝ𝑛 through it, we can define the work on it.

Figure 79: The work integral circled from the giant poster in Figure 75.
Definition of work

The work of 𝐅:ℝ𝑛→ℝ𝑛 done on a path 𝐫:ℝ→ℝ𝑛 is defined as

∫𝑡=start timestop time𝐅(𝐫(𝑡))⋅𝐫′(𝑡)d𝑡.
Type signature
Keep in mind the types of the inputs; see Table 17. The work is a scalar quantity (there is a dot product inside the integrand, so it outputs a number).
SymbolNameInput typeOutput type
𝐫:ℝ→ℝ𝑛Parametrization of a pathScalar 𝑡 (time)Point (dot) in ℝ𝑛
𝐫′:ℝ→ℝ𝑛Velocity vector for 𝐫Scalar 𝑡 (time)Vector (arrow) in ℝ𝑛
𝐅:ℝ𝑛→ℝ𝑛Vector fieldPoint (dot) in ℝ𝑛Vector (arrow) in ℝ𝑛
Table 17: The type signatures of the objects in the work integral.

This is commonly abbreviated with shorthand in two ways.

That means the above work integral can be rewritten as just

∫𝒞︀𝐅⋅d𝐫.

Mercifully, the shorthand still writes a dot product in the symbols, to remind you that, yes, you should be evaluating a dot product when you compute this. I can’t imagine how much confusion it would cause if the shorthand didn’t have the dot product.

§33.2 [SIDENOTE] Aquatic interpretation of work

Letting 𝐅 represent water current as always, the “work” done along a trajectory can be thought of as:

Idea
The work tells you how much the water current helps or hinders the movement of a swimmer through the water.

To compute this, consider a trajectory along which an object, such as a boat or swimmer, moves through the water. The current vector field 𝐅 at any point describes the speed and direction of the water flow at that location. The work done by the current as the object follows a path 𝒞︀ depends on the alignment of the current with the object’s movement along that path.

Figure 80: An illustration of the sign of work for a given vector field 𝐅 which points roughly southeast. In the leftmost image, the path moves directly along 𝐅 and hence the work is positive. In the middle image, 𝐅 moves directly against 𝐅 instead and hence the work is negative. In the rightmost image, 𝐅 moves perpendicular to 𝐅 and the work is zero instead.
  1. When the current aligns with the path: If the direction of 𝐅 aligns with the direction of the trajectory at a point, the current contributes positively to the work along that segment, effectively aiding the motion. This is experienced as a “push” in the direction of travel. The dot products are positive since at each point 𝑃=𝐫(𝑡), the vectors 𝐅(𝑃) and 𝐫′(𝑡) align well, and the work is a sum of a lot of positive numbers.

  2. When the current opposes the path: If the current direction opposes the trajectory at any point, it contributes negatively to the work, effectively resisting the motion. In this case, the object has to work against the current, experiencing it as a “drag” force that slows its progress. The dot products are negative since at each point 𝑃=𝐫(𝑡), the vectors 𝐅(𝑃) and 𝐫′(𝑡) point against each other, and the work is a sum of a lot of negative numbers.

  3. When the current flows perpendicularly to the path: If 𝐅 is perpendicular to the trajectory at a point, it does no work in the direction of travel, as the current neither aids nor resists the movement along the path. The effect of the current in this case would primarily cause a lateral drift rather than a forward or backward push along the trajectory. The dot products are zero in this case: at each point 𝑃=𝐫(𝑡), the vectors 𝐅(𝑃) and 𝐫′(𝑡) are perpendicular.

An illustration of all three situations is shown in Figure 80.

§33.3 [TEXT] Visualizing line integrals via dot products

If you want to visualize the integral, you can imagine walking along the path cut out by 𝐫. At each point, you draw the tangent vector 𝐫′(𝑡) to the path, and also look at the arrow for the vector field 𝐅(𝐫(𝐭)) at that point. There’s a dot product of these two vectors, which is a number. The line integral adds up all these numbers.

The light blue and purple in Figure 81 are totally separate

When drawing a cartoon like in Figure 81, it might be useful to keep in mind that there are two parts to the picture:

  • the curve 𝒞︀ and its parametrization 𝐫(𝑡) (purple in Figure 81)
  • the vector field 𝐅(𝑥,𝑦) (light blue arrows in Figure 81)

Remember, these two parts have nothing to do with each other. That is:

  • When you’re sketching the light blue arrows for 𝐅(𝑥,𝑦), you should only look at 𝐅 and completely ignore 𝒞︀ and 𝐫.
  • Similarly, when sketching the purple path 𝒞︀, ignore 𝐅 completely.

Figure 81: Cartoon of the dot products being added up by the work integral. Imagine adding up all the dot products 𝐅(𝐫(𝑡))⋅𝐫′(𝑡).

In practice, if you actually want to do the integral calculation, you end up having to do a parametrization, so the shorthand hides how much effort will be needed. For example, in the following exercise, 𝒞︀ is the upper half of the circle 𝑥2+𝑦2=1, directed from the point (1,0) to (−1,0). (Again, for work integrals, we always require a specification of which way the integral moves along 𝒞︀, if we choose to hide the parametrization 𝐫(𝑡) from the notation.)

Tip: You get flexibility in parametrizations, as in Section 12.7

The work integral depends on which direction you walk along the path (it negates if you flip the start and stop point), but it doesn’t depend on exactly how exactly you parametrize the path.

Thus, the comments from Section 12.7 apply here: if you’re saying, parametrizing the semicircle (1,0) to (−1,0) the blue arc in later Figure 82), you should probably use 𝐫(𝑡)=(cos(𝑡),sin(𝑡)) for 0≤𝑡≤𝜋.

You could also use 𝐫(𝑡)=(cos(𝜋𝑡),sin(𝜋𝑡)) for 0≤𝑡≤1. Or if you wanted to annoy the grader, you could even use 𝐫(𝑡)=(cos(𝜋𝑡2),sin(𝜋𝑡2)) for 0≤𝑡≤1, which traces out the same arc at an irregular rate. Since these all give the same answer, you should pick the parametrization that makes the calculation easiest for you.

Tip: Splicing is OK
There’s no issue with cutting up the path into multiple parts. For example, if 𝒞︀ is a closed loop consisting of walking along the perimeter of the square, just cut it into the four line segments.

§33.4 [RECIPE] Computing line integrals by bare-hands via parametrization

Going back to our definition, here it is in recipe form.

Recipe for computing line integrals with bare-hands parametrization

To compute the line integral of 𝐅 over the curve 𝒞︀:

  1. Pick any parametrization 𝐫:ℝ→ℝ𝑛 of the curve 𝒞︀, including specifying the start and stop times.

    • As described in Section 12.7, you have some freedom in how you set the parametrization: it only matters you start and end at the right place, and trace out the exact curve 𝒞︀. So you should pick a parametrization that makes your calculation easier.
  2. Calculate the derivative 𝐫′(𝑡).
  3. Calculate the dot product 𝐅(𝐫(𝑡))⋅𝐫′(𝑡).
  4. Integrate this from the start time to the stop time.

Let’s show some examples of how to calculate this in practice.

Sample Question

Compute the line integral of the vector field 𝐅(𝑥,𝑦)=(2𝑦3𝑥) along the following two curves:

  • the upper half of the circle 𝑥2+𝑦2=1, oriented counterclockwise (blue in Figure 82).
  • the line segment from (1,0) to (−1,0) (brown in Figure 82).

Figure 82: Two example of a work integral in the vector field 𝐅(𝑥,𝑦)=(2𝑦3𝑥). The blue path is the upper semicircle of 𝑥2+𝑦2=1; the brown one is a straight line.

Solution. We do both parts; to prevent drowning in subscripts, we’ll use 𝒞︀ and 𝐫 for the curve and parametrization for each part.

Before jumping into the calculation, look at Figure 82 to get a sense of what’s going on. The blue arc has mixed signs: near the start and end of the arc, the dot products we’re adding are positive as the small arrows line up well with the blue path. But we’re moving against the current near the top. Since the arrows near the start are longer, you might guess the work integral is a small positive number, and you’d be right.

Meanwhile, along the brown arrow, all the arrows are perpendicular to our trajectory. We should expect the total work to thus be 0, and indeed it is.

□

In particular the work integral in general depends on which path you take: we got different answers for the blue and brown path above. It’s only for the so-called conservative vector fields, which we’ll talk about more in a moment, for which work integrals are path-independent.

§33.5 [TEXT] Even more shorthand: 𝑝d𝑥+𝑞d𝑦

The notation ∫𝒞︀𝐅⋅d𝐫 can still be contracted further: there is another shorthand that hides both 𝐅 and 𝐫 altogether. Here it is:

Definition: More shorthand for line integrals

In ℝ2, suppose 𝐅(𝑥,𝑦)=(𝑝(𝑥,𝑦)𝑞(𝑥,𝑦)). Then the work integral can further be abbreviated as

∫𝒞︀(𝑝d𝑥+𝑞d𝑦).

Analogously, suppose we have a vector field 𝐅(𝑥,𝑦,𝑧)=(𝑝(𝑥,𝑦,𝑧)𝑞(𝑥,𝑦,𝑧)𝑟(𝑥,𝑦,𝑧)) for ℝ3. Then the work integral can further be abbreviated as

∫𝒞︀(𝑝d𝑥+𝑞d𝑦+𝑟d𝑧).
Remark

Here’s the reason the shorthand is written like so. For simplicity, let’s say we’re in the 2D case and 𝐫(𝑡)=(𝑥(𝑡)𝑦(𝑡)). Then (𝑝𝑞)⋅𝐫′=(𝑝𝑞)⋅(𝑥′𝑦′)=𝑝⋅𝑥′+𝑞⋅𝑦′=𝑝⋅d𝑥d𝑡+𝑞⋅d𝑦d𝑡. Hence, if we are integrating ∫𝑡=startstop(𝑝𝑞)⋅𝐫′d𝑡, we could imagine “cancelling” the d𝑡 out, the expression we’d get looks like 𝑝d𝑥+𝑞d𝑦.

For 18.02 purposes, all of this is only for mnemonic purposes; we don’t actually define what any of the d symbols mean, so we can’t make a more precise statement than that.

If any of 𝑝, 𝑞, 𝑟 are zero, that term can also be omitted entirely. So for example, in 2D, if you see

∫𝒞︀𝑦d𝑥

you should take this shorthand to mean

∫𝒞︀𝑦d𝑥≔∫𝒞︀(𝑦d𝑥+0d𝑦)=∫𝒞︀(𝑦0)⋅d𝐫.

Let’s do an example to practice the weird d𝑥 and d𝑦 shorthand, along a different path.

Sample Question

Let 𝒞︀ denote the arc of the parabola 𝑦=𝑥2 starting from (−1,1) and moving right to (1,1). Compute the line integral

∫𝒞︀𝑦2/3d𝑥.

Solution. First we need to expand the shorthand with d𝑥 and d𝑦. Recall that 𝑝d𝑥+𝑞d𝑦 is shorthand for the vector field being (𝑝𝑞). So where 𝑦2/3d𝑥=𝑦2/3d𝑥+0d𝑦, we expand the shorthand as

∫𝒞︀𝑦2/3d𝑥=∫𝒞︀(𝑦2/30)⋅d𝐫=∫𝑡=start timestop time𝐅(𝐫(𝑡))⋅𝐫′(𝑡)d𝑡

where 𝐅(𝑥,𝑦)≔(𝑦2/30) refers to the vector field encoded by the 𝑦2/3d𝑥 shorthand.

Again, if you look at the sketch in Figure 83, we’re expecting a positive work: all the arrows are pointing right, and the path 𝒞︀ in red is moving right as well, so all the dot products are positive. (Again, if you imagine the blue arrows as a river current, it’s definitely helping you swim, even if it’s not directly aligned since you’re not swimming straight east.)

Figure 83: The vector field 𝐅(𝑥,𝑦)=(𝑦2/30) (little light blue horizontal arrows) and an arc 𝒞︀ from the parabola 𝑦=𝑥2 in it (purple).

The arc of the parabola we’re trying to traverse needs to start at (−1,1) and end at (1,1). Just to make things concrete, examples of points we expect to pass through in our path are

(−1,1)⟶(−12,14)⟶(−13,19)⟶(0,0)⟶(13,19)⟶(12,14)⟶(1,1).

Anyway, we choose to parametrize the time as varying in −1≤𝑡≤1 with

𝐫(𝑡)=(𝑡,𝑡2).

Now if we throw everything in, we have

𝐅(𝐫(𝑡))=𝐅(𝑡,𝑡2)=(𝑡430)

and

𝐫′(𝑡)=(12𝑡).

So the overall line integral becomes

∫𝑡=−11(𝑡430)⏟=𝐅(𝐫(𝑡))⋅(12𝑡)⏟=𝐫′(𝑡)d𝑡=∫𝑡=−11𝑡43d𝑡=[37𝑡73]𝑡=−11=67.

□

§33.6 [EXER] Exercises

Exercise 33.1 (Suggested by Ting-Wei Chao). Let 𝒞︀ be the oriented closed curve formed by the arc of the parabola 𝑦=𝑥2−1 running from (−1,0) to (1,0), followed by a line segment from (1,0) back to (−1,0). Let

𝐅(𝑥,𝑦)=(𝑥2(𝑦+1)(𝑦+1)2).

Compute ∫𝒞︀𝐅⋅d𝐫 using direct parametrization.

Exercise 33.2. Let 𝒞︀ be a curve in ℝ2 from (0,0) to (2,3) whose arc length is 7. Let 𝐅 be a vector field with the property that for any point 𝑃 on the curve,

Compute ∫𝒞︀𝐅⋅d𝐫.