In the previous section, we were concerned with finding maxima and minima of functions without any constraints on the variables (other than being in the domain of the function). We ended by discussing what we would do if there were constraints on the variables. The following example illustrates a simple case of this type of problem.
For a rectangle whose perimeter is m, find the dimensions that will maximize the area.
SolutionThe area of a rectangle with width and height is . The perimeter of the rectangle is then given by the formula . Since we are given that the perimeter , this problem can be stated as:
The reader is probably familiar with a simple method, using single-variable calculus, for solving this problem. Since we must have , then we can solve for, say, in terms of using that equation. This gives , which we then substitute into to get . This is now a function of alone, so we now just have to maximize the function on the interval . Since and , then the Second Derivative Test tells us that is a local maximum for , and hence must be the global maximum on the interval (since at the endpoints of the interval). So since , then the maximum area occurs for a rectangle whose width and height both are m.
Notice in the above example that the ease of the solution depended on being able to solve for one variable in terms of the other in the equation . But what if that were not possible (which is often the case)? In this section we will use a general method, called the Lagrange multiplier method, for solving constrained optimization problems: ††margin: Note: Joseph Louis Lagrange (1736–1813) was a French mathematician and astronomer. Λ
for some constant . The equation is called the constraint equation, and we say that and are constrained by . Points which are maxima or minima of with the condition that they satisfy the constraint equation are called constrained maximum or constrained minimum points, respectively. Similar definitions hold for functions of three variables.
The previous section optimized a function on a set . In this section, “subject to ” is the same as saying that the set is given by . The Lagrange multiplier method for solving such problems can now be stated:
Let and be functions with continuous partial derivatives of all orders, and suppose that is a scalar constant such that for all that satisfy the equation . Then to solve the constrained optimization problem
find the points that solve the equation for some constant (the number is called the Lagrange multiplier). If there is a constrained maximum or minimum, then it must be at such a point.
A rigorous proof of the above theorem is well beyond the scope of this text. Note that the theorem only gives a necessary condition for a point to be a constrained maximum or minimum. Whether a point that satisfies for some actually is a constrained maximum or minimum can sometimes be determined by the nature of the problem itself. For instance, in Example 13.9.1 it was clear that there had to be a global maximum.
How can one tell when a point that satisfies the condition in Theorem 13.9.1 is a constrained maximum or minimum? The answer is that it depends on the constraint function and any implicit constraints. It can be shown that if the constraint equation (plus any hidden constraints) describes a bounded set in , then the constrained maximum or minimum of will occur either at a point satisfying or at a “boundary” point of the set .
Watch the video:
LaGrange Multipliers from https://youtu.be/ry9cgNx1QV8
In Example 13.9.1 the constraint equation describes a line in , which by itself is not bounded. However, there are “hidden” constraints, due to the nature of the problem, namely , which cause that line to be restricted to a line segment in (including the endpoints of that line segment), which is bounded.
For a rectangle whose perimeter is m, use the Lagrange multiplier method to find the dimensions that will maximize the area.
SolutionAs we saw in Example 13.9.1, with and representing the width and height, respectively, of the rectangle, this problem can be stated as:
Then solving the equation for some means solving the equations and , namely:
The general idea is to solve for in both equations, then set those expressions equal (since they both equal ) to solve for and . Doing this we get
so now substitute either of the expressions for or into the constraint equation to solve for and :
There must be a maximum area, since the minimum area is and , so the point that we found (called a constrained critical point) must be the constrained maximum. Therefore, the maximum area occurs for a rectangle whose width and height both are m.
Find the points on the circle which are closest to and farthest from the point .
SolutionThe distance from any point to the point is
and minimizing the distance is equivalent to minimizing the square of the distance. Thus the problem can be stated as:
Solving means solving the following equations:
Note that since otherwise we would get in the first equation. Similarly, . So we can solve both equations for as follows:
Substituting this into yields , so . So the two constrained critical points are and . Since and , and since there must be points on the circle closest to and farthest from , then it must be the case that is the point on the circle closest to and is the farthest from (see Figure 13.9.1).
Notice that since the constraint equation describes a circle, which is a bounded set in , then we were guaranteed that the constrained critical points we found were indeed the constrained maximum and minimum.
The Lagrange multiplier method can be extended to functions of three variables.
Maximize (and minimize) subject to .
SolutionSolve the equation :
The first equation implies (otherwise we would have ), so we can divide by in the second equation to get and we can divide by in the first and third equations to get . Substituting these expressions into the constraint equation yields the constrained critical points and . Since , and since the constraint equation describes a sphere (which is bounded) in , then is the constrained maximum point and is the constrained minimum point.
When we have two constraints, we can still use Lagrange multipliers once we’ve made a slight modification. The optimization problem
is satisfied when .
The plane intersects the cylinder in an ellipse. Find the points on the ellipse closest to and farthest from the origin.
SolutionWe can optimize the distance by optimizing the function , which has a simpler derivative. We let be the plane constraint, and be the cylinder constraint. We see that
The equation means that
Adding the first two equations tells us that , so that or . If , then , and the constraint equations become
Substituting into tells us that , which simplifies to . This means that we need to look at the points and , which are both distance 2 from the origin. If , then the constraint equations become
and we need to look at the points . These have distance , which are both greater than 2. Therefore, the closest points are and , while the furthest point is .
Finally, note that solving the equation means having to solve a system of two (possibly nonlinear) equations in three unknowns, which as we have seen before, may not be possible to do. And the 3-variable case can get even more complicated. All of this somewhat restricts the usefulness of Lagrange’s method to relatively simple functions. Luckily there are many numerical methods for solving constrained optimization problems, though we will not discuss them here.
Find the constrained maxima and minima of given that .
Find the constrained maxima and minima of given that .
Find the points on the circle which are closest to and farthest from the point .
Find the constrained maxima and minima of given that .
Find the maximum volume of a rectangular box inscribed in the unit sphere.
Find the minimum surface area of a box that holds 2 cubic meters.
The girth of a box is the perimeter of a cross section perpendicular to its length. The US post office will accept packages whose combined length and girth are at most 130 inches. Find the dimensions of the largest volume box that will be accepted.
Using Lagrange multipliers, find the shortest distance from the point to the plane . (See also Key Idea 11.6.1.)
Find all points on the surface that are closest to the origin.
Find the three positive numbers whose sum is 60 and whose product is as large as possible.
Find all points on the plane in the first octant at which has a maximum value.
Find the points on the surface that are closest to the origin.
Find the maximum and minimum points of when .
Find three real numbers whose sum is 12 and the sum of whose squares is a small as possible.
The plane intersects the cylinder in an ellipse. Find the points on the ellipse closest to and farthest from the origin.
Consider subject to . Show that there is no maximum. Find the minimum.
Find the minimum of subject to and .