Lagrange multipliers are a method used to optimize an objective function when the variables are constrained. Before, we used a constraint to reduce a function of three variables to one of two variables. Now, the function is given in terms of two variables, and x and y are limited.
Goal:
Maximize or minimize an objective function f(x,y).
Constraints:
g(x,y)=0
Procedure:
Let the objective function f and the constraint function g be differentiable on a region of R2 with ∇g(x,y)=0⃗ on the curve g(x,y)=0.
Find x, y, and λ such that
∇f(x,y)=λ∇g(x,y) and g(x,y)=0.
These are the candidates for the maxima and minima.
Select the points (x,y) that give the max/min values for f(x,y).
Examples
Find the absolute maximum and minimum for f(x,y)=2x2+y2+2 subject to g(x,y)=x2+4y2−4=0.
Solution
∇f(x,y)∇g(x,y)=4xı^+2yȷ^=2xı^+8yȷ^
Set up the equality:
∇f(x,y)4x and 2y=λ∇g(x,y)=λ2x⟶2x(2−λ)=0⟶x=0 or λ=2=λ8y⟶2y(1−4λ)=0⟶y=0 or λ=41
The third condition is that g(x,y)=0:
If x=0:
02+4y2−4=0⟶y=1,−1
If y=0:
x2+4(0)2−4=0⟶x=2,−2
Thus, we have four candidates for the maximum and minimum: (0,1), (0,−1), (2,0), and (−2,0). We just need to test the function f at these four points and see which gives the largest value and which gives the smallest.
(x,y)(0,1)(0,−1)(2,0)(−2,0)f(x,y)331010
Therefore, the maximum of this function is 10, attained at (2,0) and (−2,0), and the minimum is 3, attained at (0,1) and (0,−1).
Find the absolute maximum and minimum of f(x,y)=xy subject to the constraint x2+y2−8y=9.
Maximum of 9 at (3,3) and (−3,−3); minimum of −3 at (−3,3) and (3,−3)
Find the absolute maximum and minimum of f(x,y)=y2−4x2 subject to the constraint x2+2y2=4.
Maximum of 2 at (0,2) and (0,−2); minimum of −16 at (2,0) and (−2,0)
Find the point on the surface 4x+y−1=0 closest to the point (1,2,−3).
Solution
It will be easiest to minimize the squared distance from this point (subject to the constraint that the point lies on the surface):
f(x,y,z)g(x,y,z)=(x−1)2+(y−2)2+(z+3)2=4x+y−1
Find the gradients:
∇f(x,y,z)∇g(x,y,z)=⟨2x−2,2y−4,2z+6⟩=⟨4,1,0⟩
Set up the equality, and equate the components:
∇f(x,y,z)2x−2 and 2y−4 and 2z+6=λ∇g(x,y,z)=4λ⟶x=1+2λ=λ⟶y=2+2λ=0⟶z=−3
The last condition is that g(x,y)=0:
4x+y−14(1+2λ)+(2+2λ)−1217λλ=0=0=−5=−1710
Therefore, the point on the given surface that is closest to (1,2,−3) is
(−173,1729,−3)