Line integrals

So far we’ve discussed vector and scalar fields and what it means to differentiate them. In this part of the module we’ll discuss different ways we can integrate these fields over different structures in 3D space, starting with integration over a curve.

There’s some general notation here to consider before we dive in. All integrals will be written as \[ \int_A F({\mathbf{r}}) dB. \] \(F\) is the function we’re integrating, \(A\) is the set we’re integrating it over (which could be a curve, surface, or volume) and \(dB\) is the integral element appropriate for the set (and there are different choices). Instead of \(\int\) you might also see symbols like \(\iint\) or \(\oint\) but these can always be replaced with \(\int\), they just give you a little more context about what you’re integrating.

In every case, the steps are going to be the same:

  1. Parameterise the curve/surface/volume \(A\).
  2. Calulate the element \(dB\) for that parameterisation.
  3. Replace the integral \(\int_A\) with ordinary integral(s) \(\int_a^b\) with the correct limits.
  4. Compute the value of the integral.

Line integrals of scalar fields

In fact, we’ve already seen an example of line integrals, when we said that the arc-length of a curve \[ \gamma = \left\{{\mathbf{r}}(t)\,|\,t_0\leq t\leq t_1\right\} \] is \[ \int_{t_0}^{t_1} \left| \frac{d {\mathbf{r}}}{dt}\right| dt. \] This can viewed as the empty integral over the curve \(\gamma\), which we notate as \[ \int_\gamma ds = \int_{t_0}^{t_1} \left| \frac{d {\mathbf{r}}}{dt}\right| dt. \] You can think of this like \(\int_a^b dx\) for ordinary integrals, which just gives you the size of the interval \(b-a\), but now we’re doing the integral over the curve \(\gamma\) so it gives the length of the curve. Here \(ds\) is an infinitesimal length of the curve, and if we add up an infinite number of these infinitesimal lengths then we get the total length of the line.

If instead of just adding up the little bits of line, we want to add up the values of a function along the line, that becomes the standard line integral and it’s computed in just the same way: \[ \int_\gamma f({\mathbf{r}})ds = \int_{t_0}^{t_1} f({\mathbf{r}}(t))\left| \frac{d {\mathbf{r}}}{dt}\right| dt. \]

Note

This is easy. Just remember that for curves \(ds = \left| \frac{d {\mathbf{r}}}{dt}\right| dt\) and plug in the correct limits and it’s a normal integral.

Example

Integrate the scalar field \(f(x,y,z) = x^2+z\) over the circle \(x^2+y^2=4\), \(z=2\).

Step 1: Parameterise the curve

Hopefully by now you can just get straight to \[{\mathbf{r}}(t) = [2\cos t,\,2\sin t,\,2],\qquad 0\leq t<2\pi.\]

Step 2: Calculate \(ds\)

We have \[ \frac{d {\mathbf{r}}}{dt} = [2\sin t,\,-2\cos 2,\,0] \] so \[ ds = \left| \frac{d {\mathbf{r}}}{dt}\right| dt = \sqrt{(2\sin t)^2+(2\cos t)^2+0^2} dt = 2dt. \]

Step 3: Rewrite the integration

\[ \int_\gamma (x^2+z) ds = \int_0^{2\pi} (4\cos^2 t + 4) 2dt = 8\int_0^{2\pi} (\cos^2 t + 1) dt \]

Step 4: Compute the answer

A quick trick is to remember that the average value of \(\cos^2\) or \(\sin^2\) is \(1/2\) (because \(\cos^2 + \sin^2 = 1\)), so \(\int_0^{2\pi} \cos^2 t \,dt = \pi\).

However you do it, the final answer is \(24\pi\).

Line integrals of vector fields

There are actually two different types of integration here.

Firstly we could just integrate a vector field by its separate components as scalar fields, so that \[ \int_\gamma {\mathbf{F}}({\mathbf{r}}) ds = \int_\gamma \left[F_1({\mathbf{r}}),\,F_2({\mathbf{r}}),F_3({\mathbf{r}})\right] ds = \left[\int_\gamma F_1({\mathbf{r}}) ds,\,\int_\gamma F_2({\mathbf{r}}) ds,\int_\gamma F_3({\mathbf{r}}) ds\right] . \] This is a perfectly valid thing to do, and there are definitely contexts where it makes sense, but it just means doing three scalar integrations, so we won’t discuss it more.

Instead, the type of integration we want to discuss is sometimes called circulation, and it tells us how much a vector field goes along a line.

We write \[ \int_\gamma {\mathbf{F}}({\mathbf{r}}) \cdot d{\mathbf{s}}. \] Notice how now there’s a dot product, and the \(d{\mathbf{s}}\) is a vector (bold \({\mathbf{s}}\)).

Important

Before, we were just integrating over a curve. For vector integrals, the direction of the integral makes a difference: it matters which end you start at.

Luckily, the definition is exactly the obvious thing. For any suitable parameterisation of the curve, we define1 \[ d{\mathbf{s}} = \frac{d {\mathbf{r}}}{dt} dt \] and then this is a vector so we can take the dot product with \({\mathbf{F}}\): \[ \int_\gamma {\mathbf{F}}({\mathbf{r}}) \cdot d{\mathbf{s}} = \int_{t_0}^{t_1} {\mathbf{F}}({\mathbf{r}}(t)) \cdot \frac{d {\mathbf{r}}}{dt} dt. \] We have to make sure that the order of the limits is correct for the direction we want to integrate, that is we start from \(t=t_0\) and go towards \(t=t_1\).

Example

Calculate the line integral of the vector field \({\mathbf{F}}(x,y,z) = [x^2+y^2,z,0]\) over the semicircle which starts at \((0,4,0)\) and ends at \((0,0,0)\) which passes through \((0,0,2)\).

Step 1: Parameterise the curve

I suggest drawing a sketch to help here. The \(x\) co-ordinate is always \(0\), so we think about a circle in the \(y\)-\(z\) plane, something like \[ {\mathbf{r}}(t) = [0,\, a + b \cos t,\,c+b\sin t], \] where we need to find \(a\), \(b\), \(c\) and the limits of \(t\). It makes sense to use \(0\leq t\leq \pi\) because it’s a semicircle, so then plugging in our three points at \(t=0,\pi/2,\pi\), \[[0,a+b,c] = [0,4,0]\] \[[0,a,c+b] = [0,0,2]\] \[[0,a-b,c] = [0,0,0]\] \(a=2\), \(b=2\), \(c=0\) solves all of these, so the parameterisation is \[ {\mathbf{r}}(t) = [0,\, 2 + 2\cos t,\, 2\sin t],\qquad 0\leq t \leq \pi. \]

Step 2: Calculate \(d{\mathbf{s}}\)

\[d{\mathbf{s}} = \frac{d {\mathbf{r}}}{dt} dt = [0,2\sin t, -2\cos t] dt.\]

Step 3: Rewrite the integration

\[\int_\gamma {\mathbf{F}}({\mathbf{r}}) \cdot d{\mathbf{s}} = \int_0^\pi [0^2+(2+2\cos t)^2,\,2\sin t,\,0] \cdot [0,2\sin t, -2\cos t] dt = \int_0^\pi 4 \sin^2 t dt\]

Step 4: Compute the answer

With the same trick as above, we can straight away say that the answer is \(2\pi\).

Footnotes

  1. Sometimes this is written \(d{\mathbf{r}}\)↩︎