20. Maxima and minima: I Recall that K ⊂ Rn is closed if the complement is open. Recall also that this is equivalent to saying that K contains all of its limit points. Definition 20.1. We that K ⊂ Rn is bounded if there is a real num­ ber M such that �x� ≤ M, for all x ∈ K. We say that K is compact if K is closed and bounded. Note that K is bounded if and only if K ⊂ BM (O), where O is the origin. Example 20.2. (1) [a, b] ⊂ R is compact. (2) (a, b] ⊂ R is bounded but not closed (whence not compact). (3) [a, ∞) ⊂ R is closed but not bounded (whence not compact). (4) K = { x ∈ Rn | �x� ≤ M }, is compact. (5) K = { x ∈ Rn | �x� < M }, is bounded but not closed. Theorem 20.3. Let f : K −→ R be a continuous function. If K is compact then there are two points �amin and �amax in K such that f (�amin ) ≤ f (�x) ≤ f (�amax ). The proof of (20.3) is highly non-trivial. Definition 20.4. Let K ⊂ Rn . We say that �a ∈ K is an interior point if there is an open ball containing �a which is contained in K. Otherwise �a is a boundary point of K. Example 20.5. If K = [a, b] ⊂ R then every point a < x < b is an interior point and a and b are boundary points. To find the maxima and minima of f : K −→ R we break the problem into two pieces: I. The interior points. Use the derivative test, this lecture. II. The boundary points. Use Lagrange multipliers, see lecture 21. 1 Notice that the boundary can have a rather complicated structure in higher dimensions. For example, in R3 the closed unit ball is compact. The boundary is the set of points in the open unit ball and the set of boundary points is the set of points on the unit sphere. Definition 20.6. Let f : K −→ R be a function and let �a ∈ K be an interior point. We say that f has a local minimum at �a if there is an open ball U = Bδ (�a) centred at �a contained in K such that f (�a) ≤ f (�x), for all �x ∈ U . We can define local maxima in a similar fashion. Definition 20.7. Let f : K −→ R be a differentiable function. We say that a point �a ∈ K in the interior of K is a critical point if Df (�a) = �0. Proposition 20.8. Let K ⊂ Rn be a compact set and let f : K −→ R be a differentiable function. Let �a ∈ K be an interior point. If �a is a local maximum, then �a is a critical point. Proof. ∂f f (�a + hêi ) − f (êi ) (�a) = lim ≤0 h↓0 ∂xi h ∂f f (�a + hêi ) − f (êi ) (�a) = lim ≥ 0. h↑0 ∂xi h � Recall the one variable second derivative test: (i) If f � (a) = 0 and f �� (a) < 0, then a is a local maximum of f . (ii) If f � (a) = 0 and f �� (a) > 0, then a is a local minimum of f . (iii) If f � (a) = 0 and f �� (a) = 0, then we don’t know. The reason why the second derivative works follows from Taylor’s Theorem with remainder, applied to the second Taylor polynomial. To figure out the multi-variable form of the second derivative test, we need to consider the multi-variable second Taylor polynomial: 1 P�a,2 f (�x) = f (�a) + �f (�a) · �h + �ht Hf (�a)�h. 2 Recall that ∂2f �h = (h1 , h2 , . . . , hn ) and Hf (�a) = ( (�a)). ∂xi ∂xj The important term is then Q(�h) = ht Hf (�a)h. 2 Definition 20.9. If A is a symmetric n × n matrix, then the function Q(�h) = �xt A�x, is called a symmetric quadratic form. � 0 implies that Q(�x) > 0. We say that Q is positive definite if �x = We say that Q is positive definite if �x = � 0 implies that Q(�x) < 0. Example 20.10. If A = I2 then � �� � 1 0 x Q(x, y) = (x, y) = x2 + y 2 , 0 1 y which is positive definite. If A = −I2 then Q(x, y) = −x2 − y 2 is negative definite. Finally if � � 1 0 0 −1 then Q(x, y) = x2 − y 2 is neither positive nor negative definite. Proposition 20.11. If �a ∈ K ⊂ Rn is an interior point and f : K −→ R is C 3 and �a is a critical point, then (1) If Q(�h) = �ht Hf (�a)�h is positive definite, then �a is a minimum. (2) If Q(�h) = �ht Hf (�a)�h is negative definite, then �a is a maximum. (3) If Q(�h) = �ht Hf (�a)�h is not zero and is neither positive nor negative definite, then �a is a saddle point. Proof. Immediate from Taylor’s Theorem. � Proposition 20.12. If A is a n × n matrix, then let di be the deter­ minant of the upper left i × i submatrix. Let Q(�h) = ht Ah. (1) If di > 0 for all i, then Q is positive definite. (2) If di > 0 for i even and di < 0 for i odd, then Q is negative definite. Let’s consider the 2 × 2 case. � A= � a b b d In this case Q(x, y) = ax2 + 2bxy + cy 2 . Assume that d1 = a > 0. Let’s complete the square. a = α2 , some α > 0. Q(x, y) = (αx + b/αy)2 + (d − b2 /α2 )y 2 = (αx + b/αy)2 + (ad − b2 )/ay 2 . In this case d1 = a > 0 and d2 = ad − b2 . So the coefficient of y 2 is positive if d2 > 0 and negative if d2 < 0. 3 MIT OpenCourseWare http://ocw.mit.edu 18.022 Calculus of Several Variables Fall 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.