You are about to erase your work on this activity. Are you sure you want to do this?
Updated Version Available
There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?
Mathematical Expression Editor
We give a new method of finding extrema.
Throughout this course, we hope it has become apparent that when given a
problem:
There is more than one way to solve it.
The method of Lagrange multipliers tells us that to maximize a function constrained
to a curve, we need to find where the gradient of the function is perpendicular to the
curve.
Previously, when we were finding extrema of functions \(F:\R ^n\to \R \) when constrained to some
curve, we had to find an explicit formula for the curve. Consider this example from
the previous section:
Let \(F(x,y) = 4x^3+4y^2-4x\) and let \(C\) the set
\[ C = \{(x,y):x^2 + y^2 =1\} \]
Find the maximum and minimum values of \(F\) on \(C\).
The first step for solving this problem was to find an explicit formula that
drew the curve \(C\). In the case above, we choose:
\[ \vec {c}(t) = \vector {\cos (t),\sin (t)} \]
However, finding a function
that draws the constraining set could be very difficult or even impossible!
If our constraining set had been
\[ S = \{(x,y): x+y+\sin (xy) =0\} \]
our previous method will not work, as
we (at least this author!) cannot find an explicit formula describing the set
above. Nevertheless, there is another way. It is called the method of Lagrange
multipliers. This method is named after the mathematician Joseph-Louis
Lagrange. This method relies on the geometric properties of the gradient
vector. Recall: There are three things you must know about the gradient
vector:
\(\grad F = \vector {\pp [F]{x_1},\pp [F]{x_2},\dots ,\pp [F]{x_n}}\).
\(\grad F(\vec {x})\) points in the direction that one must leave \(\vec {x}\) in order to see the initial
greatest increase in \(F\).
\(\grad F(\vec {x})\) points in the direction that is perpendicular to any level surface of \(F\).
It is the last two facts that we will think about now. Below we see level
curves for some function \(F:\R ^2\to \R \) along with a constraining curve that we will call \(S\):
Let’s add vectors to our graph that point in the direction of \(\grad F(x,y)\). Since we know that the
gradient vector is perpendicular to level curves, we can do this without computation.
If for some point \((x,y)\) on \(S\) the gradient \(\grad F(x,y)\) points in the “general” direction of the tangent
vectors of \(S\), then \((x,y)\)cannot give an extremal value of \(F\), as moving along \(S\) will either
increase or decrease the value of \(F\). Here’s the upshot:
The only candidates for local extrema occur when the
gradient of \(F\) is perpendicular to \(S\).
How do we find these points? To do this, we will imagine that \(S\) is a level curve for
some other function \(G:\R ^2\to \R \), and define \(S\) as:
\[ S = \{(x,y):G(x,y)= c\} \]
now, the candidates for extrema of \(F\) when
constrained to a curve \(S\) are found by finding \((x,y)\) such that
\[ \grad F(x,y) = \lambda \cdot \grad G(x,y) \]
since \((x,y)\) that satisfy this
equation are those where the gradient vectors of \(F\) are perpendicular to the level curve
\(G(x,y)= c\). This is the essence of the method of Lagrange multipliers.
Lagrange Multipliers Let \(F:\R ^n\to \R \), \(G:\R ^n\to \R \), \(\grad G(\vec {x}) \ne \vec {0}\), and let \(S\) be the constraint, or level set,
\[ S = \{\vec {x}: G(\vec {x}) = c\} \]
If \(F\) has extrema
when constrained to \(S\) at \(\vec {x}\), then
The first step for solving a constrained optimization problem using the method of
Lagrange multipliers is to write down the equations needed to solve the
problem.
Let \(F(x,y) = xy\) and let \(L\) the set
\[ L = \{(x,y):(x^2+y^2)^2 = x^2-y^2\} \]
Write down the three equations one must solve to find the
extrema of \(F\) when constrained to \(L\).
First set \(G(x,y)= (x^2+y^2)^2 - x^2 +y^2\). Now \(L\) is the level curve \(G(x,y) =\answer [given]{0}\). We must write
down:
Lagrange multipliers tell us that to maximize a function \(F:\R ^2\to \R \) along a curve defined by \(G(x,y) = c\),
we need to find where \(\grad F\) is perpendicular to \(G\). In essence we are detecting geometric
behavior using the tools of calculus.
Below we have plotted a curve \(G(x,y) = c\) along with \(\grad F\).
Find the candidates for the
maximum and minimum values for \(F\) when restricted to \(G(x,y) = c\).
At the candidates for the
extrema, we know that the gradient vector of \(F\) must be parallelperpendicular to
the curve \(G(x,y) = c\). Hence we see that the points
the gradient vector for \(G\) are parallel to the gradient vectors for \(F\).
Below we have plotted a curve \(G(x,y) = c\) along with \(\grad F\).
Find the candidates for the
maximum and minimum values for \(F\) when restricted to \(G(x,y) = c\).
At the candidates for the
extrema, we know that the gradient vector of \(F\) must be parallelperpendicular to
the curve \(G(x,y) = c\). Hence we see that the points
Breaking
this vector equation into components, and adding in the constraint equation, the
method of Lagrange multipliers gives us three equations and three unknowns:
Plugging these points
back into \(F\), we find that the minimum value of \(F\) on \(C\) is \(\answer [given]{0}\) and the maximum value is \(\answer [given]{128/27}\).
Lagrange multipliers help out when when constraint set is given by an implicit
function. Let’s see this in an example.
Let \(F(x,y) = x^2+2y^2-28x+51\) and let \(M\) the set
\[ M = \{(x,y):y^2=x^3+1\} \]
Find the maximum and minimum values of \(F\) on \(M\).
Start by
setting \(G(x,y) = x^3+1-y^2\). The set \(M\) is now the level curve \(G(x,y) = 0\). Now compute:
\[ x = \answer [given]{-7/3} \quad \text {and}\quad x = 2 \]
Now use the constraint equation \(x^3+1=y^2\) to find
\(y\)-values. If \(x\) is \(\answer [given]{-7/3}\), then \(y\) is not a real number, so we will discard this solution. If \(x=\answer [given]{2}\), then \(y=\pm \answer [given]{3}\).
From this we gain two more candidate for an extrema:
Plugging these points back
into \(F\), we find that the minimum value of \(F\) on \(M\) is \(\answer [given]{17}\) and the maximum value is \(\answer [given]{80}\).
The constraint curve used in the example above is called a Mordell curve. The
Mordell curve is a type of elliptic curve, a central object of study in number theory
and cryptography. For much more information on the Mordell curve, see this paper
by Keith Conrad.
The method of Lagrange multipliers gives a unified method for solving a large class of
constrained optimization problems, and hence is used in many areas of applied
mathematics.