Week 9: Exercises#

Note

By the Jacobian we will in these exercise refer to the Jacobian function \(\sqrt{\det(\pmb{J}^T \pmb{J})}\) (i.e., the “distortion factor”, meaning the area/volume correction factor), which more officially is known as the geometric tensor. The term Jacobian is generally also used for both the Jacobian matrix as well as the Jacobian determinant, so you should be cautious when using this term and be careful with how it is defined in context. To avoid confusion, we will in these exercises always write out these terms in full.

Exercises – Long Day#

1: A simple Line Integral in the Plane#

In this exercise we will integrate a scalar function along a straight line.

Question a#

Consider the straight line \(\mathcal{L}\) from \(\left(0,0\right)\) to \(\left(3,4\right)\) in the plane \(\mathbb{R}^2\). Provide a parametrization \(r\left(u\right)\) for the line that uses \(u\in \left[0,1\right]\), and determine the corresponding Jacobian function.

Question b#

We are given the function \(f\left(x,y\right)=x+y\). Calculate the line integral \(\int_{\mathcal{L}} f\, \mathrm{d}s\).

2: Line Integral of a Scalar Function in 3D Space#

We consider a circle \(\mathcal{C}\) in \((x,y,z)\) space 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 center and radius of \(\mathcal{C}\). Choose a parametric representation \(\pmb r(u)\) for \(\mathcal{C}\) corresponding to one complete revolution of the circle. Determine its corresponding Jacobian function.

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 calculate the line integral

\[\begin{equation*} \int_\mathcal{C} f\,\mathrm{d}s. \end{equation*}\]

Question c#

In the textbook it is mentioned that the line integral is independent of the chosen parameterization of the circle. Try with other parameterizations, and compute the line integral based on them. To get a new parametrization of the same geometry, you can, for instance, change the direction of traversal or the traversal speed, or you can re-parameterize, for example using \(t = -2\pi u\) with a fitting new parameter interval.

Question d#

Does the line integral depend on the location of the circle? For example, try translating/moving the circle by 1 unit in the direction of the \(y\) axis and compute the line integral again.

3: The Length of a Hanging Cable#

We consider a non-elastic, freely hanging cable suspended between two poles, influenced only by gravity (and the tension forces in the cable). The mathematical form describing the shape of this cable is known as a catenary. The 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 will assume that the cable is fixed at \(y=5\) (meaning, \(y \in [a,5]\)). For this exercise it is useful to remember the relation \(\cosh^2 (x) - \sinh^2 (x) = 1\).

Question a#

Assume that \(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, pay attention to your choice of parameter interval (you may use SymPy’s solve command to determine the parameter interval end-points). Then, find the norm of the tangent vector (that is, the Jacobian function).

Question b#

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

4: Line Integral of Vector Field I#

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

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

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

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

Question a#

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

Question b#

Now calculate the tangential line integral

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

5: Line Integral of Vector Field II#

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\) parametrization.

Question b#

Calculate the tangential line integral

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

6: Integration of Vector Field along 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#

Calculate 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 piece-wise 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 calculate 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 answer 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}\)). What is this method?

7: 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 (just as we are used to). It can furthermore be shown that the curve is continuous, so \(C^0\), but not \(C^1\). In the textbook, chapter 7, it is required that the curves are \(C^1\), as unexpected things can happen when the curves are not \(C^1\). We want to 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\). Calculate 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}\)?

Exercises – Short Day#

1: The Antiderivative Problem in \(\mathbb{R}^3\)#

In 3D space we consider an arbitrary point \(\pmb{x}=(x_1,x_2,x_3)\), as well as the two vector fields

\[\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

\[\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#

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

Question b#

State all antiderivatives of \(\pmb{V}\).

Question c#

Let \(\mathcal{H}\) be a helix with the parametric representation

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

Calculate the tangential line integral

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

Question d#

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

Question e#

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

2: What can have an Antiderivative?#

For scalar functions of one variable we saw that if \(F'(x) = f(x)\), then \(\int_a^b f(x)\,\mathrm dx = F(b) - F(a)\) (see the fundamental theorem of calculus). In this exercise we will discuss whether a similar “shortcut” exists for calculating integrals with multiple variables. First, we must be clear on which types of functions the question is even relevant for. In previous exercises we have found antiderivatives to vector fields \(\pmb{V}:\mathbb{R}^n \to \mathbb{R}^n\). Remember that vector fields are vector functions \(\pmb{f}:\mathbb{R}^n \to \mathbb{R}^k\) for which \(n=k\). But what if the dimensions \(n\) and \(k\) do not match?

Question a#

Consider a scalar function of two variables, e.g. \(f(x,y) = x y^2\). If we seek a “fundamental theorem” similar to \(F(b) - F(a)\), then \(F\) must be a scalar function. If \(F\) is a scalar function, then its derivative is the gradient \(\nabla F\), which is a vector.

Discuss why \(F\) must be a scalar function, and explain why the equation \(\nabla F = f\) is mathematically impossible. Why can we not have an “antiderivative” to a usual scalar function \(f(x,y)\) similar to the 1D case?

Question b#

The line integral of a vector field \(\pmb{V}\) is calculated as \(\int_{\mathcal{C}} \pmb{V} \cdot \mathrm d\pmb{s}\). Assume that we have a function \(\pmb{f} : \mathbb{R}^3 \to \mathbb{R}^2\) (the output is a 2D vector, but the input is 3D).

Can we define the tangential line integral of this function along a curve in 3D space?

Question c#

Lemma 7.4.1 in the textbook states

\[\begin{equation*} \int_{\mathcal{C}} \pmb{V} \cdot \mathrm d\pmb{s} = f(\pmb{r}(b)) - f(\pmb{r}(a)). \end{equation*}\]

For this lemma to make sense, certain conditions must be fulfilled for the dimension of \(\pmb{V}\) and \(f\), respectively.

Argue that if we are in \(\mathbb{R}^n\), then \(f\) (also known as the potential) must be a scalar function, and the vector field \(\pmb{V}\) must have a dimension of \(n=k\) (so its output is in \(\mathbb{R}^n\)). Why is the case \(n=k\) (where the vector field maps from \(\mathbb{R}^n\) to \(\mathbb{R}^n\)) the only case for which the link between antiderivatives and line integrals makes sense?

3: Vector Field over a Circular Disc. In Sympy#

For this exercise you may use Sympy.

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?

Question b#

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

Question c#

Find the gradient of the arcustangent function \(f(x,y) = \mathrm{atan2}(y,x)\). The function is in SymPy given by 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 antiderivative of \(\pmb{V}\)?

4: Flow Curves 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 imagine that we at time \(t=0\) release a particle inside a force field at the point \((x_0,y_0)\), and we want to model the trajectory (curve) \(\pmb{r}(t)\) of the particle as a function of time. Such curves are known as 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 can be of great help in this exercise, but try doing as much of this exercise by hand as you can.

Question a#

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

Question b#

We are now being informed that the flow curve \(\pmb{r}_1(t)\) passes through the point \((0,-1)\) at time \(t=0,\) and that the flow curve \(\pmb{r}_2(t)\) passes through \((0,\frac 12)\) at time \(t=0\). Find, using the results from question a and these given initial conditions, a parametric representation for \(\pmb{r}_1(t)\) and \(\pmb{r}_2(t)\).

Question c#

Make a Python illustration that shows both the vector field and the two flow curves.