Calculus III 13.10 Lagrange Multipliers
Previous | Calculus III 13.09 Extrema Applications |
Next | Calculus III 14 Multiple Integration |
Contents
13.10 Lagrange Multipliers[1]
- Lagrange Multiplier Method
- Use Lagrange multipliers to solve constrained optimization problems.
- Use Lagrange Multipliers with two constraints.
Lagrange Multiplier Method
|
Many optimization problems have restrictions, or constraints, on the values that can be used to produce the optimal solution. Such constraints tend to complicate optimization problems because the optimal solution can occur at a boundary point in the solution domain. An ingenious technique for solving such problems is the Lagrange Multiplier Method. Consider finding the maximum area for a rectangle that can be inscribed in the ellipse
Let \((x,y)\) be the vertex for the rectangle in the first quadrant, as shown in Figure 13.10.1. Because the rectangle has sides with lengths \(2x\) and \(2y\), its area is given by
Find \(x\) and \(y\) such that \(f(x,y)\) is a maximum. The choice for \((x,y)\) is restricted to first-quadrant points that lie on the ellipse
Consider the constraint equation as a fixed level curve for
The level curves for \(f\) represent the hyperbola family
In this family, the level curves that meet the constraint correspond to the hyperbolas that intersect the ellipse. To maximize \(f(x,y)\) find the level curve, hyperbola, that just barely satisfies the constraint. That level curve is tangent to the ellipse, as shown in Figure 13.10.2. Two curves are tangent at a point if and only if their gradient vectors are parallel. This means that \(\nabla f(x,y)\) must be a scalar multiple for \(\nabla g(x,y)\) at the tangent point. In constrained optimization problems, this scalar is denoted by \(\lambda\), the lowercase Greek letter lambda.
The scalar \(\lambda\) is called a Lagrange multiplier, as described in Theorem 13.10.1. |
Theorem 13.10.1 Lagrange’s Theorem
Let \(f\) and \(g\) have continuous first partial derivatives such that \(f\) has an extremum at a point \((x_{0},y_{0})\) on the smooth constraint curve \(g(x,y)=c\). If \( \nabla g(x,y) \ne \textbf{0} \), then there is a real number \(\lambda \) such that
- \(\nabla f(x_{0},y_{0}) = \lambda \nabla g(x_{0},y_{0}). \)
Proof Represent the smooth constraint curve \(g(x,y)=c\) by the vector-valued function
- \( \textbf{r}(t) = x(t)\textbf{i} + y(t)\textbf{j}, \: \textbf{r}^{\prime}(t) \ne \textbf{0} \)
where \(x^{\prime}\) and \(y^{\prime}\) are continuous on an open interval \(I\). Define the function \(h\) as \(h(t)=f(x(t),y(t))\). Therefore, because \(f(x_{0},y_{0})\) is an extreme value for \(f\), \(h\) equals
- \(h(t_{0})=f(x(t_{0}),y(t_{0})) = f(x_{0},y_{0})\)
is an extreme value for \(h\). This implies that \(h^{\prime}(t_{0}) =0\), and, by the Chain Rule,
- \(h^{\prime}(t_{0}) = f_{x}(x_{0},y_{0}) x^{\prime}(t_{0}) + f_{y}(x_{0},y_{0}) y^{\prime}(t_{0}) = \nabla f(x_{0},y_{0}) \cdot \textbf{r}^{\prime}(t_{0}) = 0 \).
Therefore \( \nabla f(x,y) \) is orthogonal to \( \textbf{r}^{\prime}(t_{0}) \). By Theorem 13.6.4, \(\nabla g(x_{0},y_{0})\) is also orthogonal to \( \textbf{r}^{\prime}(t_{0}) \). Consequently, the gradients \(\nabla f(x_{0},y_{0}) \) and \(\nabla g(x_{0},y_{0}) \) are parallel, and there must exist a scalar \(\lambda\) such that
- \(\nabla f(x_{0},y_{0}) = \lambda \nabla g(x_{0},y_{0}). \)
Theorem 13.10.2 Lagrange Multiplier Method
Let \(f\) and \(g\) satisfy the hypothesis in Lagrange’s Theorem, and let \(f\) have a minimum or maximum subject to the constraint \(g(x,y)=c\). To find the minimum or maximum for \(f\), use these steps.
1. | Simultaneously solve the equations \(\nabla f(x_{0},y_{0}) = \lambda \nabla g(x_{0},y_{0})\) and \(g(x,y)=c\) by solving the following equation system.
| ||||||
2. | Evaluate \(f\) at each solution point obtained in the first step. The greatest value yields the maximum for \(f\) subject to the constraint \(g(x,y)=c\), and the least value yields the minimum for \(f\) subject to the constraint \(g(x,y)=c\). |
Constrained Optimization Problems
Example 13.10.1 uses Lagrange multipliers to solve the rectangle inscribed in an ellipse problem mentioned earlier.
Example 13.10.1 Using a Lagrange Multiplier with One Constraint
Find the maximum value for \(f(x,y)=4xy\), where \(x>0\) and \(y>0\), subject to the constraint
- $$ \frac{x^{2}}{3^{2}}+ \frac{y^{2}}{4^{2}}=1. $$
Solution Let
- $$ g(x,y) = \frac{x^{2}}{3^{2}}+ \frac{y^{2}}{4^{2}}-1=0. $$
By equating \(\nabla f(x,y) = 4y\textbf{i} +4x\textbf{j}\) and
- $$ \lambda \nabla g(x,y) = \frac{ 2 \lambda x}{9}+ \frac{\lambda y}{8}, $$
yields the following equation system.
\( 4y \) | $$= \frac{2}{9} \lambda x \:\:\:\: $$ | \(f_{x}(x,y) = \lambda g_{x}(x,y)\) |
\(4x\) | $$= \frac{1}{8} \lambda y $$ | \(f_{y}(x,y) = \lambda g_{y}(x,y)\) |
$$ \frac{x^{2}}{3^{2}}+ \frac{y^{2}}{4^{2}} $$ | $$=1 $$ | Constraint |
The first equation produces \(\lambda = 18y/x\), and substitution into the second equation produces
- $$ 4x = \frac{1}{8} \left( \frac{18y}{x} \right)y \rightarrow x^{2} = \frac{9}{16}y^{2}. $$
Substituting this value for \(x^{2}\) into the third equation produces
- $$ \frac{1}{9} \left( \frac{9}{16} y^{2}\right) + \frac{1}{16} y^{2} = 1 \rightarrow y^{2} = 8 \rightarrow y = \pm 2\sqrt{2}. $$
Because \(y>0\) is a constraint, choose the positive value and solve for \(x\).
\( x^{2} \) | $$= \frac{9}{16} y^{2} $$ |
$$= \frac{9}{16}(8)$$ | |
$$= \frac{9}{2}$$ | |
\(x\) | $$= \frac{3}{\sqrt{2}}. $$ |
The maximum value for \(f\) is
- $$ f\left( \color{red}{\frac{3}{\sqrt{2}}}, \color{red}{2\sqrt{2}}\right) = 4xy= 4 \left( \color{red}{\frac{3}{\sqrt{2}}} \right)( \color{red}{2\sqrt{2}}) = 24.$$
Note that writing the constraint as
- $$ \frac{x^{2}}{3^{2}}+ \frac{y^{2}}{4^{2}}=1 \text{ or } \frac{x^{2}}{3^{2}}+ \frac{y^{2}}{4^{2}}- 1 =0 $$
does not affect the solution -- the constant is eliminated when \(\nabla g\) is formed.
Example 13.10.2 A Business Application
Economists call the Lagrange multiplier obtained in a production function the marginal productivity of money. Find The Cobb-Douglas production function, see Example 13.1.5, for a software manufacturer is given by
- \(f(x,y) = 100x^{3/4}y^{1/4} \)
where \(x\) represents the labor units, at $150 per unit, and \(y\) represents the capital units, at $250 per unit. The total labor and capital cost is limited to $50,000. Find the maximum production level for this manufacturer and the marginal productivity of money.
Solution The gradient for \(f\) is
- \( \nabla f(x,y) = 75x^{1/4}y^{-1/4}\textbf{i} + 25x^{3/4}y^{-3/4}\textbf{j}. \)
The limit on the cost of labor and capital produces the constraint
- \(g(x,y) = 150x+250y=50,000 \:\:\:\: \) Constraint
The Lagrange Multiplier looks like \( \lambda \nabla g(x,y) = 150\lambda\textbf{i}+250\lambda\textbf{j} \) This produces the following equation system.
\( 75x^{-1/4}y^{1/4} \) | $$= 150 \lambda $$ | \(f_{x}(x,y) = \lambda g_{x}(x,y)\) |
\( 25x^{3/4}y^{-3/4} \) | $$= 250 \lambda y $$ | \(f_{y}(x,y) = \lambda g_{y}(x,y)\) |
\( 150x+250y \) | $$=50,000 \:\:\:\: $$ | Constraint |
Solve for \(\lambda \) in the first equation
- $$ \lambda = \frac{75x^{-1/4}y^{1/4} }{150} = \frac{x^{-1/4}y^{-1/4}}{2} $$
and substitute into the second equation to produce
\( 25x^{3/4}y^{-3/4} \) | \(=250 ( \frac{x^{-1/4}y^{-1/4}}{2} ) \:\:\:\: \) | |
\( 25x \) | \(= 125y\) | Multiply by \(x^{-1/4}y^{3/4}\). |
\(x\) | \(= 5y \) |
The value for \(x\) is
\(x\) | \(=5(50) \) |
\(= 250 \) labor units |
The maximum production level is
\( f(\color{red}{250},\color{red}{50}) \) | \(= 100(\color{red}{250})^{3/2}(\color{red}{50})^{1/4} \) |
\(\approx 16,719\: \) product units |
The marginal productivity of money is
- $$ \lambda = \frac{x^{-1/4}y^{-1/4}}{2} = \frac{(250)^{-1/4}(50)^{-1/4}}{2} \approx 0.344 $$
which means that for each additional dollar spent on production, an additional 0.334 unit of the product can be produced.
Example 13.10.3 Lagrange Multipliers and Three Variables
Find the minimum value for
- \( f(x,y,z) = 2x^{2} + y^{2} + 3z^{2} \:\:\:\: \) Objective function
subject to the constraint
- \( 2x-3y -4z= 49 \).
Solution Let
- \( g(x,y,z) = 2x-3y-4x = 49.\)
Because
- \( \nabla f(x,y,z) = 4x \textbf{i} +2y\textbf{j} + 6z\textbf{k} \)
and
- \( \lambda \nabla g(x,y,z) = 4 \lambda \textbf{i} +2 \lambda \textbf{j} + 6 \lambda \textbf{k} \)
you obtain the following system of equations.
\(4x\) | \(= 2 \lambda \) | \( f_{x}(x,y,z) = \lambda g_{x}(x,y,z) \) |
\(2y\) | \(= -3\lambda \) | \( f_{y}(x,y,z) = \lambda g_{y}(x,y,z) \) |
\(6z \) | \(= -4 \lambda \:\:\:\: \) | \( f_{z}(x,y,z) = \lambda g_{z}(x,y,z) \) |
\(2x-3y-4x\) | \(= 49 \) | Constraint |
The solutions are
\(x\) | \(=3 \) |
\(y\) | \(= -9\) |
\(z\) | \(= -4 \) |
The optimum value for \(f\) is
\(f(\color{red}{3},\color{red}{-9},\color{red}{-4} )\) | \(=2(\color{red}{3})^{2} + (\color{red}{-9})^{2} + 3(\color{red}{-4})^{2} \) |
\(= 147.\) |
|
Figures 13.10.1 and 13.10.2 show a graphical interpretation for constrained optimization problems with two variables. Extending the interpretation to three variables is done with level surfaces replacing level curves. In Example 13.10.3, the level surfaces for \(f\) are ellipsoids centered at the origin, and the constraint
is a plane. The minimum value for \(f\) is represented by the ellipsoid that is tangent to the constraint plane, as shown in Figure 13.10.3 |
Example 13.10.4 Optimization Inside a Region
|
Find the extreme values for
subject to the constraint \(x^{2} + y^{2} \leqslant 10 \).
Combining the results yields that \(f\) has a maximum value 24 at \((-1,\pm3)\) and a minimum value 2 at \((1,0)\), as shown in Figure 13.10.4. |
Lagrange Multiplier Method with Two Constraints
For optimization problems involving two constraint functions \(g\) and \(h\), introduce a second Lagrange multiplier, \(\mu\), the lowercase Greek letter mu, and then solve the equation
- \( \nabla = \lambda \nabla g + \mu \nabla h \)
where the gradient vectors are not parallel, as illustrated in Example 13.10.5.
Example 13.10.5 Optimization with Two Constraints
Let
- \( T(x,y,z) = 20 + 2x + 2y +z^{2}\)
represent the temperature at each point on the sphere
- \( x^{2} +y^{2} +z^{2} = 11.\)
Find the extreme temperatures on the curve formed by the intersection between the plane
- \( x +y +z = 3\)
and the sphere.
Solution The constraints are
- \( g(x,y,z) = x^{2} +y^{2} +z^{2} = 11\)
and
- \( h(x,y,z) = x +y +z = 3. \)
Using
\( \nabla T(x,y,z) \) | \(= 2 \textbf{i} +2\textbf{j} + 2z\textbf{k}\) |
\( \lambda \nabla g(x,y,z) \) | \(= 2 \lambda x\textbf{i} +2 \lambda y \textbf{j} + 2 \lambda z\textbf{k} \) |
\( \mu \nabla h(x,y,z) \) | \(= \mu \textbf{i} + \mu \textbf{j} + \mu \textbf{k}\) |
produces the following equation system
\(2\) | \(= 2 \lambda x + \mu\) | \( T_{x}(x,y,z) = \lambda g_{x}(x,y,z) + \mu h_{x}(x,y,z) \) |
\(2\) | \(= 2 \lambda y + \mu \) | \( T_{y}(x,y,z) = \lambda g_{y}(x,y,z) + \mu h_{y}(x,y,z) \) |
\(2z \) | \(= 2 \lambda z + \mu \:\:\:\: \) | \( T_{z}(x,y,z) = \mu g_{z}(x,y,z) + \mu h_{z}(x,y,z) \) |
\(x^{2} +y^{2} +z^{2} \) | \(= 11 \) | Constraint 1 |
\(x+y+z\) | \(= 3 \) | Constraint 1 |
Subtracting the second equation from the first produces the following system.
\( \lambda (x-y)\) | \(= 0 \) |
\( 2z(1-\lambda ) - \mu \) | \(= 0\) |
\(x^{2} +y^{2} +z^{2} \) | \(= 11 \) |
\(x+y+z\) | \(= 3 \) |
The first equation yields \(\lambda = 0\) or \(x=y\). For \(\lambda = 0\), the critical points are \((3,-1,1)\) and \((-1,3,1)\). For \lambda \ne 0\), the \(x=y\) and the critical points occur when \(x=y=(3 \pm 2\sqrt{3})/3\) and \(z=(3 \mp 4\sqrt{3})/3\). To find the optimal solutions compare the temperatures at the four critical points.
\(T(3,-1,1)=T(-1,3,1)=25 \) | |
$$ T \left( \frac{3-2\sqrt{3}}{3}, \frac{3-2\sqrt{3}}{3},\frac{3+4 \sqrt{3}}{3} \right) $$ | $$= \frac{91}{3} \approx 30.33 $$ |
$$ T \left( \frac{3+2\sqrt{3}}{3}, \frac{3+2\sqrt{3}}{3},\frac{3-4 \sqrt{3}}{3} \right) $$ | $$= \frac{91}{3} \approx 30.33 $$ |
The minimum temperature is \(T=24\) and the maximum temperature is \(T=91/3\) on the curve.
Internal Links
Parent Article: Calculus III 13 Functions with Several Variables