Docsity

Simple Multivariate Optimization - Lecture Slides | ECON 500, Exams of Economics

Toggle sidebar
bg1
SIMPLE MULTIVARIATE OPTIMIZATION
1. DEFINITION OF LOCAL MAXIMA AND LOCAL MINIMA
1.1. Functions of 2 variables. Let f(x1,x
2) be defined on a region D in <2containing the point (a, b). Then
a: f(a, b) is a local maximum value of f if f(a, b) ≥f(x1,x
2) for all domain points (x1,x
2) in an open
disk centered at (a, b).
b: f(a, b) is a local minimum value of f if f(a, b) ≤f(x1,x
2) for all domain points (x1,x
2) in an open
disk centered at (a, b).
1.2. Functions of n variables.
a: Consider a real valued function f with domain D in <n. Then f is said to have a local minimum at
a point x∗∈D if there exists a real number δ>0 such that
f(x)≥f(x∗)∀x∈Dsatisfying kx−x∗k<δ (1)
b: Consider a real valued function f with domain D in <n. Then f is said to have a local maximum at
a point x∗∈D if there exists a real number δ>0 such that
f(x)≤f(x∗)∀x∈Dsatisfying kx−x∗k<δ (2)
c: A real valued function f with domain D in <nis said to have a local extremum at a point x∗∈Dif
either equation 1 or equation 2 holds.
d: The function f has a global maximum at x∗D if 2 holds for all x D and similarly for a global
minimum.
2. DEFINITION OF THE GRADIENT AND HESSIAN OF A FUNCTION OF nVARIABLES
2.1. Gradient of f. The gradient of a function of n variables f(x1,x
2,···,x
n)is defined as follows.
∇f(x)=∂f
∂x1
∂f
∂x2
... ∂f
∂xn0
=
∂f
∂x1
∂f
∂x2
.
.
.
∂f
∂xn
(3)
Date: September 1, 2005.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Simple Multivariate Optimization - Lecture Slides | ECON 500 and more Exams Economics in PDF only on Docsity!

1. DEFINITION OF LOCAL MAXIMA AND LOCAL MINIMA

1.1. Functions of 2 variables. Let f(x 1 , x 2 ) be defined on a region D in < 2 containing the point (a, b). Then

a: f(a, b) is a local maximum value of f if f(a, b) ≥ f(x 1 , x 2 ) for all domain points (x 1 , x 2 ) in an open

disk centered at (a, b).

b: f(a, b) is a local minimum value of f if f(a, b) ≤ f(x 1 , x 2 ) for all domain points (x 1 , x 2 ) in an open

disk centered at (a, b).

1.2. Functions of n variables.

a: Consider a real valued function f with domain D in < n

. Then f is said to have a local minimum at

a point x ∗ ∈ D if there exists a real number δ > 0 such that

f(x) ≥ f(x

∗ ) ∀ x ∈ D satisfying ‖x − x

∗ ‖ < δ (1)

b: Consider a real valued function f with domain D in < n

. Then f is said to have a local maximum at

a point x ∗ ∈ D if there exists a real number δ > 0 such that

f(x) ≤ f(x

∗ ) ∀ x ∈ D satisfying ‖x − x

∗ ‖ < δ (2)

c: A real valued function f with domain D in < n is said to have a local extremum at a point x ∗ ∈ D if

either equation 1 or equation 2 holds.

d: The function f has a global maximum at x ∗  D if 2 holds for all x  D and similarly for a global

minimum.

  1. DEFINITION OF THE GRADIENT AND HESSIAN OF A FUNCTION OF n VARIABLES

2.1. Gradient of f. The gradient of a function of n variables f(x 1 , x 2 , · · · , xn) is defined as follows.

∇ f(x) =

∂f

∂x 1

∂f

∂x 2

∂f

∂xn

∂f ∂x 1 ∂f ∂x 2

. . .

∂f ∂xn

Date : September 1, 2005.

1

2.2. Hessian matrix of f. The Hessian matrix of a function of n variables f(x 1 , x 2 , · · · , xn) is as follows.

2 f(x) =

[

2 f

∂xi∂xj

]

i, j = 1, 2 ,... , n

∂ 2 f (x 0 ) ∂x 1 ∂x 1

∂ 2 f (x 0 ) ∂x 1 ∂x 2

∂ 2 f (x 0 ) ∂x 1 ∂xn

∂ 2 f (x 0 ) ∂x 2 ∂x 1

∂ 2 f (x 0 ) ∂x 2 ∂x 2

∂ 2 f (x 0 ) ∂x 2 ∂xn

. . .

∂ 2 f (x 0 ) ∂xn ∂x 1

∂ 2 f (x 0 ) ∂xn ∂x 2

∂ 2 f (x 0 ) ∂xn ∂xn

3. NECESSARY CONDITIONS FOR EXTREME POINTS

3.1. First derivative test for local extreme values.

Theorem 1. Let x ∗ be an interior point of a domain D in R n and assume that f is twice continuously differentiable

on D. It is necessary for a local minimum of f at x ∗ that

∇f(x

∗ ) = 0 (5)

This implies that

∂f(x

∗ )

∂x 1

∂f(x ∗ )

∂x 2

∂f(x

∗ )

∂xn

Theorem 2. Let x

∗ be an interior point of a domain D in R

n and assume that f is twice continuously differentiable

on D. It is necessary for a local maximum of f at x

∗ that

∇f(x

∗ ) = 0 (7)

3.2. Graphical illustration. Figure 1 shows the relative maximum of a function. The plane that is tangent

to the surface at the point where the gradient is equal to zero is horizontal in the f(x 1 ,x 2 ) plane.

3.3. Critical points and saddle points.

3.3.1. Critical point. An interior point of the domain of a function f(x 1 , x 2 , ... , xn) where all first partial

derivatives are zero or where one or more of the first partials does not exist is a critical point of f.

3.3.2. Saddle point. A critical point that is not a local extremum is called a saddle point. We can say that a

differentiable function f(x 1 , x 2 , ... , xn) has a saddle point at a critical point (x

∗ ) if we can partition the vector

x* into two subvectors (x 1 ∗ , x 2 ∗ ) where x 1 ∗ ∈ X 1 ⊆ R q and x 2 ∗ ∈ X 2 ⊆ R p (n = p + q) with the following

property

f(x

1 , x

2 ∗ ) ≤ f(x

1 ∗ , x

2 ∗ ) ≤ f(x

1 ∗ , x

2 ) (8)

FIGURE 2. Saddle point of the function f(x 1 , x 2 ) = x

2 1 −^ x

2 2

x 1

x 2

fHx 1 ,x 2 L

a

x 1

FIGURE 3. Contour plot for function f(x 1 , x 2 ) = x

2 1 −^ x

2 2

  • 2 - 1 0 1 2
  • 2
  • 1

0

1

2

We can also write this as f 11 < 0 and f 11 f 22 − f

2 12 >^0 at^ (a, b).

b: f has a local minimum at (a, b) if

∂ 2 f ∂x^21 (a, b) > 0 and

∂ 2 f ∂x^21

∂ 2 f ∂x^22

[

∂ 2 f ∂x 1 ∂x 2

] 2

0 at (a, b).

We can also write this as f 11 > 0 and f 11 f 22 − f

2 12

0 at (a, b).

c: f has a saddle point at (a, b) if

∂

2 f ∂x 2 1

∂

2 f ∂x 2 2

[

∂

2 f ∂x 1 ∂x 2

] 2

< 0 at (a, b).

We can also write this as f 11 f 22 − f

2 12 <^0 at^ (a, b).

d: The test is inconclusive at (a, b) if

∂ 2 f ∂x^21

∂ 2 f ∂x^22

[

∂ 2 f ∂x 1 ∂x 2

] 2

= 0 at (a, b).

In this case we must find some other way to determine the behavior of f at (a, b).

The expression

∂

2 f ∂x 2 1

∂

2 f ∂x 2 2

[

∂

2 f ∂x 1 ∂x 2

] 2

is called the discriminant of f. It is sometimes easier to remember

it by writing it in determinant form

2 f

∂x 2 1

2 f

∂x 2 2

[

2 f

∂x 1 ∂x 2

] 2

f 11 f 12

f 21 f 22

The theorem says that if the discriminant is positive at the point (a, b), then the surface curves the same

way in all directions; downwards if f 11 < 0 , giving rise to a local maximum, and upwards if f 11 > 0 , giving

a local minimum. On the other hand, if the discriminant is negative at (a, b), then the surface curves up in

some directions and down in others and we have a saddle point.

4.2. Example problems.

4.2.1. Example 1.

y = 2 − x

2 1 − x

2 2

Taking the first partial derivatives we obtain

∂f

∂x 1

= − 2 x 1 = 0 (10a)

∂f

∂x 2

= − 2 x 2 = 0 (10b)

⇒ x 1 = 0, x 2 = 0 (10c)

Thus we have a critical point at (0,0). Taking the second derivatives we obtain

2 f

∂x

2 1

2 f

∂x 1 ∂x 2

2 f

∂x 2 ∂x 1

2 f

∂x 2 2

The discriminant is

2 f

∂x

2 1

2 f

∂x

2 2

[

2 f

∂x 1 ∂x 2

] 2

f 11 f 12

f 21 f 22

Thus this function has a maximum at the point (0, 0) because

∂ 2 f ∂x 2 1

and the discriminant is positive. The

graph of the function is given in figure 4. The level curves are given in figure 5. The tangent plane is given

in figure 6.

FIGURE 6. Tangent plane to the function 2 − x

2 1 −^ x

2 2

  • 2

0

2

x (^1) - 2

0

2

x (^2)

  • 15
  • 10
  • 5

0

f Hx 1 ,x 2 L

  • 2

0

2

x (^1)

Taking the first partial derivatives we obtain

∂f

∂x 1

= 16 + 2x 1 = 0 (11a)

∂f

∂x 2

= 12 + 2x 2 = 0 (11b)

These equations are easy to solve because the first equation only depends on x 1 and the second equation

only depends on x 2. Solving equation 11a, we obtain

16 + 2x 1 = 0

⇒ 2 x 1 = − 16

⇒ x 1 = − 8

Solving equation 11b, we obtain

12 + 2x 2 = 0

⇒ 2 x 2 = − 12

⇒ x 1 = − 6

Thus we have a critical point at (-8,-6). Taking the second derivatives we obtain

2 f

∂x 2 1

2 f

∂x 1 ∂x 2

2 f

∂x 2 ∂x 1

2 f

∂x 2 2

The discriminant is

2 f

∂x

2 1

2 f

∂x

2 2

[

2 f

∂x 1 ∂x 2

] 2

f 11 f 12

f 21 f 22

Thus this function has a minimum at the point (-8, -6) because

∂ 2 f ∂x 2 1

0 and the discriminant is positive.

The graph of the function is given in figure 7. The level curves are given in figure 8.

FIGURE 7. Graph of the function f(x 1 , x 2 ) = 16x 1 + 12x 2 + x

2 1 +^ x

2 2

  • 15
    • 10
      • 5

0

x (^1)

  • 15
    • 10
      • 5

0

5

x (^2)

  • 100

0

100 f Hx 1 ,x 2 L

15

  • 10
    • 5

0

x (^1)

FIGURE 8. Level curves of the function 16 x 1 + 12x 2 + x

2 1 +^ x

2 2

-15 -10 -5 0 5

0

5

FIGURE 10. Graph of the function f(x 1 , x 2 ) = x 1 x 2

  • 10

0

10

20

x 1 -^10

0

10

20

x 2

  • 200

0

200

400

fHx 1 ,x 2 L

  • 10

0

x 1 10

FIGURE 11. Let sets of the function f(x 1 , x 2 ) = x 1 x 2

-15 -10 -5 0 5 10 15

0

5

10

15

4.2.4. Example 4.

y = 20x 1 + 40x 2 − x

2 1 + 4x^1 x^2 −^2 x

2 2

Taking the first partial derivatives we obtain

FIGURE 12. Saddle point of the function f(x 1 , x 2 ) = x 1 x 2

  • 10

0

10

20

x 1

  • 10

0 10 x 2 20

  • 200

0

200

fHx 1 ,x 2 L

  • 10

0

10

x 1

  • 10

0 10

FIGURE 13. Saddle point of the function f(x 1 , x 2 ) = x 1 x 2

  • 10

0

10

20

x 1

  • 10

0

10

20

x 2

  • 200

0

200

fHx 1 ,x 2 L

  • 10

0

10

20

x 1

0

200

∂f

∂x 1

= 20 − 2 x 1 + 4x 2 = 0 (13a)

∂f

∂x 2

= 40 + 4x 1 − 4 x 2 = 0 (13b)

Write this system of equations as

The discriminant is negative and so the function has a saddle point. The graph of the function is given

in figure 14. The level curves are given in figure 15. The tangent plane is shown from two different angles

in figures 16 and 17.

FIGURE 14. Graph of the function f(x 1 , x 2 ) = 20x 1 + 40x 2 − x

2 1 + 4x^1 x^2 −^2 x

2 2

x 1

x 2

f H x 1 ,x 2 L

4.2.5. Example 5.

y = −x 1 x 2 e

−(x^2 1

  • x^2 2 ) 2

Taking the first partial derivatives we obtain

∂f

∂x 1

= − x 2 e

−(x^21 + x^22 ) (^2) + x^2 1 x^2 e^

−(x^21 + x^22 ) 2

= x 2 (x

2 1 −^ 1)e^

−(x^21 + x^22 ) 2

∂f

∂x 2

= − x 1 e

−(x^21 + x^22 ) (^2) + x 1 x

2 2 e^

−(x^21 + x^22 ) 2

= x 1 (x

2 2 −^ 1)e^

−(x^21 + x^22 ) 2

We set both of the equations equal to zero and solve for critical values of x 1 and x 2. Because

FIGURE 15. Level sets of the function f(x 1 , x 2 ) = 20x 1 + 40x 2 − x

2 1 + 4x^1 x^2 −^2 x

2 2

  • 100 - 50 0 50 100
  • 100
  • 50

0

50

100

FIGURE 16. Plane through saddle point of the function f(x 1 , x 2 ) = 20x 1 + 40x 2 − x 2 1

4 x 1 x 2 − 2 x 2 2

  • 80
    • 60
      • 40
        • 20

0

x 1

  • 40
    • 20

0

20

x 2

  • 6000
    • 4000
      • 2000

0

f H x 1 ,x 2 L

e

−(x^21 + x^22 ) (^2 6) = 0 for all (x 1 , x 2 )

the equations can be zero if and only if

x 2 (x

2 1

x 1 (x

2 2 −^ 1) = 0

FIGURE 19. Level sets of the function f(x 1 , x 2 ) = −x 1 x 2 e

−(x^21 + x^22 ) 2

-3 -2 -1 0 1 2 3

0

1

2

3

We compute the second partial derivatives. The second partial derivative of f with respect to x 1 is

fx 1 x 1 = 3e

−x^21 −x^22 (^2) x 1 x 2 −^ e^

−x^21 −x^22 (^2) x^3 1 x 2

The second partial derivative of f with respect to x 2 is given by

fx 2 x 2 = 3e

−x^21 −x^22 (^2) x 1 x 2 −^ e^

−x^21 −x^22 (^2) x 1 x

3 2

The cross partial derivative of f with respect to x 1 and x 2 is

fx 2 x 1 = −e

−x^21 − x^22 (^2) + e

−x^21 − x^22 (^2) x 2 1

  • e

−x^21 − x^22 (^2) x 2 2 − e

−x^21 − x^22 (^2) x 2 1 x

2 2

The discriminant

∂ 2 f ∂x 2 1

∂ 2 f ∂x 2 2

[

∂ 2 f ∂x 1 ∂x 2

] 2

is given by

f 11 f 12

f 21 f 22

We can write this as follows by making the substitutions.

∣ ∣ ∣ ∣ ∣ ∣

3 e

−x^21 −x^22 (^2) x 1 x 2 − e

−x^21 −x^22 (^2) x 3 1 x 2 −e^

−x^21 −x^22 (^2) + e

−x^21 −x^22 (^2) x 2 1 +^ e^

−x^21 −x^22 (^2) x 2 2 −^ e^

−x^21 −x^22 (^2) x 2 1 x

2 2

−e

−x^2 1 −x^2 2 (^2) + e

−x^2 1 −x^2 2 (^2) x 2 1 +^ e^

−x^2 1 −x^2 2 (^2) x 2 2 −^ e^

−x^2 1 −x^2 2 (^2) x 2 1 x

2 2 3 e^

−x^2 1 −x^2 2 (^2) x 1 x 2 − e

−x^2 1 −x^2 2 (^2) x 1 x 3 2

∣ ∣ ∣ ∣ ∣ ∣

Computing the discriminant we obtain

Discriminant =

 3 e

−x^2 1 −x^2 2 2 x 1 x 2 − e

−x^2 1 −x^2 2 2 x 3 1 x 2

 3 e

−x^2 1 −x^2 2 2 x 1 x 2 − e

−x^2 1 −x^2 2 2 x 1 x 3 2

−

−e

−x^21 −x^22 (^2) + e

−x^21 −x^22 (^2) x^2 1 +^ e

−x^21 −x^22 (^2) x^2 2 −^ e

−x^21 −x^22 (^2) x^2 1 x

2 2

−e

−x^21 −x^22 (^2) + e

−x^21 −x^22 (^2) x^2 1 +^ e

−x^21 −x^22 (^2) x^2 2 −^ e

−x^21 −x^22 (^2) x^2 1 x

2 2

Multiplying out the first term we obtain

term 1 = e

−x 2 1 −x

2 (^2) x^2 1 (−3 + x

2 1 ) x

2 2 (−3 + x

2 2

= e

−x 2 1 −x

2 2

9 x

2 1 x

2 2 − 3 x

4 1 x

2 2 − 3 x

2 1 x

4 2

  • x

4 1 x

4 2

Multiplying out the second term we obtain

term 2 = e

−x 2 1 −x

2 (^2) (−1 + x^2 1 )

2 (−1 + x

2 2 )

2

= e

−x 2 1 −x

2 2

1 − 2 x

2 1 +^ x

4 1 −^2 x

2 2 + 4x

2 1 x

2 2 −^2 x

4 1 x

2 2 +^ x

4 2 −^2 x

2 1 x

4 2 +^ x

4 1 x

4 2

Subtracting term 2 from term 1 we obtain

Discriminant = e

−x 2 1 −x

2 2

9 x

2 1 x

2 2 − 3 x

4 1 x

2 2 − 3 x

2 1 x

4 2

  • x

4 1 x

4 2

−1 + 2x

2 1 −^ x

4 1 + 2x

2 2 −^4 x

2 1 x

2 2 + 2x

4 1 x

2 2 −^ x

4 2 + 2x

2 1 x

4 2 −^ x

4 1 x

4 2

= e

−x 2 1 −x

2 2

−1 + 5x

2 1 x

2 2 − x

4 1 x

2 2 − x

2 1 x

4 2

  • 2x

2 1

  • 2x

2 2 − x

4 1 − x

4 2

Because e −x 2 1 −^ x

2 (^2) > 0 for all (x 1 , x 2 ), we need only consider the term in parentheses to check the sign

of the discriminant. Consider each of the cases in turn.

a: Consider the critical point (0, 0). In the case the relevant term is given by

( −1 + 5x

2 1 x

2 2 − x

4 1 x

2 2 − x

2 1 x

4 2

  • 2x

2 1

  • 2x

2 2 − x

4 1 − x

4 2

This is negative so this is a saddle point. We can see this in figure 20.

b: Consider the critical point (1, -1). In the case the relevant term is given by

( −1 + 5x

2 1 x

2 2 −^ x

4 1 x

2 2 −^ x

2 1 x

4 2 + 2x

2 1 + 2x

2 2 −^ x

4 1 −^ x

4 2

This is positive. The second derivative of f with respect to x 1 evaluated at (1, -1) is given by

fx 1 x 1 =3e

−x^21 −x^22 (^2) x 1 x 2 −^ e^

−x^21 −x^22 (^2) x 3 1 x 2

=e

−x^21 −x^22 2

3 x 1 x 2 − x

3 1 x 2

=e

− 1 (−3 + 1) =

e

Given that the f 11 is negative, this point is a local maximum. We can see this in figure 21.

c: Consider the critical point (-1, 1). In the case the relevant term is given by

( −1 + 5x

2 1 x

2 2 −^ x

4 1 x

2 2 −^ x

2 1 x

4 2 + 2x

2 1 + 2x

2 2 −^ x

4 1 −^ x

4 2

This is positive. The second derivative of x with respect to x 1 evaluated at (1, -1) is given by

FIGURE 21. Local maximum of the function f(x 1 , x 2 ) = −x 1 x 2 e

−(x^21 + x^22 ) 2

  • 2

0

2

x (^1)

  • 2

0

2

x (^2)

0

f Hx 1 ,x 2 L

  • 2

0

2

x (^1)

FIGURE 22. Local maximum of the function f(x 1 , x 2 ) = −x 1 x 2 e

−(x^21 + x^22 ) 2

  • 2

0

2

x (^1)

  • 2

0

2

x (^2)

0

f Hx 1 ,x 2 L

  • 2

0

2

x (^1)

e: Consider the critical point (-1, -1). In the case the relevant term is given by

( −1 + 5x

2 1 x

2 2 −^ x

4 1 x

2 2 −^ x

2 1 x

4 2 + 2x

2 1 + 2x

2 2 −^ x

4 1 −^ x

4 2

FIGURE 23. Local minimum of the function f(x 1 , x 2 ) = −x 1 x 2 e

−(x^21 + x^22 ) 2

  • 2

0

2 x 1 -^2

0

2

x (^2)

0

f Hx 1 ,x 2 L

  • 2

0

2 x (^1)

This is positive. The second derivative of f with respect to x 1 evaluated at (-1, -1) is given by

fx 1 x 1 =3e

−x^21 −x^22 (^2) x 1 x 2 −^ e^

−x^21 −x^22 (^2) x^3 1 x^2

=e

−x^21 −x^22 2

3 x 1 x 2 − x

3 1 x^2

=e

− 1 (3 − 1) =

e

Given that the f 11 derivative is positive, this point is a local minimum. We can see this in figure

FIGURE 24. Local minimum of the function f(x 1 , x 2 ) = −x 1 x 2 e

−(x 2 1 +^ x

2 2 ) 2

  • 2

0

2 x 1 -^2

0

2

x (^2)

0

f Hx 1 ,x 2 L

  • 2

0

2 x (^1)