Real-valued functions of several variables

Functions that take in several real variables and output a single real number.

The definition for functions of more than one variable is quite similar to the definition for functions of one variable that we studied in basic calculus. In this lecture we develop the fundamental concepts and tools for doing calculus with functions of several variables.

Real-valued functions of two variables

The definition for functions of two variables is quite similar to the definition for functions of one variable that we already studied.

These functions can be visualized as mappings between the 2-dimensional plane and the 1-dimensional real line, and they naturally appear in many applications. We have to develop a few new tools in order to do calculus with these functions.

Given a subset $D$ of the (real) plane $\mathbb{R}^2$, a (real-valued) function of two variables on $D$ maps each ordered pair $(x,y)$ in $D$ to a unique real number $z$.

Here $D$ is called the domain of $f$, and the range of $f$ is the set of all real numbers $z$ that has at least one ordered pair $(x,y)$ in $D$ such that $f(x,y) = z$.

Functions of two variables can be describe by formulas. For example, \[ f(x,y) = x^2 + y^2 + \sin(xy) \] is a function defined on the domain $D = \mathbb{R}^2$. When we plug in a pair of real numbers $(x,y)$, this function produces a real number $z = f(x,y)$ as its output.
For any point $(x,y)$ on the plane $\mathbb{R}^2$, let $f(x,y)$ be distance between $(x,y)$ and the origin $(0,0)$, then $f$ is a function in two variables, and its domain is the entire plane $\mathbb{R}^2$.

In this case, we can see the range is the set of all nonnegative real numbers.

Graphs of functions in two variables

For a given function $f(x,y)$ in the two variables $x$ and $y$, the set of points $(x,y,f(x,y))$ with $(x,y)$ in its domain is called the graph of $f$.

In other words, the function value $f(x,y)$ provides the $z$ value of any point in the graph of $f$.

For example, the following image shows the surface that is the graph of the function \[ f(x,y) = \frac{x^2}{10} - \frac{y^2}{10} + \sin(xy). \]

Surface

Contour lines and level curves

Visualizing a surface in space is not always easy. We often have to rely on their 2-dimensional representations similar to topographical maps.

A topographical map use contour lines to represent terrains that are not flat. They represent points having the exact same elevation.

In our context, the curves equivalent to contour lines are called level curves.

For a function $f(x,y)$ and a number $c$ in its range, a level curve of $f$ at value $c$ is the set of all points $(x,y)$ such that $f(x,y) = c$.

It is also the intersection between the graph of $f$ and a plane defined by $z=c$.

An simple example

For the function \[ f(x,y) = \frac{x^2+y^2}{5}, \] and a nonnegative real number $c$, the level curve at value $c$ is simply the curve defined by \[ \frac{x^2+y^2}{5} = c. \]

We can see the level curves at values $c=1$ and $c=2$.

In this figure, we can also see that the level curves are projection of points having the same "height" (just like in a topographical map).

Exercises

Consider the function \[ f(x,y) = xy. \] Sketch the level curves at values $0,1,2,3,-1,-2,-3$ respectively.
Consider the function \[ f(x,y) = x^2 - y^2. \] Sketch the level curves at values $0,1,2,3,-1,-2,-3$ respectively.

While it is easy to sketch these level curves using computer programs (or graphing calculators), you should at least try to do these by hand, at least once.

Functions of several variables

Everything we just described can be easily generalized to functions of more than two variables.

Given a positive integer $n$ and a subset $D$ of the $\mathbb{R}^n$, a (real-valued) function in $n$ variables on $D$ maps each point $(x_1,\dots,x_n)$ in $D$ to a unique real number.

Here $D$ is called the domain of $f$, and the range of $f$ is the set of all real numbers $y$ that has at least one point $(x_1,\dots,x_n)$ in $D$ such that $f(x_1,\dots,x_n) = y$.

Level surface and level set

We can generalize the concept of level curves to functions in three variables, and the resulting objects are called level surface.

Given a function $f(x,y,z)$ and a real number $c$ in the range of $f$, a level surface of $f$ is the set of all points satisfying the equation $f(x,y,z) = c$.

We can generalize this idea much further to functions in $n$ variables, and the equivalent objects will be called level sets.

Terms like level curve and level surface are not to be taken literally. It is possible for a level curve to not be a curve at all, and it is possible for a level surface to not be surface in the normal sense of the word. For example, we can see that the level curve of $f(x,y) = x^2 + y^2$ defined by $f(x,y) = 0$ consists of a single point.

For the function \[ f(x,y,z) = x^2 + y^2 + z^2, \] find the range of the $f$ and describe the shape of the level surface defined by $f(x,y,z) = c$ for any $c$ in its range.
For the function \[ f(x,y,z) = z^2 - \sin(x + y), \] describe the shape of the level surface defined by $f(x,y,z) = c$ for any real number $c$ such that $c > 1$.
For the function \[ f(x,y,z) = x^2 + y^2 - z^2, \] can you describe the shape of its level surfaces?