Local Extrema Previousl we have taken the partial derivative of a function f(x, ). But those partial derivatives were themselves functions and so we can take their partial derivatives. Local Maximums and Local Minimums of Functions f(x, ) has a local maximum at the point (x 0, 0 ) if f(x 0, 0 ) f(x, ) for all points (x, ) near (x 0, 0 ) f(x, ) has a local minimum at the point (x 0, 0 ) if f(x 0, 0 ) f(x, ) for all points (x, ) near (x 0, 0 ) Recall that the gradient vector points in a direction where the function increases. Suppose that the point (x 0, 0 ) is a local maximum of the function f(x, ) which is not on the boundar of the domain. If the vector f(x 0, 0 ) is defined and non-zero, then we can increase f(x, ) b moving in the direction of f(x 0, 0 ). But we just said that the point (x 0, 0 ) is a local maximum, thus there is no direction that we can travel in to make the function larger. Hence, we must have that f(x 0, 0 ) = 0. Similarl, if (x 0, 0 ) were a local minimum, it would follow that f(x 0, 0 ) = 0 as well. Using our results from above, we also have a useful relation between local maxima and local minima to first-order partial derivatives. Local Extrema Theorem If f(x, ) has a local maximum or a local minimum at (x 0, 0 ) and the first-order partial derivatives of f(x, ) exist there, then f x (x 0, 0 ) = 0 and f (x 0, 0 ) = 0. This leads us to the definition of a critical point for a function. As is the case with onevariable calculus, we allow for the possibilit that a point is neither a local maximum nor a local minimum. Critical Points of a Function A point (x 0, 0 ) is said to be a critical point of the function f(x, ) if the gradient, f(x 0, 0 ), is either 0 or undefined.
Example : Find and analze the critical point(s) of f(x, ) = x + x +. f x (x, ) = x + and f (x, ) = x +. Setting these equations equal to 0, we have two equations: x + = 0 and x + = 0 We can solve for x and b multipling the second equation b - and adding the equations. Doing this, we have that - = 0, and so = 0. Plugging that into the first equation, we see that x = 0. Thus, the onl critical point is (0, 0). Notice that f(0, 0) = 0. Thus, if f(x, ) is alwas positive or zero near (0, 0), then we would have that (0, 0) is a local minimum. If f(x, ) is alwas negative or zero near (0, 0), then we would have a local maximum. Looking at a sketch of the graph (Figure below), it would appear that (0, 0, 0) is a local minimum. Figure : Sketch of f(x, ) = x + x + We can confirm our suspicion b completing the square on the function. That is, we have that f ( x, ) x x x. Notice that this is a sum of two 4 squares, so it is alwas greater than or equal to zero. Thus, the critical point is a local (and in fact, global) minimum. In Example, solving for x and was fairl straightforward. We had two linear equations with two unknowns. We were able to solve for x and b solving the equations simultaneousl or b the method substitution.
In some instances, though, a bit more algebra is required. Often times, it is best to substitute the result of one of equations into the other equation to solve for the variables, as the next example shows. Example : Find the local extrema of the function f ( x, ) x x. f x (x, ) = x and f (x, ) = x +. Setting these equal to 0, we have the following equations: x = 0 and x + = 0 Solving for x in both equations, we have x = and x =. Setting the two equations equal to each other, we have that =. Solving for, we have that = 0 or =. If = 0, then x = 0. And if =, then x =. So, we end up with the critical points (0, 0) and (, ). We can use a contour diagram to help classif critical points. Let us begin b looking at some critical points and classif them. 9 8 0 6 4 7 0 0.5 A 0.5 - x 6 8 0 5-9 9 7 Figure : A local minimum at the point A = (0, 0) 0 In Figure, the level curves are circular around the point A. This suggests that we are dealing with a local maximum or a local minimum. Moreover, as we move awa from the point A, the level curves are getting larger. This means that A is a local minimum.
- -0.5-6 - -6 - -4 C - - -0.5-0.5 B -0.5 - -4 x Figure : Local maximums at the points B = (-, 0) and C = (, ) In Figure, the level curves are circular around the points B and C. This suggests that we are dealing with local maxima or a local minima. Moreover, as we move awa from the points, the level curves are getting smaller (more negative). This means that B and C are local maxima. -.5 0 - -.5 -.5 - -0.5.5 -.5.5 D -0.5 0 0.5.5.5 x 0.5 - -.5 - -.5-0.5 -.5 Figure 4: A saddle point at the point D = (0, 0) In Figure 4, the level curves are perpendicular at the point D. As we move in the positive x-direction, the values of the level curves get larger. As we move in the positive -direction, the values of the level curves get smaller. This means that D is a saddle point. From our figures above, we have the following classification of critical points based upon their level curves. 4
Determining Critical Points from a Contour Diagram Suppose that (x 0, 0 ) is a critical point of the function f(x, ). - If the contours around (x 0, 0 ) are circular, (x 0, 0 ) is either a local maximum or a local minimum. + If the values of the level curves decrease as ou move awa from the point (x 0, 0 ), then (x 0, 0 ) is a local maximum. + If the values of the level curves increase as ou move awa from the point (x 0, 0 ), then (x 0, 0 ) is a local minimum. - If two contours meet at a perpendicular angle, (x 0, 0 ) is a saddle point. Example : In Figure 5 (below), classif the points P, Q, and R as local maximum, local minimum, saddle points, or neither. 5.7 Q. 4.7 4. P -. 6 x 0 - R Figure 5: Contour Diagram of f(x, ) = 4 + x + x 4 Since the level curves are perpendicular at P, we see that P is a saddle point. Around the point Q, we notice that the level curves are circular. Also, as we move awa from the point, the values of the level curves are increasing. Thus, Q is a local minimum. None of the defining characteristics occur at the point R, so we conclude that R is not a local extrema nor a saddle point. Recall the Degree Talor Polnomial approximation for a function f(x, ) near the point (x 0, 0 ) was given b 5
f( x, ) f( x, ) f ( x, )( ) f ( x, )( ) 0 0 x 0 0 0 0 0 0 f x f ( x, ) ( 0, 0) ( 0 0 0 ) ( 0, 0 )( 0 )( 0 ) x x fx x x x ( 0) If f(x 0, 0 ) = 0, then we have that f x (x 0, 0 ) = 0 and f (x 0, 0 ) = 0. For the sake of simplicit of notation, if we were to assume that x 0 = 0 and 0 = 0, then the right-hand side will reduce to f(x, ) º ax + bx + c, for some constants a, b, and c. For this reason, we shall investigate this function in more detail. It is fairl straightforward to see that ax + bx + c onl has a critical point at (0, 0). (The reasoning is exactl the same as we used in Example.) And like Example, we shall proceed b completing the square. Provided that a 0, we have that a a a a 4a b c b c b ax bx c a x x a x b 4ac b ax a 4a Notice that the shape of the graph of ax + bx + c will depend on whether the coefficient of is positive, negative or zero. Since 4a > 0, we have that the sign of the coefficient depends on the value of D = 4ac b. We call D the discriminant. If D > 0, then the expression inside of the brackets is positive or zero, so the function has a local maximum or a local minimum (depending on the sign of a). That is, if a > 0, the function has a local minimum and if a < 0, the function has a local maximum. If D < 0, the function goes up in some directions and goes down in others. The point is thus classified as a saddle point. Now, let us return to the Degree Talor Polnomial approximation. Again, for the sake of simplicit, we shall suppose that f(0, 0) = 0. Thus, we have that f ( x, ) f(0,0) f(0,0) x f(0,0) x x f( x, ) f(0,0) x fx (0,0) x x x where we used the fact that f(0, 0) = 0 gives us that f x (0, 0) = 0 and f (0, 0) = 0. 6
Looking at the discriminant of this quadratic polnomial, we have that D = 4ac b, where a, b f x (0,0), and c. This simplifies to D [ (0,0)] f x. If the critical point was at (x 0, 0 ) instead of (0, 0), then we would end up with the following result: Second-Derivative Test for Functions of Two Variables Suppose (x 0, 0 ) is a point where f(x 0, 0 ) = 0. Let D = f (x 0, 0 )f (x 0, 0 ) [f x (x 0, 0 )] If D > 0 and f (x 0, 0 ) > 0, then f(x, ) has a local minimum at (x 0, 0 ). If D > 0 and f (x 0, 0 ) < 0, then f(x, ) has a local maximum at (x 0, 0 ). If D < 0, then f(x, ) has a saddle point at (x 0, 0 ) If D = 0, then we cannot sa what happens at (x 0, 0 ) Example 4: Suppose that (, ) is a critical point of a function f(x, ) with continuous second derivatives. In each case, what can ou sa about f(x, )? (a) f (, ) = 4, f x (, ) =, f (, ) = (b) f (, ) = 4, f x (, ) =, f (, ) = For (a), D = f (, )f (, ) [f x (, )] = (4)() () = 8 > 0 and f (, ) = 4 > 0. Thus, we have that f(x, ) has a local minimum at (, ). For (b), D = f (, )f (, ) [f x (, )] = (4)() () = < 0. Thus, we have that f(x, ) has a saddle point at (, ). The second-derivative test is rather useful, but some times we end up with the fourth case, where D = 0. In those instances, we are left scratching our head as to what is going on at that point, as the next example illustrates. 7
Example 5: Draw the contour diagram of f(x, ) = x x + 4. Then find and classif the critical points of f(x, ) using the second-derivative test. The contour diagram of f(x, ) appears below in Figure 6..9 0.5 - -.9 -.5 -.7.5.9 -.5.7.7 -.9 -.5 -.9 -.7 - - -.7.9.5.5.7 -.5 -.5 -.9 -.7 0 - x -.7 --.9 -.5 Figure 6: Contour diagram of f(x, ) = x x + 4 The contour diagram suggests that there are six critical points at (, ), and (, 0). We can confirm this algebraicall. f x (x, ) = x and f (x, ) = 4 + 4. Setting these equal to 0, we have the equations: x = 0 and 4 + 4 = 0 The first equation tells us that x = - or while the second equation tells us that = 0, - or. This gives us a total of six different combinations for points, which corresponds precisel to the six points the contour diagram revealed. Looking at the contour diagram, it would appear that (-, ) and (-, -) are local minimums, (, 0) is a local maximum, and (-, 0), (, ), and (, -) are saddle points. We can use the second derivative test to confirm our suspicions. Notice that f (x, ) = -6x, f x (x, ) = 0 and f (x, ) = 4 +. This gives rise to the following table: 8
Critical Point (,) (, ) (,0) (,0) (,) (, ) D 0 0 0 0 0 0 f ( x, ) 0 0 0 0 0 0 0 0 Local Local Saddle Saddle Classification???? Minimum Minimum Point Point And so, we see that we were able to correctl identif four of the critical points, but since two of them returned D values equal to 0, we were unable to classif them. This example points out that the second-derivative test can be useful, but it is not a magic bullet that alwas work. 9