© Springer Nature Switzerland AG 2018
Michael Oberguggenberger and Alexander OstermannAnalysis for Computer ScientistsUndergraduate Topics in Computer Sciencehttps://doi.org/10.1007/978-3-319-91155-7_16

16. Vector-Valued Functions of Two Variables

Michael Oberguggenberger1   and Alexander Ostermann1  
(1)
University of Innsbruck, Innsbruck, Austria
 
 
Michael Oberguggenberger (Corresponding author)
 
Alexander Ostermann

In this section we briefly touch upon the theory of vector-valued functions in several variables. To simplify matters we limit ourselves again to the case of two variables.

First we define vector fields in the plane and extend the notions of continuity and differentiability to vector-valued functions. Then we discuss Newton’s method in two variables. As an application we compute a common zero of two nonlinear functions. Finally, as an extension of Sect. 15.​1, we show how smooth surfaces can be described mathematically with the help of parameterisations.

For the required basic notions of vector and matrix algebra we refer to the Appendices A and B.

16.1 Vector Fields and the Jacobian

In the entire section D denotes an open subset of $$\mathbb R^2$$ and
$$ \mathbf {F}:D\subset \mathbb R^2 \rightarrow \mathbb R^2: (x,y) \mapsto \begin{bmatrix}u\\v\end{bmatrix}=\mathbf {F}(x,y)= \begin{bmatrix}f(x,y)\\g(x, y)\end{bmatrix} $$
a vector-valued function of two variables with values in $$\mathbb R^2$$. Such functions are also called vector fields since they assign a vector to every point in the plane. Important applications are provided in physics. For example, the velocity field of a flowing liquid or the gravitational field are mathematically described as vector fields.
In the previous chapter we have already encountered a vector field, namely the gradient of a scalar-valued function of two variables $$f:D\rightarrow \mathbb R: (x,y)\mapsto f(x, y)$$. For a partially differentiable function f the gradient
$$ \mathbf {F}=\nabla f:D\rightarrow \mathbb R^2: (x,y) \mapsto \begin{bmatrix}\dfrac{\partial f}{\partial x}(x,y)\\ \dfrac{\partial f}{\partial y}(x, y)\end{bmatrix} $$
is obviously a vector field.

Continuity and differentiability of vector fields are defined componentwise.

Definition 16.1

The function
$$ \mathbf {F}:D\subset \mathbb R^2 \rightarrow \mathbb R^2: (x,y) \mapsto \mathbf {F}(x,y)= \begin{bmatrix}f(x,y)\\g(x, y)\end{bmatrix} $$
is called continuous (or partially differentiable or Fréchet differentiable, respectively) if and only if its two components $$f:D\rightarrow \mathbb R$$ and $$g:D\rightarrow \mathbb R$$ have the corresponding property, i.e. they are continuous (or partially differentiable or Fréchet differentiable, respectively).
If both f and g are Fréchet differentiable, one has the linearisations
$$\begin{aligned} f(x,y)&= f(a,b) + \left[ \dfrac{\partial f}{\partial x}(a,b), \dfrac{\partial f}{\partial y}(a, b)\right] \begin{bmatrix} x-a\\y-b\end{bmatrix} + R_1(x,y;a,b),\\ g(x,y)&= g(a,b) + \left[ \dfrac{\partial g}{\partial x}(a,b), \dfrac{\partial g}{\partial y}(a, b)\right] \begin{bmatrix} x-a\\y-b\end{bmatrix} + R_2(x,y;a, b) \end{aligned}$$
for (xy) close to (ab) with remainder terms $$R_1$$ and $$R_2$$. If one combines these two formulas to one formula using matrix-vector notation, one obtains
$$ \begin{bmatrix} f(x,y)\\g(x,y)\end{bmatrix} = \begin{bmatrix} f(a,b)\\g(a,b)\end{bmatrix}+ \begin{bmatrix}\dfrac{\partial f}{\partial x}(a,b)&\quad \dfrac{\partial f}{\partial y}(a,b)\\ \dfrac{\partial g}{\partial x}(a,b)&\quad \dfrac{\partial g}{\partial y}(a, b)\end{bmatrix} \begin{bmatrix}x-a\\y-b\end{bmatrix} + \begin{bmatrix}R_1(x,y;a, b)\\R_2(x,y;a, b)\end{bmatrix}, $$
or in shorthand notation
$$ \mathbf {F}(x,y) = \mathbf {F}(a,b) + \mathbf {F}'(a,b)\begin{bmatrix} x-a\\y-b\end{bmatrix} + \mathbf {R}(x,y;a, b) $$
with the remainder term $$\mathbf {R}(x,y;a, b)$$ and the (2$$\times $$2)-Jacobian
$$ \mathbf {F}'(a,b) = \begin{bmatrix}\dfrac{\partial f}{\partial x}(a,b)&\quad \dfrac{\partial f}{\partial y}(a,b)\\ \dfrac{\partial g}{\partial x}(a,b)&\quad \dfrac{\partial g}{\partial y}(a, b)\end{bmatrix}. $$
The linear mapping defined by this matrix is called (Fréchet) derivative of the function $$\mathbf {F}$$ at the point (ab). The remainder term $$\mathbf {R}$$ has the property
$$ \lim _{(x,y)\rightarrow (a, b)} \frac{\sqrt{R_1(x,y;a, b)^2+R_2(x,y;a, b)^2}}{\sqrt{(x-a)^2+(y-b)^2}} =0. $$

Example 16.2

(Polar coordinates)   The mapping
$$ \mathbf {F}:\mathbb R^2\rightarrow \mathbb R^2: (r,\phi ) \mapsto \begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}r\cos \varphi \\r\sin \varphi \end{bmatrix} $$
is (everywhere) differentiable with derivative (Jacobian)
$$ \mathbf {F}'(r,\varphi ) = \begin{bmatrix}\cos \varphi&\quad -r\sin \varphi \\ \sin \varphi&\quad r\cos \varphi \end{bmatrix}. $$

16.2 Newton’s Method in Two Variables

The linearisation
$$ \mathbf {F}(x,y) \approx \mathbf {F}(a,b) + \mathbf {F}'(a, b)\begin{bmatrix} x-a\\y-b\end{bmatrix} $$
is the key for solving nonlinear equations in two (or more) unknowns. In this section, we derive Newton’s method for determining the zeros of a function
$$ \mathbf {F}(x,y) = \begin{bmatrix}f(x,y)\\g(x, y)\end{bmatrix} $$
of two variables and two components.

Example 16.3

(Intersection of a circle with a hyperbola)    Consider the circle $$x^2+y^2=4$$ and the hyperbola $$xy=1$$. The points of intersection are the zeros of the vector equation $$\mathbf {F}(x, y)=\mathbf {0}$$ with
$$ \mathbf {F}:\mathbb R^2\rightarrow \mathbb R^2:\mathbf {F}(x,y)=\begin{bmatrix} f(x,y)\\g(x, y)\end{bmatrix} =\begin{bmatrix}x^2+y^2-4\\ xy-1\end{bmatrix}. $$
The level curves $$f(x, y)=0$$ and $$g(x, y)=0$$ are sketched in Fig. 16.1.
images/215236_2_En_16_Chapter/215236_2_En_16_Fig1_HTML.gif
Fig. 16.1

Intersection of a circle with a hyperbola

Newton’s method for determining the zeros is based on the following idea. For a starting value $$(x_0,y_0)$$ which is sufficiently close to the solution, one computes an improved value by replacing the function by its linear approximation at $$(x_0,y_0)$$
$$ \mathbf {F}(x, y)\approx \mathbf {F}(x_0,y_0) + \mathbf {F}'(x_0,y_0) \begin{bmatrix}x-x_0\\ y-y_0\end{bmatrix}. $$
The zero of the linearisation
$$ \mathbf {F}(x_0,y_0) + \mathbf {F}'(x_0,y_0) \begin{bmatrix}x-x_0\\ y-y_0\end{bmatrix} = \begin{bmatrix}0\\0\end{bmatrix} $$
is taken as improved approximation $$(x_1,y_1)$$, so
$$ \mathbf {F}'(x_0,y_0) \begin{bmatrix}x_1-x_0\\ y_1-y_0\end{bmatrix} = -\mathbf {F}(x_0,y_0), $$
and
$$ \begin{bmatrix}x_1\\y_1\end{bmatrix} = \begin{bmatrix}x_0\\y_0\end{bmatrix} - \Bigl (\mathbf {F}'(x_0,y_0) \Bigr )^{-1} \mathbf {F}(x_0,y_0), $$
respectively. This can only be carried out if the Jacobian is invertible, i.e. its determinant is not equal to zero. In the example above the Jacobian is
$$ \mathbf {F}'(x, y)=\begin{bmatrix}2x&\quad 2y\\y&\quad x\end{bmatrix} $$
with determinant $$\det \mathbf {F}'(x, y) = 2x^2-2y^2$$. Thus it is singular on the straight lines $$x=\pm y$$. These lines are plotted as dashed lines in Fig. 16.1.
The idea now is to iterate the procedure, i.e. to repeat Newton’s step with the improved value as new starting value
$$ \begin{bmatrix}x_{k+1}\\y_{k+1}\end{bmatrix} = \begin{bmatrix}x_k\\y_k\end{bmatrix} - \begin{bmatrix}\dfrac{\partial f}{\partial x}(x_k,y_k)&\quad \dfrac{\partial f}{\partial y}(x_k,y_k)\\ \dfrac{\partial g}{\partial x}(x_k,y_k)&\quad \dfrac{\partial g}{\partial y}(x_k, y_k)\end{bmatrix}^{-1} \begin{bmatrix}f(x_k,y_k)\\g(x_k, y_k)\end{bmatrix} $$
for $$k=1,2,3,\ldots $$ until the desired accuracy is reached. The procedure generally converges rapidly as is shown in the following proposition. For a proof, see [23, Chap. 7, Theorem 7.1].

Proposition 16.4

Let $$\mathbf {F}:D\rightarrow \mathbb R^2$$ be twice continuously differentiable with $$\mathbf {F}(a, b)=\mathbf {0}$$ and $$\det \mathbf {F}'(a, b)\not =0$$. If the starting value $$(x_0,y_0)$$ lies sufficiently close to the solution (ab) then Newton’s method converges quadratically.

One often sums up this fact under the term local quadratic convergence of Newton’s method.

Example 16.5

The intersection points of the circle and the hyperbola can also be computed analytically. Since
$$ xy=1 \quad \Leftrightarrow \quad x = \frac{1}{y} $$
we may insert $$x=1/y$$ into the equation $$x^2+y^2=4$$ to obtain the biquadratic equation
$$ y^4-4y^2+1=0. $$
By substituting $$y^2=u$$ the equation is easily solvable. The intersection point with the largest x-component has the coordinates
$$\begin{aligned} x=&\sqrt{2+\sqrt{3}}=1.93185165257813657\ldots \\ y=&\sqrt{2-\sqrt{3}}=0.51763809020504152\ldots \end{aligned}$$
Application of Newton’s method with starting values $$x_0=2$$ and $$y_0=1$$ yields the above solution in 5 steps with 16 digits accuracy. The quadratic convergence can be observed from the fact that the number of correct digits doubles with each step.

x

y

Error

2.000000000000000

1.000000000000000

4.871521418175E-001

2.000000000000000

5.000000000000000E-001

7.039388810410E-002

1.933333333333333

5.166666666666667E-001

1.771734052060E-003

1.931852741096439

5.176370548219287E-001

1.502295005704E-006

1.931851652578934

5.176380902042443E-001

1.127875985998E-012

1.931851652578136

5.176380902050416E-001

2.220446049250E-016

Experiment 16.6

Using the MATLAB programs mat16_1.m and mat16_2.m compute the intersection points from Example 16.3. Experiment with different starting values, and this way try to determine all four solutions to the problem. What happens if the starting value is chosen to be $$(x_0,y_0)=(1,1)$$?

16.3 Parametric Surfaces

In Sect. 15.​1 we investigated surfaces as graphs of functions $$f:D\subset \mathbb R^2\rightarrow \mathbb R$$. However, similar to the case of curves, this concept is too narrow to represent more complicated surfaces. The remedy is to use parameterisations like it was done for curves.

The starting point for the construction of a parametric surface is a (componentwise) continuous mapping
$$ (u,v) \mapsto \mathbf {x}(u,v) = \begin{bmatrix} x(u,v)\\y(u,v)\\z(u, v) \end{bmatrix} $$
of a parameter domain $$ D \subset \mathbb R^2$$ to $$\mathbb R^3$$. By fixing one parameter $$u = u_0$$ or $$v = v_0$$ at a time one obtains coordinate curves in space
$$\begin{aligned} u \mapsto \mathbf {x}(u, v_0) \quad \dots \quad u\text {-curve}\\ v \mapsto \mathbf {x}(u_0, v) \quad \dots \quad v\text {-curve} \end{aligned}$$

Definition 16.7

A regular parametric surface is defined by a mapping $$D \subset \mathbb R^2 \rightarrow \mathbb R^3:(u,v) \mapsto \mathbf {x}(u, v)$$ which satisfies the following conditions
  1. (a)

    the mapping $$(u,v) \mapsto \mathbf {x}(u, v)$$ is injective;

     
  2. (b)

    the u-curves and the v-curves are continuously differentiable;

     
  3. (c)

    the tangent vectors to the u-curves and v-curves are linearly independent at every point (thus always span a plane).

     

These conditions guarantee that the parametric surface is indeed a two-dimensional smooth subset of $$\mathbb R^3$$.

For a regular surface, the tangent vectors
$$ \frac{\partial \mathbf {x}}{\partial u}(u,v) = \begin{bmatrix}\,\small \displaystyle \frac{\partial x}{\partial u}{(u,v)}\\ \,\small \displaystyle \frac{\partial y}{\partial u}{(u,v)}\\ \,\small \displaystyle \frac{\partial z}{\partial u}{(u,v)} \end{bmatrix}, \qquad \qquad \frac{\partial \mathbf {x}}{\partial v}(u,v) = \begin{bmatrix}\,\small \displaystyle \frac{\partial x}{\partial v}{(u,v)}\\ \,\small \displaystyle \frac{\partial y}{\partial v}{(u,v)}\\ \,\small \displaystyle \frac{\partial z}{\partial v}{(u, v)} \end{bmatrix} $$
span the tangent plane at $$\mathbf {x}(u, v)$$. The tangent plane has the parametric representation
$$ \mathbf {p}(\lambda ,\mu ) \ = \ \mathbf {x}(u,v) + \lambda \,\frac{\partial \mathbf {x}}{\partial u}(u,v) + \mu \,\frac{\partial \mathbf {x}}{\partial v}(u, v),\qquad \lambda ,\mu \in \mathbb R. $$
The regularity condition (c) is equivalent to the assertion that
$$ \frac{\partial \mathbf {x}}{\partial u}\times \frac{\partial \mathbf {x}}{\partial v}\ne \mathbf {0}. $$
The cross product constitutes a normal vector to the (tangent plane of the) surface.

Example 16.8

(Surfaces of rotation)   By rotation of the graph of a continuously differentiable, positive function $$z \mapsto h(z), a< z < b$$, around the z-axis, one obtains a surface of rotation with parametrisation
$$\begin{aligned} D = (a, b) \times (0, 2 \pi ),\qquad \mathbf {x}(u, v) = \begin{bmatrix} h(u) \cos v\\ h(u) \sin v\\ u\end{bmatrix}. \end{aligned}$$
The v-curves are horizontal circles, the u-curves are the generator lines. Note that the generator line corresponding to the angle $$v = 0$$ has been removed to ensure condition (a). To verify condition (c) we compute the cross product of the tangent vectors to the u- and the v-curves
$$ \frac{\partial \mathbf {x}}{\partial u}\times \frac{\partial \mathbf {x}}{\partial v} = \begin{bmatrix} h'(u)\cos v\\ h'(u)\sin v\\ 1\end{bmatrix}\times \begin{bmatrix} -h(u)\sin v\\ h(u)\cos v\\ 0\end{bmatrix} = \begin{bmatrix} -h(u)\cos v\\ -h(u)\sin v\\ h(u)\, h'(u)\end{bmatrix}\ne \mathbf {0}. $$
Due to $$h(u)>0$$ this vector is not zero; the two tangent vectors are hence not collinear.

Figure 16.2 shows the surface of rotation which is generated by $$h(u) = 0.4 + \cos (4\pi u)/3$$, $$u \in (0,1)$$. In MATLAB one advantageously uses the command cylinder in combination with the command mesh for the representation of such surfaces.

images/215236_2_En_16_Chapter/215236_2_En_16_Fig2_HTML.gif
Fig. 16.2

Surface of rotation, generated by rotation of a graph h(z) about the z-axis. The underlying graph h(z) is represented on the right

images/215236_2_En_16_Chapter/215236_2_En_16_Fig3_HTML.gif
Fig. 16.3

Unit sphere as parametric surface. The interpretation of the parameters uv as angles is given in the picture on the right

Example 16.9

(The sphere)   The sphere of radius R is obtained by the parametrisation
$$\begin{aligned} D =(0, \pi ) \times (0, 2\pi ),\qquad \mathbf {x}(u, v) = \begin{bmatrix} R \sin u \cos v\\ R \sin u \sin v\\ R \cos u\end{bmatrix}. \end{aligned}$$
The v-curves are the circles of latitude, the u-curves the meridians. The meaning of the parameters uv as angles can be seen from Fig. 16.3.

16.4 Exercises

1.
Compute the Jacobian of the mapping
$$ \begin{bmatrix} u\\v \end{bmatrix} = \mathbf {F}(x, y) = \begin{bmatrix} x^2+y^2\\x^2-y^2 \end{bmatrix}. $$
For which values of x and y is the Jacobian invertible?
2.
Program Newton’s method in several variables and test the program on the problem
$$\begin{aligned} x^2+\sin y&= 4\\ xy&= 1 \end{aligned}$$
with starting values $$x=2$$ and $$y=1$$. If you are working in MATLAB, you can solve this question by modifying mat16_2.m.
3.

Compute the tangent vectors $$\frac{\partial \mathbf {x}}{\partial u}$$, $$\frac{\partial \mathbf {x}}{\partial v}$$ and the normal vector $$\frac{\partial \mathbf {x}}{\partial u}\times \frac{\partial \mathbf {x}}{\partial v}$$ to the sphere of radius R (Example 16.9). What can you observe about the direction of the normal vector?

4.
Sketch the surface of revolution
$$ \mathbf {x}(u, v) = \begin{bmatrix} \cos u\cos v\\ \cos u\sin v\\ u \end{bmatrix}, \qquad -1< u< 1,\ 0< v < 2\pi . $$
Compute the tangent vectors $$\frac{\partial \mathbf {x}}{\partial u}$$, $$\frac{\partial \mathbf {x}}{\partial v}$$ and the normal vector $$\frac{\partial \mathbf {x}}{\partial u}\times \frac{\partial \mathbf {x}}{\partial v}$$. Determine the equation of the tangent plane at the point $$(1/\sqrt{2}, 1/\sqrt{2}, 0)$$.
5.
Sketch the paraboloid
$$ \mathbf {x}(u, v) = \begin{bmatrix} u \cos v \\ u\sin v \\ 1 - u^2\end{bmatrix},\qquad 0< u< 1,\ 0< v < 2\pi $$
and plot some of the u- and v-curves. Compute the tangent vectors $$\frac{\partial \mathbf {x}}{\partial u}$$, $$\frac{\partial \mathbf {x}}{\partial v}$$ and the normal vector $$\frac{\partial \mathbf {x}}{\partial u}\times \frac{\partial \mathbf {x}}{\partial v}$$.
6.
Plot some of the u- and v-curves for the helicoid
$$ \mathbf {x}(u, v) = \begin{bmatrix} u\cos v\\ u\sin v\\ v \end{bmatrix},\qquad \quad 0< u< 1,\ 0< v < 2\pi $$
What kind of curves are they? Try to sketch the surface.
7.
A planar vector field (see also Sect. 20.​1)
$$ (x,y) \mapsto \mathbf {F}(x,y)= \begin{bmatrix}f(x,y)\\g(x, y)\end{bmatrix} $$
can be visualised by plotting a grid of points $$(x_i, y_j)$$ in the plane and attaching the vector $$\mathbf {F}(x_i, y_j)$$ to each grid point. Sketch the vector fields
$$ \mathbf {F}(x, y) = \frac{1}{\sqrt{x^2+y^2}}\begin{bmatrix} x\\ y\end{bmatrix}\qquad \text{ and }\qquad \mathbf {G}(x, y) = \frac{1}{\sqrt{x^2+y^2}}\begin{bmatrix} -y\\ x\end{bmatrix} $$
in this way.