Math 233. Lagrange Multipliers Basics Optimization problems of the form to optimize a function f(x, y, z) over a constraint g(x, y, z) = k can often be conveniently solved using the method of Lagrange multipliers: Theorem. Let f and g have continuous first partial derivatives and suppose f has an extremum at (x 0, y 0, z 0 ) on the smooth surface g(x, y, z) = c. If g(x 0, y 0, z 0 ) is not the zero vector, then there is a real number λ such that f(x 0, y 0, z 0 ) = λ g(x 0, y 0, z 0 ) Analogs of this hold whenever f and g are functions of the same number of variables (2 or more). Geometrically this means the gradients of f and g are parallel when f attains an extreme value on a level surface of g. Under the conditions of the theorem, the relation f = λ g will be true when f has a maximum or a minimum on the surface, however, the condition f = λ g at a point does not guarantee f has a maximum or minimum on at a point on the level surface of g, the only way to determine maximum and minimum values of f on the surface would be to test all possible points where the gradients are parallel while making sure to that maximums and/or minimums actually exist. Example 1. A certain company s shipping regulation is that the sum of the length and girth (perimeter of a cross-section) of a rectangular package cannot exceed 138 inches. Find the dimensions of the rectangular package of largest volume that may be shipped. Answer. For a box with sides x, y and length z the girth is 2x + 2y and the length is z. We then maximize volume f(x, y, z) = xyz subject to the constraint g(x, y, z) = 2x+2y +z = 138. The equation f = λ g leads to the equations yz = 2λ xz = 2λ xy = λ This implies 2λ = yz = xz and so y = x (since for maximal volume x 0, y 0 and z 0) and λ = yz = xy and so z = 2x. 2 Plugging these relations in the constraint 2x + 2y + z = 138 result in 2x + 2x + 2x = 138 = 6x = 138 = x = 23 Then z = 2(23) = 46 and the dimensions of the package are 23 inches by 23 inches by 46 inches yielding a maximum volume of 24334 cubic inches. Example 2. A cargo container (in the shape of a rectangular solid) must have a volume of 600 cubic feet. The bottom needs to be stronger, so it will cost $6 per square foot to construct, whereas the sides and top will cost $3 per square foot to construct. Find the dimensions of the container of this size that has minimum cost. Answer. Minimize cost: f(x, y, z) = xy + 6xz + 6yz (x, y are lengths of edges of base, z is height)
Subject to g(x, y, z) = xyz = 600. Using Lagrange multipliers we get y + 6z = λyz, x + 6z = λxz, 6x + 6y = λxy and because of the constraint, x 0, y 0 and z 0. Thus solving each of these for λ and equating them pairwise we get z + 6 y = z + 6 x z + 6 x = 6 y + 6 x. The first equation above implies x = y and the second implies z = 3 y. Plugging these into the 2 constraint we have y y 3 2 y = 600 implies y3 = 400. Thus the dimensions of the box are x = 3 400, y = 3 400, and z = 3 2 3 400. Example 3. Find the point on the plane 3x 2y + z = 28 that is closest to (0, 0, 0). Answer. Minimize f(x, y, z) = x 2 + y 2 + z 2 subject to g(x, y, z) = 3x 2y + z = 28. Using Lagrange multipliers one solves f = λ g, or 2x = 3λ 2y = 2λ 2z = λ The first and third equation imply x = 3z; the second and third imply y = 2z. When these relations are substituted back into the constraint we obtain z + 4z + z = 28. This implies z = 2. The nearest point is thus (6, 4, 2). Example 4. (A Lagrange multiplier question with two constraints.) Find the maximum and minimum volumes of a rectangular box along with their corresponding dimensions whose surface area equals 000 square cm and whose edge length (sum of lengths of all twelve edges) is 520 cm. Answer. First, the edges cannot all be equal, because if they were, the edge length would be 520/12 = 43 cm and then the surface area would be 6(43) 2 = 1104 square cm which exceeds the given value of 000 square cm for surface area. Thus, there are at most two sides with equal length, we will label these sides y and z, with the third side being x. Thus we know, x y and x z. Now we set up the Lagrange multiplier equations: We will maximize and minimize V = xyz subject to the constraints 2xy + 2xz + 2yz = 000 and 4x + 4y + 4z = 520 We divide these constraint equations by 2 and 4 respectively to obtain the Lagrange multiplier problem Maximize and minimize f(x, y, z) = xyz subject to g(x, y, z) = xy + xz + yz = 4500 and h(x, y, z) = x + y + z = 130
Then f = λ g + µ h implies yz = λ(y + z) + µ xz = λ(x + z) + µ xy = λ(x + y) + µ Subtracting the second equation from the first above yields yz xz = λy λx = z(y x) = λ(y x) = z = λ since y x Similarly, subtracting the third equation from the first above implies y = λ. Thus we conclude y = z. Then the constraint x + y + z = 130 = x + 2y = 130 = x = 130 2y Finally, putting this information into the constraint xy + xz + yz = 4500 yields (130 2y)y + (130 2y)y + y 2 = 4500 = 3y 2 260y + 4500 = 0 The quadratic formula then implies y = 260 ± 260 2 4(3)(4500) 6 = y 62.76840 or y 23.86827 In the minimum volume case, the volume is approximately 17573.86 cm 3 and the dimensions are approximately 4.460320 cm by 62.76840 cm by 62.76840 cm In the maximum volume case, the volume is approximately 4644.620 cm 3 and the dimensions are approximately 82.206346 cm by 23.86827 cm by 23.86827 cm
Practice Exercises on Extrema 1. A cargo container (in the shape of a rectangular box) must have a volume of 4608 cubic feet. The bottom needs to be stronger, so it will cost $5 per square foot to construct, whereas the sides and top will cost $4 per square foot to construct. Find the dimensions of the container of this volume that has minimum cost. 2. Find the volume of the largest rectangular box with edges parallel to the axes that can be inscribed in the ellipsoid x 2 81 + y2 36 + z2 = 1 3. Find the point on the plane 4x 5y + 5z = 132 that is closest to (0, 0, 0). 4. (A Lagrange multiplier question with two constraints.) Find the maximum and minimum volumes of a rectangular box along with their corresponding dimensions whose surface area equals 13100 square cm and whose edge length (sum of lengths of all twelve edges) is 564 cm. 5. A certain company s shipping regulation is that the sum of the length and girth (perimeter of a cross-section) of a rectangular package cannot exceed 108 inches. Find the dimensions of the rectangular package of largest volume that may be shipped.
Practice Exercises on Extrema with Solutions. 1. A cargo container (in the shape of a rectangular box) must have a volume of 4608 cubic feet. The bottom needs to be stronger, so it will cost $5 per square foot to construct, whereas the sides and top will cost $4 per square foot to construct. Find the dimensions of the container of this volume that has minimum cost. Solution: Let x, y be lengths of edges of base, and let z be the height measured in feet. Then we Minimize cost: f(x, y, z) = xy + 8xz + 8yz Subject to g(x, y, z) = xyz = 4608. Using Lagrange multipliers we get y + 8z = λyz, x + 8z = λxz, 8x + 8y = λxy and because of the constraint, x 0, y 0 and z 0. Thus solving each of these for λ and equating them pairwise we get y + 8z yz = x + 8z xz = xy + 8xz = xy + 8yz = x = y Similarly, y + 8z yz = 8y + 8x xy = xy + 8xz = 8yz + 8xz = z = 8 x Plugging these into the constraint we have x x 8 x = 4608 = x3 = 406 = x = 16 Thus the dimensions of the box are x = 16 feet, y = 16 feet, and z = 18 feet. That is, the base is 16 feet by 16 feet, and the height is 18 feet. 2. Find the volume of the largest rectangular box with edges parallel to the axes that can be inscribed in the ellipsoid x 2 81 + y2 36 + z2 = 1 Solution: We will maximize f(x, y, z) = xyz subject to the constraint g(x, y, z) = x2 81 + y2 36 + z2 = 1 where x, y, z are in the first quadrant, then the maximum volume will be 8 times the maximum value for f. Then setting f = λ g we obtain yz = 2λx 81 xz = 2λy 36 xy = 2λz
Notice that for a maximum, x 0, y 0 and z 0. Then dividing the first equation by the second we have yz xz = 2λx 81 36 2λy = y x = 36x 81y y2 = x = 36 2 81 = y2 = 36x2 81 Similary, dividing the first equation by the third we have yz xy = 2λx 81 2λz = z x = x 81z z2 = x = 2 81 = z2 = x2 81 Substituting these into the constraint, we find then y = 6 x 2 81 + 36x2 (81)(36) + x2 (81)() = 1 = x2 = 81 3 = x = 3 = 6 and z = 3 3 3 = 3. Then the maximum volume is 3 3 V = 8 3 6 3 3 = 126 3 3 3 24.415316 3. Find the point on the plane 4x 5y + 5z = 132 that is closest to (0, 0, 0). Solution: Minimize f(x, y, z) = x 2 +y 2 +z 2 subject to g(x, y, z) = 4x 5y+5z = 132. Using Lagrange multipliers one solves f = λ g, or Then and so y = 5x, and z = 5 x and then 4 4 2x = 4λ 2y = 5λ 2z = 5λ λ = 2x 4 = 2y 5 = 2z 5 4x + 52 4 x + 52 z = 132 = 66x = 528 = x = 8 4 Then y = 5 4 (8) = 10 and z = 5 (8) = 10. Thus the point on the plane nearest to 4 (0, 0, 0) is (8, 10, 10). 4. (A Lagrange multiplier question with two constraints.) Find the maximum and minimum volumes of a rectangular box along with their corresponding dimensions whose surface area equals 13100 square cm and whose edge length (sum of lengths of all twelve edges) is 564 cm.
Solution: First, the edges cannot all be equal, because if they were, the edge length would be 564/12 = 47 cm and then the surface area would be 6(47) 2 = 13254 square cm which exceeds the given value of 13100 square cm for surface area. Thus, there are at most two sides with equal length, we will label these sides y and z, with the third side being x. Thus we know, x y and x z. Now we set up the Lagrange multiplier equations: We will maximize and minimize V = xyz subject to the constraints 2xy + 2xz + 2yz = 13100 and 4x + 4y + 4z = 564 We divide these constraint equations by 2 and 4 respectively to obtain the Lagrange multiplier problem Maximize and minimize f(x, y, z) = xyz subject to g(x, y, z) = xy + xz + yz = 6550 and h(x, y, z) = x + y + z = 141 Then f = λ g + µ h implies yz = λ(y + z) + µ xz = λ(x + z) + µ xy = λ(x + y) + µ Subtracting the second equation from the first above yields yz xz = λy λx = z(y x) = λ(y x) = z = λ since y x Similarly, subtracting the third equation from the first above implies y = λ. Thus we conclude y = z. Then the constraint x + y + z = 141 = x + 2y = 141 = x = 141 2y Finally, putting this information into the constraint xy + xz + yz = 6550 yields (141 2y)y + (141 2y)y + y 2 = 6550 = 3y 2 282y + 6550 = 0 The quadratic formula then implies y = 282 ± 282 2 4(3)(6550) 6 = y 52.066228 or y 41.33772 In the minimum volume case, the volume is approximately 43.34 cm 3 and the dimensions are approximately 36.867544 cm by 52.066228 cm by 52.066228 cm In the maximum volume case, the volume is approximately 100464.066 cm 3 and the dimensions are approximately 57.132456 cm by 41.33772 cm by 41.33772 cm
5. A certain company s shipping regulation is that the sum of the length and girth (perimeter of a cross-section) of a rectangular package cannot exceed 108 inches. Find the dimensions of the rectangular package of largest volume that may be shipped. Solution: For a box with sides x, y and length z the girth is 2x + 2y and the length is z. We then maximize volume f(x, y, z) = xyz subject to the constraint g(x, y, z) = 2x + 2y + z = 108. The equation f = λ g leads to the equations yz = 2λ xz = 2λ xy = λ This implies 2λ = yz = xz and so y = x (since for maximal volume x 0, y 0 and z 0) and λ = yz = xy and so z = 2x. 2 Plugging y = x and z = 2x in the constraint 2x + 2y + z = 108 results in 2x + 2x + 2x = 108 = 6x = 108 = x = 18 Then z = 2(18) = 36 and the dimensions of the package are 18 inches by 18 inches by 36 inches yielding a maximum volume of 11664 cubic inches.