Lagrange multipliers
Find the largest and smallest values of f on a constraint curve g(x, y) = k by solving ∇f = λ∇g together with g = k, understand why the gradients are parallel, compare the candidate values, and use the same method for a function of three variables.
It opens on
A circular fence x² + y² = 1 is built around the summit of the hill. Walking only along the fence, the height goes up and down. Where is it greatest, and what does the fence look like against the contours there?
Why it matters
Many real problems ask for the best value while a budget, a length or a material is fixed; the method finds it without solving the constraint for a variable, and the multiplier λ tells how much the best value would change if the constraint changed.
Good to know first
- Absolute extrema on a closed region: the extreme value theorem gives a largest and a smallest value on a closed and bounded set, found by comparing candidate values
- The gradient vector: ∇f is perpendicular to the level curves of f and ∇g to those of g
Step by step
Why the gradients are parallel
See that the highest point on a constraint is where a contour of f touches the constraint, and deduce the conditions ∇f = λ∇g and g = k with ∇g ≠ 0.
Near the marked point (0.92, 0.38): ∇f ≈ ⟨−1.46, −0.60⟩ and ∇g = ⟨1.84, 0.76⟩, and both component ratios are about −0.79, so λ ≈ −0.79.
A common mix-up
Gradients are equal at the extreme.
In fact: ∇f ≈ −0.79 ∇g there: opposite directions and different lengths, so only parallel.
Solving the system
Solve the Lagrange system by eliminating λ, evaluate f at every solution and compare, for the circle fence and then for a straight fence.
(−2x + y)y = (x − 4y)x simplifies to x² − 2xy − y² = 0. Here x ≠ 0, since x = 0 would force y = 0, off the fence.
A common mix-up
Every solution is a maximum.
In fact: The system finds candidates; the four fence solutions give heights 9.21, 7.79, 9.21, 7.79.
Three variables and the meaning of λ
Apply the method to f(x, y, z) with one constraint, find the box of greatest volume, and read λ as the rate at which the best value changes with the constraint.
For the open-top box, ∇V = ⟨yz, xz, xy⟩ and ∇g = ⟨y + 2z, x + 2z, 2x + 2y⟩, so yz = λ(y + 2z), xz = λ(x + 2z), xy = λ(2x + 2y).
A common mix-up
λ is the answer.
In fact: It is the rate 1/2 m³ per m²; the maximum volume is 4 m³.
Try it
Write the three Lagrange equations for f = x + y on x² + y² = 1.Answer
1 = 2λx, 1 = 2λy, x² + y² = 1
Hint: ∇f = ⟨1, 1⟩ and ∇g = ⟨2x, 2y⟩
Find the point of the line x + y = 2 where x² + y² is least.Answer
(1, 1), where the value is 2
Hint: 2x = λ and 2y = λ give x = y
Find the greatest volume of a closed box with surface area 24 m².Answer
8 m³, a cube of side 2
Hint: g = 2xy + 2xz + 2yz; the three equations give x = y = z
Here ∇g = ⟨2x, 2y⟩. Why is it never the zero vector on the fence?Answer
Only (0, 0) makes it zero, and (0, 0) is not on the circle.
Why evaluate f at all four instead of stopping at the first solution?Answer
Solutions include lowest points; only the values tell maximum from minimum.
