Uge 9: Integration of Vector Fields#

Key Terms#

  • Parametric representations of curves and surfaces in \(\mathbb{R}^n\)

  • Curve length

  • The normal to a surface

  • Line and surface integrals

  • The anti-derivative problem in \(\mathbb{R}^n\)

  • Vector fields and gradient fields

  • Flux

Preparation and Syllabus#

  • Reading material: Sections 7.1, 7.2, 7.3, 7.4, and 7.5 in Chapter 7.


The line integral of a vector field along a curve is at DTU (but not many other places) called the tangential line integral. In other literature the integral is typically called the line integral of the vector field.

By the Jacobian we mean the Jacobian function \(\sqrt{\det(\pmb{J}^T \pmb{J})}\) (meaning the distortion factor, also referred to as the area-/volume-correcting factor), which is also called the geometric tensor. The words Jacobian matrix and Jacobian determinant are written out in full in the below exercises to avoid confusion. In English, the word Jacobian (in Danish, equivalently with the word Jacobiant) can refer to all three concepts, and one should thus be careful with the use of the word “Jacobian” (respectively in Danish, “Jacobiant”). Most often, though, the word “Jacobian” refers to the distortion factor, and we will follow that tradition here.

Exercises (Long Day and Short Day in One)#

1: Line Integral of a Scalar Function. By Hand#

In \((x,y,z)\) space we consider a circle \(\mathcal{C}\) given by

\[\begin{equation*} \mathcal{C}=\left\{(x,y,z)\in \mathbb{R}^3 \mid x^2+(y-1)^2=4 \wedge z=1\right\}. \end{equation*}\]

Question a#

State the centre and radius of \(\mathcal{C}\). Choose a parametric representation \(\pmb r(u)\) for \(\mathcal{C}\) corresponding to one rotation around the circle. Determine the Jacobian that corresponds to your parametric representation.

Question b#

We are given the function \(f(x,y,z)=x^2+y^2+z^2\). Determine the restriction \(f(\pmb r(u))\), and compute the line integral

\[\begin{equation*} \int_\mathcal{C} f(x,y,z)\,\mathrm{d}s. \end{equation*}\]

Question c#

In the textbook it is mentioned that the line integral is independent of the chosen parametric representation for the circle. Try with other parametric representations, such as via re-parametrizations (for instance with \(t=-2\pi u\)), and compute the line integral based on these. You can for instance change the orientation or the “speed” with which the curve is drawn.

Question d#

Does the line integral depend on the location of the circle? Try to e.g. move the circle \(1\) unit in the direction of the \(y\) axis, and compute the line integral anew.

2: The Length of a Hanging Cable#

We consider a non-elastic cable freely hanging between two masts while being only under the influence of gravity (apart from the tension forces within the cable itself). The mathematical form it takes is called a catenary curve, whose equation is

\[\begin{equation*} y = a \cosh (x/a) \end{equation*}\]

where \(a\) is the distance to the lowest point above the \(x\) axis. We consider the cable as tied at \(y=5\) (meaning, \(y \in [a,5]\)).

Question a#

Assume \(0 < a \le 5\). Provide a parametrization for the curve

\[\begin{equation*} \mathcal{C}_a = \{ (x,y) \in \mathbb{R}^2 \mid y = a \cosh (x/a) \, \wedge \, y \le 5\}. \end{equation*}\]

In particular, the parameter interval must be stated (it may be helpful to use SymPy’s solve). Next, the norm of the tangent vector (meaning the Jacobian) is to be computed.

Question b#

Plot the curve for \(a=0.5, a=1, a=2\). Write out the integral formula for the length of the curve \(\mathcal{C}_a\). Find decimal approximations of the length of the curves \(\mathcal{C}_{0.5}\), \(\mathcal{C}_1\), and \(\mathcal{C}_2\).

3: Line Integral of Vector Field I. By Hand#

In the \((x,y)\) plane we are given a vector field by

\[\begin{equation*} \pmb{V}: \mathbb{R}^2 \to \mathbb{R}^2, \quad \pmb{V}(x,y)=(x^2-2xy,y^2-2xy) \end{equation*}\]

and a curve \(\mathcal{C}\) by the equation

\[\begin{equation*} y=x^2, \quad x\in\left[ -1,1\right]. \end{equation*}\]

Question a#

Determine a parametrization of \(\mathcal{C}\). Compute the Jacobian and check that your parametrization is regular.

Question b#

Now compute the tangential line integral,

\[\begin{equation*} \int_\mathcal{C}\pmb{V}\cdot \mathrm{d} \pmb{s}. \end{equation*}\]

4: Line Integral of Vector Field II. By Hand#

In \((x,y,z)\) space we are given a vector field

\[\begin{equation*} \pmb{V}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{V}(x,y,z)=(y^2-z^2,2yz,-x^2) \end{equation*}\]

as well as a curve \(\mathcal{C}\) with the parametric representation

\[\begin{equation*} \pmb{r}(u)=(u,u^2,u^3), \quad u\in\left[ 0,1\right] . \end{equation*}\]

Question a#

Argue that \(\pmb{r}\) is a regular \(C^1\) parametric representation.

Question b#

Compute the tangential line integral

\[\begin{equation*} \int_\mathcal{C}\pmb{V}\cdot \mathrm{d} \pmb{s}. \end{equation*}\]

5: Integration of Vector Field along a Stair Line#

In the plane we consider an arbitrary point \(\pmb{x}=(x_1,x_2)\) as well as the vector field

\[\begin{equation*} \pmb{V}: \mathbb{R}^2 \to \mathbb{R}^2, \quad \pmb{V}(x_1,x_2)=(x_1x_2,x_1). \end{equation*}\]

Question a#

Compute the tangential line integral of \(\pmb{V}\) along the straight line \(\mathcal{C}\) from \(\pmb{x}_0=\pmb{0}\) to \(\pmb{x}\).

Question b#

By the stair line from \(\pmb{x}_0=\pmb{0}\) to \(\pmb{x}\) we mean the piecewise straight line that passes from \((0,0)\) to the point \((x_1,0)\) and then from \((x_1,0)\) to \((x_1,x_2)\).

On a piece of paper with an \((x_1,x_2)\) coordinate system, sketch the stair line for different choices of \(\pmb{x}\). Then compute the tangential line integral of \(\pmb{V}\) along the stair line \(\mathcal{T}\) from \(\pmb{x}_0=\pmb{0}\) to \(\pmb{x}\).

Question c#

Determine based on your answers to questions a) and b) whether \(\pmb{V}\) is a gradient vector field.

Question d#

There is an easier way to determine whether a vector field is a gradient vector field (at least when the vector field is defined on all of \(\mathbb{R}\)). Which way would that be?

6: The Anti-Derivative Problem in \(\mathbb{R}^3\)#

In \((x,y,z)\) space we consider an arbitrary point \(\pmb{x}=(x_1,x_2,x_3)\), the vector field

\[\begin{equation*} \pmb{V}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{V}(x_1,x_2,x_3)=\begin{bmatrix} x_2\cos (x_1 x_2) \\ x_3+x_1\cos (x_1x_2) \\ x_2 \end{bmatrix}, \end{equation*}\]

and the vector field

\[\begin{equation*} \pmb{W}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{W}(x_1,x_2,x_3)= \frac{1}{1+x_1^2x_2^2+2x_1 x_2x_3^2+x_3^4} \begin{bmatrix} x_2 \\ x_1 \\ 2x_3 \end{bmatrix}. \end{equation*}\]

Question a#

Compute the Jacobian matrix of \(\pmb{V}\). Is \(\pmb{V}\) a gradient vector field?

Question b#

State all anti-derivatives of \(\pmb{V}\).

Question c#

Compute using SymPy the tangential line integral of \(\pmb{W}\) along a straight line from \(\pmb{0}\) to the arbitrary point \(\pmb{x}\).

Question d#

Investigate whether \(\pmb{W}\) is a gradient vector field, and if so then state all anti-derivatives.

7: Vector Field over a Circle Disc#

Let \(U = \{ (x,y) \mid \frac{1}{4} < x^2 + y^2 < 1 \}\) be given. Consider the vector field

\[\begin{equation*} \pmb{V}: U \to \mathbb{R}^2, \quad \pmb{V}(x,y)= \frac{1}{x^2+y^2} \begin{bmatrix} -y \\ x \end{bmatrix}. \end{equation*}\]

Question a#

Is the domain \(U\):

  1. open?

  2. bounded?

  3. curve-connected?

  4. simply connected?

  5. star-shaped?

Determine in each of the five cases whether the answer is yes or no.

Question b#

Determine whether \(\pmb{V}\) is \(C^0\) and \(C^1\). Find the Jacobian matrix of \(\pmb{V}\) and determine whether it is symmetric.

Question c#

Determine the gradient of the arcus-tangent function \(f(x,y) = \mathrm{atan2}(y,x)\). This function is in SymPy given as f = atan2(y,x) and is a variant of \(\arctan(y/x)\).

Question d#

Plot the function \(f\) on \(U\). Is \(f(x,y)\) an anti-derivative to \(\pmb{V}\)?

8: A very long Curve#

The linear spiral curve \(\mathcal{C}\) in \(\mathbb{R}^2\) is parametrized by \(\pmb{r}: [0,1] \to \mathbb{R}^2\), where

\[\begin{equation*} \pmb{r}(u) = \begin{cases} (0,0) & \text{for } u = 0 \\ (u \cos(1/u), u \sin(1/u)) & \text{for } u \in ]0,1]. \end{cases} \end{equation*}\]

Note that the domain of \(\pmb{r}\) is bounded and closed (as it usually is). It can furthermore be shown that the curve is continuous, meaning \(C^0\), but not \(C^1\). In the textbook in Chapter 7, the curves are required to be \(C^1\) since unexpected things can happen when the curves are not \(C^1\). We will illustrate that in this exercise.

Question a#

Plot the curve. Show (you may use Python) that the norm of the tangent vector is

\[\begin{equation*} \Vert \pmb{r}'(u) \Vert = \sqrt{1 + u^{-2}} \end{equation*}\]

for \(u \in ]0,1]\).

Question b#

Let \(\epsilon < 1\). Compute the length \(\ell_\epsilon\) of the curve \(\pmb{r}(u)\) for \(u \in [\epsilon,1]\). Find \(\lim_{\epsilon \to 0} \ell_\epsilon\). What is the length \(\ell_0\) of the curve \(\mathcal{C}\)?

9: Surface Area of a Sphere#

We consider a solid sphere in \(\mathbb{R}^3\) centred at \((0,0,0)\) with a radius of \(a > 0\). Consider the boundary of the sphere,

\[\begin{equation*} \{ \pmb{x} \in \mathbb{R}^3 \mid \Vert \pmb{x} \Vert = a \}. \end{equation*}\]

The surface area of the sphere is (as is known from elementary geometry) \(4 \pi a^2\). Re-derive this expression by using a surface integral as well as a parametrization of the sphere.

10: Flux through Parametric Surfaces. By Hand#

We are given a vector field by

\[\begin{equation*} \pmb{V}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{V}(x,y,z)=(\cos(x),\cos(x)+\cos(z),0) \end{equation*}\]

as well as a surface \(\mathcal{F}\) by the parametric representation

\[\begin{equation*} \pmb{r}(u,v)=(u,0,v), \quad u\in\left[ 0,\pi\right] ,\quad v\in\left[ 0,2\right] . \end{equation*}\]

Question a#

Determine the normal vector \(\pmb{n}_{\mathcal{F}}(u,v)\) that corresponds to the parametrization. Argue that the parametric representation is regular. Next, compute the flux of the vector field through the surface.

Question b#

What is the meaning of the sign of the flux? Can you change the sign of the flux by changing the parametric representation of the surface?

Question c#

We are given another vector field by

\[\begin{equation*} \pmb{V}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{V}(x,y,z)=(yz,-xz,x^2+y^2) \end{equation*}\]

as well as a surface \(\mathcal{F}\) by the parametric representation

\[\begin{equation*} \pmb{r}(u,v)=(u\sin(v),-u\cos( v),uv), \quad u\in\left[ 0,1\right] ,\quad v\in\left[ 0,1\right] . \end{equation*}\]

Determine the normal vector \(\pmb{n}_{\mathcal{F}}(u,v)\) that corresponds to the parametrization. Argue that the parametrization is regular. Compute the flux of the vector field through the surface.

11: The Coulomb Vector Field#

Coulomb (1736-1806) worked with electromagnetism. From his work the so-called Coulomb vector field is known:

\[\begin{equation*} \pmb{V}: \mathbb{R}^3\setminus \{(0,0,0)\} \to \mathbb{R}^3, \quad \pmb{V}(x,y,z)= \left(x^2+y^2+z^2\right)^{-\frac32} \begin{bmatrix} x \\ y \\ z \end{bmatrix}. \end{equation*}\]

Note that the Coulomb vector field cannot be defined on all of \(\mathbb{R}^3\). It does, though, have an open domain \(U = \mathbb{R}^3\setminus \{(0,0,0)\}\), which is a default assumption in our text book.

A solid cylinder \(B\) of height \(2h\) and diameter \(2a\), where \(a\) and \(h\) are positive real numbers, is given by the parametric representation

\[\begin{equation*} \pmb{r}(u,v,w)=\left(u\cos(w),u\sin(w),v\right), \quad u\in\left[0,a\right], \; v\in[-h,h], \; w\in \left[-\pi,\pi\right]. \end{equation*}\]

Question a#

Draw a sketch of \(B\) (this is most easily done with pencil and paper) and determine a parametric representation for each of the three pieces of which the boundary \(\partial B\) of \(B\) consists: the bottom, the top, and the curved part.

Question b#

Compute the flux of \(\pmb{V}\) out through \(\partial B\),

\[\begin{equation*} \int_{\partial B} \pmb{V} \cdot \mathrm{d} \pmb{S}, \end{equation*}\]

by computing the flux through each of the three pieces of which \(\partial B\) consists. In what way does the size of the cylinder influence the strength of the flux? And in continuation hereof, what is the limit value of the strength of the flux when \(a\) and \(h\) go towards \(0\)?

12: Flux via the Divergens Theorem#

The Divergence Theorem is not a part of our syllabus, but even so we will in this exercise become familiar with it:


Theorem (Divergence): Let \(\pmb{V}\) be a \(C^1\) vector field on an open set \(U\subseteq \mathbb{R}^3\), and \(B \subseteq U\) is a bounded subset with a piecewise \(C^1\) boundary \(\mathcal{F}=\partial B\). Suppose \(\pmb{r}: \Gamma \to \mathbb{R}^3\), \(\Gamma \subset \mathbb{R}^2\), is a parametrization of the surface \(\mathcal{F}\) with outward-pointing normal. Then

(1)#\[\begin{equation} \int_{\partial B} \pmb{V} \cdot \mathrm{d} \pmb{S} =\int_{B}\mathrm{div} (\pmb{V}) \, \mathrm{d} X. \end{equation}\]

Divergence \(\mathrm{div} (\pmb{V})\) is defined as the trace of the Jacobian matrix:

(2)#\[\begin{equation} \mathrm{div} (\pmb{V}) = \mathrm{tr} (\pmb{J}_{\pmb{V}}). \end{equation}\]

If we think of the vector field as a velocity field of a fluid, then the divergence is a measure of the infinitesimal expansion rate or compression rate of the fluid. The velocity field of an incompressible fluid has a divergence of zero.

We are given the \(C^1\) vector field

\[\begin{equation*} \pmb{V}: \mathbb{R}^3 \to \mathbb{R}^3, \quad \pmb{V}(x,y,z)=(-8x,8,4z^3) \end{equation*}\]

as well as a spatial (three-dimensional) region

\[\begin{equation*} \Omega=\lbrace (x,y,z)\,\vert\, x^2+y^2+z^2\leq a^2\,\, \mathrm{and}\,\, z\geq 0\rbrace\,,\,a>0, \end{equation*}\]

whose surface \(\,\partial \Omega\,\) has been given an orientation with an outwards-pointing unit normal vector field \(\,\pmb n_{\,\partial \Omega}\,\).

Question a#

Compute the volume integral

\[\begin{equation*} \int_{\Omega}\mathrm{div}(\pmb{V})\, \mathrm{d} X. \end{equation*}\]

Question b#

Compute the surface integral of the vector field:

\[\begin{equation*} \int_{\partial\,\Omega}\,\pmb{V} \cdot \mathrm{d} \pmb{S}. \end{equation*}\]

Question c#

For which \(a\) is the flux with the mentioned normal vector positive (meaning, that the “outwards flow through \(\partial \Omega\) is larger than the inwards flow”).

Question d#

Gauss’ theorem about the relation between the divergence integral and the vector field’s surface integral can be considered as a generalization of the fundamental theorem of calculus:

\[\begin{equation*} \left[ F(x)\right] _a^b=\int_a^b F'(x)\mathrm{d}x\,. \end{equation*}\]

Can you think of why that is?

13: Flow Curve of a Vector Field#

A linear vector field \(\pmb V\) in the \((x,y)\) plane is given by

\[\begin{equation*} \pmb V(x,y)=\left(\frac 18x +\frac 38y,\frac 38x +\frac 18y\right). \end{equation*}\]

We image that we at time \(t=0\) throw a particle into a force field at the point \((x_0,y_0)\), and we wish to model the trajectory of the particle (the curve) \(\pmb{r}(t)\) as a function of time. Such curves are called integral curves (or flow curves). They are solutions to the differential equation system:

\[\begin{equation*} \pmb{r}'(t) = \pmb V(\pmb{r}(t)), \quad \pmb{r}(0) = \pmb{x}_0 \end{equation*}\]

where \(\pmb{x}_0\) is the initial point.

This week’s Python demoes maybe of help for this exercise.

Question a#

Determine the system matrix of the differential equation system, and find (you may use Sympy’s eigenvects()) the eigenvalues and corresponding eigenvectors of the matrix.

Question b#

The integral curve \(\pmb{r}_1(u)\) is determined by the fact that it passes through the point \((0,-1)\) at time \(u=0,\) and the integral curve \(\pmb{r}_2(u)\) by the fact that it passes through \((0,\frac 12)\) at time \(u=0\). Determine, using the results from question a) as well as the given initial conditions, a parametric representation for \(\pmb{r}_1(u)\) and \(\pmb{r}_2(u)\).

Question c#

Create a Python illustration that displays both the vector field and the two integral curves.