1  Line integrals

1.1 Curves

A curve \(C\) is a 1-d subset of \(\Real^n\), for \(n>1\).

A curve.

It is usually convenient to describe a curve by a parametrisation, \(\xb(t)\), which maps a real interval \([t_0,t_1]\) into \(\Real^n\). This is a vector-valued function \[ \xb(t) = x_1(t)\eb_1 + x_2(t)\eb_2 + \ldots + x_n(t)\eb_n, \] where \(\{\eb_1,\eb_2,\ldots,\eb_n\}\) denote the Cartesian unit vectors. When \(n=2\) or \(n=3\), we will usually write \(x_1\equiv x\), \(x_2\equiv y\) and \(x_3\equiv z\).

Think of \(\xb(t)\) as the trajectory of a particle, with the parameter \(t\) being time.

Recall that the circle can be described by a single parameter if we change to polar coordinates \((r,\theta)\), where \(x=r\cos\theta\) and \(y=r\sin\theta\).

Circle.

Then \[ x^2 + y^2 = a^2 \quad \implies r^2(\sin^2\theta + \cos^2\theta)=a^2 \quad \implies r=a, \] so we can set \(t=\theta\) and obtain the parametrisation \[ \xb(t)=a\cos t\,\eb_1 + a\sin t\,\eb_2, \quad t\in[0,2\pi]. \]

If \(\xb(t_1)=\xb(t_0)\) then the curve is called closed.

A curve that does not cross itself is called simple.

The circle in Tip 1.1 is both closed and simple.

Helix.

This curve is not closed, because \(\xb(6\pi)\neq\xb(0)\). It is simple because it doesn’t cross itself.

Clover.

This curve is closed, because \(\xb(\pi)=(-1)^2\eb_1 = \eb_1 = \xb(0)\).

The curve is not simple, because it intersects at the origin – in fact it is a triple intersection, and you can check that \(\xb(\pi/6)=\xb(\pi/2)=\xb(5\pi/6)=\bfzero\).

The parametrisation of a curve is not unique: different parametrisations could trace out the same curve in opposite directions, or by speeding up and slowing down as they move along the curve.

A parametrisation \(\xb(t)\) is differentiable if it has a well-defined tangent vector, \[ \ddt{\xb} = \lim_{dt\to 0}\frac{\xb(t+dt) - \xb(t)}{dt}, \] so-called because its direction points along the curve at each \(t\).

Tangent vector.

If we think of \(\xb(t)\) as the trajectory of a particle, then \(\displaystyle\left|\ddt{\xb}\right|\) is the speed at which the particle is moving, for each \(t\).

For (i), \(\displaystyle\ddt{\xb} = \bb-\ab\).

For (ii), \(\displaystyle\frac{d\xb}{d\tau}= \cos\tau(\bb-\ab).\)

[Notice that both parametrisations describe straight lines, because the directions of the tangent vectors are constant. In fact, for (i) we have \(\xb(0)=\ab\) and \(\xb(1)=\bb\), while for (ii) we have \(\xb(0)=\ab\) and \(\xb(\frac\pi2)=\bb\). The endpoints are the same, so both parametrisations describe the same curve.]

Straight line.

If \(\xb(t)\) and \(\xb(\tau)\) are two different parametrisations of the same curve, then the chain rule gives \[ \ddt{\xb} = \frac{d\xb}{d\tau}\frac{d\tau}{dt}. \]

For parametrisations (i) and (ii), setting \(\xb(t)=\xb(\tau)\) gives \(t=\sin\tau\), so \(\displaystyle\frac{dt}{d\tau} = \cos\tau.\)

The chain rule then gives \(\displaystyle\ddt{\xb}=\frac{d\xb}{d\tau}\frac{1}{\cos\tau}\), in agreement with what we found in Tip 1.4.

A parametrisation is regular if \(\displaystyle\ddt{\xb}\neq 0\) everywhere, and a curve is regular if it has at least one regular parametrisation. [You can construct a singular parametrisation even for a regular curve.]

An example of a singular curve is the hypocycloid given by \(\xb(t) = \cos^3t\eb_1 + \sin^3t\eb_2\) for \(t\in[0,2\pi]\).

Hypocycloid.

The tangent vector is \(\displaystyle\ddt{\xb} = -3\cos^2{t}\sin{t}\eb_1 + 3\sin^2{t}\cos{t}\eb_2\).

This vanishes when either \(\sin{t}=0\) or \(\cos{t}=0\), so \(t=0, \frac\pi2, \pi, \frac{3\pi}{2}\), which correspond to the points \[ \xb(0)=(1,0), \quad\xb(\frac\pi2)=(0,1), \quad\xb(\pi)=(-1,0), \quad\xb(\frac{3\pi}{2})=(0,-1). \] These singular points where the direction of the curve is not defined are known as cusps.

1.2 Line integrals of scalar fields

Recall from Calculus I that a scalar field on \(\Real^n\) is a map \(f:\Real^n\to\Real\). In other words, it assigns a real number to every point in \(\Real^n\).

The contours are the family of curves \(f(x,y)=c\) for \(c\in\Real\). Here, \[ y + x^2 = c \qquad \implies y = c - x^2. \] So the contours are all upside down parabolas, with varying \(y\)-intercepts, as in the following sketch:

Contours of f.

The line integral of a scalar field \(f(\xb)\) along a curve \(C\) with parametrisation \(\xb(t)\), for \(t\in[t_0,t_1]\), is defined as \[ \int_Cf\,d\ell = \int_{t_0}^{t_1}f(\xb(t))\left|\ddt{\xb}\right|\,dt. \]

First, we need a parametrisation for the unit circle. From the previous lecture, we have \[ \xb(t) = \cos{t}\eb_1 + \sin{t}\eb_2, \quad t\in[0,2\pi] \quad \implies \ddt{\xb} = -\sin{t}\eb_1 + \cos{t}\eb_2 \quad \implies \left|\ddt{\xb}\right| = \sqrt{\sin^2{t} + \cos^2{t}} = 1. \] So the line integral is \[\begin{align*} \int_0^{2\pi}f(\xb(t))\left|\ddt{\xb}\right|\,dt &= \int_0^{2\pi}\Big(y + x^2\Big)(1)\,dt\\ &= \int_0^{2\pi}\Big(\sin{t} + \cos^2{t}\Big)\,dt\\ &= \int_0^{2\pi}\cos^2{t}\,dt = \pi. \end{align*}\]

The picture is that we are “summing” the values of \(f\) that happen to lie on the circle:

Integrating f around the unit circle.

Physically, a line integral of \(f(\xb)\) measures its total concentration along some path. For example, \(f(\xb)\) could be the concentration of some nutrient on a petri dish, and the line integral would be the total amount eaten by a bacterium swimming from \(\xb(t_0)\) to \(\xb(t_1)\).

Bacterium eating nutrients.

Proposition 1.1 The line integral of a scalar field is independent of the choice of parametrisation.

Proof. Suppose we have two parametrisations of the same curve: \(\xb(t)\) for \(t\in[t_0,t_1]\), and \(\xb(\tau)\) for \(\tau\in[\tau_0,\tau_1]\). By the Chain Rule, the tangent vectors are related by \[ \ddt{\xb} = \ddt{\tau}\frac{d\xb}{d\tau} \quad \implies \left|\ddt{\xb}\right| = \left|\ddt{\tau}\right|\,\left|\frac{d\xb}{d\tau}\right|. \] There are now two cases:

Case 1: \(\xb(\tau_0)=\xb(t_0)\), meaning both parametrisations trace the curve in the same direction. Then \[ \frac{d\tau}{dt}>0 \quad \implies \int_{t_0}^{t_1}f(\xb(t))\left|\ddt{\xb}\right|\,dt = \int_{t_0}^{t_1}f(\xb(t))\left|\frac{d\xb}{d\tau}\right|\frac{d\tau}{dt}\,dt = \int_{\tau_0}^{\tau_1}f(\xb(\tau))\left|\frac{d\xb}{d\tau}\right|\,d\tau. \]

Case 2: \(\xb(\tau_0)=\xb(t_1)\), meaning they trace the curve in opposite directions. Now \[ \frac{d\tau}{dt}<0 \quad \implies \int_{t_0}^{t_1}f(\xb(t))\left|\ddt{\xb}\right|\,dt = \int_{t_0}^{t_1}f(\xb(t))\left|\frac{d\xb}{d\tau}\right|\left(-\frac{d\tau}{dt}\right)\,dt = -\int_{\tau_1}^{\tau_0}f(\xb(\tau))\left|\frac{d\xb}{d\tau}\right|\,d\tau. \] Both cases recover the original formula.


For the special case \(f(\xb)\equiv 1\), the line integral is called the arclength of the curve, \[ L = \int_C\,d\ell = \int_{t_0}^{t_1}\left|\ddt{\xb}\right|\,dt. \]

To see why this measures the “length” of the curve, consider a curve in \(\Real^2\), and notice that \[ \left|\ddt{\xb}\right|\,dt = \sqrt{\left(\ddt{x}\right)^2 + \left(\ddt{y}\right)^2}\,dt = \sqrt{dx^2 + dy^2}. \] By Pythagoras, this is the length of an infinitesimal piece of the curve.

Length of a curve segment.

There is always a special arclength parametrisation \(\xb(s)\) where \(\displaystyle\left|\frac{d\xb}{ds}\right|\equiv 1\) all along the curve. In that case, the parameter \(s\) corresponds to distance along the curve and \(\displaystyle L = \int_0^L\,ds\).

For a circle this is called the circumference, so we know that it should be \(2\pi a\). To obtain this from the arclength formula, recall our parametrisation \[ \xb(t) = a\cos{t}\,\eb_1 + a\sin{t}\,\eb_2, \quad t\in[0,2\pi]. \] Differentiating gives the tangent vector \[ \ddt{\xb} = -a\sin{t}\,\eb_1 + a\cos{t}\,\eb_2 \quad \implies \left|\ddt{\xb}\right| = a. \] So the arclength is \[ L = \int_0^{2\pi} a\,dt = a[t]_0^{2\pi} = 2\pi a. \]

The hypocycloid.

Differentiating gives the tangent vector \(\displaystyle\ddt{\xb} = -3\cos^2{t}\sin{t}\eb_1 + 3\sin^2{t}\cos{t}\eb_2\), so \[\begin{align*} \left|\ddt{\xb}\right| &= \sqrt{9\cos^4t\sin^2t + 9\sin^4t\cos^2t}= 3\sqrt{\cos^2t\sin^2t}\sqrt{\cos^2t + \sin^2t}= 3\left|\cos{t}\sin{t}\right|. \end{align*}\] By symmetry, we only need to integrate over \(t\in[0,\frac\pi2]\), so \[ L = \int_0^{2\pi}3|\cos{t}\sin{t}|\,dt = 4\int_0^{\frac\pi2}3\cos{t}\sin{t}\,dt = 12\int_0^1y\,dy = 6. \]

A curve which has finite length is called rectifiable. This is a weaker condition than “regular” (for example, if \(\xb(t)\) is Lipschitz continuous then it is rectifiable).

One example of a non-rectifiable curve is the Hilbert curve, which is space filling (so cannot have a finite length):

Constructing the Hilbert curve.

1.3 Line integrals of vector fields

A vector field is a function \(\fb:\Real^n\to\Real^n\) that assigns a vector to each point in \(\Real^n\). For \(n=2\), we can visualise \(\fb\) as an arrow at each point in the plane.

We have \(\fb(\xb) = -x\eb_1 -y\eb_2\).

One approach to sketching the field is to first of all think about what happens on \(y=0\), then \(x=0\), then \(x=y\), then fill in some more arrows by continuity. The lengths are supposed to indicate \(|\fb|\).

Sketching a vector field.

[This is called a sink – all arrows point towards the zero \(\fb=\bfzero\) at the origin. The opposite, where all arrows point away from the origin, is called a source.]

Following the same approach gives:

Sketching another vector field.

[This is a clockwise inward spiral.]

The unit tangent vector of a parametrisation is \[ \hat{\tb} = \frac{\displaystyle\ddt{\xb}}{\displaystyle\left|\ddt{\xb}\right|}. \] This only depends on the direction of the parametrisation, not the “speed”.

An oriented curve is a curve together with a specified (consistent) choice of \(\hat{\tb}\). We indicate this by adding an arrow to the curve.

The line integral of a vector field \(\fb(\xb)\) along an oriented curve \(C\) with parametrisation \(\xb(t)\), for \(t\in[t_0,t_1]\), is defined as the scalar line integral of the tangential component: \[ \int_C\fb\cdot\hat{\tb}\,d\ell = \int_{t_0}^{t_1}\fb(\xb(t))\cdot\hat{\tb}\left|\ddt{\xb}\right|\,dt = \int_{t_0}^{t_1}\fb(\xb(t))\cdot\ddt{\xb}\,dt. \]

Line integral of a vector field.

The parametrisation \(\xb(t)\) must trace the curve in the direction given by \(\hat{\tb}\), otherwise the integral will flip sign.

Integral along a straight line.

First we need a parametrisation for \(C\). We choose the obvious one: \(\xb(t)=(1+t)\eb_1\), for \(t\in[0,1]\), with \(\displaystyle\ddt{\xb}=\eb_1\).

Then we evaluate \[\begin{align*} \int_C\fb\cdot\hat{\tb}\,d\ell &= \int_0^1(-x(t)\eb_1 -y(t)\eb_2)\cdot(\eb_1)\,dt\\ &= \int_0^1(-(1+t)\eb_1 - (0)\eb_2)\cdot(\eb_1)\,dt\\ &= -\int_0^1(1+t)\,dt = -\left[t + \frac{t^2}{2}\right]_0^1 = -\frac32. \end{align*}\]

If we parametrised the curve in the wrong direction, say \(\xb(t)=(2-t)\eb_1\) for \(t\in[0,1]\), then we would get the opposite sign: \[ \int_C\fb\cdot\hat{\tb}\,d\ell = \int_0^1(t-2)\eb_1\cdot(-\eb_1)\,dt = \int_0^1(2-t)\,dt = \frac32. \]

The classic physical example of a line integral is the work done by a particle moving in a force field \(\Fb(\xb)\) under Newton’s second law \(m\ddot{\xb} = \Fb(\xb)\).

The work done between \(t=0\) and \(t=T\) is the change in kinetic energy \(K=\frac12m\dot{\xb}\cdot\dot{\xb}\), given by \[ K(T) - K(0) = \int_0^T\ddt{K}\,dt = \int_0^Tm\dot{\xb}\cdot\ddot{\xb}\,dt = \int_0^T\Fb\cdot\dot{\xb}\,dt = \int_C\Fb\cdot\hat{\tb}\,d\ell, \] where \(C\) is the particle’s trajectory.

If the curve \(C\) is closed, this is often emphasised by the notation \[ \int_C\fb\cdot\hat{\tb}\,d\ell = \oint_C\fb\cdot\hat{\tb}\,d\ell, \] and the line integral is called the circulation of \(\fb\) around \(C\).

Line integral around a circle.

We choose the standard parametrisation: \(\xb(t)=\cos{t}\eb_1 + \sin{t}\eb_2\), for \(t\in[0,2\pi]\), with \(\displaystyle\ddt{\xb} = -\sin{t}\eb_1 + \cos{t}\eb_2\).

Then \[\begin{align*} \int_C\fb\cdot\hat{\tb}\,d\ell &= \int_0^{2\pi}(-x\eb_1 - y\eb_2)\cdot(-\sin{t}\eb_1 + \cos{t}\eb_2)\,dt\\ &= \int_0^{2\pi}(-\cos{t}\eb_1 - \sin{t}\eb_2)\cdot(-\sin{t}\eb_1 + \cos{t}\eb_2)\,dt\\ &= \int_0^{2\pi}(\cos{t}\sin{t} - \sin{t}\cos{t})\,dt = 0. \end{align*}\] [The integral vanishes because \(\fb\) is everywhere orthogonal to \(\hat{\tb}\).]

Line integral around a circle.

Again we choose \(\xb(t)=\cos{t}\eb_1 + \sin{t}\eb_2\), for \(t\in[0,2\pi]\), with \(\displaystyle\ddt{\xb} = -\sin{t}\eb_1 + \cos{t}\eb_2\).

This time, the sketch suggests a non-zero (and negative) answer. We have \[\begin{align*} \int_C\gb\cdot\hat{\tb}\,d\ell &= \int_0^{2\pi}[(y-x)\eb_1 - (x+y)\eb_2]\cdot(-\sin{t}\eb_1 + \cos{t}\eb_2)\,dt\\ &= \int_0^{2\pi}[(\sin{t}-\cos{t})\eb_1 - (\cos{t}+\sin{t})\eb_2]\cdot(-\sin{t}\eb_1 + \cos{t}\eb_2)\,dt\\ &= \int_0^{2\pi}(-\sin^2{t}-\cos^2{t})\,dt = -\int_0^{2\pi}\,dt = -2\pi. \end{align*}\] [Indeed we get a negative circulation.]

You may also come across the “differential form” notation for line integrals, \[ \int_C\fb\cdot\hat{\tb}\,d\ell = \int_C\fb\cdot\,d\xb, \] which arises from \[ \ddt{\xb}dt = \ddt{x_1}dt\eb_1 + \ldots + \ddt{x_n}dt\eb_n = dx_1\eb_1 + \ldots + dx_n\eb_n = d\xb. \]

For example, the integral in Tip 1.13 would be written \(\displaystyle\int_C(-x\,dx - y\,dy)\).

You always evaluate by changing variable to \(t\), so with the parametrisation from Tip 1.13 we get \[ \int_C(-x\,dx - y\,dy) = \int_0^{2\pi}(-x)\ddt{x}\,dt + \int_0^{2\pi}(-y)\ddt{y}\,dt = \int_0^{2\pi}(-\cos{t})(-\sin{t})\,dt + \int_0^{2\pi}(-\sin{t}\cos{t})\,dt = 0. \]

1.4 Curvilinear coordinates

For solving problems in \(\Real^3\) with particular symmetries, it is often advantageous to use non-Cartesian coordinates.

In a curvilinear coordinate system \((u,v,w)\), the coordinate lines – where two of the coordinates are constant and one varies – may be curved. These coordinate lines may be parametrised by the corresponding coordinate, so are given by \(\xb(u,v,w)\) with two of the coordinates fixed.

The corresponding tangent vectors are therefore \(\displaystyle\ddy{\xb}{u}, \ddy{\xb}{v}, \ddy{\xb}{w}\).

Coordinate lines in curvilinear coordinates.

The coordinate system is orthogonal if the three tangent vectors are mutually orthogonal at every point. We can then define an orthonormal basis \(\{\eb_u, \eb_v, \eb_w\}\) by normalising: \[ \eb_u = \frac{1}{h_u}\ddy{\xb}{u}, \quad \eb_v = \frac{1}{h_v}\ddy{\xb}{v}, \quad \eb_w = \frac{1}{h_w}\ddy{\xb}{w}, \] where \[ h_u = \left|\ddy{\xb}{u}\right|, \quad h_v = \left|\ddy{\xb}{v}\right|, \quad h_w = \left|\ddy{\xb}{w}\right| \] are called the scale factors.

Geometrically, the scale factors tell you how much an infinitesimal region in \((u,v,w)\) coordinates is stretched at different points in real space.

Differentiating gives the coordinate tangent vectors \[ \ddy{\xb}{r} = \cos\theta\eb_1 + \sin\theta\eb_2, \quad \ddy{\xb}{\theta} = -r\sin\theta\eb_1 + r\cos\theta\eb_2. \] These are normal to curves of constant \(r\) and \(\theta\), respectively.

Plane polar coordinates.

Like Cartesians, this coordinate system has the property that the tangent vectors are orthogonal at every point: \[ \ddy{\xb}{r}\cdot\ddy{\xb}{\theta} = -r\sin\theta\cos\theta + r\cos\theta\sin\theta = 0. \] Unlike Cartesians, the tangents are no longer both unit vectors. The scale factors are \[ h_r = \left|\ddy{\xb}{r}\right| = 1, \quad h_\theta = \left|\ddy{\xb}{\theta}\right| = \sqrt{r^2\sin^2\theta + r^2\cos^2\theta} = r, \] so the basis vectors are \[ \eb_r = \frac{1}{h_r}\ddy{\xb}{r} = \cos\theta\eb_1 + \sin\theta\eb_2, \quad \eb_\theta=\frac{1}{h_\theta}\ddy{\xb}{\theta} = -\sin\theta\eb_1 + \cos\theta\eb_2. \]

Accounting for the scale factors will be critical when calculating surface and volume integrals…

One can also have valid coordinate systems that are not orthogonal. We may see some examples in integration, but our work on differential operators will be limited to orthogonal systems where they have nicer formulae.

In \(\Real^3\), there are two non-Cartesian systems in common use:

  1. Cylindrical coordinates are useful for problems with axial symmetry: \[ \xb(r,\theta,z) = r\cos\theta\eb_1 + r\sin\theta\eb_2 + z\eb_3, \quad r>0, \quad \theta\in[0,2\pi], \quad z\in\Real, \] leading to scale factors \(h_r = 1\), \(h_\theta=r\), \(h_z=1\).

  2. Spherical coordinates are useful for problems with spherical symmetry: \[ \xb(r,\theta,\phi) = r\sin\theta\cos\phi\eb_1 + r\sin\theta\sin\phi\eb_2 + r\cos\theta\eb_3, \quad r>0, \quad\theta\in[0,\pi], \quad\phi\in[0,2\pi], \] leading to scale factors \(h_r = 1\), \(h_\theta=r\), \(h_\phi=r\sin\theta\).

Cylindrical and spherical coordinates.

To derive the spherical coordinate parametrisation, note from the side view firstly that \(z=r\cos\theta\), and secondly that the distance of \(\xb(r,\theta,\phi)\) from the \(z\)-axis (i.e., the cylindrical radius) is \(r\sin\theta\). The top view then gives \(x\) and \(y\) like in cylindrical polar coordinates.

Derivation of spherical coordinates.

Notation for spherical coordinates is not consistent in the literature, with some authors interchanging the meanings of \(\theta\) and \(\phi\). Since this is an Applied Mathematics course, we will follow what Wikipedia calls the “physics convention”.

The tangent vectors in cylindrical coordinates are \[\begin{align*} &\ddy{\xb}{r} = \cos\theta\eb_1 + \sin\theta\eb_2,\\ &\ddy{\xb}{\theta} = -r\sin\theta\eb_1 + r\cos\theta\eb_2,\\ &\ddy{\xb}{z} = \eb_3. \end{align*}\] We can then verify the scale factors quoted above: \[\begin{align*} &h_r = \sqrt{\cos^2\theta + \sin^2\theta} = 1,\\ &h_\theta = \sqrt{r^2\cos^2\theta + r^2\sin^2\theta} = r,\\ &h_z = 1, \end{align*}\] so the unit vectors are \[\begin{align*} \eb_r &= \frac{1}{h_r}\ddy{\xb}{r} = \cos\theta\eb_1 + \sin\theta\eb_2,\\ \eb_\theta &= \frac{1}{h_\theta}\ddy{\xb}{\theta} = -\sin\theta\eb_1 + \cos\theta\eb_2,\\ \eb_z &= \frac{1}{h_z}\ddy{\xb}{z} = \eb_3. \end{align*}\]

However, for this problem we need to express \(\{\eb_1,\eb_2,\eb_3\}\) in terms of \(\{\eb_r,\eb_\theta,\eb_z\}\). Solving simultaneously gives \[\begin{align*} \eb_1 &= \cos\theta\eb_r - \sin\theta\eb_\theta,\\ \eb_2 &= \sin\theta\eb_r + \cos\theta\eb_\theta,\\ \eb_3 &= \eb_z, \end{align*}\] so \[\begin{align*} \gb(\xb) &= (r\sin\theta-r\cos\theta)(\cos\theta\eb_r - \sin\theta\eb_\theta) - (r\cos\theta+r\sin\theta)(\sin\theta\eb_r + \cos\theta\eb_\theta)\\ &= (-r\cos^2\theta - r\sin^2\theta)\eb_r + (-r\sin^2\theta - r\cos^2\theta)\eb_\theta\\ &= -r(\eb_r + \eb_\theta). \end{align*}\]

[So \(\gb\) has a shorter expression in cylindrical coordinates than in Cartesians.]

A coordinate system is called right-handed if \(\eb_u\times\eb_v\) points in the positive \(\eb_w\) direction. Equivalently, if \[ \ddy{\xb}{w}\cdot\left(\ddy{\xb}{u}\times\ddy{\xb}{v}\right) > 0. \]

Right-handed basis.

This is true in Cartesian coordinates \((x,y,z)\), and you can show that it also holds in both cylindrical coordinates \((r,\theta,z)\) and spherical coordinates \((r,\theta,\phi)\).