8. Functions of Several Variables 8.1: Functions of Several Variables A function of two variables is a rule that associates to each ordered pair (x, y) in some set D a unique number denoted by f (x, y). The set D is called the domain of f and the range is the set of all values that f takes on. To make explicit the value taken on by f at the point (x, y), we often write z = f (x, y). The variables x and y are called the independent variables, and z is the dependent variable. If a function f is given by a formula and no domain is specified, then the domain of f is understood to be the set of all pairs (x, y) for which f (x, y) is well-defined. Evaluating Functions of Two Variables √ x2 + 3zy 2 + ( 3 x)y + y 3 Example 1. Given g(x, y, z) = . Find ex a) g(0,1,1) b) g(1,0,1) c) g(1,1,0) d) g(-1,2,1) 1 Finding the Domain of Functions of Two Variables Example 2. Find the domain of each of the following functions. p a) f (x, y) = x2 − 4xy + 4y 2 b) h(x, y) = x4 9 + y4 c) u(x, y) = ln(y − x − 5) d) v(x, y, z) = x3 + yz − e) h(x, y, z) = ex √ z3 2 yz x + 2y f ) f (x, y, z) = √ xz 2 2 A Cobb-Douglas production function describes the number of units f (L, K) produced from the utilization of L units of labor and K units of capital investment and has the form f (L, K) = ALb K c where A, b, and c are positive constants. These functions are used to describe the productivity of a single industry, of a group of industries producing the same product, or even of an entire country! Example 3. The Cobb-Douglas production function for an olive oil company is given by f (L, K) = 20L0.3 K 0.7 where L is the utilization of labor and K is the utilization of captial. If the company uses 1,500 units of labor and 2,000 units of capital, how many units of olive oil will be produced? Example 4. Suppose a company sells two types of milk bottles: soymilk and almondmilk. Let x be the number of soymilk bottles sold per day and y be the number of almondmilk bottles sold per day. The price per bottle is given by p = 10 − x + 2y for the soymilk bottles and q = 14 + 2x − y for the almondmilk bottles. a) Find the revenue function for the company. b) Suppose the cost function for the company is given to be C(x, y) = 25 + 3x + 7y. Find the profit function. c) Find the profit or loss of selling 20 soymilk bottles and 15 almondmilk bottles. 3 Given f a function of two variables with domain D, the graph of f is the set of points (x, y, z) in the three-dimensional coordinate system such that z = f (x, y) when (x, y) is in D. The graph of any function of the form z = f (x, y) is called a surface. Example 5. Graph a plane x + 2y + 3z = 6. Example 6. The graph of the function h(x, y) = 4x2 + y 2 is given as below. 4 Another method for visualizing functions of two variables, borrowed from mapmakers, is a contour map on which points of constant elevation are joined to form contour curves, or level curves. The level curve of a function f of two variables are the curves with equations f (x, y) = k, where k is a constant in the range of f . A level curve shows where the graph of f has height k. If you draw the level curves of a function and visualize them being lifted up to the surface at the indicated height, then you can mentally piece together a picture of the graph. The surface is steep where the level curves are close together. It is somewhat flatter where they are farther apart. One common example of level curves occurs in topographic maps of mountain regions. The level curves are curves of constant elevation above sea level. If you walk along one of these contour lines you neither ascend nor descend. Another common example are the isothermals which join locations with the same temperature. The isothermals are the curves that separate the colored bands of a weather map. x2 Example 7. Sketch some of the level curves for f (x, y) = 2 + y 2 . 2 We can have function of any number of variables. For example, V = f (x, y, z) is a function of three variables. We cannot visualize a function f of three variables by its graph, since that would lie in four-dimensional space. Its level surfaces are the surfaces with equations f (x, y, z) = k, where k is a constant. 5 8.2. Partial Derivatives First-Order Partial Derivatives Given z = f (x, y), we define the first-order partial derivatives of f with respect to x and y, respectively: ∂f = fx (x, y) = fx (here y a constant) ∂x ∂f = fy (x, y) = fy (here x a constant) ∂y Example 8. Given f (x, y) = x2 y 4 . Find fy (−2, 2). 3 Example 9. Given f (x, y) = ye−x − x. Find ∂f (0, 1). ∂y Geometric Interpretation: The equation z = f (x, y) represents a surface S. If f (a, b) = c, then the point (a, b, c) lies on S. The partial derivatives fx (a, b) and fy (a, b) can be interpreted as the slopes of the tangent lines at (a, b, c). ∂z Partial derivatives can also be interpreted as rates of change. If z = f (x, y), then represents the ∂x ∂z rate of change of z with respect to x when y is fixed. Similarly, represents the rate of change of z ∂y with respect to y when z is fixed. 6 Example 10. Find all first-order partial derivatives of the folowing functions. a) f (x, y) = (x5 y 7 + y 3 )3 b) h(s, t) = s2 + 9t 4s7 + st c) u(x, y) = exy−x 3 7 d) g(u, v) = ln(3u4 v 2 + u − uv) e) f (s, t) = √ 2 st + s3 Partial derivatives can also be defined for functions of three or more variables by regarding all other variables as constants and differentiating with respect to x (for example). Example 11. Find al three partial derivatives of the following functions. a) f (u, v, w) = uvw5 − u2 v + w 8 b) h(x, y, z) = exyz+ln(x 2 y) 9 Example 12. The producing of a country is given approximately by the function f (l, K) = 15L0.8 K 0.2 with the utilization of L unit of labor and K units of capital. a) Find fL (L, K) and fK (L, K). b) If the country is now using 700 units of labor and 100 units of capital, find the marginal productivity of labor and the marginal productivity of capital. c) For the greatest increase in the country’s productivity, should the government encourage increased use of labor or increased use of capital? 10 Second-Order Partial Derivatives Given z = f (x, y), there are four second-order partial derivatives. ∂ 2f ∂ = ∂x2 ∂x ∂ 2f ∂ = 2 ∂y ∂y ∂f ∂x = fxx (x, y) = fxx ∂f = fyy (x, y) = fyy ∂y ∂ 2f ∂ ∂f = = fyx (x, y) = fyx ∂x∂y ∂x ∂y ∂ 2f ∂ ∂f = = fxy (x, y) = fxy ∂y∂x ∂y ∂x Note: In subscript notation, differentiate from left to right. Example 13. Find all second-order partial derivatives of the following functions. 3 a) f (x, y) = x2 y 2 + 2xy 4 11 b) g(s, t) = s3 + t t4 12