LECTURE 6: MAXIMUM/MINIMUM PROBLEMS MINGFENG ZHAO January 16, 2015 Local maximum/minimum Definition 1. A function f has a local maximum value at point (a, b) if f (x, y) ≤ f (a, b) for all (x, y) in some small open disk centered at (a, b). A function f has a local minimum value at point (a, b) if f (x, y) ≥ f (a, b) for all (x, y) in some small open disk centered at (a, b). Example 1. The function f (x, y) = x2 + y 2 − 4x + 2y + 5 has a local minimum at (2, −1). In fact, we know that f (x, y) = x2 − 4x + y 2 + 2y + 5 = x2 − 4x + 4 − 4 + y 2 + 2y + 1 − 1 + 5 = (x − 2)2 − 4 + (y + 1)2 − 1 + 5 = (x − 2)2 + (y + 1)2 . Completing the square Now it’s easy to see that f (x, y) has a local minimum at (2, −1), and f (2, −1) = 0. Remark 1. For completing the square: b 2 ax + bx + c = a x + x + c a " 2 2 # b b b 2 − +c = a x +2· x+ 2a 2a 2a " # 2 b b2 = a x+ − 2 +c 2a 4a 2 b b2 = a x+ −a· 2 +c 2a 4a 2 1 2 MINGFENG ZHAO 2 b b2 = a x+ − +c 2a 4a 2 4ac − b2 b + = a x+ . 2a 4a Critical points Definition 2. A point (a, b) is called a critical point of f if fx (a, b) = fy (a, b) = 0. Theorem 1. If f has a local maximum or local minimum value at point (a, b), then (a, b) is a critical point of f , that is, fx (a, b) = fy (a, b) = 0. Remark 2. But a critical point of F maybe neither a local maximum nor local minimum value at this critical point. Example 2. In Example 1, we know that f (x, y) = x2 + y 2 − 4x + 2y + 5 has a local minimum at (2, −1), by Theorem 1, we have fx (2, −1) = fy (2, −1) = 0. In fact, for partial derivatives of f , we have fx (x, y) = 2x − 4, and fy (x, y) = 2y + 2. Then we get fx (2, −1) = 2 · 2 − 4 = 0, and fy (2, −1) = 2 · (−1) + 2 = 0. Example 3. Find all critical points of f (x, y) = xy(x − 2)(y + 3). For partial derivatives of f , we have fx (x, y) fy (x, y) = y(x − 2)(y + 3) + xy(y + 3) = (xy − 2y)(y + 3) + xy(y + 3) = (xy − 2y + xy)(y + 3) = (2xy − 2y)(y + 3) = 2y(x − 1)(y + 3) = x(x − 2)(y + 3) + xy(x − 2) = (xy + 3x)(x − 2) + xy(x − 2) By the product rule By the product rule LECTURE 6: MAXIMUM/MINIMUM PROBLEMS = (xy + 3x + xy)(x − 2) = (2xy + 3x)(x − 2) 3 = x(2y + 3)(x − 2). To find critical points of f , we should solve the following system: 2y(x − 1)(y + 3) = 0 (1) fx (x, y) = (2) fy (x, y) = x(2y + 3)(x − 2) = 0. Let’s first solve the first equation (1), since 2y(x − 1)(y + 3) = 0, then 2y = 0 or x − 1 = 0 or y + 3 = 0, which gives us: y = 0, or x = 1, or y = −3. When y = 0, plug y = 0 into the second equation (2), we get x(2 · 0 + 3)(x − 2) = 0, that is, 3x(x − 2) = 0, then 3x = 0 or x − 2 = 0, that is, x = 0 or x = 2. In this case, we get two critical points: (0, 0) and (2, 0). When x = 1, plug x = 1 into the second equation (2), we get 1(2y + 3)(1 − 2) = 0, that is, −(2y + 3) = 0, then 2y + 3 = 0, that is, y = − 23 . In this case, we get one critical point: (1, − 23 ). When y = −3, plug y = −3 into the second equation (2), we get x(2 · (−3) + 3)(x − 2) = 0, that is, −3x(x − 2) = 0, then −3x = 0 or x − 2 = 0, that is, x = 0 or x = 2. In this case, we get two critical points: (0, −3) and (2, −3). In summary, we get five critical points of f : (0, 0), (2, 0), 3 (1, − ), 2 (0, −3), and (2, −3). Second derivative test for classifying critical points Definition 3. A point (a, b) is call a saddle point of f if (a, b) is a critical point of f , and in every small open disk centered at (a, b), there are points (x, y) for which f (x, y) > f (a, b) and points for which f (x, y) < f (a, b). Definition 4. The Hessian matrix of f is defined as: fxx fxy fyx fyy . The discriminant of f , D(x, y), is defined as: D(x, y) = fxx (x, y)fyy (x, y) − (fxy (x, y))2 . 4 MINGFENG ZHAO Example 4. Let f (x, y) = x2 y 2 , compute the Hessian matrix and discriminant of f . In fact, we have fx = 2xy 2 , and fy = 2x2 y. Then fxx = 2y 2 , fxy = fyx = 4xy, and fyy 2x2 . So the Hessian matrix of f is: 2y 2 4xy 4xy 2x2 . So the discriminant of f is: D(x, y) = fxx fyy − (fxy )2 = 2y 2 · 2x2 − (4xy)2 = 4x2 y 2 − 16x2 y 2 = −12x2 y 2 . Remark 3. The critical points for f (x, y) = x2 y 2 are (0, y) and (x, 0) for all x and all y, and D(x, 0) = D(0, y) = 0. Theorem 2 (Second Derivative Test). Let the point (a, b) be a critical point of f , that is, fx (a, b) = fy (a, b) = 0, then a. If D(a, b) > 0 and fxx (a, b) < 0, then f has a local maximum value at (a, b). b. If D(a, b) > 0 and fxx (a, b) > 0, then f has a local minimum value at (a, b). c. If D(a, b) < 0, then f has a saddle point at (a, b). d. If D(a, b) = 0, then the test is inconclusive. Example 5. For the function f (x, y) = x2 + y 2 − 4x + 2y + 5 in Example 1, by Example 2, we know that (2, −1) is the only critical point for f (x, y). By the computations in Example 2, we know that fxx (2, −1) = 2, fxy (2, −1) = 0, and fyy (2, −1) = 2. So D(2, −1) = 2 · 2 − 02 = 4 > 0. Since fxx (2, −1) = 2 > 0, by the Second Derivative Test, we know that (2, −1) is a local minimum for f (x, y). Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca