Applied Mathematics II Chapter-3: Differential Calculus of Functions of Variables Nigussie Chanie Admassu nigussieadm@gmail.com February 22, 2023 Bahir Dar Institute of Technology 1 Chapter 3: Differential Calculus of Functions of Variables 3.1 Functions of Several Variables 3.2 Limits and Continuity 3.3 Partial Derivatives 3.4 The Chain Rule 3.5 Directional Derivatives and the Gradient Vector 3.6 Maximum and Minimum Values 3.7 Lagrange Multipliers 3.1 Functions of Several Variables 2 3.1 Functions of Several Variables Definition-3.1: • A function f of two variables, x and y, is a rule that assigns a unique real number z = f (x, y) to each point (x, y) in some set D in the xy-plane. Example-3.1: f (x, y) = x2 − 2xy + y 2 − 4 is a function of two variables. 3 • A function f of three variables, x, y, and z, is a rule that assigns a unique real number w = f (x, y, z) to each point (x, y, z) in some set D in three-dimensional space. Example-3.2: f (x, y, z) = xeyz is a function of three variables. • A function f of n variables, x1 , · · · , xn is a rule that assigns a unique real number w = f (x1 , · · · , xn ) to each "point" (x1 , · · · , xn ) in some set D in n-dimensional space. • In both cases, D is the domain of f. 4 To find the domain D of f , consider the following: • expressions in the denominator must be non-zero. • expressions in the nth root if n is even must be non-negative. • expressionsin the logarithms must be positive. Example-3.3: 2 ) Find the domain of f (x, y) = √ln(y−x 2 2 4−x −y Solution y − x2 > 0 ∧ 4 − x2 − y 2 > 0 ⇒ Domain of f = {(x, y)| y > x2 ∧ x2 + y 2 < 4}. 5 Graph, Level Curve, Surface Definition-3.2: i) The set of points (x, y, f (x, y) ) in space, for (x, y) in the domain of f , is called the graph of f. • The graph of a function z=(x,y) of two variables is called a surface. ii) Given a function f(x,y) and a number k in the range of f,a level curve of a function of two variables for the value k is defined to be the set of points satisfying the equation f(x,y)=k. • A level curve can be described as the intersection of the horizontal plane z = k with the surface defined by f. • Level curves are also known as contour lines. iii) For a function w=f(x,y,z), the level surface of value k is the surface S in R3 on which f(x,y,z)=k. • Level surface are basically the same as level curves in principle, except that the domain of f (x, y, z) is in 3D-space. • Therefore, the set f (x, y, z) = k describes a surface in 3D-space rather than a curve in 2D-space. 6 Example-3.4: p Describe the level curves of the function. f (x) = x2 + y 2 . Solution • A level curve is the graph of the equation x2 + y 2 = k 2 , k ≥ 0, which describes a circle with radius k. • Taking different values of k, we obtain k = 1, x2 + y 2 = 1 k = 2, x2 + y 2 = 4 k = 3, x2 + y 2 = 9 k = 4, x2 + y 2 = 16 7 Quadratic Surfaces: A quadratic surface is a surface given by the general second-degree equation: Ax2 + By 2 + Cz 2 + Dxy + Exz + F yz + Gx + Hy + Iz + J = 0, where A, B, · · · , J are all constants. 1. Ellipsoids are closed, bounded quadratic surfaces defined by the equation x2 y2 z2 + + = 1. a2 b2 c2 When a = b = c, the ellipsoid is a sphere. 8 2. Paraboloid: Quadratic surfaces with equation x2 y2 + 2 = z, are 2 a b elliptic paraboloids and x2 y2 − 2 = z, are 2 a b hyperbolic paraboloid. 3. Cone: Quadratic surfaces of x2 y2 z2 the form 2 + 2 = 2 a b c are elliptic cones. 9 4. Cylinders: −Elliptic Cylinder : −P arabolic Cylinder : −Hyperbolic Clinder : x2 y2 + 2 =1 2 a b y = ax2 x2 y2 − =1 a2 b2 10 3.2 Limits and Continuity 3.2 Limits and Continuity • We say that a function f (x, y) approaches the limit L as (x, y) approaches (a, b) and write lim f (x, y) = L. (a,b) 11 Properties of Limits of Functions of Two Variables: Let lim f (x, y) = L and lim g(x, y) = M. Then (x,y)→(a,b) 1. 2. 3. 4. 5. lim (x,y)→(a,b) (f (x, y) + g(x, y)) = L + M (x,y)→(a,b) lim (f (x, y)g(x, y)) = LM (x,y)→(a,b) lim (x,y)→(a,b) lim (x,y)→(a,b) lim f (x, y) L = , M 6= 0 g(x, y) M kf (x, y) = kL, k=constant. (f (x, y))k = Lk , k=constant. (x,y)→(a,b) Example-3.5: Evaluate the limit of: 2 x + y3 a) lim cos x+y+1 (x,y)→(0,0) x e sin y c) lim y (x,y)→(0,0) cos y + 2 y − sin x x2 − xy √ d) lim √ . x− y (x,y)→(0,0) b) lim (x,y)→(π/2,0) 12 Solution a) lim cos (x,y)→(0,0) x2 + y 3 x+y+1 x2 + y 3 = cos lim (x,y)→(0,0) x + y + 1 = cos 0 = 1 b) lim (x,y)→(π/2,0) lim(x,y)→(π/2,0) (cos y + 2) cos y + 2 3 = = y − sin x lim(x,y)→(π/2,0) (y − sin x) −1 = −3 c) sin y ex sin y = lim ex lim =1 y (x,y)→(0,0) (x,y)→(0,0) (x,y)→(0,0) y lim √ √ x(x − y)( x + y) x2 − xy √ √ d) lim lim √ = √ √ √ x − y (x,y)→(0,0) ( x − y)( x + y) (x,y)→(0,0) √ √ x(x − y)( x + y) = lim x−x (x,y)→(0,0) √ √ = lim x( x + y) = 0 (x,y)→(0,0) 13 Two-Path Test for Nonexistence of a Limit: • If a function f (x, y) has different limits along two different paths as (x, y) approaches (x0 , y0 ), then lim f (x, y) does not exist. (x0 ,y0 ) Example-3.6: Evaluate the limit: Solution Let f (x, y) = lim x3 y + y2 (x,y)→(0,0) x6 x3 y x6 +y 2 . Then 0 = 0, f or x 6= 0. x6 T heref ore, f (x, y) → 0 as (x, y) → (0, 0) along the x − axis. If y = 0, then f (x, 0) = 14 N ow, we approach (0, 0) along the curve : y = x3 , f or x 6= 0. 1 x6 = , x 6= 0 2 3 + (x ) 2 1 as (x, y) → (0, 0) along the graph of y = x3 . T herf ore, f (x, y) → 2 Since we have obtained different limits along different paths, the given limit does not exist. f (x, x3 ) = x6 Evaluating limit using polar coordinates: • If lim (x,y)→(0,0)f (x,y) exists, then we can evaluate the limit by converting in to polar coordinates. • x = r cos θ, y = r sin θ and r= p 2 2 • If (x, y) → (0, 0) then r = x + y → 0+ . • lim (x,y)→(0,0) f (x, y) = lim (x,y)→(0,0) p x2 + y 2 . = lim+ f (r cos θ, r sin θ) r→0 15 Example-3.7 Evaluate the limit: sin(x2 + y 2 ) x2 + y 2 (x,y)→(0,0) lim Solution sin(x2 + y 2 ) sin r2 2r cos r2 = lim+ cos r2 = 1. = lim+ = lim+ 2 2 2 r→0 r→0 r→0 x +y r 2r (x,y)→(0,0) lim Exercise: Find the limit, if it exists, or show that the limit does not exist.. a) x4 − y 4 (x,y)→(0,0) x2 + y 2 b) c) x2 sin2 y (x,y)→(0,0) x2 + 2y 2 d) lim lim x2 + sin2 y (x,y)→(0,0) 2x2 + y 2 lim lim (x,y)→(0,0) x2 + y 2 p x2 + y 2 + 1 − 1 16 Continuity: Definition-3.3: A function f of two variables is called continuous at (x0 , y0 ) if lim (x,y)→(x0 ,y0 ) f (x, y) = f (x0 , y0 ). We say f is continuous on D (x0 , y0 ) in D. (1) if f is continuous at every point • all polynomial functions of two variables are continuous on R2 . • any rational function is continuous on its domain because it is a quotient of continuous functions. 17 Example-3.8: Determinethe set of points at which the function xy , (x, y) 6= (0, 0) x2 + xy + y 2 f (x, y) = is continuous. 0, (x, y) = (0, 0) Solution • Domain of f (x, y) = R2 . • f (0, 0) = 0. xy does not exist. + xy + y 2 (x,y)→(0,0) • Therefore f is not continuous at (0, 0) and • lim f (x, y) = lim (x,y)→(0,0) x2 f is continuous on R2 except at the origin (0, 0). 18 3.3 Partial Derivatives 3.3 Partial Derivatives Definition-3.4: If f is a function of two variables, its partial derivatives fx and fy are the functions and defined by f (x + h, y) − f (x, y) h→0 h f (x, y + h) − f (x, y) fy (x, y) = lim h→0 h fx (x, y) = lim Notations For Partial Derivatives: If z = f (x, y), we write ∂f ∂ = f (x, y) = ∂x ∂x ∂ ∂f fy (x, y) = fy = = f (x, y) = ∂y ∂y fx (x, y) = fx = ∂z = Dx f ∂x ∂z = Dy f ∂y 19 Rule for Finding Partial Derivatives of z = f (x, y): 1. To find fx , regard y as a constant and differentiate f (x, y) with respect to x. 2. To find fy , regard x as a constant and differentiate f (x, y) with respect to y. Example-3.9: Find fx (1, 2) and fy (1, 2) if f (x, y) = x2 + x3 y 2 − 3y + 5. Solution Holding y constant and differentiating with respect to x, we get fx = 2x + 3x2 y 2 and so fx (1, 2) = 2(1) + 3(1)2 (2)2 = 14. Holding x constant and differentiating with respect to y, we get fy (x, y) = 2x3 y − 3 fy (1, 2) = 2(1)3 (2) − 3 = 4 − 3 = 1. 20 • Partial derivatives can be interpreted as rates of change. If z = (x, y), then ∂z represents the rate of change of z with respect to x when y is ∂x fixed. ∂z • represents the rate of change of z with respect to y when x is ∂y fixed. • Rules of Partial Derivatives: 1. Sum Rule: (f + g)x = fx + gx and (f + g)y = fy + gy 2. Product Rule: (f g)x = fx g + f gx and (f g)y = fy g + f gy fx g − f gx f fy g − f gy f = and = 3. Quotient Rule: g x g2 g y g2 4. Chain Rule: (h ◦ f )x (x, y) = h0 (f (x, y))fx (x, y) and (h ◦ f )y (x, y) = h0 (f (x, y))fy (x, y) 21 Example-3.10: Find fx and fy if f (x, y) = sin xy x−y . Solution xy xy y(x − y) − (xy)(1) = cos x−y x x−y (x − y)2 y2 xy =− . cos (x − y)2 x−y xy xy x(x − y) − (xy)(−1) xy = cos fy (x, y) = cos x−y x−y y x−y (x − y)2 x2 xy = cos . 2 (x − y) x−y fx (x, y) = cos xy x−y 22 Higher Derivatives: • If f is a function of two variables, then its partial derivatives fx and fy are also functions of two variables, so we can consider their partial derivatives (fx )x , (fx )y , (fy )x and (fy )y which are called the second partial derivatives of f. • If z = f (x, y), we use the following notation: ∂ ∂f ∂2f ∂2z (fx )x = fxx = = = = zxx , ∂x ∂x ∂x2 ∂x2 ∂2f ∂2z ∂ ∂f = = = zxy , (fx )y = fxy = ∂y ∂x ∂y∂x ∂y∂x ∂2z ∂ ∂f ∂2f = = zyx , (fy )x = fyx = = ∂x ∂y ∂x∂y ∂x∂y ∂ ∂f ∂2f ∂2z (fy )y = fyy = = = = zyy . 2 ∂y ∂y ∂y ∂y 2 23 Theorem Suppose f is defined on a disk D that contains the point (x0 , y0 ). If the functions fxy and fyx are both continuous on D, then fxy (x0 , y0 ) = fyx (x0 , y0 ) Example-3.11 Find fxyy and fxyz if f (x, y, z) = x ln xy 2 z 3 . Solution fx = ln xy 2 z 3 + 1, fxyy = − 2 , y2 fxy = 2 y fxyz = 0 24 3.4 The Chain Rule 3.4 The Chain Rule 1) If y = f (x) and x = g(t), where f and g are differentiable functions, then y is indirectly a differentiable function of t and dy dy dx = . dt dx dt 2) The Chain Rule Case - 1: Suppose that z = f (x, y) is a differentiable function of x and y, where x = g(t) and y = h(t) are both differentiable functions of t. Then z is a differentiable function of t and dz ∂z dx dz dy = + dt ∂x dt ∂y dt (2) 25 Example-3.12: The radius of a right circular cone is increasing at a rate of 3 m/s while its height is decreasing at a rate of 1.5 m/s. At what rate is the volume of the cone changing when the radius is 1m and the height is 2m. Solution V = 1 2 πr h. 3 dr dh = 3m/s, = −1.5m/s, r = 1m, h = 2m. dt dt dV ∂V dr dV dh = + . dt ∂r dt ∂h dt 2π dr π 2 dh π = rh + r = 2(1)(2)(3m/s) + (1)2 (−1.5m/s) 3 dt 3 dt 3 = 3.5 π m/s. 26 3) The Chain Rule Case - 2: Suppose that z = f (x, y) is a differentiable function of x and y, where x = g(u, v) and y = h(u, v) are both differentiable functions of u and u. Then ∂z ∂x ∂z ∂y ∂z = + ∂u ∂x ∂u ∂y ∂u ∂z ∂z ∂x ∂z ∂y = + ∂v ∂x ∂v ∂y ∂v (3) (4) 27 Example-3.13: Suppose f is a differentiable function of x and y and g(u, v) = f (eu + sin v, eu + cos v). If fx (1, 2) = 2 and fy (1, 2) = 5, then calculate gu (0, 0) and gv (0, 0). Solution x = eu + sin v, xu = eu , xu (0, 0) = 1, y = eu + cos v. xv = cos v, xv (0, 0) = 1, yu = eu , yu (0, 0) = 1, yv = − sin v. yv (0, 0) = 0. gu (0, 0) = fx (1, 2)xu (0, 0) + fy (1, 2)yu (0, 0) = (2)(1) + (8)(1) = 10. gv (0, 0) = fx (1, 2)xv (0, 0) + fy (1, 2)yv (0, 0) = (2)(1) + (8)(0) = 2. 28 4) Implicit Differentiation: • The Chain Rule can be used to give a more complete description of the process of implicit differentiation. • We suppose that an equation of the form F (x, y) = 0 defines y implicitly as a differentiable function of x, that is,y = f (x), where F (x, f (x)) = 0 for all x in the domain of f. • If F is differentiable, we can apply Case 1 of the Chain Rule to differentiate both sides of the equation F (x, f (x)) = 0 with respect to x. Since both x and y are functions of x, we obtain ∂F dy ∂F dx + = 0. ∂x dx ∂y dx • But dx ∂F dy = 1, so if 6= 0 we solve for and obtain dx ∂y dx Fx dy =− . dx Fy (5) 29 • Now we suppose that z is given implicitly as a function z = f (x, y) by an equation of the form F (x, y, z) = 0. This means that F (x, y, f (x, y)) = 0 for all (x, y) in the domain of . If F and f are differentiable, then we can use the Chain Rule to differentiate the equation F (x, y, z) = 0 as follows: ∂F ∂x ∂F ∂y ∂F ∂z + + =0 ∂x ∂x ∂y ∂x ∂z ∂x • But, • If ∂x =1 ∂x and ∂y = 0, so this equation becomes ∂x ∂F ∂F ∂z + =0 ∂x ∂z ∂x ∂F ∂z 6= 0, we solve for and obtain ∂z ∂x ∂z Fx =− ∂x Fz (6) 30 • If ∂F 6= 0, then ∂z Fy ∂z =− ∂y Fz Example-3.14: ∂z ∂z Find and ∂x (1,0,2) ∂y (7) 2 if x2 y 3 + z 2 y 5 = yex + z 3 − 2 (0,−1,2) Solution Let 2 F (x, y, z) =x2 y 3 + z 2 y 5 − yex − z 3 + 2. T hen 2 2 Fx = 2xy 3 − 2xyex , Fy = 3x2 y 2 + 5z 2 y 4 − ex , Fz = 2zy 5 − 3z 2 Fx (0, −1, 2) = 0, ∂z ∂x =− (1,0,2) Fy (0, −1, 2) = 19, ∂z Fx (0, −1, 2) = 0, and Fz (0, −1, 2) ∂y Fz (0, −1, 2) = −16. =− (0,−1,2) 19 Fy (0, −1, 2) = Fz (0, −1, 2) 16 31 3.5 Directional Derivatives and the Gradient Vector 3.5 Directional Derivatives and the Gradient Vector The Gradient Vector: 1. If f is a function of two variables x and y, then the gradient of f is the vector function ∇f defined by ∇f (x, y) = hfx (x, y), fy (x, y)i = ∂f ∂f i+ j ∂x ∂y (8) 2. For a function of three variables, the gradient vector, denoted by ∇f or grad f , is ∇f (x, y, z) = hfx (x, y, z), fy (x, y, z), fz (x, y, z)i ∂f ∂f ∂f = i+ j+ k ∂x ∂y ∂z (9) (10) 32 Directional Derivatives: The directional derivative of f at (x0 , y0 ) in the direction of a unit vector ~u = hu1 , u2 i is f (x0 + hu1 , y0 + hu2 ) − f (x0 , y0 ) h→0 h D~u f (x0 , y0 ) = lim if this limit exists. • We see that if ~u = ~i = h1, 0i , then D~i f = lim h→0 f (x + h · 1, y + h · 0) − f (x, y) f (x + h, y) − f (x, y) = lim h→0 h h = fx . • If ~u = ~j = h0, 1i , then Dj f = fy . 33 Theorem 1. If f is a differentiable function of x and y, then f has a directional derivative in the direction of any unit vector ~u = hu1 , u2 i and Du f (x, y) = fx (x, y)u1 + fy (x, y)u2 = hfx , fy i · hu1 , u2 i = ∇f · u. = ||∇f || cos θ, where θ is the angle between the vectors ∇f and u. 2. If f (x, y, z) is a differentiable function then the directional derivative of f in the direction of any unit vector ~u = hu1 , u2 , u3 i is: Du f (x, y, z) = fx (x, y, z)u1 + fy (x, y, z)u2 + fz (x, y, z)u3 . = hfx , fy , fz i · hu1 , u2 , u3 i = ∇f · u. = ||∇f || cos θ, where θ is the angle between the vectors ∇f and u. 34 Example-3.15: find the gradient of f (x, y, z) = (x + 2y + 3z)3/2 at the point (1, 1, 2) and find the rate of change of f at (1, 1, 2) in the direction of the vector v = 2j − k Solution 3 9 fx = (x + 2y + 3z)1/2 , fy = 3(x + 2y + 3z)1/2 , fz = (x + 2y + 3z)1/2 . 2 2 27 fx (1, 1, 2) = fy (1, 1, 2) = 9, fz (1, 1, 2) = . 2 9 27 ∇f (1, 1, 2) = , 9, . 2 2 2 v 1 = 0, √ , − √ . u= ||v|| 5 5 9 Dv f (1, 1, 2) = ∇f (1, 1, 2) · u = − . 2 35 Maximizing the Directional Derivatives: Suppose we have a function f of two or three variables and we consider all possible directional derivatives of f at a given point. These give the rates of change of f in all possible directions. We can then ask the questions: In which of these directions does change fastest and what is the maximum rate of change? Theorem • Suppose f is a differentiable function of two or three variables. The maximum value of the directional derivative Du f (P ) is k∇f (P )k and it occurs when u has the same direction as the gradient vector ∇f (P ). • A differentiable function f decreases most rapidly at a point P in the direction opposite to the gradient vector, that is, in the direction of −∇f (P ). 36 Example-3.17: 1. Find the maximum rate of change of f (x, y, z) = tan(x + 2y + 3z) at the point (−5, 1, 1) and the direction in which it occurs. 2. Find the directional derivative of the function f (x, y, z) = x3 y 2 z 5 − 2xz + yz + 3x at P (−1, −2, 1) in the direction of the negative z-axis. Solution • fx = sec2 (x + 2y + 3z), fx (−5, 1, 1) = 1 1. • fy = 2 sec2 (x + 2y + 3z), fy (−5, 1, 1) = 2 • fz = 3 sec2 (x + 2y + 3z), fz (−5, 1, 1) = 3 √ • ∇f (−5, 1, 1) = h1, 2, 3i and k∇f (−5, 1, 1)k = 14. √ • ∴, the maximum rate of change is k∇f (−5, 1, 1)k = 14. • It occurs in the direction of h1, 2, 3i . 2. Let v = h0, 0, −1i be the vector from P (−1, −2, 1) in the direction of the negative z-axis. Dv (−1, −2, 1) = 20 37 Tangent Planes to Surfaces • If F (x, y, z) is differentiable a function at P0 (x0 , y0 , z0 ) and if ∇F (P0 ) 6= 0, then n = ∇F (P0 ) = Fx (P0 )i + Fy (P0 )j + Fz (P0 )k (11) is normal to the level surface F (x, y, z) = 0 at P0 (x0 , y0 , z0 ). • The equation of the tangent plane to the level surface S of a function of three variables F (x, y, z) = 0 at the point P0 (x0 , y0 , z0 ) is Fx (P0 )(x − x0 ) + Fy (P0 )(y − y0 ) + Fz (P0 )(z − z0 ) = 0 (12) • The normal line to S at P0 is the line passing through P0 and perpendicular to the tangent plane. The direction of the normal line is therefore given by the gradient vector ∇F (P0 ) and so its symmetric equations are x − x0 y − y0 z − z0 = = (13) Fx (P0 ) Fy (P0 ) Fz (P0 ) 38 • Let P0 (x0 , y0 , z0 ) be any point on the surface z = f (x, y). If z = f (x, y) is differentiable at (x0 , y0 ), then the surface has a tangent plane at P0 , and this plane has the equation fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ) − (z − f (x0 , y0 )) = 0. (14) • n = fx (x0 , y0 )i + fy (x0 , y0 )j − k is a normal vector to the surface z = f (x, y) at the point P0 (x0 , y0 , z0 ). • The symmetric equations of the normal line to the surface z = f (x, y), are x − x0 y − y0 z − f (x0 , y0 ) = = fx (x0 , y0 ) fy (x0 , y0 ) −1 (15) 39 Example-3.18: Find equations of the tangent plane and the normal line to the surface yz = ln(x + z) at the point (0, 0, 1. Solution Let F (x, y, z) = yz − ln(x + z) = 0. Then 1 , x+z Fx (0, 0, 1) = 1, Fx = Fy = z, 1 x+z Fz (0, 0, 1) = 1 Fz = y + Fy (0, 0, 1) = 1, The equation of the tangent plane to the surface is x+y+z =1 and symmetric equations of the normal line to the surface are y z−1 x = = 1 1 1 40 3.6 Maximum and Minimum Values 3.6 Maximum and Minimum Values. Definition-3.6: • A function of two variables has a local maximum at (x0 , y0 ) if f (x, y) ≤ f (x0 , y0 ) when (x, y) is near (x0 , y0 ). [This means that f (x, y) ≤ f (x0 , y0 ) for all points (x, y) in some disk with center (x0 , y0 ).] The number f (x0 , y0 ) is called a local maximum value. • If f (x, y) ≥ f (x0 , y0 ) when (x, y) is near (x0 , y0 ), then f has a local minimum at (x0 , y0 ) and f (x0 , y0 ) is a local minimum value. • If the inequalities hold for all points in the domain of f, then f has an absolute maximum (or absolute minimum) at (x0 , y0 ). 41 • The point (x0 , y0 ) is called a critical point (or stationary point) of z = f (x, y) if one of the following conditions holds 1. fx (x0 , y0 ) = fy (x0 , y0 ) = 0, or 2. either fx (x0 , y0 ) or fy (x0 , y0 ) does not exist. • If f has a local maximum or minimum at (x0 , y0 ), then (x0 , y0 ) is a critical point of f. At a critical point, a function could have a local maximum or a local minimum or neither. • The point (x0 , y0 , f (x0 , y0 )) is a saddle point of z = f (x, y) if fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0, but f does not have any local extremum values (maxima or minima) at (x0 , y0 ). 42 Second Derivatives Test: Suppose that f (x, y) has continuous second-order partial derivatives in some open disk containing the point (a, b) and that fx (a, b) = fy (a, b) = 0. Define the discriminant D for the point (a, b) by 2 D(a, b) = fxx (a, b)fyy (a, b) − [fxy (a, b)] (16) (i) If D(a, b) > 0 and fxx (a, b) > 0, then f has a local minimum at (a, b). (ii) If D(a, b) > 0 and fxx (a, b) < 0, then f has a local maximum at (a, b). (iii) If D(a, b) < 0, then f has a a saddle point at(a, b). (iv) If D(a, b) = 0, then no conclusion can be drawn. Example-3.19: Find all critical points of f (x, y) = x4 − 6x2 + 4y 3 + 2y 2 − 1 and classify them. 43 Solution: √ • fx = 4x3 − 12x = 4x(x2 − 3) = 0 ⇒ x = 0, ± 3 and • fy = 12y + 12y = 12y(y + 1) = 0 ⇒ y = 0, −1. √ √ • Therefore, (0, 0), (0, −1), (± 3, 0), (± 3, −1) are the critical points of f . 2 • fxx = 12x2 − 12, fxy = 0, fyy = 24y + 12. 2 • The discriminant, D(x, y) = fxx fyy − [fxy ] = 144(x2 − 1)(2y + 1). Critical point: (a,b) fxx (a, b) D(a, b) Classification (0,0) (0,-1) √ (± 3, 0) √ (± 3, −1) -12 -144 saddle Point -12 144 Relative Maximum 24 288 Relative Minimum 24 -288 Saddle Point 44 Definition-3.7: • We call f (a, b) the absolute maximum of f on the region R if f (a, b) ≥ f (x, y) for all (x, y) ∈ R. • Similarly, f (a, b) is called the absolute minimum of f on R if f (a, b) ≤ f (x, y) for all (x, y) ∈ R. • In either case, f (a, b) is called an absolute extremum of f. Extreme Value Theorem for Functions of Two Variables: If f is continuous on a closed, bounded set R in R2 , then f attains an absolute maximum value f (x1 , y1 ) and an absolute minimum value f (x2 , y2 ) at some points (x1 , y1 ) and x1 , y1 ) in R. To find the absolute maximum and minimum values of a continuous function on a closed, bounded set R : 1. Find the values of f at the critical points of f in R. 2. Find the extreme values of f on the boundary of R. 3. The largest of the values from steps 1 and 2 is the absolute maximum value; the smallest of these values is the absolute minimum value. 45 Example-3.20: Find the absolute maximum and minimum values of f (x, y) = 3 + xy − x − 2y on the closed triangular region with vertices (1, 0), (5, 0), and (1, 4). Solution: • Values of f at the critical points of f in R.: fx = y − 1, fx = 0 ⇒ y = 0, fy = x − 2 fy = 0 x = 2. Therefore, the critical point of f in R is (2, 1) and f (2, 1) = 1. • Extreme values of f on the boundary of R : Boundary of R: S1 : y = 0, 1 ≤ x ≤ 5; S2 : x = 1, 0 ≤ y ≤ 4; S3 : y = −x + 5, 1 ≤ x ≤ 5. 46 • The value of f on S1 g1 (x) = f (x, 0) = 3 − x, ⇒ g10 (x) = −1 6= 0 1 ≤ x ≤ 5. has no critical point. ∴ , g1 (1) = f (1, 0) = 2, and g1 (5) = f (5, 0) = −2. • The value of f on S2 g2 (y) = f (1, y) = 2 − y, 0 ≤ x ≤ 4. ⇒ g20 (y) = −1 6= 0 has no critical point. ∴ , g2 (0) = f (1, 0) = 2, and g2 (4) = f (1, 4) = −2. • The value of f on S3 g3 (x) = f (x, 5 − x) = −x2 + 6x − 7, ⇒ g30 (x) 1 ≤ x ≤ 5. = −2x + 6 ⇒ x = 3 is a critical point. ∴ , g3 (1) = f (1, 4) = −2, g3 (3) = f (3, 2) = 2 and g3 (5) = f (5, 0) = −2. 47 The absolute maximum value of f on R is f (1, 0) = f (3, 2) = 2 and the absolute minimum value is f (5, 0) = f (1, 4) = f (5, 0) = −2. Example-3.21: Find the absolute maximum and minimum values of f (x, y) = xy 2 on the region D = {(x, y)|x ≥ x, y ≥ 0, x2 + y 2 ≤ 3}. Solution • Values of f at the critical points of f in R.: fx = y 2 , fy = 2xy ⇒ y = 0, x=0 or y = 0. √ ⇒ (x, 0), f or 0 ≤ x ≤ 3, are critical points, and f (x, 0) = 0. • Extreme values of f on the boundary of R : Boundary of R: S1 : y = 0, 0≤x≤ S2 : x = 0, p S3 : y = 3 − x2 , 0≤y≤ 0≤x≤ √ √ √ 3; 3; 3. 48 • The value of f on S1 h1 (x) = f (x, 0) = 0, 0≤x≤ √ 3. • The value of f on S2 h2 (y) = f (0, y) = 0, 0≤x≤ √ 3. • The value of f on S3 h3 (x) = f (x, ⇒ p 3 − x2 ) = 3x − x2 , 0≤x≤ √ 3. h03 (x) = 3 − 2x ⇒ x = 3/2 is a critical point. √ √ ∴ , h3 (0) = f (0, 3) = 0, h3 (3/2) = f (3/2, 3/2) = 9/4, √ √ h3 ( 3) = f ( 3, 0) = 0. • Therefore, the absolute maximum value of f on R is √ f (3/2, 3/2) = 9/4 and the absolute minimum value is √ √ f (x, 0) = f (0, y) = 0 for 0 ≤ x ≤ 3 and 0 ≤ y ≤ 3. 49 Exercise: 1. Find the volume of the largest rectangular box in the first octant with three faces in the coordinate planes and one vertex in the plane x + y + z = 6. 2. Find the dimensions of a rectangular box of maximum volume such that the sum of the lengths of its 12 edges is a constant c. 3. Find the dimensions of the rectangular box with largest volume if the total surface area is given as 64 cm2 . 4. Find the points on the cone z 2 = x2 + y 2 that are closest to the point (4, 2, 0). 50 3.7 Lagrange Multipliers 3.7 Lagrange Multipliers Method of Lagrange Multipliers To find the maximum and minimum values of f (x, y, z) subject to the constraint g(x, y, z) = k[assuming that these extreme values exist and ∇g(x, y, z) 6= 0 on the surface g(x, y, z) = k ]: (a) Find all values of x, y, z and λ such that ∇f (x, y, z) = λ∇g(x, y, z) and g(x, y, z) = k (17) (18) • The number λ in Equation 21 is called a Lagrange multiplier. (b) Evaluate f at all the points (x, y, z) that result from step (a). The largest of these values is the maximum value of ; the smallest is the minimum value of f. To find the extreme values of f (x, y) subject to the constraint g(x, y) = k, we look for values of x, y, and λ such that ∇f (x, y) = λ∇g(x, y) and g(x, y) = k (19) 51 Example-3.22: Use Lagrange multipliers to find the extreme values of the function f (x, y, z) = xyz subject to the constraint x2 + 2y 2 + 3z 2 = 6. Solution According to the method of Lagrange multipliers, we solve ∇f = λ∇g, g = 6, where g(x, y, z) = x2 + 2y 2 + 3z 2 . This gives yz = 2λx (20) xz = 4λy (21) xy = 6λz (22) x2 + 2y 2 + 3z 2 = 6 (23) The simplest way to solve these equations is multiply equations (24), (25) and (26) by x, y and z respectively. 52 xyz = 2λx2 (24) xyz = 4λy 2 (25) xyz = 6λz 2 (26) From equations (28), (29) and (30), we have (27) x2 = 2y 2 = 3z 2 Using equations (27) and (31), we get 2 √ 3x = 6 ⇒ x = ± 2, √ y = ±1, z=± 6 3 Therefore f has possible extreme values at the points √ √ 6 ± 2, ±1, ± 3 53 2 Evaluating f at these eight points, the maximum value of f is √ √ √ 3 √ √ 6 6 occurs at the four points − 2, 1, − , − 2, −1, , 3 3 √ √ √ √ 6 6 , and − 2, −1, and the minimum value of 2, −1, − 3 3 √ √ 2 6 f is − √ occurs at the four points − 2, −1, − , 3 3 √ √ √ √ √ √ 6 6 6 2, −1, , 2, −1, and 2, 1, − . 3 3 3 Example-3.23: Find the extreme values of f (x, y) = x2 + 2y 2 on the disk x2 + 2y 2 ≤ 1. Solution We compare the values of f at the critical points with values at the points on the boundary. Since fx = 2x and fy = 4y the only critical point is (0, 0) . 54 Using Lagrange multipliers, we solve the equations ∇f = λ∇g g(x, y) = x2 + y 2 = 1 or 2 2x = 2λx (28) 4y = 2λy (29) 2 x +y =1 (30) From (32) we have x = 0 or λ = 1. If x = 0, then (34) gives y = ±1. If λ = 1, then y = 0 from (33), so then (11) gives x = ±1. Therefore f has possible extreme values at the points (0, 1), (0, −1), (1, 0) and (−1, 0). Evaluating f at the critical point and at these four points, we find that f (0, 0) = 0 f (0, 1) = 2, f (0, −1) = 2, f (1, 0) = 1 f (−1, 0) = 1. Therefore the maximum value of f on the circle x2 + y 2 = 1 is f (0, ±1) = 2 and the minimum value is f (0, 0) = 0 55