Before Next Class: - : Why The Method of Lagrange Multipliers Works

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Week 11 15.

3 Constrained Optimization: Lagrange Multipliers 1

• Class begins at 11:10am ET

• Your instructor is Dr. Xiaoyue Cui

• Before next class:

– Make sure to download next lecture worksheet and bring it to your lecture.

After learning this section, you should be able to

• Develop an intuitive understanding of why the method of Lagrange multipliers works


in terms of the gradient vector.

• Use the method of Lagrange multipliers to find the maximum and minimum values of
a multivariable function subject to a constraint.

• Use Lagrange multipliers to solve optimization problems from geometry.

We previously considered how to find the extreme values of functions on both unrestricted
domains and on closed, bounded domains. Other types of optimization problems involve
maximizing or minimizing a quantity subject to an external constraint. In these cases the
extreme values frequently won’t occur at the points where the gradient is zero, but rather
at other points that satisfy an important geometric condition. These problems are often
called constrained optimization problems and can be solved with the method of Lagrange
Multipliers, which we study in this section.

Why the method of Lagrange Multipliers works


According to U.S. postal regulations, the girth plus the length of a parcel sent by mail may
not exceed 108 inches, where by “girth” we mean the perimeter of the smallest end. Our
goal is to find the largest possible volume of a rectangular parcel with a square end that can
be sent by mail. If we let x be the length of the side of one square end of the package and
y the length of the package, then we want to maximize the volume f (x, y) = x2 y of the box
subject to the constraint that the girth (4x) plus the length (y) is as large as possible, or
4x + y = 108. The equation 4x + y = 108 is thus an external constraint on the variables.

1. The constraint equation involves the function g that is given by

g(x, y) = 4x + y

Then the constraint is a contour of g , and is therefore a two-dimensional curve.


The graph below shows the graph of the constraint equation g(x, y) = 108 along with
a few contours of the volume function f . Since our goal is to find the maximum
value of f subject to the constraint g(x, y) = 108, we want to find the point on our
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 2

constraint curve that intersects the contours of f at which f has its largest value.

i. Points A and B in the graph lie on a contour of f and on the constraint equation
g(x, y) = 108. Explain why neither A nor B provides a maximum value of f that
satisfies the constraint.

ii. Points C and D in the graph lie on a contour of f and on the constraint equation
g(x, y) = 108. Explain why neither A nor B provides a maximum value of f that
satisfies the constraint.

iii. Based on your responses to parts i. and ii., draw the contour of f on which you
believe f will achieve a maximum value subject to the constraint g(x, y) = 108.
Explain why you drew the contour you did.

2. Recall that g(x, y) = 108 is a contour of the function , and that the gradient of a
function is always orthogonal to its contours. With this in mind, how should ∇f and
∇g be related at the optimal point? Explain.
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 3

We saw that we can create a function g from the constraint, specifically g(x, y) = 4x + y.
The constraint equation is then just a contour of g, g(x, y) = c where c is a constant
(in our case 108). The graph below illustrates that the volume function f is maximized,
subject to the constraint g(x, y) = c, when the graph of g(x, y) = c is tangent to a
contour of f . Moreover, the value of f on this contour is the sought maximum value.

To find this point where the graph of the constraint is tangent to a contour of , recall that
∇f is perpendicular to the contours of f and ∇g is perpendicular to the contour of g. At
such a point, the vectors ∇f and ∇g are parallel, and thus we need to determine the points
where this occurs. Recall that two vectors are parallel if one is a nonzero scalar multiple of
the other, so we therefore look for values of a parameter that make

∇f = λ∇g.

This constant λ is called a Lagrange multiplier.


Now let’s find the λ and x, y such that f (x, y) = x2 y is maximized, subject to the constraint
g(x, y) = 4x + y = 108.
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 4

Definition:
Suppose P0 is a point satisfying the constraint g(x, y) = c.

1. f has a local maximum at the point P0 subject to the constraint if

2. f has a global maximum at the point P0 subject to the constraint if

.
Local and global minima are defined similarly.

The method of Lagrange Multipliers:


The general technique for optimizing a function f = f (x, y) subject to a constraint g(x, y) = c
is to solve the system ∇f = λ∇g and g(x, y) = c for x, y,and λ. We then evaluate the function
f at each point (x, y) that results from a solution to the system in order to find the optimum
values of subject to the constraint.

1. Let T (x, y, z) = x − 2y + 5z + 64 give the temperature, in degrees Celsius, at the point


(x, y, z), where x, y, and z are measured in meters. Find the maximum and minimum
temperature on the sphere x2 + y 2 + z 2 = 120.
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 5

2. An ant walks along the surface z = x2 − y 2 + 4y + 14 so that its distance from the z-axis
remains constant at 2 units. Given that the ant makes one full revolution around the
z-axis, find the highest and the lowest point of the ant.
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 6

Lagrangian function
Constrained optimization problems are frequently solved using a Lagrangian function,
L. For example, to optimize f (x, y) subject to the constraint g(x, y) = c, we use the
Lagrangian function
L(x, y, λ) = f (x, y) − λ(g(x, y) − c)
To see how the function L, compute the partial derivative of L:
∂L
=
∂x
∂L
=
∂y
∂L
=
∂λ
Note that if (x0 , y0 ) is an extreme point of f (x, y) subjection to g(x, y) = c and λ0 is
the corresponding Lagrange multiplier, then at the point (x0 , y0 , λ0 ) we have
Week 11 15.3 Constrained Optimization: Lagrange Multipliers 7

3. A company has a production function with three inputs x, y and z given by

f (x, y, z) = 50x2/5 y 1/5 z 1/5

The total budget is 24000 dollars and the company can buy x, y and z at 80, 12 and 10
dollars per unit, respectively. What combination of inputs will maximize production?

You might also like