Calculus Volume 3

# 4.8Lagrange Multipliers

Calculus Volume 34.8 Lagrange Multipliers

### 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 $11$ month $(x),(x),$ and a maximum number of advertising hours that could be purchased per month $(y).(y).$ Suppose these were combined into a budgetary constraint, such as $20x+4y≤216,20x+4y≤216,$ 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 $xx$ and $y.y.$ This constraint, when combined with the profit function $f(x,y)=48x+96y−x2−2xy−9y2,f(x,y)=48x+96y−x2−2xy−9y2,$ is an example of an optimization problem, and the function $f(x,y)f(x,y)$ is called the objective function. A graph of various level curves of the function $f(x,y)f(x,y)$ follows.

Figure 4.59 Graph of level curves of the function $f(x,y)=48x+96y−x2−2xy−9y2f(x,y)=48x+96y−x2−2xy−9y2$ corresponding to $c=150,250,350,and400.c=150,250,350,and400.$

In Figure 4.59, the value $cc$ represents different profit levels (i.e., values of the function $f).f).$ As the value of $cc$ 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 be not be a maximum profit for the company. Unfortunately, we have a budgetary constraint that is modeled by the inequality $20x+4y≤216.20x+4y≤216.$ To see how this constraint interacts with the profit function, Figure 4.60 shows the graph of the line $20x+4y=21620x+4y=216$ superimposed on the previous graph.

Figure 4.60 Graph of level curves of the function $f(x,y)=48x+96y−x2−2xy−9y2f(x,y)=48x+96y−x2−2xy−9y2$ corresponding to $c=150,250,350,and395.c=150,250,350,and395.$ The red graph is the constraint function.

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 $f.f.$ Trial and error reveals that this profit level seems to be around $395,395,$ when $xx$ and $yy$ are both just less than $5.5.$ 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 $ff$ and $gg$ be functions of two variables with continuous partial derivatives at every point of some open set containing the smooth curve $g(x,y)=0.g(x,y)=0.$ Suppose that $f,f,$ when restricted to points on the curve $g(x,y)=0,g(x,y)=0,$ has a local extremum at the point $(x0,y0)(x0,y0)$ and that $∇g(x0,y0)≠0.∇g(x0,y0)≠0.$ Then there is a number $λλ$ called a Lagrange multiplier, for which

$∇f(x0,y0)=λ∇g(x0,y0).∇f(x0,y0)=λ∇g(x0,y0).$

#### Proof

Assume that a constrained extremum occurs at the point $(x0,y0).(x0,y0).$ Furthermore, we assume that the equation $g(x,y)=0g(x,y)=0$ can be smoothly parameterized as

$x=x(s)andy=y(s)x=x(s)andy=y(s)$

where s is an arc length parameter with reference point $(x0,y0)(x0,y0)$ at $s=0.s=0.$ Therefore, the quantity $z=f(x(s),y(s))z=f(x(s),y(s))$ has a relative maximum or relative minimum at $s=0,s=0,$ and this implies that $dzds=0dzds=0$ at that point. From the chain rule,

$dzds=∂f∂x·∂x∂s+∂f∂y·∂y∂s=( ∂f∂xî+ ∂f∂yĵ)·(∂x∂sî·∂y∂sĵ)=0,dzds=∂f∂x·∂x∂s+∂f∂y·∂y∂s=( ∂f∂xî+ ∂f∂yĵ)·(∂x∂sî·∂y∂sĵ)=0,$

where the derivatives are all evaluated at $s=0.s=0.$ However, the first factor in the dot product is the gradient of $f,f,$ and the second factor is the unit tangent vector $T(0)T(0)$ to the constraint curve. Since the point $(x0,y0)(x0,y0)$ corresponds to $s=0,s=0,$ it follows from this equation that

$∇f(x0,y0)·T(0)=0,∇f(x0,y0)·T(0)=0,$

which implies that the gradient is either $00$ or is normal to the constraint curve at a constrained relative extremum. However, the constraint curve $g(x,y)=0g(x,y)=0$ is a level curve for the function $g(x,y)g(x,y)$ so that if $∇g(x0,y0)≠0∇g(x0,y0)≠0$ then $∇g(x0,y0)∇g(x0,y0)$ is normal to this curve at $(x0,y0)(x0,y0)$ It follows, then, that there is some scalar $λλ$ such that

$∇f(x0,y0)=λ∇g(x0,y0)∇f(x0,y0)=λ∇g(x0,y0)$

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
1. Determine the objective function $f(x,y)f(x,y)$ and the constraint function $g(x,y).g(x,y).$ Does the optimization problem involve maximizing or minimizing the objective function?
2. Set up a system of equations using the following template:
$∇f(x0,y0)=λ∇g(x0,y0)g(x0,y0)=0.∇f(x0,y0)=λ∇g(x0,y0)g(x0,y0)=0.$
3. Solve for $x0x0$ and $y0.y0.$
4. The largest of the values of $ff$ at the solutions found in step $33$ maximizes $f;f;$ the smallest of those values minimizes $f.f.$

### Example 4.42

#### Using Lagrange Multipliers

Use the method of Lagrange multipliers to find the minimum value of $f(x,y)=x2+4y2−2x+8yf(x,y)=x2+4y2−2x+8y$ subject to the constraint $x+2y=7.x+2y=7.$

#### Solution

1. The optimization function is $f(x,y)=x2+4y2−2x+8y.f(x,y)=x2+4y2−2x+8y.$ To determine the constraint function, we must first subtract $77$ from both sides of the constraint. This gives $x+2y−7=0.x+2y−7=0.$ The constraint function is equal to the left-hand side, so $g(x,y)=x+2y−7.g(x,y)=x+2y−7.$ The problem asks us to solve for the minimum value of $f,f,$ subject to the constraint (see the following graph).
Figure 4.61 Graph of level curves of the function $f(x,y)=x2+4y2−2x+8yf(x,y)=x2+4y2−2x+8y$ corresponding to $c=10c=10$ and $26.26.$ The red graph is the constraint function.
2. We then must calculate the gradients of both f and g:
$∇f(x,y)=(2x−2)i+(8y+8)j∇g(x,y)=i+2j.∇f(x,y)=(2x−2)i+(8y+8)j∇g(x,y)=i+2j.$

The equation $∇f(x0,y0)=λ∇g(x0,y0)∇f(x0,y0)=λ∇g(x0,y0)$ becomes
$(2x0−2)i+(8y0+8)j=λ(i+2j),(2x0−2)i+(8y0+8)j=λ(i+2j),$

which can be rewritten as
$(2x0−2)i+(8y0+8)j=λi+2λj.(2x0−2)i+(8y0+8)j=λi+2λj.$

Next, we set the coefficients of $iandjiandj$ equal to each other:
$2x0−2=λ8y0+8=2λ.2x0−2=λ8y0+8=2λ.$

The equation $g(x0,y0)=0g(x0,y0)=0$ becomes $x0+2y0−7=0.x0+2y0−7=0.$ Therefore, the system of equations that needs to be solved is
$2x0−2=λ8y0+8=2λx0+2y0−7=0.2x0−2=λ8y0+8=2λx0+2y0−7=0.$
3. 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 $λ=4y0+4,λ=4y0+4,$ so substituting this into the first equation gives
$2x0−2=4y0+4.2x0−2=4y0+4.$

Solving this equation for $x0x0$ gives $x0=2y0+3.x0=2y0+3.$ We then substitute this into the third equation:
$(2y0+3)+2y0−7=04y0−4=0y0=1.(2y0+3)+2y0−7=04y0−4=0y0=1.$

Since $x0=2y0+3,x0=2y0+3,$ this gives $x0=5.x0=5.$
4. Next, we substitute $(5,1)(5,1)$ into $f(x,y)=x2+4y2−2x+8y,f(x,y)=x2+4y2−2x+8y,$ gives $f(5,1)=52+4(1)2−2(5)+8(1)=27.f(5,1)=52+4(1)2−2(5)+8(1)=27.$ To ensure this corresponds to a minimum value on the constraint function, let’s try some other values, such as the intercepts of $g(x,y)=0,g(x,y)=0,$ Which are $(7,0)(7,0)$ and $(0,3.5).(0,3.5).$ We get $f(7,0)=35f(7,0)=35$ and $f(0,3.5)=77,f(0,3.5)=77,$ so it appears $ff$ has a minimum at $(5,1).(5,1).$

### Checkpoint 4.37

Use the method of Lagrange multipliers to find the maximum value of $f(x,y)=9x2+36xy−4y2−18x−8yf(x,y)=9x2+36xy−4y2−18x−8y$ subject to the constraint $3x+4y=32.3x+4y=32.$

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 $xx$ of golf balls sold per month (measured in thousands), and the number of hours per month of advertising y, according to the function

$z=f(x,y)=48x+96y−x2−2xy−9y2,z=f(x,y)=48x+96y−x2−2xy−9y2,$

where $zz$ 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 $20x+4y=216.20x+4y=216.$ Find the values of $xx$ and $yy$ that maximize profit, and find the maximum profit.

#### Solution

Again, we follow the problem-solving strategy:

1. The optimization function is $f(x,y)=48x+96y−x2−2xy−9y2.f(x,y)=48x+96y−x2−2xy−9y2.$ To determine the constraint function, we first subtract 216 from both sides of the constraint, then divide both sides by $4,4,$ which gives $5x+y−54=0.5x+y−54=0.$ The constraint function is equal to the left-hand side, so $g(x,y)=5x+y−54.g(x,y)=5x+y−54.$ The problem asks us to solve for the maximum value of $f,f,$ subject to this constraint.
2. So, we calculate the gradients of both $fandfand$ $g:g:$
$∇f(x,y)=(48−2x−2y)i+(96−2x−18y)j∇g(x,y)=5i+j.∇f(x,y)=(48−2x−2y)i+(96−2x−18y)j∇g(x,y)=5i+j.$

The equation $∇f(x0,y0)=λ∇g(x0,y0)∇f(x0,y0)=λ∇g(x0,y0)$ becomes
$(48−2x0−2y0)i+(96−2x0−18y0)j=λ(5i+j),(48−2x0−2y0)i+(96−2x0−18y0)j=λ(5i+j),$

which can be rewritten as
$(48−2x0−2y0)i+(96−2x0−18y0)j=λ5i+λj.(48−2x0−2y0)i+(96−2x0−18y0)j=λ5i+λj.$

We then set the coefficients of $iandjiandj$ equal to each other:
$48−2x0−2y0=5λ96−2x0−18y0=λ.48−2x0−2y0=5λ96−2x0−18y0=λ.$

The equation $g(x0,y0)=0g(x0,y0)=0$ becomes $5x0+y0−54=0.5x0+y0−54=0.$ Therefore, the system of equations that needs to be solved is
$48−2x0−2y0=5λ96−2x0−18y0=λ5x0+y0−54=0.48−2x0−2y0=5λ96−2x0−18y0=λ5x0+y0−54=0.$
3. We use the left-hand side of the second equation to replace $λλ$ in the first equation:
$48−2x0−2y0=5(96−2x0−18y0)48−2x0−2y0=480−10x0−90y08x0=432−88y0x0=54−11y0.48−2x0−2y0=5(96−2x0−18y0)48−2x0−2y0=480−10x0−90y08x0=432−88y0x0=54−11y0.$

Then we substitute this into the third equation:
$5(54−11y0)+y0−54=0270−55y0+y0=0216−54y0=0y0=4.5(54−11y0)+y0−54=0270−55y0+y0=0216−54y0=0y0=4.$

Since $x0=54−11y0,x0=54−11y0,$ this gives $x0=10.x0=10.$
4. We then substitute $(10,4)(10,4)$ into $f(x,y)=48x+96y−x2−2xy−9y2,f(x,y)=48x+96y−x2−2xy−9y2,$ which gives
$f(10,4)=48(10)+96(4)−(10)2−2(10)(4)−9(4)2=480+384−100−80−144=540.f(10,4)=48(10)+96(4)−(10)2−2(10)(4)−9(4)2=480+384−100−80−144=540.$

Therefore the maximum profit that can be attained, subject to budgetary constraints, is $540,000540,000$ with a production level of $10,00010,000$ golf balls and $44$ 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 $(10.8,0)(10.8,0)$ and $(0,54)(0,54)$ Let’s evaluate $ff$ at both of these points:
$f(10.8,0)=48(10.8)+96(0)−10.82−2(10.8)(0)−9(02)=401.76f(0,54)=48(0)+96(54)−02−2(0)(54)−9(542)=−21,060.f(10.8,0)=48(10.8)+96(0)−10.82−2(10.8)(0)−9(02)=401.76f(0,54)=48(0)+96(54)−02−2(0)(54)−9(542)=−21,060.$

The second value represents a loss, since no golf balls are produced. Neither of these values exceed $540,540,$ so it seems that our extremum is a maximum value of $f.f.$

### Checkpoint 4.38

A company has determined that its production level is given by the Cobb-Douglas function $f(x,y)=2.5x0.45y0.55f(x,y)=2.5x0.45y0.55$ where x represents the total number of labor hours in $11$ year and y represents the total capital input for the company. Suppose $11$ unit of labor costs $4040$ and $11$ unit of capital costs $50.50.$ Use the method of Lagrange multipliers to find the maximum value of $f(x,y)=2.5x0.45y0.55f(x,y)=2.5x0.45y0.55$ subject to a budgetary constraint of $500,000500,000$ 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: $f(x,y,z)=x0.2y0.4z0.4,f(x,y,z)=x0.2y0.4z0.4,$ where $xx$ represents the cost of labor, $yy$ represents capital input, and $zz$ 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

$∇f(x,y,z)=λ∇g(x,y,z)g(x,y,z)=0.∇f(x,y,z)=λ∇g(x,y,z)g(x,y,z)=0.$

### Example 4.44

#### Lagrange Multipliers with a Three-Variable Optimization Function

Maximize the function $f(x,y,z)=x2+y2+z2f(x,y,z)=x2+y2+z2$ subject to the constraint $x+y+z=1.x+y+z=1.$

#### Solution

1. The optimization function is $f(x,y,z)=x2+y2+z2.f(x,y,z)=x2+y2+z2.$ To determine the constraint function, we subtract $11$ from each side of the constraint: $x+y+z−1=0x+y+z−1=0$ which gives the constraint function as $g(x,y,z)=x+y+z−1.g(x,y,z)=x+y+z−1.$
2. Next, we calculate $∇f(x,y,z)∇f(x,y,z)$ and $∇g(x,y,z):∇g(x,y,z):$
$∇f(x,y,z)=〈2x,2y,2z〉∇g(x,y,z)=〈1,1,1〉.∇f(x,y,z)=〈2x,2y,2z〉∇g(x,y,z)=〈1,1,1〉.$

$〈2x0,2y0,2z0〉=λ〈1,1,1〉x0+y0+z0−1=0〈2x0,2y0,2z0〉=λ〈1,1,1〉x0+y0+z0−1=0$

which can be rewritten in the following form:
$2x0=λ2y0=λ2z0=λx0+y0+z0−1=0.2x0=λ2y0=λ2z0=λx0+y0+z0−1=0.$
3. Since each of the first three equations has $λλ$ on the right-hand side, we know that $2x0=2y0=2z02x0=2y0=2z0$ and all three variables are equal to each other. Substituting $y0=x0y0=x0$ and $z0=x0z0=x0$ into the last equation yields $3x0−1=0,3x0−1=0,$ so $x0=13x0=13$ and $y0=13y0=13$ and $z0=13z0=13$ which corresponds to a critical point on the constraint curve.
4. Then, we evaluate f at the point $(13,13,13):(13,13,13):$
$f(13,13,13)=(13)2+(13)2+(13)2=39=13.f(13,13,13)=(13)2+(13)2+(13)2=39=13.$

Therefore, an extremum of the function is $13.13.$ To verify it is a minimum, choose other points that satisfy the constraint and calculate $ff$ at that point. For example,
$f(1,0,0)=12+02+02=1f(0,−2,3)=02+(−2)2+32=13.f(1,0,0)=12+02+02=1f(0,−2,3)=02+(−2)2+32=13.$

Both of these values are greater than $13,13,$ 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

$f(x,y,z)=x+y+zf(x,y,z)=x+y+z$

subject to the constraint $x2+y2+z2=1.x2+y2+z2=1.$

### 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, $ww$ is a function of three variables:

$w=f(x,y,z)w=f(x,y,z)$

and it is subject to two constraints:

$g(x,y,z)=0andh(x,y,z)=0.g(x,y,z)=0andh(x,y,z)=0.$

There are two Lagrange multipliers, $λ1λ1$ and $λ2,λ2,$ and the system of equations becomes

$∇f(x0,y0,z0)=λ1∇g(x0,y0,z0)+λ2∇h(x0,y0,z0)g(x0,y0,z0)=0h(x0,y0,z0)=0.∇f(x0,y0,z0)=λ1∇g(x0,y0,z0)+λ2∇h(x0,y0,z0)g(x0,y0,z0)=0h(x0,y0,z0)=0.$

### Example 4.45

#### Lagrange Multipliers with Two Constraints

Find the maximum and minimum values of the function

$f(x,y,z)=x2+y2+z2f(x,y,z)=x2+y2+z2$

subject to the constraints $z2=x2+y2z2=x2+y2$ and $x+y−z+1=0.x+y−z+1=0.$

#### Solution

1. The optimization function is $f(x,y,z)=x2+y2+z2.f(x,y,z)=x2+y2+z2.$ To determine the constraint functions, we first subtract $z2z2$ from both sides of the first constraint, which gives $x2+y2−z2=0,x2+y2−z2=0,$ so $g(x,y,z)=x2+y2−z2.g(x,y,z)=x2+y2−z2.$ The second constraint function is $h(x,y,z)=x+y−z+1.h(x,y,z)=x+y−z+1.$
2. We then calculate the gradients of $f,g,andh:f,g,andh:$
$∇f(x,y,z)=2xi+2yj+2zk∇g(x,y,z)=2xi+2yj−2zk∇h(x,y,z)=i+j−k.∇f(x,y,z)=2xi+2yj+2zk∇g(x,y,z)=2xi+2yj−2zk∇h(x,y,z)=i+j−k.$

The equation $∇f(x0,y0,z0)=λ1∇g(x0,y0,z0)+λ2∇h(x0,y0,z0)∇f(x0,y0,z0)=λ1∇g(x0,y0,z0)+λ2∇h(x0,y0,z0)$ becomes
$2x0i+2y0j+2z0k=λ1(2x0i+2y0j−2z0k)+λ2(i+j−k),2x0i+2y0j+2z0k=λ1(2x0i+2y0j−2z0k)+λ2(i+j−k),$

which can be rewritten as
$2x0i+2y0j+2z0k=(2λ1x0+λ2)i+(2λ1y0+λ2)j−(2λ1z0+λ2)k.2x0i+2y0j+2z0k=(2λ1x0+λ2)i+(2λ1y0+λ2)j−(2λ1z0+λ2)k.$

Next, we set the coefficients of $i,j, andki,j, andk$ equal to each other:
$2x0=2λ1x0+λ22y0=2λ1y0+λ22z0=−2λ1z0−λ2.2x0=2λ1x0+λ22y0=2λ1y0+λ22z0=−2λ1z0−λ2.$

The two equations that arise from the constraints are $z02=x02+y02z02=x02+y02$ and $x0+y0−z0+1=0.x0+y0−z0+1=0.$ Combining these equations with the previous three equations gives
$2x0=2λ1x0+λ22y0=2λ1y0+λ22z0=−2λ1z0−λ2z02=x02+y02x0+y0−z0+1=0.2x0=2λ1x0+λ22y0=2λ1y0+λ22z0=−2λ1z0−λ2z02=x02+y02x0+y0−z0+1=0.$
3. The first three equations contain the variable $λ2.λ2.$ Solving the third equation for $λ2λ2$ and replacing into the first and second equations reduces the number of equations to four:
$2x0=2λ1x0−2λ1z0−2z02y0=2λ1y0−2λ1z0−2z0z02=x02+y02x0+y0−z0+1=0.2x0=2λ1x0−2λ1z0−2z02y0=2λ1y0−2λ1z0−2z0z02=x02+y02x0+y0−z0+1=0.$

Next, we solve the first and second equation for $λ1.λ1.$ The first equation gives $λ1=x0+z0x0−z0,λ1=x0+z0x0−z0,$ the second equation gives $λ1=y0+z0y0−z0.λ1=y0+z0y0−z0.$ We set the right-hand side of each equation equal to each other and cross-multiply:
$x0+z0x0−z0=y0+z0y0−z0(x0+z0)(y0−z0)=(x0−z0)(y0+z0)x0y0−x0z0+y0z0−z02=x0y0+x0z0−y0z0−z022y0z0−2x0z0=02z0(y0−x0)=0..x0+z0x0−z0=y0+z0y0−z0(x0+z0)(y0−z0)=(x0−z0)(y0+z0)x0y0−x0z0+y0z0−z02=x0y0+x0z0−y0z0−z022y0z0−2x0z0=02z0(y0−x0)=0..$

Therefore, either $z0=0z0=0$ or $y0=x0.y0=x0.$ If $z0=0,z0=0,$ then the first constraint becomes $0=x02+y02.0=x02+y02.$ The only real solution to this equation is $x0=0x0=0$ and $y0=0,y0=0,$ which gives the ordered triple $(0,0,0).(0,0,0).$ This point does not satisfy the second constraint, so it is not a solution.
Next, we consider $y0=x0,y0=x0,$ which reduces the number of equations to three:
$y0=x0z02=x02+y02x0+y0−z0+1=0.y0=x0z02=x02+y02x0+y0−z0+1=0.$

We substitute the first equation into the second and third equations:
$z02=x02+x02x0+x0−z0+1=0.z02=x02+x02x0+x0−z0+1=0.$

Then, we solve the second equation for $z0,z0,$ which gives $z0=2x0+1.z0=2x0+1.$ We then substitute this into the first equation,
$z02=2x02(2x0+1)2=2x024x02+4x0+1=2x022x02+4x0+1=0,z02=2x02(2x0+1)2=2x024x02+4x0+1=2x022x02+4x0+1=0,$

and use the quadratic formula to solve for $x0:x0:$
$x0=−4±42−4(2)(1)2(2)=−4±84=−4±224=−1±22.x0=−4±42−4(2)(1)2(2)=−4±84=−4±224=−1±22.$

Recall $y0=x0,y0=x0,$ so this solves for $y0y0$ as well. Then, $z0=2x0+1,z0=2x0+1,$ so
$z0=2x0+1=2(−1±22)+1=−2+1±2=−1±2.z0=2x0+1=2(−1±22)+1=−2+1±2=−1±2.$

Therefore, there are two ordered triplet solutions:
$(−1+22,−1+22,−1+2)and(−1−22,−1−22,−1−2).(−1+22,−1+22,−1+2)and(−1−22,−1−22,−1−2).$
4. We substitute $(−1+22,−1+22,−1+2)(−1+22,−1+22,−1+2)$ into $f(x,y,z)=x2+y2+z2,f(x,y,z)=x2+y2+z2,$ which gives
$f(−1+22,−1+22,−1+2)=(−1+22)2+(−1+22)2+(−1+2)2=(1−2+12)+(1−2+12)+(1−22+2)=6−42.f(−1+22,−1+22,−1+2)=(−1+22)2+(−1+22)2+(−1+2)2=(1−2+12)+(1−2+12)+(1−22+2)=6−42.$

Then, we substitute $(−1−22,−1−22,−1−2)(−1−22,−1−22,−1−2)$ into $f(x,y,z)=x2+y2+z2,f(x,y,z)=x2+y2+z2,$ which gives
$f(−1−22,−1−22,−1−2)=(−1−22)2+(−1−22)2+(−1−2)2=(1+2+12)+(1+2+12)+(1+22+2)=6+42.f(−1−22,−1−22,−1−2)=(−1−22)2+(−1−22)2+(−1−2)2=(1+2+12)+(1+2+12)+(1+22+2)=6+42.$

$6+426+42$ is the maximum value and $6−426−42$ is the minimum value of $f(x,y,z),f(x,y,z),$ subject to the given constraints.
Checkpoint 4.40

Use the method of Lagrange multipliers to find the minimum value of the function

$f(x,y,z)=x2+y2+z2f(x,y,z)=x2+y2+z2$

subject to the constraints $2x+y+2z=92x+y+2z=9$ and $5x+5y+7z=29.5x+5y+7z=29.$

### 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.

358.

$f(x,y)=x2y;x2+2y2=6f(x,y)=x2y;x2+2y2=6$

359.

$f(x,y,z)=xyz,x2+2y2+3z2=6f(x,y,z)=xyz,x2+2y2+3z2=6$

360.

$f(x,y)=xy;4x2+8y2=16f(x,y)=xy;4x2+8y2=16$

361.

$f(x,y)=4x3+y2;2x2+y2=1f(x,y)=4x3+y2;2x2+y2=1$

362.

$f(x,y,z)=x2+y2+z2,x4+y4+z4=1f(x,y,z)=x2+y2+z2,x4+y4+z4=1$

363.

$f(x,y,z)=yz+xy,xy=1,y2+z2=1f(x,y,z)=yz+xy,xy=1,y2+z2=1$

364.

$f(x,y)=x2+y2,(x−1)2+4y2=4f(x,y)=x2+y2,(x−1)2+4y2=4$

365.

$f(x,y)=4xy,x29+y216=1f(x,y)=4xy,x29+y216=1$

366.

$f(x,y,z)=x+y+z,1x+1y+1z=1f(x,y,z)=x+y+z,1x+1y+1z=1$

367.

$f(x,y,z)=x+3y−z,x2+y2+z2=4f(x,y,z)=x+3y−z,x2+y2+z2=4$

368.

$f(x,y,z)=x2+y2+z2,xyz=4f(x,y,z)=x2+y2+z2,xyz=4$

369.

Minimize $f(x,y)=x2+y2f(x,y)=x2+y2$ on the hyperbola $xy=1.xy=1.$

370.

Minimize $f(x,y)=xyf(x,y)=xy$ on the ellipse $b2x2+a2y2=a2b2.b2x2+a2y2=a2b2.$

371.

Maximize $f(x,y,z)=2x+3y+5zf(x,y,z)=2x+3y+5z$ on the sphere $x2+y2+z2=19.x2+y2+z2=19.$

372.

Maximize $f(x,y)=x2−y2;x>0,y>0;g(x,y)=y−x2=0f(x,y)=x2−y2;x>0,y>0;g(x,y)=y−x2=0$

373.

The curve $x3−y3=1x3−y3=1$ is asymptotic to the line $y=x.y=x.$ Find the point(s) on the curve $x3−y3=1x3−y3=1$ farthest from the line $y=x.y=x.$

374.

Maximize $U(x,y)=8x4/5y1/5;4x+2y=12U(x,y)=8x4/5y1/5;4x+2y=12$

375.

Minimize $f(x,y)=x2+y2,x+2y−5=0.f(x,y)=x2+y2,x+2y−5=0.$

376.

Maximize $f(x,y)=6−x2−y2,x+y−2=0.f(x,y)=6−x2−y2,x+y−2=0.$

377.

Minimize $f(x,y,z)=x2+y2+z2,x+y+z=1.f(x,y,z)=x2+y2+z2,x+y+z=1.$

378.

Minimize $f(x,y)=x2−y2f(x,y)=x2−y2$ subject to the constraint $x−2y+6=0.x−2y+6=0.$

379.

Minimize $f(x,y,z)=x2+y2+z2f(x,y,z)=x2+y2+z2$ when $x+y+z=9x+y+z=9$ and $x+2y+3z=20.x+2y+3z=20.$

For the next group of exercises, use the method of Lagrange multipliers to solve the following applied problems.

380.

A pentagon is formed by placing an isosceles triangle on a rectangle, as shown in the diagram. If the perimeter of the pentagon is $1010$ in., find the lengths of the sides of the pentagon that will maximize the area of the pentagon. 381.

A rectangular box without a top (a topless box) is to be made from $1212$ ft2 of cardboard. Find the maximum volume of such a box.

382.

Find the minimum and maximum distances between the ellipse $x2+xy+2y2=1x2+xy+2y2=1$ and the origin.

383.

Find the point on the surface $x2−2xy+y2−x+y=0x2−2xy+y2−x+y=0$ closest to the point $(1,2,−3).(1,2,−3).$

384.

Show that, of all the triangles inscribed in a circle of radius $RR$ (see diagram), the equilateral triangle has the largest perimeter. 385.

Find the minimum distance from point $(0,1)(0,1)$ to the parabola $x2=4y.x2=4y.$

386.

Find the minimum distance from the parabola $y=x2y=x2$ to point $(0,3).(0,3).$

387.

Find the minimum distance from the plane $x+y+z=1x+y+z=1$ to point $(2,1,1).(2,1,1).$

388.

A large container in the shape of a rectangular solid must have a volume of $480480$ 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.

389.

Find the point on the line $y=2x+3y=2x+3$ that is closest to point $(4,2).(4,2).$

390.

Find the point on the plane $4x+3y+z=24x+3y+z=2$ that is closest to the point $(1,−1,1).(1,−1,1).$

391.

Find the maximum value of $f(x,y)=sinxsiny,f(x,y)=sinxsiny,$ where $xandyxandy$ denote the acute angles of a right triangle. Draw the contours of the function using a CAS.

392.

A rectangular solid is contained within a tetrahedron with vertices at

$(1,0,0),(0,1,0),(0,0,1),(1,0,0),(0,1,0),(0,0,1),$ and the origin. The base of the box has dimensions $x,y,x,y,$ and the height of the box is $z.z.$ If the sum of $x,y,andzx,y,andz$ is 1.0, find the dimensions that maximizes the volume of the rectangular solid.

393.

[T] By investing x units of labor and y units of capital, a watch manufacturer can produce $P(x,y)=50x0.4y0.6P(x,y)=50x0.4y0.6$ watches. Find the maximum number of watches that can be produced on a budget of $20,00020,000$ if labor costs $100/unit and capital costs$200/unit. Use a CAS to sketch a contour plot of the function.