fx = L gx and
fy = L gy
Some somewhat repetitious notes about Lagrange Multipliers! We said in class that
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
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.
On the boundary, we have x2 + y2 = 9, so Lagrange multipliers are a good way to go. grad g = <2x, 2y>, so we need
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.
figure 2: 3d figure showing f(x,y) | figure 3: rotated 3d figure showing f(x,y) |