lagrange multipliers

 >up

Some somewhat repetitious notes about Lagrange Multipliers! We said in class that

Critical points of a function f(x,y) constrained to a curve g(x,y) = c occur when tangents to the curve are parallel to level curves. That is the same as saying "when normals to the level curves are parallel to normals to the curve g(x,y) = c". But normals to curves f(x,y) = k (or g(x,y) = c) are given by the gradient, so this is
grad f = (constant) grad g, or
fx = L gx and
fy = L gy
Plus we must satisfy the constraint,
g(x,y) = c.

Now, what's this L (which we called lambda in class)? It's just a constant! Two vectors are parallel when they're constant multiples of each other: a = L b for some constant L.

An Example

Consider the function f(x,y) = x2 + 3 y - x y2 on the domain x2 + y2 <= 9. Find the absolute maximum and minimum values of f.

Solution: We'll check the interior and boundary of the domain separately. In the interior, x2 + y2 < 9, we need grad f = 0, or

2x - y2 = 0, and
3 - 2 x y = 0.

The first of these says x = y2/2, so the second gives y3 = 3, and y = 31/3. Plugging back in for x, x = 32/3/2.

level curves and critical points for f with constraint
figure 1: level curves and critical points for a function f(x,y)

On the boundary, we have x2 + y2 = 9, so Lagrange multipliers are a good way to go. grad g = <2x, 2y>, so we need

2x - y2 = L 2 x and
3 - 2 x y = L 2 y, with
x2 + y2 = 9.

This is a bit of a pain to solve, so we'll do it using Maple (or a similar program, like Mathematica). Solving these gives the points (x,y) = (-2.87,-0.86), (-2.47,-1.70), (-1.86,2.36), (1.29,-2.71), (1.60,2.54), and (2.98,0.38). These points and the level curves of f(x,y) are shown in the figure to the right. (Check that you can match the numerical values here to the points on the graph!) Notice that at the points the level curves are, in fact, parallel to the bounding curve!

Now, what are the maximum and minimum? We can find these by plugging in the critical points:

x = -2.87 -2.46 -1.86 1.29 1.60 2.98
y = -0.86 -1.70 2.36 -2.71 2.54 0.38
f(x,y) = 7.81 8.15 20.83 -15.92 -0.13 9.57

There's one more point to check, the interior critical point. f(32/3/2, 31/3) = 3.25 (approximately).

So the absolute maximum is 20.83 at (-1.86,2.36), and the absolute minimum is -15.92 at (1.29,-2.71). To illustrate this, the 3D surface and bounding curve are shown in two orientations below. In the first, the x- and y-axes are oriented as you expect, with x pointing out to the left and y out to the right. In the second, the figure is rotated so that the x-axis points out to the right, and the y-axis points back away from you to the right. Check that you can see how this works and match it with the level curves and critical points shown below.

3d figure   rotated 3d figure
figure 2: 3d figure showing f(x,y)   figure 3: rotated 3d figure showing f(x,y)


 >up


lagrange multipliers
Last modified: Mon Feb 16 15:49:48 EST 2004
Comments to:glarose@umich.edu
©2004 Gavin LaRose, UM Math Dept.