maths.freeMultivariable Calculus › 4. Differentiation of Functions of Several Variables › Functions of several variables

Functions of several variables

Surfaces, level curves, domains — reading z = f(x, y).

A function of two variables is a surface over the plane; its level curves are the contour lines of a map. Picture it: z = x² − y² is a saddle — rotate it and watch it curve up in one direction and down in the other. Think it: everything single-variable calculus did with a curve, we now do with a surface, and the derivative becomes a vector.

Functions of Several Variables

This section expects students to have familiarity with our discussion of 3D coordinates and fundamental planes in and properties of functions from precalculus (domain, range, etc.). This section can probably be covered in in a single class meeting but students will need to practice with the ideas of traces and contour plots since those will be used throughout the next three chapters.

There are a variety of activities in this section that will allow an instructor to select how much algebraic versus conceptual coverage they would prefer. Some instructors may skip elements like domain and range and would not need to do . introduces users to the spreadsheet version of multivariable functions that will used in application settings for the next couple of chapters. helps users to connect work with traces and practice drawing surfaces. There are a few different activities you can select from related to contours and how to visualize surfaces.

Introduction

In this section, we will start our work with (scalar valued) multivariable functions by looking at several basic elements of these type of functions, such as domain, range, different presentations, and how to plot these functions. Our preview activity will use a finance example to get you used to the notation and descriptions of different aspects of functions of several variables.

Exploration

Suppose you invest money in an account that pays 5% interest compounded continuously. If you have an initial investment of \(P\) dollars in the account, then \(A\), the amount of money in the account after \(t\) years is given by \[\begin{aligned}\end{aligned}\]

The variables \(P\) and \(t\) are independent of each other, so using functional notation we write \[\begin{aligned}\end{aligned}\]

Find the amount of money in the account after 7 years if you originally invest 1000 dollars.

Evaluate \(A(5000,8)\). Write a sentence to explain what this calculation represents.

Now consider only the situation where the amount invested is fixed at 1000 dollars. Calculate the amount of money in the account after \(t\) years as indicated in the table below. Round payments to the nearest penny.

Duration (in years) 2 3 4 5 6
Amount (dollars)

Now consider the situation where we want to know the amount of money in the account after 10 years given various initial investments. Calculate the amount of money in the account as indicated in the table below. Round payments to the nearest penny.

Initial investment (dollars) 500 1000 5000 7500 10000
Amount (dollars)

Describe as best you can what combinations of initial investments and time will result in an account containing $10,000.

Functions of Several Variables

Up to this chapter, we have primarily been concerned with functions of a single variable. Remember that a function is a rule that assigns exactly one output for each allowed input. For instance, the rule that assigns a student ID number to each student at your school is a function because each student (input) gets assigned one and only one ID number. The rule that assigns the classrooms for your courses this semester is not a function because you likely have more than one classroom (multiple outputs) for each student (a single input).

We saw the behavior of a function in Preview Activity, where each pair of inputs, \((P,t)\), produces a single output \(A(P,t)\). Additionally, the values of the two variables \(P\) and \(t\) did not depend on one another. That is, we could choose any value of \(P\) without limiting what value \(t\) might have, and we could select any value of \(t\) to use without regard to what value \(P\) might have. For that reason we say that the variables \(t\) and \(P\) are independent of each other. Thus, we call \(A = A(P,t)\) a function of the two independent variables \(P\) and \(t\). This is the key idea in defining a function of two independent variables.

There is no reason to restrict ourselves to functions of only two variables; we can use any number of variables we like. For example, \[\begin{aligned}\end{aligned}\] defines \(f\) as a function of the three variables \(x\), \(y\), and \(z\). In general, a function of \(n\) independent variables is a rule that assigns to an ordered \(n\)-tuple \((x_1, x_2, \ldots, x_n)\) in some set \(D\) exactly one real number. You may notice that we use variable names like \(x,y,z\) when using three variables but when there are more than three variables, it will be convenient to index the variables like \(x_i\) so that we can refer to the variables by index. For example the fifth variable in \((x_1, x_2, \ldots, x_n)\) will be \(x_5\) and the last two variables will be \(x_{n-1}\) and \(x_n\).

As with functions of a single variable, it is important to understand the set of inputs for which the function is defined.

Condensed — the full section is in Boelkins et al., Active Calculus Multivariable.

Representing Functions of Two Variables

You have already seen one representation of a function of several variables: the algebraic notation \(f(x,y)=\sqrt{xy}\), which shows an algebraic rule to find the output of the function \(f\) for given input values \(x\) and \(y\). This kind of representation is convenient to use with algebraic rules for derivatives or for computing the output of a function given particular inputs. The drawback to this representation is that you need a lot of intuition about the type of function being used to understand how the output changes over a range of values.

One of the techniques we use to study functions of one variable is to create a table of values. We can do the same for functions of two variables, except that our tables must allow us to keep track of both input variables. We can do this with a two-dimensional table, where we list the \(x\)-values down the first column and the \(y\)-values across the first row.

As an example, suppose we launch a projectile (perhaps by hitting a golf ball with a golf club) from ground level. Under ideal conditions, by which we mean ignoring wind resistance, spin, or any other forces except the force of gravity, the horizontal distance the object travels before hitting the ground depends on the initial velocity \(x\) the object is given, and the angle \(y\) at which it is launched. If we let \(f\) represent the horizontal distance the object travels, then \(f\) is a function of the two variables \(x\) and \(y\), and we represent \(f\) in functional notation by \[\begin{aligned}\end{aligned}\], where \(g\) is the acceleration due to gravity.Note that \(g\) is constant, \(9.8\) meters per second squared or \(32\) feet per second squared. To create a table of values for \(f\), we list the \(x\)-values down the first column and the \(y\)-values across the first row. The value \(f(x,y)\) is displayed in the location where the \(x\) row intersects the \(y\) column, as shown in Table, where we measure \(x\) in feet per second and \(y\) in radians. For example, \(f(75,0.8)=175.7\) is shown in the table by looking at the value in the row with \(x=75\) and column corresponding to \(y=0.8\).

Condensed — the full section is in Boelkins et al., Active Calculus Multivariable.

Traces

When studying functions of several variables, we are often interested in how each individual variable affects the function while the other variable is fixed. In Preview Activity, we saw that the amount of money in an account depends on the amount initially invested and the duration of the investment. However, if we fix the initial investment, the amount of money in the account depends only on the duration of the investment, and if we fix the duration of the investment, then the amount of money in the account depends only on the initial investment. This idea of keeping one variable constant while we allow the other to change will be an important tool for us when studying functions of several variables. This will be the first of many times we will employ the following approach

As another example, consider again the projectile distance function \(f\) defined by \[\begin{aligned}\end{aligned}\], where \(x\) is the initial velocity of an object in feet per second, \(y\) is the launch angle in radians, and \(g\) is the acceleration due to gravity (32 feet per second squared). If we hold the launch angle constant at \(y=0.6\) radians, we can consider \(f\) a function of the initial velocity alone. In this case we have \[\begin{aligned}\end{aligned}\]. Similarly, if we fix the initial velocity at 150 feet per second, we can consider the projectile distance as a function of the launch angle only. In this case we have \[\begin{aligned}\end{aligned}\]. In , we show two plots. shows what happens when fixing \(y=0.6\), while shows the two-dimensional graph obtained by fixing \(x=150\).

We can plot the curve from on the surface by tracing out the points on the surface when \(y = 0.6\), as shown in red in Figure. The formula for \(f(x,0.6)\) shows that \(f\) is quadratic in the \(x\)-direction. More descriptively, as we increase the launch velocity while keeping the launch angle constant, the horizontal distance the object travels increases proportional to the square of the initial velocity.

We can plot the curve from on the surface by tracing out the points on the surface when \(x=150\), as shown in blue in Figure. The formula for \(f(150,y)\) shows that \(f\) is sinusoidal in the \(y\)-direction. More descriptively, as we increase the launch angle while keeping the initial velocity constant, the horizontal distance traveled by the object is proportional to the sine of twice the launch angle.

Understanding trends in the behavior of functions of two variables can be challenging, as can sketching their graphs; traces help us with both of these tasks.

Condensed — the full section is in Boelkins et al., Active Calculus Multivariable.

Contour Maps and Level Curves

As you saw earlier in this section, traces give important information about what a slice of a surface looks like when holding one of the inputs constant. This corresponds to looking at the intersection of a fundamental plane of the form \(x=a\) or \(y=b\) with the surface given by \(z=f(x,y)\). These fundamental planes are oriented vertically when we consider a conventional right-handed coordinate system. In this section, we will explore the intersection of a surface given by \(z=f(x,y)\) with a fundamental plane of the form \(z=c\). This will correspond to looking at the points on the surface with a fixed height.

You may have seen topographic maps such as the one of the Porcupine Mountains in the upper peninsula of Michigan shown in .Map source: Michigan Department of Natural Resources, with permission of the Michigan DNR and Bob Wild. The curves on these maps show the locations with a particular elevation (as labeled on the curve). The amount of space between these curves also depicts the rate of change in elevation: curves on the topographic map that are close together signify steep ascents or descents, while curves that are far apart indicate slower changes in elevation. Thus, these topographic maps with curves of constant elevation can tell us a lot about three-dimensional surfaces. Mathematically, if \(f(x,y)\) represents the elevation at the point \((x,y)\), then each of the curves with constant elevation is the graph of an equation of the form \(f(x,y) = k\), for some constant \(k\).

Activity

Use the topographical map of the Porcupine Mountains below to answer the following questions. Note that points of interest are sometimes marked with an X and have their elevation listed.

Identify the highest and lowest points you can find.

Describe how your elevation would change if you walked in a straight line from the lowest to the highest elevation points. You may want to sketch a plot of the elevation along your path.

If you walk along the Big Carp River Trail (in the top left part of the image) from the left to the right as shown on the map, describe which parts of the trail will have steep increases in elevation and which parts you think will be the most like level ground.

Curves on a surface that describe points at the same height or level are called level curves and as you saw in the topographic map above, a plot with level curves can be useful for representing information on a surface using just a two dimensional plot.

Condensed — the full section is in Boelkins et al., Active Calculus Multivariable.

A gallery of functions

We end this section by considering a collection of functions and illustrating their surface graphs and contour plots. Many (but not all) of these surfaces will be familiar to you from , so now you will have an opportunity to see how the contour plots relate to the analyses you did in that section.

Functions of Two Variables

The definition of a function of two variables is very similar to the definition for a function of one variable. The main difference is that, instead of mapping values of one variable to values of another variable, we map ordered pairs of variables to another variable.

Determining the domain of a function of two variables involves taking into account any domain restrictions that may exist. Let’s take a look.

Condensed — the full section is in OpenStax Calculus Volume 3.

Graphing Functions of Two Variables

Suppose we wish to graph the function \(z=f(x,y).\) This function has two independent variables \((x\ \text{and}\ y)\) and one dependent variable \((z).\) When graphing a function \(y=f(x)\) of one variable, we use the Cartesian plane. We are able to graph any ordered pair \((x,y)\) in the plane, and every point in the plane has an ordered pair \((x,y)\) associated with it. With a function of two variables, each ordered pair \((x,y)\) in the domain of the function is mapped to a real number \(z.\) Therefore, the graph of the function \(f\) consists of ordered triples \((x,y,z).\) The graph of a function \(z=(x,y)\) of two variables is called a surface.

To understand more completely the concept of plotting a set of ordered triples to obtain a surface in three-dimensional space, imagine the \((x,y)\) coordinate system laying flat. Then, every point in the domain of the function \(f\) has a unique \(z\text{-value}\) associated with it. If \(z\) is positive, then the graphed point is located above the \(\text{xy}\text{-plane,}\) if \(z\) is negative, then the graphed point is located below the \(\text{xy}\text{-plane}.\) The set of all the graphed points becomes the two-dimensional surface that is the graph of the function \(f.\)

Example

Try it.

A profit function for a hardware manufacturer is given by

\[f(x,y)=16-{(x-3)}^{2}-{(y-2)}^{2},\]

where \(x\) is the number of nuts sold per month (measured in thousands) and \(y\) represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.

Solution

This function is a polynomial function in two variables. The domain of \(f\) consists of \((x,y)\) coordinate pairs that yield a nonnegative profit:

\[\begin{array}{l}16-{(x-3)}^{2}-{(y-2)}^{2}\ge 0 \\ {(x-3)}^{2}+{(y-2)}^{2}\le 16.\end{array}\]

This is a disk of radius \(4\) centered at \((3,2).\) A further restriction is that both \(x\ \text{and}\ y\) must be nonnegative. When \(x=3\) and \(y=2,\) \(f(x,y)=16.\) Note that it is possible for either value to be a noninteger; for example, it is possible to sell \(2.5\) thousand nuts in a month. The domain, therefore, contains thousands of points, so we can consider all points within the disk. For any \(z<16,\) we can solve the equation \(f(x,y)=z\text{:}\)

\[\begin{array}{lll} \\ 16-{(x-3)}^{2}-{(y-2)}^{2} & = & z \\ {(x-3)}^{2}+{(y-2)}^{2} & = & 16-z.\end{array}\]

Since \(z<16,\) we know that \(16-z>0,\) so the previous equation describes a circle with radius \(\sqrt{16-z}\) centered at the point \((3,2).\) Therefore. the range of \(f(x,y)\) is \(\{z\in ℝ|z\le 16\}.\) The graph of \(f(x,y)\) is also a paraboloid, and this paraboloid points downward as shown.

Condensed — the full section is in OpenStax Calculus Volume 3.

Level Curves

If hikers walk along rugged trails, they might use a topographical map that shows how steeply the trails change. A topographical map contains curved lines called contour lines. Each contour line corresponds to the points on the map that have equal elevation (). A level curve of a function of two variables \(f(x,y)\) is completely analogous to a contour line on a topographical map.

Returning to the function \(g(x,y)=\sqrt{9-{x}^{2}-{y}^{2}},\) we can determine the level curves of this function. The range of \(g\) is the closed interval \([0,3].\) First, we choose any number in this closed interval—say, \(c=2.\) The level curve corresponding to \(c=2\) is described by the equation

\[\sqrt{9-{x}^{2}-{y}^{2}}=2.\]

To simplify, square both sides of this equation:

\[9-{x}^{2}-{y}^{2}=4.\]

Now, multiply both sides of the equation by \(-1\) and add \(9\) to each side:

\[{x}^{2}+{y}^{2}=5.\]

This equation describes a circle centered at the origin with radius \(\sqrt{5}.\) Using values of \(c\) between \(0\ \text{and}\ 3\) yields other circles also centered at the origin. If \(c=3,\) then the circle has radius \(0,\) so it consists solely of the origin. is a graph of the level curves of this function corresponding to \(c=0,1,2,\ \text{and}\ 3.\) Note that in the previous derivation it may be possible that we introduced extra solutions by squaring both sides. This is not the case here because the range of the square root function is nonnegative.

A graph of the various level curves of a function is called a contour map.

Another useful tool for understanding the graph of a function of two variables is called a vertical trace. Level curves are always graphed in the \(xy\text{-plane,}\) but as their name implies, vertical traces are graphed in the \(xz\)- or \(yz\text{-planes.}\)

Condensed — the full section is in OpenStax Calculus Volume 3.

Functions of More Than Two Variables

So far, we have examined only functions of two variables. However, it is useful to take a brief look at functions of more than two variables. Two such examples are

\[f(x,y,z)={x}^{2}-2xy+{y}^{2}+3yz-{z}^{2}+4x-2y+3x-6\ \text{(a polynomial in three variables)}\]

and

\[g(x,y,t)=({x}^{2}-4xy+{y}^{2})\text{sin}\ t-(3x+5y)\text{cos}\ t.\]

In the first function, \((x,y,z)\) represents a point in space, and the function \(f\) maps each point in space to a fourth quantity, such as temperature or wind speed. In the second function, \((x,y)\) can represent a point in the plane, and \(t\) can represent time. The function might map a point in the plane to a third quantity (for example, pressure) at a given time \(t.\) The method for finding the domain of a function of more than two variables is analogous to the method for functions of one or two variables.

Example

Try it.

Find the domain of each of the following functions:

  1. \(f(x,y,z)=\frac{3x-4y+2z}{\sqrt{9-{x}^{2}-{y}^{2}-{z}^{2}}}\)
  2. \(g(x,y,t)=\frac{\sqrt{2t-4}}{{x}^{2}-{y}^{2}}\)
Solution
  1. For the function \(f(x,y,z)=\frac{3x-4y+2z}{\sqrt{9-{x}^{2}-{y}^{2}-{z}^{2}}}\) to be defined (and be a real value), two conditions must hold:
    1. The denominator cannot be zero.
    2. The radicand cannot be negative.
    Combining these conditions leads to the inequality
    \[9-{x}^{2}-{y}^{2}-{z}^{2}>0.\]
    Moving the variables to the other side and reversing the inequality gives the domain as
    \[\text{domain}(f)=\{(x,y,z)\in {ℝ}^{3}|{x}^{2}+{y}^{2}+{z}^{2}<9\},\]
    which describes a ball of radius \(3\) centered at the origin. (Note: The surface of the ball is not included in this domain.)
  2. For the function \(g(x,y,t)=\frac{\sqrt{2t-4}}{{x}^{2}-{y}^{2}}\) to be defined (and be a real value), two conditions must hold:
    1. The radicand cannot be negative.
    2. The denominator cannot be zero.
    Since the radicand cannot be negative, this implies \(2t-4\ge 0,\) and therefore that \(t\ge 2.\) Since the denominator cannot be zero, \({x}^{2}-{y}^{2}\ne 0,\) or \({x}^{2}\ne {y}^{2},\) Which can be rewritten as \(y\ne \text{\pm }x\), which are the equations of two lines passing through the origin. Therefore, the domain of \(g\) is
    \[\text{domain}(g)=\{(x,y,t)|y\ne \text{\pm }x,t\ge 2\}.\]

Functions of two variables have level curves, which are shown as curves in the \(xy\text{-plane.}\) However, when the function has three variables, the curves become surfaces, so we can define level surfaces for functions of three variables.

Condensed — the full section is in OpenStax Calculus Volume 3.

Key Concepts

  • The graph of a function of two variables is a surface in \({ℝ}^{3}\) and can be studied using level curves and vertical traces.
  • A set of level curves is called a contour map.

Functions of Several Variables

For the following exercises, evaluate each function at the indicated values.

For the following exercises, find the domain of the function.

Find the range of the functions.

For the following exercises, find the level curves of each function at the indicated value of \(c\) to visualize the given function.

For the following exercises, find the vertical traces of the functions at the indicated values of \(x\) and y, and plot the traces.

Find the domain of the following functions.

For the following exercises, plot a graph of the function.

Condensed — the full section is in OpenStax Calculus Volume 3.

Ohatra: x^2 - y^2

Analyse x^2 - y^2

x^{2} - y^{2}

Dingana amin'ny dingana

  1. x^{2} - y^{2}

    An expression in x, y. Here is what it does.

  2. \left(x - y\right) \left(x + y\right)

    Factored form.

Asehoy ny valinteny
x^{2} - y^{2}

Practice (40)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Find the domain and range of each of the following functions:

    1. \(f(x,y)=3x+5y+2\)
    2. \(g(x,y)=\sqrt{9-{x}^{2}-{y}^{2}}\)
    Asehoy ny valinteny
    1. This is an example of a linear function in two variables. There are no values or combinations of \(x\) and \(y\) that cause \(f(x,y)\) to be undefined, so the domain of \(f\) is \({ℝ}^{2}.\) To determine the range, first pick a value for \(z.\) We need to find a solution to the equation \(f(x,y)=z,\) or \(3x+5y+2=z.\) One such solution can be obtained by first setting \(y=0,\) which yields the equation \(3x+2=z.\) The solution to this equation is \(x=\frac{z-2}{3},\) which gives the ordered pair \((\frac{z-2}{3},0)\) as a solution to the equation \(f(x,y)=z\) for any value of \(z.\) Therefore, the range of the function is all real numbers, or \(ℝ.\)
    2. For the function \(g(x,y)\) to have a real value, the quantity under the square root must be nonnegative:
      \[9-{x}^{2}-{y}^{2}\ge 0.\]
      This inequality can be written in the form
      \[{x}^{2}+{y}^{2}\le 9.\]
      Therefore, the domain of \(g(x,y)\) is \(\{(x,y)\in {ℝ}^{2}|{x}^{2}+{y}^{2}\le 9\}.\) The graph of this set of points can be described as a disk of radius \(3\) centered at the origin. The domain includes the boundary circle as shown in the following graph.

      To determine the range of \(g(x,y)=\sqrt{9-{x}^{2}-{y}^{2}}\) we start with a point \(({x}_{0},{y}_{0})\) on the boundary of the domain, which is defined by the relation \({x}^{2}+{y}^{2}=9.\) It follows that \({x}_{0}^{2}+{y}_{0}^{2}=9\) and
      \[g({x}_{0},{y}_{0})=\sqrt{9-{x}_{0}^{2}-{y}_{0}^{2}}=\sqrt{9-({x}_{0}^{2}+{y}_{0}^{2})}=\sqrt{9-9}=0.\]
      If \({x}_{0}^{2}+{y}_{0}^{2}=0\) (in other words, \({x}_{0}={y}_{0}=0),\) then
      \[g({x}_{0},{y}_{0})=\sqrt{9-{x}_{0}^{2}-{y}_{0}^{2}}=\sqrt{9-({x}_{0}^{2}+{y}_{0}^{2})}=\sqrt{9-0}=3.\]
      This is the maximum value of the function. Given any value c between \(0\ \text{and}\ 3,\) we can find an entire set of points inside the domain of \(g\) such that \(g(x,y)=c\text{:}\)
      \[\begin{array}{lll}\sqrt{9-{x}^{2}-{y}^{2}} & = & c \\ 9-{x}^{2}-{y}^{2} & = & {c}^{2} \\ {x}^{2}+{y}^{2} & = & 9-{c}^{2}.\end{array}\]
      Since \(9-{c}^{2}>0,\) this describes a circle of radius \(\sqrt{9-{c}^{2}}\) centered at the origin. Any point on this circle satisfies the equation \(g(x,y)=c.\) Therefore, the range of this function can be written in interval notation as \([0,3].\)
  2. Find the domain and range of the function \(f(x,y)=\sqrt{36-9{x}^{2}-9{y}^{2}}.\)

    Asehoy ny valinteny

    The domain is the shaded circle defined by the inequality \(9{x}^{2}+9{y}^{2}\le 36,\) which has a circle of radius \(2\) as its boundary. The range is \([0,6].\)

  3. Create a graph of each of the following functions:

    1. \(g(x,y)=\sqrt{9-{x}^{2}-{y}^{2}}\)
    2. \(f(x,y)={x}^{2}+{y}^{2}\)
    Asehoy ny valinteny
    1. In , we determined that the domain of \(g(x,y)=\sqrt{9-{x}^{2}-{y}^{2}}\) is \(\{(x,y)\in {ℝ}^{2}|{x}^{2}+{y}^{2}\le 9\}\) and the range is \(\{z\in ℝ|0\le z\le 3\}.\) When \({x}^{2}+{y}^{2}=9\) we have \(g(x,y)=0.\) Therefore any point on the circle of radius \(3\) centered at the origin in the \(x,y\text{-plane}\) maps to \(z=0\) in \({ℝ}^{3}.\) If \({x}^{2}+{y}^{2}=8,\) then \(g(x,y)=1,\) so any point on the circle of radius \(2\sqrt{2}\) centered at the origin in the \(x,y\text{-plane}\) maps to \(z=1\) in \({ℝ}^{3}.\) As \({x}^{2}+{y}^{2}\) gets closer to zero, the value of z approaches 3. When \({x}^{2}+{y}^{2}=0,\) then \(g(x,y)=3.\) This is the origin in the \(x,y\text{-plane}.\) If \({x}^{2}+{y}^{2}\) is equal to any other value between \(0\ \text{and}\ 9,\) then \(g(x,y)\) equals some other constant between \(0\ \text{and}\ 3.\) The surface described by this function is a hemisphere centered at the origin with radius \(3\) as shown in the following graph.
    2. This function also contains the expression \({x}^{2}+{y}^{2}.\) Setting this expression equal to various values starting at zero, we obtain circles of increasing radius. The minimum value of \(f(x,y)={x}^{2}+{y}^{2}\) is zero (attained when \(x=y=0.).\) When \(x=0,\) the function becomes \(z={y}^{2},\) and when \(y=0,\) then the function becomes \(z={x}^{2}.\) These are cross-sections of the graph, and are parabolas. Recall from Introduction to Vectors in Space that the name of the graph of \(f(x,y)={x}^{2}+{y}^{2}\) is a paraboloid. The graph of \(f\) appears in the following graph.
  4. A profit function for a hardware manufacturer is given by

    \[f(x,y)=16-{(x-3)}^{2}-{(y-2)}^{2},\]

    where \(x\) is the number of nuts sold per month (measured in thousands) and \(y\) represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.

    Asehoy ny valinteny

    This function is a polynomial function in two variables. The domain of \(f\) consists of \((x,y)\) coordinate pairs that yield a nonnegative profit:

    \[\begin{array}{l}16-{(x-3)}^{2}-{(y-2)}^{2}\ge 0 \\ {(x-3)}^{2}+{(y-2)}^{2}\le 16.\end{array}\]

    This is a disk of radius \(4\) centered at \((3,2).\) A further restriction is that both \(x\ \text{and}\ y\) must be nonnegative. When \(x=3\) and \(y=2,\) \(f(x,y)=16.\) Note that it is possible for either value to be a noninteger; for example, it is possible to sell \(2.5\) thousand nuts in a month. The domain, therefore, contains thousands of points, so we can consider all points within the disk. For any \(z<16,\) we can solve the equation \(f(x,y)=z\text{:}\)

    \[\begin{array}{lll} \\ 16-{(x-3)}^{2}-{(y-2)}^{2} & = & z \\ {(x-3)}^{2}+{(y-2)}^{2} & = & 16-z.\end{array}\]

    Since \(z<16,\) we know that \(16-z>0,\) so the previous equation describes a circle with radius \(\sqrt{16-z}\) centered at the point \((3,2).\) Therefore. the range of \(f(x,y)\) is \(\{z\in ℝ|z\le 16\}.\) The graph of \(f(x,y)\) is also a paraboloid, and this paraboloid points downward as shown.

  5. Given the function \(f(x,y)=\sqrt{8+8x-4y-4{x}^{2}-{y}^{2}},\) find the level curve corresponding to \(c=0.\) Then create a contour map for this function. What are the domain and range of \(f?\)

    Asehoy ny valinteny

    To find the level curve for \(c=0,\) we set \(f(x,y)=0\) and solve. This gives

    \[0=\sqrt{8+8x-4y-4{x}^{2}-{y}^{2}}.\]

    We then square both sides and multiply both sides of the equation by \(-1\text{:}\)

    \[4{x}^{2}+{y}^{2}-8x+4y-8=0.\]

    Now, we rearrange the terms, putting the \(x\) terms together and the \(y\) terms together, and add \(8\) to each side:

    \[4{x}^{2}-8x+{y}^{2}+4y=8.\]

    Next, we group the pairs of terms containing the same variable in parentheses, and factor \(4\) from the first pair:

    \[4({x}^{2}-2x)+({y}^{2}+4y)=8.\]

    Then we complete the square in each pair of parentheses and add the correct value to the right-hand side:

    \[4({x}^{2}-2x+1)+({y}^{2}+4y+4)=8+4(1)+4.\]

    Next, we factor the left-hand side and simplify the right-hand side:

    \[4{(x-1)}^{2}+{(y+2)}^{2}=16.\]

    Last, we divide both sides by \(16\text{:}\)

    \[\frac{{(x-1)}^{2}}{4}+\frac{{(y+2)}^{2}}{16}=1.\]

    This equation describes an ellipse centered at \((1,-2).\) The graph of this ellipse appears in the following graph.

    We can repeat the same derivation for values of \(c\) less than \(4.\) Then, becomes

    \[\frac{4{(x-1)}^{2}}{16-{c}^{2}}+\frac{{(y+2)}^{2}}{16-{c}^{2}}=1\]

    for an arbitrary value of \(c.\) shows a contour map for \(f(x,y)\) using the values \(c=0,1,2,\ \text{and}\ 3.\) When \(c=4,\) the level curve is the point \((1,-2).\)

    \(\begin{array}{l}\text{Domain:}\left(x,y\right)\text{inside the ellipse}\frac{{(x-1)}^{2}}{4}+\frac{{(y+2)}^{2}}{16}=1 \\ \text{Range:}[0,4)\end{array}\)

  6. Find and graph the level curve of the function \(g(x,y)={x}^{2}+{y}^{2}-6x+2y\) corresponding to \(c=15.\)

    Asehoy ny valinteny

    The equation of the level curve can be written as \({(x-3)}^{2}+{(y+1)}^{2}=25,\) which is a circle with radius \(5\) centered at \((3,-1).\)

  7. Find vertical traces for the function \(f(x,y)=\text{sin}\ x\ \text{cos}\ y\) corresponding to \(x=-\frac{\pi }{4},0,\ \text{and}\ \frac{\pi }{4},\) and \(y=-\frac{\pi }{4},0,\ \text{and}\ \frac{\pi }{4}.\)

    Asehoy ny valinteny

    First set \(x=-\frac{\pi }{4}\) in the equation \(z=\text{sin}\ x\ \text{cos}\ y\text{:}\)

    \[z=\text{sin}(-\frac{\pi }{4})\text{cos}\ y=-\frac{\sqrt{2}\ \text{cos}\ y}{2}\approx -0.7071\ \text{cos}\ y.\]

    This describes a cosine graph in the plane \(x=-\frac{\pi }{4}.\) The other values of \(z\) appear in the following table.

    \(c\)Vertical Trace for \(x=c\)
    \(-\frac{\pi }{4}\)\(z=-\frac{\sqrt{2}\ \text{cos}\ y}{2}\)
    \(0\)\(z=0\)
    \(\frac{\pi }{4}\)\(z=\frac{\sqrt{2}\ \text{cos}\ y}{2}\)

    In a similar fashion, we can substitute the \(y\text{-values}\) in the equation \(f(x,y)\) to obtain the traces in the \(yz\text{-plane,}\) as listed in the following table.

    \(d\)Vertical Trace for \(y=d\)
    \(-\frac{\pi }{4}\)\(z=\frac{\sqrt{2}\ \text{sin}\ x}{2}\)
    \(0\)\(z=\text{sin}\ x\)
    \(\frac{\pi }{4}\)\(z=\frac{\sqrt{2}\ \text{sin}\ x}{2}\)

    The three traces in the \(xz\text{-plane}\) are cosine functions; the three traces in the \(yz\text{-plane}\) are sine functions. These curves appear in the intersections of the surface with the planes \(x=-\frac{\pi }{4},x=0,x=\frac{\pi }{4}\) and \(y=-\frac{\pi }{4},y=0,y=\frac{\pi }{4}\) as shown in the following figure.

  8. Determine the equation of the vertical trace of the function \(g(x,y)=\text{-}{x}^{2}-{y}^{2}+2x+4y-1\) corresponding to \(y=3,\) and describe its graph.

    Asehoy ny valinteny

    \(z=3-{(x-1)}^{2}.\) This function describes a parabola opening downward in the plane \(y=3.\)

  9. Find the domain of each of the following functions:

    1. \(f(x,y,z)=\frac{3x-4y+2z}{\sqrt{9-{x}^{2}-{y}^{2}-{z}^{2}}}\)
    2. \(g(x,y,t)=\frac{\sqrt{2t-4}}{{x}^{2}-{y}^{2}}\)
    Asehoy ny valinteny
    1. For the function \(f(x,y,z)=\frac{3x-4y+2z}{\sqrt{9-{x}^{2}-{y}^{2}-{z}^{2}}}\) to be defined (and be a real value), two conditions must hold:
      1. The denominator cannot be zero.
      2. The radicand cannot be negative.
      Combining these conditions leads to the inequality
      \[9-{x}^{2}-{y}^{2}-{z}^{2}>0.\]
      Moving the variables to the other side and reversing the inequality gives the domain as
      \[\text{domain}(f)=\{(x,y,z)\in {ℝ}^{3}|{x}^{2}+{y}^{2}+{z}^{2}<9\},\]
      which describes a ball of radius \(3\) centered at the origin. (Note: The surface of the ball is not included in this domain.)
    2. For the function \(g(x,y,t)=\frac{\sqrt{2t-4}}{{x}^{2}-{y}^{2}}\) to be defined (and be a real value), two conditions must hold:
      1. The radicand cannot be negative.
      2. The denominator cannot be zero.
      Since the radicand cannot be negative, this implies \(2t-4\ge 0,\) and therefore that \(t\ge 2.\) Since the denominator cannot be zero, \({x}^{2}-{y}^{2}\ne 0,\) or \({x}^{2}\ne {y}^{2},\) Which can be rewritten as \(y\ne \text{\pm }x\), which are the equations of two lines passing through the origin. Therefore, the domain of \(g\) is
      \[\text{domain}(g)=\{(x,y,t)|y\ne \text{\pm }x,t\ge 2\}.\]
  10. Find the domain of the function \(h(x,y,t)=(3t-6)\sqrt{y-4{x}^{2}+4}.\)

    Asehoy ny valinteny

    \(\text{domain}(h)=\{(x,y,t)\in {ℝ}^{3}|y\ge 4{x}^{2}-4\}\)

  11. Find the level surface for the function \(f(x,y,z)=4{x}^{2}+9{y}^{2}-{z}^{2}\) corresponding to \(c=1.\)

    Asehoy ny valinteny

    The level surface is defined by the equation \(4{x}^{2}+9{y}^{2}-{z}^{2}=1.\) This equation describes a hyperboloid of one sheet as shown in the following figure.

  12. Find an equation of the level surface of the function

    \[g(x,y,z)={x}^{2}+{y}^{2}+{z}^{2}-2x+4y-6z\]

    corresponding to \(c=2,\) and describe the surface, if possible.

    Asehoy ny valinteny

    \({(x-1)}^{2}+{(y+2)}^{2}+{(z-3)}^{2}=16\) describes a sphere of radius \(4\) centered at the point \((1,-2,3).\)

  13. \(W(x,y)=4{x}^{2}+{y}^{2}.\) Find \(W(2,-1),\) \(W(-3,6).\)

    Asehoy ny valinteny

    \(17,72\)

  14. \(W(x,y)=4{x}^{2}+{y}^{2}.\) Find \(W(2+h,3+h).\)

  15. The volume of a right circular cylinder is calculated by a function of two variables, \(V(x,y)=\pi {x}^{2}y,\) where \(x\) is the radius of the right circular cylinder and \(y\) represents the height of the cylinder. Evaluate \(V(2,5)\) and explain what this means.

    Asehoy ny valinteny

    \(20\pi .\) This is the volume when the radius is \(2\) and the height is \(5.\)

  16. An oxygen tank is constructed of a right cylinder of height \(y\) and radius \(x\) with two hemispheres of radius \(x\) mounted on the top and bottom of the cylinder. Express the volume of the tank as a function of two variables, \(x\ \text{and}\ y,\) find \(V(10,2),\) and explain what this means.

  17. \(V(x,y)=4{x}^{2}+{y}^{2}\)

    Asehoy ny valinteny

    All points in the \(xy\text{-plane}\)

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

  19. \(f(x,y)=4\ \text{ln}({y}^{2}-x)\)

    Asehoy ny valinteny

    \(x<{y}^{2}\)

  20. \(g(x,y)=\sqrt{16-4{x}^{2}-{y}^{2}}\)

  21. \(z(x,y)={y}^{2}-{x}^{2}\)

    Asehoy ny valinteny

    All real ordered pairs in the \(xy\text{-plane}\) of the form \((a,b)\)

  22. \(f(x,y)=\frac{y+2}{{x}^{2}}\)

  23. \(g(x,y)=\sqrt{16-4{x}^{2}-{y}^{2}}\)

    Asehoy ny valinteny

    \(\{z|0\le z\le 4\}\)

  24. \(V(x,y)=4{x}^{2}+{y}^{2}\)

  25. \(z={y}^{2}-{x}^{2}\)

    Asehoy ny valinteny

    The set \(ℝ\)

  26. \(z(x,y)={y}^{2}-{x}^{2},\) \(c=1\)

  27. \(z(x,y)={y}^{2}-{x}^{2},\) \(c=4\)

    Asehoy ny valinteny

    \({y}^{2}-{x}^{2}=4,\) a hyperbola

  28. \(g(x,y)={x}^{2}+{y}^{2};c=4,c=9\)

  29. \(g(x,y)=4-x-y;c=0,4\)

    Asehoy ny valinteny

    \(4=x+y,\) a line; \(x+y=0,\) line through the origin

  30. \(f(x,y)=xy;c=1;c=-1\)

  31. \(h(x,y)=2x-y;c=0,-2,2\)

    Asehoy ny valinteny

    \(\begin{array}{ll}2x-y=0, & 2x-y=-2\end{array},2x-y=2;\) three lines

  32. \(f(x,y)={x}^{2}-y;c=1,2\)

  33. \(g(x,y)=\frac{x}{x+y};c=-1,0,2\)

    Asehoy ny valinteny

    \(\frac{x}{x+y}=-1,\frac{x}{x+y}=0,\frac{x}{x+y}=2\)

  34. \(g(x,y)={x}^{3}-y;c=-1,0,2\)

  35. \(g(x,y)={e}_{}^{xy};c=\frac{1}{2},3\)

    Asehoy ny valinteny

    \(\begin{array}{ll}{e}^{xy}=\frac{1}{2}, & {e}^{xy}=3\end{array}\)

  36. \(f(x,y)={x}^{2};c=4,9\)

  37. \(f(x,y)=xy-x;c=-2,0,2\)

    Asehoy ny valinteny

    \(\begin{array}{ll}xy-x=-2, & xy-x=0,\end{array}xy-x=2\)

  38. \(h(x,y)=\text{ln}({x}^{2}+{y}^{2});c=-1,0,1\)

  39. \(g(x,y)=\text{ln}(\frac{y}{{x}^{2}});c=-2,0,2\)

    Asehoy ny valinteny

    \(\begin{array}{ll}{e}^{-2}{x}^{2}=y, & y={x}^{2},y={e}^{2}{x}^{2}\end{array}\)

  40. \(z=f(x,y)=\sqrt{{x}^{2}+{y}^{2}},\) \(c=3\)

Symbols used here

\sqrt{x},\ \sqrt[n]{x}
square root, n-th root
The non-negative number whose square (n-th power) is x.
\pi
pi
Ratio of a circle's circumference to its diameter, 3.14159…
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\frac{\partial f}{\partial x}
partial derivative
Derivative with respect to x, holding the other variables fixed.
\nabla f
gradient (nabla, del)
Vector of partial derivatives; points uphill.
\int f(x)\,dx,\ \int_a^b
integral
Antiderivative (indefinite) or signed area from a to b (definite).
\iint,\ \oint
double / contour integral
Integral over a region of the plane; integral around a closed curve.
\mathbf{v},\ \vec{v}
vector
A quantity with magnitude and direction; a column of numbers.
\mathbf{u} \cdot \mathbf{v},\ \|\mathbf{v}\|
dot product, norm
Σ u_i v_i; the length of v, √(v·v).

How to: Functions of several variables

  1. Recognize a function of two variables and identify its domain and range.
  2. Sketch a graph of a function of two variables.
  3. Sketch several traces or level curves of a function of two variables.
  4. Recognize a function of three or more variables and identify its level surfaces.
  5. This is an example of a linear function in two variables. There are no values or combinations of
  6. For the function
  7. In
  8. This function also contains the expression

Questions people ask

What is a partial derivative?

The ordinary derivative with respect to one variable while every other variable is frozen — the slope of the surface in one coordinate direction.

What does the gradient point at?

Uphill: the direction of steepest increase, with length equal to that steepest slope. It is perpendicular to the level curves.

Andramo ny anao manokana

Parts of this page are adapted from Boelkins et al., Active Calculus Multivariable (CC BY-SA 4.0), OpenStax Calculus Volume 3 (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

Mbola maro ao Multivariable Calculus