Home of www.mathoninfo.net or The Mart or Commercial PagesThe Lagrange Multipliers

 

 

 

The Lagrange Multipliers

 

Lagrange multipliers are used to find the maximum and minimum values of a function f:ℝⁿ→ℝ subject to one or more constraining equations. I first give an explanation of why the Lagrange method works and then provide several examples that come from my answers to problems posed on Yahoo Answers.

 

An explanation of why the Lagrange method yields the maximum and minimum values of a function subject to one or more constraints.

We first treat f:ℝ²→ℝ.

Let:

(1) f(x,y) be the function for which we seek the maximum and minimum values,
(2) (x₁,y₁) be a point at which f has a maximum or minimum,
(3) g(x,y) = 0 be the constraint.

We observe that g(x,y) defines some curve C on the x,y-plane. We select any vector function C(t) such that C(t) = (x(t),y(t)) and C(t₁) = (x₁,y₁).

Then:

(4) from (3), 0 = dg/dt = (∂g/∂x)(dx/dt) + (∂g/∂y)(dy/dt) = ∇g•C'(t),

(5) from (1), df/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt) = ∇f•C'(t), and consequently, from (2), 0 = df(x₁,y₁)/dt = ∇f(x₁,y₁)•C'(t₁).

Hence, both ∇f and ∇g are orthogonal to C' at t₁, i.e., at point (x₁,y₁); hence, for some nonzero λ, ∇f = λ∇g at (x₁,y₁).

We see that this generalizes rather immediately to functions f:ℝⁿ→ℝ.

With regard to f:ℝ³→ℝ and two constraints g(x,y,z) = 0 and h(x,y,z) = 0, we observe that the two constraints give us a curve (provided that the constraints are compatible, i.e., give an intersection) in 3 dimensions and that, in a very similar manner to what is given in detail above:

∇f(x₁,y₁,z₁)•C'(t₁) = 0
∇g(x,y,z)•C'(t) = 0
∇h(x,y,z)•C'(t) = 0;

hence, at (x₁,y₁,z₁) ∇f, ∇g and ∇h are orthogonal to C'; hence, at (x₁,y₁,z₁) ∇f is some linear combination of ∇g and ∇h; hence, at (x₁,y₁,z₁) ∇f = λ∇g + μ∇h, for some nonzero λ and μ.

Problem 1. f:ℝ²→ℝ. Find the maxima and minima of f(x,y) = x4 + y4 subject to the constraint: x² + y² = 1.

We have:

f(x,y) = x4 + y4

subject to the constraint:

x² + y² = 1.

We let g(x,y,z) = x² + y² - 1. Then ∇f = ∂f/∂x i + ∂f/∂y j = 4x³ i + 4y³ j and ∇g = ∂g/∂x i + ∂g/∂y j = 2x i + 2y j. By the Lagrange multiplier method, we have ∇f = λ ∇g at the maximum and/or minimum value(s) of f for the given constraint, for some non-zero real value λ. Hence,

4x³ i + 4y³ j = ∇f = λ ∇g = λ (2x i + 2y j ) = (2xλ) i + (2yλ) j;

hence,

4x³ = 2xλ
4y³ = 2yλ;

hence, by the first equation, we have as a possible solution x = 0 and one or more corresponding points to examine, by the second equation, we have have as a possible solution y = 0 and one or more corresponding points to examine, and if neither x nor y equals 0, then we have 4x² = 4y², i.e., x² = y². Plugging the value of x = 0 into the constraint, we have y = ±1, plugging y = 0 into the constraint, we have x = ±1, and plugging x² = y² into the constraint, we have x = ±1/√2 and y = ±1/√2. This gives us 8 points to examine: (0,1), (0,-1), (1,0), (-1,0), (1/√2,1/√2), (-1/√2,1/√2), (1/√2,-1/√2), and (-1/√2,-1/√2). We have:

f(0,1) = 04 + 14 = 1
f(0,-1) = 04 + (-1)4 = 1
f(1,0) = 14 + 04 = 1
f(-1,0) = (-1)4 + 04 = 1
f(1/√2,1/√2) = (1/√2)4 + (1/√2)4 = 1/2
f(-1/√2,1/√2) = (-1/√2)4 + (1/√2)4 = 1/2
f(1/√2,-1/√2) = (1/√2)4 + (-1/√2)4 = 1/2
f(-1/√2,-1/√2) = (-1/√2)4 + (-1/√2)4 = 1/2; hence,

the maximum value of f for the given constraint is 1 and occurs at 4 points, and the minimum value of f for the given constraint is 1/2 and occurs at 4 points.

An important point to remember is to always examine all possibilities after you assemble your equations resulting from setting the two gradient vectors equal. This is the one creative aspect in using the Lagrange method for finding maximum and minimum values.

Problem 2. f:ℝ²→ℝ. Find the maxima and minima of f(x,y) = x² + 2y² + 2x + 3 subject to the constraint: x² + y² = 4.

We have:

f(x,y) = x² + 2y² + 2x + 3

subject to the constraint:

x² + y² = 4.

We let g(x,y,z) = x² + y² - 4. Then ∇f = ∂f/∂x i + ∂f/∂y j = (2x + 2) i + 4y j and ∇g = ∂g/∂x i + ∂g/∂y j = 2x i + 2y j. By the Lagrange multiplier method, we have ∇f = λ ∇g at the maximum and/or minimum value(s) of f for the given constraint, for some non-zero real value λ. Hence,

(2x+2) i + 4y j = ∇f = λ ∇g = λ (2x i + 2y j ) = (2xλ) i + (2yλ) j;

hence,

2x + 2 = 2xλ
4y = 2yλ;

hence, by the second equation (1) y = 0 or (2) λ = 2, and by the first equation, if λ = 2 then x = 1. Plugging the value of y = 0 into the constraint, we have x = ±2 and plugging x = 1 into the constraint, we have y = ±√3. This gives us 4 points to examine: (2,0), (-2,0), (1,+√3), and (1,-√3). We have:

f(2,0) = 4 + 0 + 4 + 3 = 11
f(-2,0) = 4 + 0 - 4 + 3 = 3
f(1,+√3) = 1 + 6 + 2 + 3 = 12
f(1,-√3) = 1 + 6 + 2 + 3 = 12; hence,

the maximum value of f for the given constraint is 12 and the minimum value of f for the given constraint is 3.

Problem 3. f:ℝ²→ℝ. Find the maxima and minima of f(x,y) = 2x² + xy - y² + y subject to the constraint: 2x + 3y =1.

We have:

f(x,y) = 2x² + xy - y² + y

subject to the constraint:

2x + 3y =1.

We let g(x,y,z) = 2x + 3y - 1. Then ∇f = ∂f/∂x i + ∂f/∂y j = (4x + y) i + (x - 2y + 1) j and ∇g = ∂g/∂x i + ∂g/∂y j = 2 i + 3 j. By the Lagrange multiplier method, we have ∇f = λ ∇g at the maximum and/or minimum value(s) of f for the given constraint, for some non-zero real value λ. Hence,

(4x+y) i + (x-2y+1) j = ∇f = λ ∇g = λ (2 i + 3 j ) = (2λ) i + (3λ) j;

hence,

4x + y = 2λ
x - 2y + 1 = 3λ;

hence,

12x + 3y = 6λ
2x - 4y + 2 = 6λ;

hence,

10x + 7y = 2; and by the constraint we have:
10x + 15y = 5; hence, 8y = 3; hence y = 3/8 and x = -1/16; hence, there is a maximum or minimum at (x,y) = (-1/16,3/8).

By plugging in any pair of values (x,y) that satisfies the constraint, say (-1,1), we see that this offers a value of f greater than f(-1/16,3/8) = .21875; hence, f(-1/16,3/8) is a minimum.


Problem 4. f:ℝ³→ℝ. Find the maxima and minima of f(x,y,z) = 4x² + y² + 5z² subject to the constraint: 2x + 3y + 4z = 12.

We have:

f(x,y,z) = 4x² + y² + 5z²

subject to the constraint:

2x + 3y + 4z = 12.

We let g(x,y,z) = 2x + 3y + 4z - 12. Then ∇f = ∂f/∂x i + ∂f/∂y j + ∂f/∂z k = 8x i + 2y j + 10z k and ∇g = ∂g/∂x i + ∂g/∂y j + ∂g/∂z k = 2 i + 3 j + 4 k. By the Lagrange multiplier method, we have ∇f = λ ∇g at any maximum or minimum value(s) of f for the given constraint, for some non-zero real value λ. Hence,

8x i + 2y j + 10z k = ∇f = λ ∇g = λ (2 i + 3 j + 4 k) = 2λ i + 3λ j + 4λ k;

hence,

8x = 2λ
2y = 3λ
10z = 4λ;

hence, 16x = 10z and 8y = 30z and consequently x = (5/8)z and y = (15/4)z; hence, plugging in the values for x and y into the constraint equation, we have:

2((5/8)z) + 3((15/4)z) + 4z = 12; hence,

((5+45+16)/4)z = 12 and consequently z = (12)(4)/66 = 8/11, x = (5/8)(8/11) = 5/11, and y = (15/4)(8/11) = 30/11; hence, there is a maximum or minimum at (x,y,z) = (5/11,30/11,8/11). We select a convenient point (0,4,0) that satisfies the constraint to check whether the point (5/11,30/11,8/11) offers a maximum or minimum. We have f(0,4,0) = 16 and f(5/11,30/11,8/11) = 120/11 < 16; hence, f takes on its minimum at (5/11,30/11,8/11).

Problem 5. f:ℝ²→ℝ. Find the maxima and minima of f(x,y) = 9x² - 10y² subject to the constraint: 9x² + 10y² = 7.

We have:

f(x,y) = 9x² - 10y²

subject to the constraint:

9x² + 10y² = 7.

We let g(x,y,z) = 9x² + 10y² - 7. Then ∇f = ∂f/∂x i + ∂f/∂y j = (18x) i + (-20y) j and ∇g = ∂g/∂x i + ∂g/∂y j = (18x) i + (20y) j. By the Lagrange multiplier method, we have ∇f = λ ∇g at the maximum and/or minimum value(s) of f for the given constraint, for some non-zero real value λ. Hence,

(18x) i + (-20y) j = ∇f = λ ∇g = λ (18x i + 20y j ) = (18xλ) i + (20yλ) j;

hence,

18x = 18xλ
-20y = 20yλ;

hence, as λ ≠ 1 by the second equation and λ ≠ -1 by the first equation, the first equation gives us x = 0 and the second equation gives us y = 0. Plugging the value of x = 0 into the constraint, we have y = ±√(7/10) and plugging y = 0 into the constraint, we have x = ±√(7/9). This gives us 4 points to examine: (0,√(7/10)), (0,-√(7/10)), (√(7/9),0), and (-√(7/9),0). We have:

f(0,√(7/10)) = 9∙0² - 10∙(√(7/10))² = 0 - 10∙(7/10) = -7
f(0,-√(7/10)) = 9∙0² - 10∙(-√(7/10))² = 0 - 10∙(7/10) = -7
f(√(7/9),0) = 9∙(√(7/9))² -10∙0² = 9∙(7/9) - 0 = 7
f(-√(7/9),0) = 9∙(-√(7/9))² -10∙0² = 9∙(7/9) - 0 = 7;

hence, the maximum value of f for the given constraint is 7, occurring at points (√(7/9),0) and (-√(7/9),0), and the minimum value of f for the given constraint is -7, occurring at points (0,√(7/10)) and (0,-√(7/10)).

Problem 6. f:ℝ³→ℝ. Find the maxima and minima of f(x,y,z) = x + y subject to the constraints: x² + z² = 1 and x² + y² - z = 0.

I begin by observing that this problem is considerably more complicated than most problems entailing the use of Lagrange multipliers to find a maximum and minimum.

We have f(x,y,z) = x + y subject to the constraints x² + z² = 1 and x² + y² - z = 0. We let g(x,y,z) = x² + z² - 1 and h(x,y,z) = x² + y² - z. Then ∇f = ∂f/∂x i + ∂f/∂y j + ∂f/∂z k = 1 i + 1 j + 0 k, ∇g = ∂g/∂x i + ∂g/∂y j + ∂g/∂z k = 2x i + 0 j + 2z k, and ∇h = ∂h/∂x i + ∂h/∂y j + ∂h/∂z k = 2x i + 2y j - 1 k. By the Lagrange multiplier method, we have ∇f = λ ∇g + µ ∇h at the maximum and minimum values of f on the given constraint, for some non-zero real values of λ and µ. Hence,

1 i + 1 j + 0 k = ∇f = λ ∇g + µ ∇h = λ (2x i + 0 j + 2z k) + µ (2x i + 2y j - 1 k) = (2xλ+2xµ) i + (0λ+2yµ) j + (2zλ-1µ) k;

hence,

1 = 2xλ + 2xµ
1 = 0λ + 2yµ
0 = 2zλ-1µ;

hence, from the second equation, we have:

µ = 1/(2y)

and by the third equation, we have:

λ = µ/(2z) = 1/(4yz);

and by substituting the values of λ and µ into the first equation, we have:

1 = 2x/(4yz) + 2x/(2y) = x/(2yz) + x/y = (x/y)(1/(2z)+1)); hence,

y = x(1+1/(2z)).

Here I make the observation that the first constraint gives a circular cylinder with its axis of symmetry being the y-axis and the second constraint gives a circular paraboloid with its axis of symmetry being the z-axiz and with its vertex being at the origin. This permits a rather easy visualization of the 3-dimensional curve that constitutes the composite constraint, from which it is immediately seen that z never takes on the value of 0 on the curve and that y will not equal zero at the maximum or minimum (rather, f will take on its maximum at a y-coordinate in the vicinity of .60 to .75 and with a positive x-coordinate and f will take on its minimum at a y-coordinate in the vicinity of -.60 to -.75 and with a negative x-coordinate). Hence, our equations for λ and µ are good.

Next, we substitute our value of y into the second constraint to obtain:

z = x² + (x(1+1/(2z)))² = x² + x²(1+1/(2z))² = x² + x²(1+1/z+1/(4z²)) = x²(2+1/z+1/(4z²)); hence,

x² = z/(2+1/z+1/(4z²)) = 4z³/(8z²+4z+1); hence, substituting our value of x² into the first constraint, we have:

4z³/(8z²+4z+1) + z² = 1; hence,

4z³ + 8z^4 + 4z³ + z² = 8z² + 4z + 1; hence,

8z^4 + 8z³ - 7z² - 4z -1 = 0; hence,

z^4 + z³ - (7/8)z² - (1/2)z - 1/8 = 0.

This gives us a quatric equation to solve, whose solution entails solving a cubic equation. I leave the details for you. After considerable rounding and the elimination of some values of z, I obtained a maximum for f of about 1.25 at x ≈ .63 and y ≈ .62 and a minimum for f of about -1.25 at x ≈ -.63 and y ≈ -.62.

Problem 7. f:ℝ³→ℝ. Find the maxima and minima of f(x,y,z) =  x² + y² + z² subject to the constraints: x² + y² + 2z - 16 = 0 and x + y - 4 = 0.

We have f(x,y,z) = x² + y² + z² subject to the constraints x² + y² + 2z - 16 = 0 and x + y - 4 = 0. We let g(x,y,z) = x² + y² + 2z - 16 and h(x,y,z) = x + y - 4. Then ∇f = ∂f/∂x i + ∂f/∂y j + ∂f/∂z k = 2x i + 2y j + 2z k, ∇g = ∂g/∂x i + ∂g/∂y j + ∂g/∂z k = 2x i + 2y j + 2 k, and ∇h = ∂h/∂x i + ∂h/∂y j + ∂h/∂z k = 1 i + 1 j + 0 k. By the Lagrange multiplier method, we have ∇f = λ ∇g + µ ∇h at the maximum and minimum values of f on the given constraint, for some non-zero real values of λ and µ. Hence,

2x i + 2y j + 2z k = ∇f = λ ∇g + µ ∇h = λ (2x i + 2y j + 2 k) + µ (1 i + 1 j + 0 k) = (2xλ+µ) i + (2yλ+µ) j + 2λ k;

hence,

2x = 2xλ + µ
2y = 2yλ + µ
2z = 2λ;

hence, as λ = z, the first two equations become,

µ = 2x - 2xz
µ = 2y - 2yz;

hence,

2x - 2xz = 2y -2yz; hence,

x(1-z) = y(1-z);

hence, we determine the points, common to the constraints, where z = 1 and x = y.

We first plug in z = 1 into the constraints to obtain:

x² + y² = 14
x + y = 4;

hence,

14 = (4 - y)² + y² = 16 - 8y + y² + y² = 2y² - 8y + 16; hence,

y² - 4y + 1 = 0; hence,

y = 2 ± √3; hence, by the second of the constraints, we have the points (2 - √3,2 + √3,1) and (2 + √3,2 - √3,1).

Next, when x = y, the constraints become:

0 = 2x² + 2z -16 = x² + z -8
0 = 2x - 4;

hence, x = 2, y = 2, and z = 4 to give us the point (2,2,4). Plugging in our 3 points into f, we have:

f(2 - √3,2 + √3,1) = 15 and f(2 + √3,2 - √3,1) = 15
f(2,2,4) = 24;

hence, the minimum of f for the given constraints is 15 and the maximum of f for the given constraints is 24.

 

 

 

Choice Gifts for Birthday, Graduation, Mother's Day, Father's Day, Engagement, Anniversary, an Evening Out, or a Trip Abroad

Links to Amazon.com

Jewelry by Type: Earrings - Necklaces - Pendants - Brooches - Cufflinks - Money Clips
Watches: Men's Watches - Men's Watches by Gucci - Men's Watches by Movado - Men's Watches by Tissot - Men's Watches by Cartier - Women's Watches - Women's Watches by Gucci - Women's Watches by Movado

Thank you for visiting and patronizing Math on Info.

 

Math on Info

Search Link to Amazon.com

Search:
Keywords:

Top