Functions of Several Variables

A function $f:
   \real^n \to \real^m$ is a function of several variables if $n > 1$ --- that is, if there is more than one input variable.

For example a function $f: \real^2 \to \real^3$ is a parametrized surface in $\real^3$ . Here's a picture of

$$f(u, v) = ((u^2 - 1) \cos v, u^3, (u^2 - 1) \sin v).$$

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-1.eps}}$$

Or consider a function $f: \real^2 \to \real$ . Its graph is a surface in $\real^3$ . Here's a picture of the graph of $f(x, y) =
   \dfrac{\sin(x + y)}{x^2 + y^2 + 1}$ :

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-2.eps}}$$

Functions of several variables occur in many real world situations --- in fact, most measurable quantities depend on many factors or variables. For example, the temperature at a point in space may be a function of its coordinates $(x, y, z)$ . The ideal gas law $p V = n R T$ relates the pressure p, the volume V, and the temperature T of an ideal gas. I can regard any one of these three variables as a function of the other two; for example, writing $p =
   \dfrac{n R T}{V}$ views p as a function of V and T.

Example. A function $f: \real^3 \to
   \real^3$ is defined by

$$f(x, y, z) = (2 x + y, x - z, x^2 y + z).$$

Evaluate $f(1,
   4, -1)$ , $f(2, 3, 0)$ , and $f(6, 1, 1)$ .

You substitute values into a function of several variables in the obvious way. For instance, to evaluate $f(1, 4, -1)$ , I set $x = 1$ , $y = 4$ , and $z = -1$ in the formula for f:

$$f(1, 4, -1) = (2 \cdot 1 + 4, 1 - (-1), 1^2 \cdot 4 + (-1)) = (6, 2, 3).$$

Likewise,

$$f(2, 3, 0) = (7, 2, 12) \quad\hbox{and}\quad f(6, 1, 1) = (13, 5, 37).\quad\halmos$$


Definition. For a function $f: \real^n \to
   \real^m$ :

(a) The domain is the set of all points in $\real^n$ where f is defined.

(b) The image (or the range) is the set of all outputs of f in $\real^m$ .

Remark. I'm following the usual convention: For functions $\real^n \to \real^m$ to refer to the set of points in $\real^n$ where the function is defined as the domain of the function. Thus, for the function $f(x, y) =
   \dfrac{1}{x - y}$ , the "domain" is the set of points $(x, y)$ such that $x - y \ne 0$ , i.e. $x \ne y$ .

In more advanced courses, a more precise definition of a function requires that the "domain" be included as part of the function's definition. In that context, what we're calling the "domain" is referred to as the natural domain (the "biggest possible set" where the function is defined).

Example. A function of 2 variables is defined by

$$f(x, y) = \dfrac{x^2 + y^2 + 4}{y^2 - 4 x^2}.$$

Describe the set of points $(x, y)$ for which f is undefined. What is the domain of f?

$f(x, y) =
   \dfrac{x^2 + y^2 + 4}{y^2 - 4 x^2}$ is undefined when the denominator is 0:

$$\eqalign{ y^2 - 4 x^2 & = 0 \cr (y - 2 x)(y + 2 x) & = 0 \cr}$$

Thus, f is undefined for points $(x, y)$ on either of the lines $y = 2 x$ or $y = -2 x$ .

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-3.eps}}$$

The domain is the set of points $(x, y)$ which are not on $y = 2 x$ or $y = -2 x$ -- i.e. the points such that $y \ne \pm 2 x$ .


Example. A function of 2 variables is defined by

$$f(x, y) = \ln (5 x - y).$$

Describe the set of points $(x, y)$ for which f is undefined. What is the domain of f?

The natural log function is undefined for inputs which are less than or equal to 0. So $f(x, y) = \ln (5 x - y)$ will be undefined if

$$\eqalign{ 5 x - y & \le 0 \cr 5 x & \le y \cr}$$

That is, f is undefined at points $(x, y)$ where $y \ge 5 x$ . They are the points lying on or above the line $y = 5 x$ :

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-4.eps}}$$

The domain is the set of points $(x, y)$ below the line $y = 5 x$ .


Example. A function of 2 variables is defined by

$$f(x, y) = \sqrt{1 - x^2 - y^2}.$$

Describe the set of points $(x, y)$ for which f is undefined. What is the domain of f?

Since the square root of a negative number is undefined, $f(x, y) = \sqrt{1 -
   x^2 - y^2}$ is undefined for

$$1 - x^2 - y^2 < 0, \quad\hbox{or}\quad x^2 + y^2 > 1.$$

That is, f is undefined at points $(x, y)$ lying outside the unit circle $x^2 + y^2 = 1$ .

The domain is the set of points $(x, y)$ on or inside the unit circle $x^2 + y^2 = 1$ .


Example. Describe the image (or the range) of the function $z
   = f(x, y) = \tan^{-1} (x + y)$ .

The image of a function is the set of outputs. What are the outputs of the inverse tangent function $\tan^{-1} ()$ ?

For any x and y,

$$-\dfrac{\pi}{2} < \tan^{-1} (x + y) < \dfrac{\pi}{2}.$$

I know that $\tan^{-1} x$ attains every value between $-\dfrac{\pi}{2}$ and $\dfrac{\pi}{2}$ , and if I set $y = 0$ I have $\tan^{-1} (x + y) =
   \tan^{-1} x$ .

Therefore, the image of f is $-\dfrac{\pi}{2} < z
   < \dfrac{\pi}{2}$ .


A function of several variables can be pictured in many ways. For example, you can draw the graph of a function of 2 variables $z = f(x, y)$ . Because plotting points in 3 dimensions is tedious and difficult, you'd probably use software to draw the graph.

for functions $f: \real^n \to \real$ , you may also get a "picture" of the function by drawing its level sets. A level set for f is obtained by setting $f = c$ , where c is a constant. By using different values for c, you get a picture of the "levels" of the function.

You may have seen topographic maps, where the level curves are referred to as contour lines. They represent lines along which the altitude ("z") is constant:

$$\hbox{\epsfysize=2in \epsffile{functions-of-several-variables-5.eps}}$$

Example. Sketch the graph of $z = y - x^2$ , and some of the contour lines.

Here's the graph of the function, produced by a computer:

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-6.eps}}$$

I can use a computer to sketch the level curves, but this example is simple enough that I'll analyze it first. I get level curves by setting z to specific numbers and graphing the curves I get.

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & Value of c & & Equation for $z = c$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & -2 & & $y - x^2 = -2$ or $y = x^2 - 2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & -1 & & $y - x^2 = -1$ or $y = x^2 - 1$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 0 & & $y - x^2 = 0$ or $y = x^2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 1 & & $y - x^2 = 1$ or $y = x^2 + 1$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 2 & & $y - x^2 = 2$ or $y = x^2 + 2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} }} $$

You can see the level curves are a family of parabolas.

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-7.eps}}\quad\halmos$$


For a function of 3 variables $w = f(x, y, z)$ , setting $w = c$ for various numbers c produces level surfaces. If you interpret $w = f(x, y, z)$ as the temperature at a point $(x, y, z)$ in space, then a level surface $w = c$ is the set of points in space where the temperature is c.

Example. Describe some level surfaces for the function $w = x
   - y^2 - z^2$ .

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & w & & Equation of level surface & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & -4 & & $-4 = x - y^2 - z^2$ or $x = y^2 + z^2 + 4$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & -2 & & $-2 = x - y^2 - z^2$ or $x = y^2 + z^2 + 2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 0 & & $0 = x - y^2 - z^2$ or $x = y^2 + z^2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 2 & & $2 = x - y^2 - z^2$ or $x = y^2 + z^2 - 2$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & \cr & 4 & & $4 = x - y^2 - z^2$ or $x = y^2 + z^2 - 4$ & \cr height2pt & \omit & & \omit & \cr \noalign{\hrule} }} $$

The level surfaces are paraboloids opening along the x-axis.

$$\hbox{\epsfysize=1.75in \epsffile{functions-of-several-variables-8.eps}}\quad\halmos$$


Contact information

Bruce Ikenaga's Home Page

Copyright 2018 by Bruce Ikenaga