Lesson 3.8 · Partial Derivatives
Lagrange multipliers
Many optimization problems come with a condition attached. Maximize the volume of a box, given a fixed amount of cardboard. Minimize the cost of a fence, given the area it must enclose. Find the hottest point, but only on a circular wire. The previous lesson handled boundaries by substituting and reducing to one variable, which can get messy fast. The method of Lagrange multipliers handles constraints directly, using nothing more than the gradient.
The geometric idea
Suppose you want the largest value of among the points on the constraint curve . Picture the level curves drawn on top of the constraint curve.
Walk along the constraint curve. As long as you are crossing level curves of , you can keep walking toward higher values, so you are not at a maximum. The largest value is reached where the constraint curve stops crossing level curves and instead just touches one: the level curve of and the constraint curve are tangent there. In the picture, misses the circle, crosses it, and touches it.
Two curves that are tangent at a point share a tangent line, so their normal lines agree too. The gradient is normal to level curves, so at that point and are parallel.
Method of Lagrange multipliers
To find the maximum and minimum values of (or ) subject to , assuming these extreme values exist and on the constraint:
- Find all points and numbers satisfying
- Evaluate at every point found in step 1. The largest value is the maximum; the smallest is the minimum.
The number is the Lagrange multiplier. In two variables, step 1 is a system of three equations in three unknowns , , :
You usually don't need the value of itself; it is a tool for finding and .
Worked example: A product on a circle
Find the maximum and minimum of on the circle .
Here , so and . The system is
Multiply the first equation by and the second by : and . So . (If , the first equation forces , which is not on the circle, so this is safe.) Then gives and , which yields four points.
| point | ||||
|---|---|---|---|---|
The maximum is and the minimum is .
Worked example: A line across an ellipse
Find the extreme values of on the ellipse .
and , so
Neither , nor can be zero, so and . Substitute into the constraint:
gives with ; gives with . The maximum is and the minimum is .
Three variables
The method is identical with three variables, but now there are four equations: , , and . The geometry is that the level surface of is tangent to the constraint surface.
Worked example: The best closed box
A closed rectangular box must have a total surface area of square meters. What is its largest possible volume?
Maximize subject to , with . The Lagrange equations are
Multiply the first by , the second by , and the third by . All three left sides become , so
(otherwise ), so cancel it. The first equality gives , so ; the second gives , so . The box is a cube. Then , so , and the maximum volume is cubic meters.
Common mistake
Lagrange's method finds candidates, and it assumes the extreme values exist. On a closed, bounded constraint such as a circle, ellipse or sphere, existence is guaranteed, so comparing the values of settles everything. On an unbounded constraint (a line, a hyperbola, a plane), one of the extremes may not exist at all. For example, on has a minimum of but no maximum, because points on the hyperbola can be arbitrarily far from the origin.
Tip
When solving the Lagrange system, a reliable trick is to eliminate by solving each equation for and setting the results equal, or by multiplying equations so that the same product appears on both sides, as in the box example. Watch for cases where you would divide by zero, and handle them separately.
Practice
Find the maximum value of subject to .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the minimum value of subject to .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the maximum value of subject to , where and .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the maximum value of on the circle .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the minimum value of on the sphere .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find the maximum value of subject to , where .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A rectangle with sides parallel to the axes is inscribed in the ellipse , with one corner at in the first quadrant. Find the largest possible area of the rectangle.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Consider subject to . Which statement is correct?