Extrema examples

Example 1

Find the local extrema of f(x,y) = x3 + x2y - y2 - 4y.

Solution

Step 1: Find the critical points. The derivative of f is

Df(x,y) = [                       ]
3x2 +  2xy  x2 - 2y - 4.
Df(x,y) = [0 0] means both components must be zero simultaneously. We need
x(3x + 2y) = 0 (1)
and
x2 - 2y - 4 = 0. (2)
We need to solve two equations for the two unknowns x and y.

Equation (1) is satified if either x = 0 or if 3x + 2y = 0, i.e., if x = 0 or if y = -3x∕2. We consider these two solutions as two separate cases. For each case, we will find soultions for equation (2).

Case 1: Let x = 0. Then we know equation (1) is satisfied. We plug x = 0 into equation (2), which becomes 0 - 2y - 4 = 0, i.e., y = -2. If x = 0 and y = -2, then both equations (1) and (2) are satisfied. Therefore the point (0,-2) is a critical point.

Case 2: Let y = -3x∕2. Then we know that equation (2) is satisfied. We plug y = -3x∕2 into equation (2) and simplify:

x2 - 2(-3x∕2) - 4 = 0
x2 + 3x - 4 = 0
(x - 1)(x + 4) = 0
x = 1 or x = -4.
So, we have two solutions of equation (2) for case 2. The first solution is when x = 1, which means y = -3x∕2 = -32. If x = 1 and y = -32, then both equations (1) and (2) are satisfied. Therefore the point (1,-32) is a critical point.

The second solution for case 2 is when x = -4, which means y = -3x∕2 = 6. Therefore, the point (-4, 6) is a critical point.

To summarize the results from both case 1 and case 2, we conclude that f(x,y) has three critical points: (0,-2), (1,-32), and (-4, 6).

You should double check that Df(x,y) = [0 0] at each of these points.

Step 2: Classify the critical points.

The Hessian matrix is

Hf(x,y) = [ 6x +  2y  2x  ]

     2x     - 2
We need to check the definiteness of the Hf(x,y) at the critical points (0,-2), (1,-32), and (-4, 6).

For the critical point (0,-2),

Hf(0,-2) = [          ]
  - 4    0
    0  - 2
h11 = -4 < 0 and det(Hf) = 8 > 0. This means Hf(0,-2) is negative definite and f has a local maximum at (0,-2).

For the critical point (1,-32),

Hf(1,-32) = [ 3    2 ]

  2  - 2.

h11 = 3 > 0 and det(Hf) = -6 - 4 = -10 < 0. This means Hf(1,-32) is indefinite and f has a saddle at (1,-32).

For the critical point (-4, 6),

Hf(-4, 6) = [ - 12  - 8 ]

    - 8 - 2.

h11 = -12 < 0 and det(Hf) = 24 - 64 = -40 < 0. This means Hf(-4, 6) is indefinite and f has a saddle at (-4, 6).

Example 2

Identify the local extrama of f(x,y) = (x2 + y2)e-y.

Solution

Step 1: Find the critical points.

The derivative of f is

Df(x,y) = [                         ]
 2xe- y  (2y - x2 - y2)e-y
Df(x,y) = [0 0] means that 2x = 0 and 2y - x2 - y2 = 0, i.e., x = 0 and y(2 - y) = 0.

The critical points are therefore (0, 0) and (0, 2).

Step 2: Classify the critical points.

The Hessian matrix is

Hf(x,y) = [   2e-y           - 2xe -y       ]
        -y             2    2 - y
  - 2xe     (2 - 4y + y + x  )e

At the critical point (0, 0)

Hf(0, 0) = [      ]
  2  0
  0  2
h11 = 2 > 0 and det(Hf) = 4 > 0, so (0, 0) is a local mininum.

At the critical point (0, 2)

Hf(0, 2) = [ e-2       0 ]
           -2
    0  - 2e
h11 = e-2 > 0 and det(Hf) = -2e-4 < 0 so (0, 2) is a saddle point.