Learning Objectives
- 4.8.1 Use the method of Lagrange multipliers to solve optimization problems with one constraint.
- 4.8.2 Use the method of Lagrange multipliers to solve optimization problems with two constraints.
Solving optimization problems for functions of two or more variables can be similar to solving such problems in single-variable calculus. However, techniques for dealing with multiple variables allow us to solve more varied optimization problems for which we need to deal with additional conditions or constraints. In this section, we examine one of the more common and useful methods for solving optimization problems with constraints.
Lagrange Multipliers
Example 4.41 was an applied situation involving maximizing a profit function, subject to certain constraints. In that example, the constraints involved a maximum number of golf balls that could be produced and sold in month and a maximum number of advertising hours that could be purchased per month Suppose these were combined into a budgetary constraint, such as that took into account the cost of producing the golf balls and the number of advertising hours purchased per month. The goal is, still, to maximize profit, but now there is a different type of constraint on the values of and This constraint, when combined with the profit function is an example of an optimization problem, and the function is called the objective function. A graph of various level curves of the function follows.
In Figure 4.59, the value represents different profit levels (i.e., values of the function As the value of increases, the curve shifts to the right. Since our goal is to maximize profit, we want to choose a curve as far to the right as possible. If there was no restriction on the number of golf balls the company could produce, or the number of units of advertising available, then we could produce as many golf balls as we want, and advertise as much as we want, and there would not be a maximum profit for the company. Unfortunately, we have a budgetary constraint that is modeled by the inequality To see how this constraint interacts with the profit function, Figure 4.60 shows the graph of the line superimposed on the previous graph.
As mentioned previously, the maximum profit occurs when the level curve is as far to the right as possible. However, the level of production corresponding to this maximum profit must also satisfy the budgetary constraint, so the point at which this profit occurs must also lie on (or to the left of) the red line in Figure 4.60. Inspection of this graph reveals that this point exists where the line is tangent to the level curve of Trial and error reveals that this profit level seems to be around when and are both just less than We return to the solution of this problem later in this section. From a theoretical standpoint, at the point where the profit curve is tangent to the constraint line, the gradient of both of the functions evaluated at that point must point in the same (or opposite) direction. Recall that the gradient of a function of more than one variable is a vector. If two vectors point in the same (or opposite) directions, then one must be a constant multiple of the other. This idea is the basis of the method of Lagrange multipliers.
Theorem 4.20
Method of Lagrange Multipliers: One Constraint
Let and be functions of two variables with continuous partial derivatives at every point of some open set containing the smooth curve Suppose that when restricted to points on the curve has a local extremum at the point and that Then there is a number called a Lagrange multiplier, for which
Proof
Assume that a constrained extremum occurs at the point Furthermore, we assume that the equation can be smoothly parameterized as
where s is an arc length parameter with reference point at Therefore, the quantity has a relative maximum or relative minimum at and this implies that at that point. From the chain rule,
where the derivatives are all evaluated at However, the first factor in the dot product is the gradient of and the second factor is the unit tangent vector to the constraint curve. Since the point corresponds to it follows from this equation that
which implies that the gradient is either or is normal to the constraint curve at a constrained relative extremum. However, the constraint curve is a level curve for the function so that if then is normal to this curve at It follows, then, that there is some scalar such that
□
To apply Method of Lagrange Multipliers: One Constraint to an optimization problem similar to that for the golf ball manufacturer, we need a problem-solving strategy.
Problem-Solving Strategy
Steps for Using Lagrange Multipliers
- Determine the objective function and the constraint function Does the optimization problem involve maximizing or minimizing the objective function?
- Set up a system of equations using the following template:
- Solve for and
- The largest of the values of at the solutions found in step maximizes the smallest of those values minimizes
Example 4.42
Using Lagrange Multipliers
Use the method of Lagrange multipliers to find the minimum value of subject to the constraint
Solution
Let’s follow the problem-solving strategy:
- The optimization function is To determine the constraint function, we must first subtract from both sides of the constraint. This gives The constraint function is equal to the left-hand side, so The problem asks us to solve for the minimum value of subject to the constraint (see the following graph).
- We then must calculate the gradients of both f and g:
The equation becomes
which can be rewritten as
Next, we set the coefficients of equal to each other:
The equation becomes Therefore, the system of equations that needs to be solved is
- This is a linear system of three equations in three variables. We start by solving the second equation for and substituting it into the first equation. This gives so substituting this into the first equation gives
Solving this equation for gives We then substitute this into the third equation:
Since this gives - Next, we substitute into gives To ensure this corresponds to a minimum value on the constraint function, let’s try some other values, such as the intercepts of Which are and We get and so it appears has a minimum at
Checkpoint 4.37
Use the method of Lagrange multipliers to find the maximum value of subject to the constraint
Let’s now return to the problem posed at the beginning of the section.
Example 4.43
Golf Balls and Lagrange Multipliers
The golf ball manufacturer, Pro-T, has developed a profit model that depends on the number of golf balls sold per month (measured in thousands), and the number of hours per month of advertising y, according to the function
where is measured in thousands of dollars. The budgetary constraint function relating the cost of the production of thousands golf balls and advertising units is given by Find the values of and that maximize profit, and find the maximum profit.
Solution
Again, we follow the problem-solving strategy:
- The optimization function is To determine the constraint function, we first subtract 216 from both sides of the constraint, then divide both sides by which gives The constraint function is equal to the left-hand side, so The problem asks us to solve for the maximum value of subject to this constraint.
- So, we calculate the gradients of both
The equation becomes
which can be rewritten as
We then set the coefficients of equal to each other:
The equation becomes Therefore, the system of equations that needs to be solved is
- We use the left-hand side of the second equation to replace in the first equation:
Then we substitute this into the third equation:
Since this gives - We then substitute into which gives
Therefore the maximum profit that can be attained, subject to budgetary constraints, is with a production level of golf balls and hours of advertising bought per month. Let’s check to make sure this truly is a maximum. The endpoints of the line that defines the constraint are and Let’s evaluate at both of these points:
The second value represents a loss, since no golf balls are produced. Neither of these values exceed so it seems that our extremum is a maximum value of
Checkpoint 4.38
A company has determined that its production level is given by the Cobb-Douglas function where x represents the total number of labor hours in year and y represents the total capital input for the company. Suppose unit of labor costs and unit of capital costs Use the method of Lagrange multipliers to find the maximum value of subject to a budgetary constraint of per year.
In the case of an optimization function with three variables and a single constraint function, it is possible to use the method of Lagrange multipliers to solve an optimization problem as well. An example of an optimization function with three variables could be the Cobb-Douglas function in the previous example: where represents the cost of labor, represents capital input, and represents the cost of advertising. The method is the same as for the method with a function of two variables; the equations to be solved are
Example 4.44
Lagrange Multipliers with a Three-Variable Optimization Function
Find the minimum of the function subject to the constraint
Solution
- The optimization function is To determine the constraint function, we subtract from each side of the constraint: which gives the constraint function as
- Next, we calculate and
This leads to the equations
which can be rewritten in the following form:
- Since each of the first three equations has on the right-hand side, we know that and all three variables are equal to each other. Substituting and into the last equation yields so and and which corresponds to a critical point on the constraint curve.
- Then, we evaluate f at the point
Therefore, an extremum of the function is To verify it is a minimum, choose other points that satisfy the constraint and calculate at that point. For example,
Both of these values are greater than leading us to believe the extremum is a minimum.
Checkpoint 4.39
Use the method of Lagrange multipliers to find the minimum value of the function
subject to the constraint
Problems with Two Constraints
The method of Lagrange multipliers can be applied to problems with more than one constraint. In this case the optimization function, is a function of three variables:
and it is subject to two constraints:
There are two Lagrange multipliers, and and the system of equations becomes
Example 4.45
Lagrange Multipliers with Two Constraints
Find the local extreme values of the function
subject to the constraints and
Solution
Let’s follow the problem-solving strategy:
- The optimization function is To determine the constraint functions, we first subtract from both sides of the first constraint, which gives so The second constraint function is
- We then calculate the gradients of
The equation becomes
which can be rewritten as
Next, we set the coefficients of equal to each other:
The two equations that arise from the constraints are and Combining these equations with the previous three equations gives
- The first three equations contain the variable Solving the third equation for and replacing into the first and second equations reduces the number of equations to four:
Next, we solve the first and second equation for The first equation gives the second equation gives We set the right-hand side of each equation equal to each other and cross-multiply:
Therefore, either or If then the first constraint becomes The only real solution to this equation is and which gives the ordered triple This point does not satisfy the second constraint, so it is not a solution.
Next, we consider which reduces the number of equations to three:
We substitute the first equation into the second and third equations:
Then, we solve the second equation for which gives We then substitute this into the first equation,
and use the quadratic formula to solve for
Recall so this solves for as well. Then, so
Therefore, there are two ordered triplet solutions:
- We substitute into which gives
Then, we substitute into which gives
and are the local extreme values of subject to the given constraints.
Checkpoint 4.40
Use the method of Lagrange multipliers to find the minimum value of the function
subject to the constraints and
Section 4.8 Exercises
For the following exercises, use the method of Lagrange multipliers to find the maximum and minimum values of the function subject to the given constraints.
Minimize on the ellipse
Maximize
Maximize
Maximize
Minimize subject to the constraint
For the next group of exercises, use the method of Lagrange multipliers to solve the following applied problems.
A pentagon is formed by placing an isosceles triangle on a rectangle, as shown in the diagram. If the perimeter of the pentagon is in., find the lengths of the sides of the pentagon that will maximize the area of the pentagon.
A rectangular box without a top (a topless box) is to be made from ft2 of cardboard. Find the maximum volume of such a box.
Find the minimum and maximum distances between the ellipse and the origin.
Show that, of all the triangles inscribed in a circle of radius (see diagram), the equilateral triangle has the largest perimeter.
Find the minimum distance from the parabola to point
A large container in the shape of a rectangular solid must have a volume of m3. The bottom of the container costs $5/m2 to construct whereas the top and sides cost $3/m2 to construct. Use Lagrange multipliers to find the dimensions of the container of this size that has the minimum cost.
Find the point on the plane that is closest to the point
Find the maximum value of where denote the acute angles of a right triangle. Draw the contours of the function using a CAS.
A rectangular solid is contained within a tetrahedron with vertices at
and the origin. The base of the box has dimensions and the height of the box is If the sum of is 1.0, find the dimensions that maximizes the volume of the rectangular solid.
[T] By investing x units of labor and y units of capital, a watch manufacturer can produce watches. Find the maximum number of watches that can be produced on a budget of if labor costs $100/unit and capital costs $200/unit. Use a CAS to sketch a contour plot of the function.