Back to the on-screen lesson ·

Line integrals

Adding a function up along a curve: the scalar integral against arc length, the vector integral against direction, and why one of the two changes sign when the curve is walked backwards.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to parametrise a curve, convert either kind of line integral into an ordinary one-variable integral, compute the work a field does along a path and the mass of a wire along it, and say which of the two integrals reverses sign when the direction of travel is reversed and why.

2. What you already have

Arc length, from the lesson on space curves: $ds = |\mathbf{r}'(t)|\,dt$, and a curve described by a parametrisation rather than by an equation. And vector fields, from the last lesson. A line integral is those two ideas put together, and the single-variable integral you already know is the special case where the curve is a piece of the $x$ axis.

3. The words this lesson will use

A line integral is taken along a curve rather than over an interval; the curve is often called the path. A path is oriented once a direction of travel is chosen, and $-C$ means the same path travelled the other way. A path is closed when it ends where it started, and the integral round it is written $\oint_C$ and called the circulation. Work is the name the second kind of line integral takes when the field is a force. A path is piecewise smooth when it is made of finitely many smooth pieces joined end to end.

4. Add up a function along a curve, one small step at a time

There are two line integrals, and they differ in what they pair the function with.

The scalar kind. For a function $f$ and a curve $C$ parametrised by $\mathbf{r}(t)$ on $[\alpha, \beta]$,

$$\int_C f\,ds = \int_\alpha^\beta f(\mathbf{r}(t))\,|\mathbf{r}'(t)|\,dt.$$

Each small piece of curve contributes its length times the value of $f$ there. With $f = 1$ this is the arc length; with $f$ a density it is the mass of a wire.

The vector kind. For a field $\mathbf{F}$,

$$\int_C \mathbf{F} \cdot d\mathbf{r} = \int_\alpha^\beta \mathbf{F}(\mathbf{r}(t)) \cdot \mathbf{r}'(t)\,dt.$$

Each small step contributes the part of the field that points along the step, times the length of the step. With $\mathbf{F}$ a force this is the work done; with $\mathbf{F}$ a velocity field it is the circulation.

Both are ordinary integrals in disguise. The parametrisation converts the curve into an interval of $t$, and after substitution nothing remains but a one-variable integral. That is the entire method.

What depends on the parametrisation. Nothing. Re-parametrise the same curve, travelled the same way, and both integrals give the same number: the $|\mathbf{r}'(t)|\,dt$ and the $\mathbf{r}'(t)\,dt$ absorb the change exactly. But the direction is not a matter of parametrisation:

$$\int_{-C} f\,ds = \int_C f\,ds, \qquad \int_{-C} \mathbf{F} \cdot d\mathbf{r} = -\int_C \mathbf{F} \cdot d\mathbf{r}.$$

Another way: picture

Imagine a wire bent into the shape of $C$, and a fence built on it whose height above each point is $f$. The scalar integral is the area of that fence. For the vector kind, imagine walking the wire while a wind blows: at each step you record only the component of the wind along your step, positive when it helps and negative when it hinders. The total is the work the wind did on you, and walking home retraces every step with the sign flipped.

Another way: steps

To compute either kind:

  1. Write a parametrisation $\mathbf{r}(t)$ and say what interval $t$ runs over, in the direction the problem asks for.
  2. Differentiate to get $\mathbf{r}'(t)$.
  3. For the scalar kind take $|\mathbf{r}'(t)|$; for the vector kind keep the whole velocity.
  4. Substitute $\mathbf{r}(t)$ into $f$ or $\mathbf{F}$.
  5. Multiply or dot, and integrate over the parameter interval.
  6. Check the sign against the direction you were asked for.

5. Why the parametrisation cancels out

Suppose the same curve is described twice, once by $\mathbf{r}(t)$ on $[0,1]$ and once by $\mathbf{r}(u^2)$ on $[0,1]$ — the second version dawdles at the start and hurries at the end. The second integrand carries a factor $2u$ from the chain rule, and the substitution $t = u^2$ carries exactly the reciprocal. The two integrals agree.

This is worth stating plainly, because it is what makes the notation honest. $\int_C f\,ds$ mentions only the curve and the function, so it had better not secretly depend on how somebody chose to trace the curve — and it does not. The same is true of $\int_C \mathbf{F} \cdot d\mathbf{r}$, given the direction of travel.

So in practice: choose the easiest parametrisation. A straight segment from $A$ to $B$ is always $\mathbf{r}(t) = A + t(B - A)$ on $[0,1]$, and a graph $y = g(x)$ is always $\mathbf{r}(x) = \langle x, g(x) \rangle$. Neither choice can cost you anything.

6. Where this goes wrong

Forgetting the speed factor in the scalar kind. $\int_C f\,ds$ is not $\int f(\mathbf{r}(t))\,dt$; the $|\mathbf{r}'(t)|$ is what turns parameter steps into distance. It is easy to miss because for a unit-speed curve it equals one.

Integrating over the wrong interval. The limits are the parameter values at the ends, in the order of travel. Writing them the other way round negates the answer, which is correct for the vector kind and wrong for the scalar kind.

Substituting the curve too late. The field has to be evaluated on the curve. Leaving $x$ and $y$ in the integrand and integrating with respect to $t$ is the most common way an answer comes out meaningless.

Ignoring the direction because the field looks symmetric. An orientation, an order of integration and an order of factors are part of the answer, not part of the handwriting. Reversing a curve flips the sign of the work along it, swapping the factors of a cross product flips the vector, and exchanging the two limits of an inner integral changes what region was integrated over. Say which one you chose, every time.

7. The two line integrals are not the same integral with different notation

They look alike and they are asked for in the same breath, but $ds$ and $d\mathbf{r}$ are different objects. $ds$ is a length: positive, with no direction in it, and unchanged if you walk the curve the other way. $d\mathbf{r}$ is a small displacement: a vector, which reverses when you do.

That single difference produces every distinction between them. The scalar kind computes masses, lengths and average values, and asking for its orientation is meaningless. The vector kind computes work, flux across a plane curve and circulation, and its sign is the answer as much as its magnitude is. A problem that says counterclockwise is telling you it means the second kind, and a solution that quietly drops the direction has lost information the question supplied.

8. The mass of a straight wire

  1. A wire runs from $(0,0)$ to $(3,4)$ with density $f(x,y) = 1$. Parametrise: $\mathbf{r}(t) = \langle 3t, 4t \rangle$, $0 \le t \le 1$.

    A straight segment is easiest as a linear parametrisation.

  2. Then $\mathbf{r}'(t) = \langle 3, 4 \rangle$ and $|\mathbf{r}'(t)| = 5$, constant.

    Steady speed along a straight path.

  3. So $\int_C 1\,ds = \int_0^1 5\,dt = 5$, which is the length of the wire — as it must be, since a density of one makes mass and length the same number. A formula that reproduces a known answer in the trivial case is a formula worth trusting in the others.

    The scalar integral with $f = 1$ is arc length.

9. Work along two different routes

  1. Take $\mathbf{F} = \langle y, 0 \rangle$ from $(0,0)$ to $(1,1)$, first along the straight segment $\mathbf{r}(t) = \langle t, t \rangle$.

    One field, two routes, same endpoints.

  2. There $\mathbf{F}(\mathbf{r}(t)) = \langle t, 0 \rangle$ and $\mathbf{r}'(t) = \langle 1,1 \rangle$, so the integrand is $t$ and the work is $\tfrac12$.

    Substitute the curve, dot, integrate.

  3. Now go along the bottom then up the right side. On the bottom $y = 0$ so the field vanishes; on the right side the steps are vertical and the field is horizontal, so the dot product is zero. The work is $0$, not $\tfrac12$. For this field the route matters — and the next lesson is about exactly when it does not.

    Path dependence is the normal case, not the exception.

10. Your turn: circulation round the unit square

  1. Take $\mathbf{F} = \langle 0, x \rangle$ counterclockwise round the square with corners $(0,0)$, $(1,0)$, $(1,1)$, $(0,1)$, one side at a time.

    A closed path is done piece by piece.

  2. Bottom: steps are horizontal, the field is vertical, contribution $0$. Right side: $x = 1$ so the field is $\langle 0,1 \rangle$ and the steps are $\langle 0, dy \rangle$, contribution $1$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Top: horizontal steps again, contribution $0$. Left side: $x = 0$ so the field vanishes, contribution $0$. The circulation is $1$ — which is the area of the square, and that is not a coincidence: two lessons from here Green's theorem says it never is.

11. Guided practice

Put the stages of computing $\int_C \mathbf{F} \cdot d\mathbf{r}$ in order, for a curve $C$ of length $9$.

Number the steps in order (write the number in the box):

12. Guided practice

For $\mathbf{F} = \langle 3, 3 \rangle$ and the segment $\mathbf{r}(t) = \langle 2t, 2t \rangle$ with $0 \le t \le 2$, fill in the stages.

Value
The first component of the velocity
The second component of the velocity
The dot product of the field with the velocity
The work, integrating from zero to two

13. Practice

How much work does the constant field $\mathbf{F} = \langle 6, 3 \rangle$ do along the straight path from the origin to $(5, 4)$?

Answer:

14. Practice

Evaluate $\int_C (3x + 3)\,ds$ along the horizontal segment from $(0, 3)$ to $(2, 3)$.

Answer:

15. Practice

Put the stages of computing $\int_C \mathbf{F} \cdot d\mathbf{r}$ in order, for a curve $C$ of length $4$.

Number the steps in order (write the number in the box):

16. Somewhere new

Along a curve $C$, $\int_C f\,ds = 5$ and $\int_C \mathbf{F} \cdot d\mathbf{r} = 5$. What are they along the same curve walked backwards?

17. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

18. Test question

For $\mathbf{F} = \langle 4, 6 \rangle$ and the segment $\mathbf{r}(t) = \langle t, 2t \rangle$ with $0 \le t \le 2$, fill in the stages.

Value
The first component of the velocity
The second component of the velocity
The dot product of the field with the velocity
The work, integrating from zero to two

19. What you can do now

You can turn a curve into a parameter interval, substitute, and integrate, for both kinds of line integral, and you can say what an orientation changes and what it does not. Next: the fields for which the path does not matter at all.

Working for the steps left to you

10. Your turn: circulation round the unit square, step 3