Throughout our mathematical careers we have studied functions of a single variable. We define a function of one variable as a rule that assigns exactly one output to each input. We analyze these functions by looking at their graphs, calculating limits, differentiating, integrating, and more. Functions of several variables will be the main focus of Chapters 10 and 11, where we will analyze these functions by looking at their graphs, calculating limits, differentiating, integrating, and more. We will see that many of the ideas from single variable calculus translate well to functions of several variables, but we will have to make some adjustments as well. In this chapter we introduce functions of several variables and then discuss some of the tools (vectors and vector-valued functions) that will help us understand and analyze functions of several variables.
Suppose you invest money in an account that pays 5% interest compounded continuously. If you invest dollars in the account, the amount of money in the account after years is given by
The variables and are independent of each other, so using functional notation we write
Find the amount of money in the account after 7 years if you originally invest 1000 dollars.
Evaluate . Explain in words 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 years as indicated in Table 1.1.1. Round payments to the nearest penny.
Table1.1.1.Amount of money in an account with an initial investment of 1000 dollars.
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 Table 1.1.2. Round payments to the nearest penny.
Table1.1.2.Amount of money in an account after 10 years.
Initial investment (dollars)
500
1000
5000
7500
10000
Amount (dollars)
Describe as best you can the combinations of initial investments and time that result in an account containing $10,000.
Up to this point we have been concerned with functions of a single variable. What defined such a function is that every input in the domain produced a unique output in the range. We saw similar behavior in Preview Activity 1.1.1, where each pair of inputs produces a unique output . Additionally, the two variables and had no real relation to each other. That is, we could choose any value of without considering what value might have, and we could select any value of to use without regard to what value might have. For that reason we say that the variables and are independent of each other. Thus, we call a function of the two independent variables and . This is the key idea in defining a function of two independent variables.
defines as a function of the three variables ,, and . In general, a function of independent variables is a rule that assigns to an ordered -tuple in some set exactly one real number.
Functions of two variables might model elevation on a map (the elevation at a point might be the value ) or quantities like temperature or charge from physics.
For the most part, we will focus on functions of two or three variables. But it is important to recognize that functions of many more variables are important!
For example, a typical photo taken on a modern smartphone might be roughly pixels, each of which can be thought of as a real number. That’s 12 million pixels in total. Let’s suppose that you are tasked with building a machine learning model that will take as input a 12-million-pixel picture and return a number between 0 and 1 indicating how confident the model is that the picture is a picture of a cat. This model is a function of 12 million variables!
The function is defined as long as the inside of the square-root is nonnegative, so we simply solve the inequality to get . The solution set of this inequality is the set of points in the plane that lie on or below the line .
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 will have to allow us to keep track of both input variables. We can do this with a 2-dimensional table, where we list the -values down the first column and the -values across the first row. As an example, suppose we launch a projectile, using a golf club, a cannon, or some other device, from ground level. Under ideal conditions (ignoring wind resistance, spin, or any other forces except the force of gravity) the horizontal distance the object will travel depends on the initial velocity the object is given, and the angle at which it is launched. If we let represent the horizontal distance the object travels, then is a function of the two variables and , and we represent in functional notation by
where is the acceleration due to gravity. (Note that is constant, 32 feet per second squared. We will derive this equation in a later section.) To create a table of values for , we list the -values down the first column and the -values across the first row. The value is then displayed in the location where the row intersects the column, as shown in Table 1.1.5 (where we measure in feet per second and in radians).
If is a function of a single variable , then we define the graph of to be the set of points of the form , where is in the domain of . We then plot these points using the coordinate axes in order to visualize the graph. We can do a similar thing with functions of several variables. Table 1.1.5 identifies points of the form , and we define the graph of to be the set of these points.
We also often refer to the graph of a function of two variables as the surface generated by . Points in the form are in three dimensions, so plotting these points takes a bit more work than graphs of functions in two dimensions. To plot these three-dimensional points, we need to set up a coordinate system with three mutually perpendicular axes — the -axis, the -axis, and the -axis (called the coordinate axes). There are essentially two different ways we could set up a 3D coordinate system, as shown in Figure 1.1.6; thus, before we can proceed, we need to establish a convention.
The distinction between these two figures is subtle, but important. In the coordinate system shown at left in Figure 1.1.6, imagine that you are sitting on the positive -axis next to the label “.” Looking down at the - and -axes, you see that the -axis is obtained by rotating the -axis by 90 in the clockwise direction. Again sitting on the positive -axis in the coordinate system at right in Figure 1.1.6, you see that the -axis is obtained by rotating the -axis by 90 in the counterclockwise direction.
We call the coordinate system at right in Figure 1.1.6 a right-hand system; if we point the index finger of our right hand along the positive -axis and our middle finger along the positive -axis, then our thumb points in the direction of the positive -axis. Following mathematical conventions, we choose to use a right-hand system throughout this book.
Now that we have established a convention for a right-hand system, we can draw a graph of the distance function defined by . Note that the function is continuous in both variables, so when we plot these points in the right hand coordinate system, we can connect them all to form a surface in 3-space. The graph of the distance function is shown in Figure 1.1.8.
There are many graphing tools available for drawing three-dimensional surfaces as indicated in the Preface (see Links to interactive graphics in Features of the Text). Since we will be able to visualize graphs of functions of two independent variables, but not functions of more than two variables, we will primarily deal with functions of two variables in this text. It is important to note, however, that the techniques we develop apply to functions of any number of variables.
Notation: We let denote the set of all ordered pairs of real numbers in the plane (two copies of the real number system) and let represent the set of all ordered triples of real numbers (which constitutes three-space).
In addition to graphing functions, we will also want to understand graphs of some simple equations in three dimensions. For example, in , the graphs of the equations and , where and are constants, are lines parallel to the coordinate axes. In the next activity we consider their three-dimensional analogues.
Activity 1.1.5 shows that the equations where one independent variable is constant lead to planes parallel to ones that result from a pair of the coordinate axes. When we make the constant 0, we get the coordinate planes. The -plane satisfies , the -plane satisfies , and the -plane satisfies (see Figure 1.1.9).
On a related note, we define a circle in as the set of all points equidistant from a fixed point. In , we call the set of all points equidistant from a fixed point a sphere. To find the equation of a sphere, we need to understand how to calculate the distance between two points in three-space, and we explore this idea in the next activity.
Let and be two points in . These two points form opposite vertices of a rectangular box whose sides are planes parallel to the coordinate planes as illustrated in Figure 1.1.10, and the distance between and is the length of the blue diagonal shown in Figure 1.1.10.
Consider the right triangle in the base of the box whose hypotenuse is shown as the red line in Figure 1.1.10. What are the coordinates of the vertices of this triangle? We can use the Pythagorean Theorem to find a formula for the length of the hypotenuse of this right triangle. Find such a formula, which will be in terms of ,,, and .
Now notice that the triangle whose hypotenuse is the blue segment connecting the points and with a leg as the hypotenuse of the triangle found in part (a) lies entirely in a plane, so we can again use the Pythagorean Theorem to find the length of its hypotenuse. Explain why the length of this hypotenuse, which is the distance between the points and , is
Answer.
and are the two points that aren’t given. The legs of the right triangle are , which has length , and , which has length . The hypotenuse therefore has length .
Applying the Pythagorean Theorem to the triangle gives . Noting that has length , we can plug in for (found in the previous part) to solve for and obvain the formula given.
Equation (1.1.1) can be used to derive the formula for a sphere centered at a point with radius . Since the distance from any point on such a sphere to the point is , the point will satisfy the equation
Find a formula for the sphere of radius centered at the point .
Can you give a formula describing the interior of the sphere in Item a?
Solution.
A point is in the interior of the sphere of radius centered at if the distance from to is less than . Using The Distance Formula to convert this into symbols, we get ; squaring both sides gives
When we study functions of several variables we are often interested in how each individual variable affects the function in and of itself. In Preview Activity 1.1.1, 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 set the duration of the investment constant, 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.
where is the initial velocity of an object in feet per second, is the launch angle in radians, and is the acceleration due to gravity (32 feet per second squared). If we hold the launch angle constant at radians, we can consider a function of the initial velocity alone. In this case we have
We can plot this curve on the surface by tracing out the points on the surface when , as shown at left in Figure 1.1.14. The formula clearly shows that is quadratic in the -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.
Similarly, if we fix the initial velocity at 150 feet per second, we can consider the distance as a function of the launch angle only. In this case we have
We can again plot this curve on the surface by tracing out the points on the surface when , as shown at right in Figure 1.1.14. The formula clearly show that is sinusoidal in the -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.
A trace of a function of two independent variables and in the direction is a curve of the form , where is a constant. Similarly, a trace of a function of two independent variables and in the direction is a curve of the form , where is a constant.
Understanding trends in the behavior of functions of two variables can be challenging, as can sketching their graphs; traces help us with each of these tasks.
Which of the following graphs depicts which function, and why?
a picture of an upward-facing cone
an upward-facing paraboloid
Hint.
Look at the traces. For a fixed -value , we see that the -trace of is given by , an equation for a parabola with vertex . So, for example, gives the parabola .
On the other hand, the -trace of at is described by the equation .
In the following questions, we investigate the use of traces to better understand a function through both tables and graphs.
Identify the trace for the distance function defined by by highlighting or circling the appropriate cells in Table 1.1.5. Write a sentence to describe the behavior of the function along this trace.
Identify the trace for the distance function by highlighting or circling the appropriate cells in Table 1.1.5. Write a sentence to describe the behavior of the function along this trace.
Figure1.1.17.Coordinate axes to sketch traces.
For the function defined by , explain the type of function that each trace in the direction will be (keeping constant). Plot the ,,,, and traces in 3-dimensional coordinate system provided in Figure 1.1.17.
For the function defined by , explain the type of function that each trace in the direction will be (keeping constant). Plot the ,,,, and traces in 3-dimensional coordinate system in Figure 1.1.17.
We have all seen topographic maps such as the one of the Porcupine Mountains in the upper peninsula of Michigan shown in Figure 1.1.18. 2
Map source: Michigan Department of Natural Resources, with permission of the Michigan DNR and Bob Wild.
The curves on these maps show the regions of constant altitude. The contours also depict changes in altitude: contours that are close together signify steep ascents or descents, while contours that are far apart indicate only slight changes in elevation. Thus, contour maps tell us a lot about three-dimensional surfaces. Mathematically, if represents the altitude at the point , then each contour is the graph of an equation of the form , for some constant .
Topographical maps can be used to create a three-dimensional surface from the two-dimensional contours or level curves. For example, level curves of the distance function defined by plotted in the -plane are shown at left in Figure 1.1.20. If we lift these contours and plot them at their respective heights, then we get a picture of the surface itself, as illustrated at right in Figure 1.1.20.
Let . Draw the level curves for ,,, and on the left set of axes given in Figure 1.1.21. (You decide on the scale of the axes.) Explain what the surface defined by looks like.
Let . Draw the level curves for ,,, and on the right set of axes given in Figure 1.1.21. (You decide on the scale of the axes.) Explain what the surface defined by looks like.
Compare and contrast the graphs of and . How are they alike? How are they different? Use traces for each function to help answer these questions.
The traces and level curves of a function of two variables are curves in space. In order to understand these traces and level curves better, we will first spend some time learning about vectors and vector-valued functions in the next few sections and return to our study of functions of several variables once we have those more mathematical tools to support their study.
A function of several variables is a rule that assigns a unique number to an ordered collection of independent inputs. The domain of a function of several variables is the set of all inputs for which the function is defined.
In , the distance between points and (denoted as ) is given by the formula
and thus the equation of a sphere with center and radius is
A trace of a function of two independent variables and is a curve of the form or , where is a constant. A trace tells us how the function depends on a single independent variable if we treat the other independent variable as a constant.
A level curve of a function of two independent variables and is a curve of the form , where is a constant. A level curve describes the set of inputs that lead to a specific output of the function.
Match the surfaces with the verbal description of the level curves by placing the letter of the verbal description to the left of the number of the surface.
For each surface, decide whether it could be a bowl, a plate, or neither. Consider a plate to be any fairly flat surface and a bowl to be anything that could hold water, assuming the positive z-axis is up.
Consider the concentration, C, (in mg/liter) of a drug in the blood as a function of the amount of drug given, x, and the time since injection, t. For mg and hours, we have
A manufacturer sells aardvark masks at a price of $140 per mask and butterfly masks at a price of $570 per mask. A quantity of a aardvark masks and b butterfly masks is sold at a total cost of $600 to the manufacturer.
Consider the concentration, , in mg per liter (L), of a drug in the blood as a function of , the amount, in mg, of the drug given and , the time in hours since the injection. For and , we have .
Graph the following two single variable functions on a separate page, being sure that you can explain their significance in terms of drug concentration.
The Ideal Gas Law, , relates the pressure (, in pascals), temperature (, in Kelvin), and volume (, in cubic meters) of 1 mole of a gas (J mol K is the universal gas constant), and describes the behavior of gases that do not liquefy easily, such as oxygen and hydrogen. We can solve the ideal gas law for the volume and hence treat the volume as a function of the pressure and temperature:
Explain in detail what the trace of with tells us about a key relationship between two quantities.
Explain in detail what the trace of with tells us.
Explain in detail what the level curve tells us.
Use 2 or three additional traces in each direction to make a rough sketch of the surface over the domain of where and are each nonnegative. Write at least one sentence that describes the way the surface looks.
Based on all your work above, write a couple of sentences that describe the effects that temperature and pressure have on volume.
When people buy a large ticket item like a car or a house, they often take out a loan to make the purchase. The loan is paid back in monthly installments until the entire amount of the loan, plus interest, is paid. The monthly payment that the borrower has to make depends on the amount of money borrowed (called the principal), the duration of the loan in years, and the interest rate . For example, if we borrow $18,000 to buy a car, the monthly payment that we need to make to pay off the loan is given by the formula
Find the monthly payments on this loan if the interest rate is 6% and the duration of the loan is 5 years.
Create a table of values that illustrates the trace of with fixed at 5%. Use yearly values of from 2 to 6. Round payments to the nearest penny. Explain in detail in words what this trace tells us about .
Create a table of values that illustrates the trace of with fixed at 3 years. Use rates from 3% to 11% in increments of 2%. Round payments to the nearest penny. Explain in detail what this trace tells us about .
Consider the combinations of interest rates and durations of loans that result in a monthly payment of $200. Solve the equation for to write the duration of the loan in terms of the interest rate. Graph this level curve and explain as best you can the relationship between and .
What is the domain of ? (Hint: describe a set of ordered pairs in the plane by explaining their relationship relative to a key circle.)
The range of a function is the set of all outputs the function generates. Given that the range of the square root function is the set of all nonnegative real numbers, what do you think is the range of ? Why?
Choose 4 different values from the range of and plot the corresponding level curves in the plane. What is the shape of a typical level curve?
Choose 5 different values of (including at least one negative value and zero), and sketch the corresponding traces of the function .
Choose 5 different values of (including at least one negative value and zero), and sketch the corresponding traces of the function .
Sketch an overall picture of the surface generated by and write at least one sentence to describe how the surface appears visually. Does the surface remind you of a familiar physical structure in nature?