What is a lagrange multiplier?
Great question, and it’s one we’re going to cover in detail today.
Let’s go!
Lagrange Multiplier Method
What’s the most challenging part about identifying absolute extrema for functions of several variables?
Identifying the boundary points, of course.
So, what if I told you that there’s an easier way to solve extrema problems with constraints?
Well, the method of Lagrange Multipliers is the key.
How?
By adding a variable!
What? Wouldn’t that make it even more complicated?
Nope. Because this new variable (dimension) will link and connect our function to the constraint in a more tangible way.
Lagrange Theorem
Let’s learn how!
Lagrange’s Theorem says that if \(f\) and \(g\) have continuous first order partial derivatives such that \(f\) has an extremum at a point \(\left( {{x_0},{y_0}} \right)\) on the smooth constraint curve \(g\left( {x,y} \right) = c\) and if \(\nabla g\left( {{x_0},{y_0}} \right) \ne \overrightarrow 0 \), then there is a real number lambda, \(\lambda \), such that \(\nabla f\left( {{x_0},{y_0}} \right) = \lambda \nabla g\left( {{x_0},{y_0}} \right)\) .
Why Does This Work?
Well, we know that two curves have a common perpendicular line if they are tangent at the same point.
Furthermore, we know that the gradient vector, \(\nabla f\), is perpendicular to its level curves and \(\nabla g\) is perpendicular to the constraint curve as well.
So, when optimizing \(f\left( {x,y} \right)\) subject to constraint \(g\left( {x,y} \right) = 0\) all we are really being asked to find is the level curve of \(f\) with the greatest or smallest k-value that intersects the constraint curve.
In other words, it will be the place where the two curves are tangent. Which means we are looking for are the points where \(\nabla f = \lambda \nabla g\).
How Does This Work?
Alright, now it’s time to learn how this works in a more applicable sense.
Thankfully there are only a few simple steps.
Supposing \(f\) and \(g\) satisfy the hypothesis of Lagrange’s Theorem, and \(f\) has a maximum or minimum subject to the constraint \(g\left( {x,y} \right) = c\), then the Method of Lagrange Multipliers is as follows:
- Simultaneously solve the system of equations \(\nabla f\left( {{x_0},{y_0}} \right) = \lambda \nabla g\left( {{x_0},{y_0}} \right)\) and \(g\left( {x,y} \right) = c\).
- Evaluate \(f\) at each solution point obtained in step 1. The largest value yields the maximum of \(f\) subject to the constraint \(g\left( {x,y} \right) = c\), and the smallest value yields the minimum of \(f\) subject to the constraint \(g\left( {x,y} \right) = c\).
\begin{equation}
\left\{\begin{array}{c}
f_{x}=\lambda g_{x} \\
f_{y}=\lambda g_{y} \\
g(x, y)=c
\end{array}\right.
\end{equation}
Note that each critical point obtained in step 1 is a potential candidate for the constrained extremum problem, and the corresponding \(\lambda \) is called the Lagrange multiplier.
Lagrange Multiplier Example
Let’s walk through an example to see this ingenious technique in action.
Find the absolute maximum and absolute minimum of \(f(x, y)=x y\) subject to the constraint equation \(g\left( {x,y} \right) = 4{x^2} + 9{y^2} – 36\).
First, we will find the first partial derivatives for both \(f\) and \(g\).
\begin{equation}
\begin{array}{ll}
f_{x}=y & g_{x}=8 x \\
f_{y}=x & g_{y}=18 y
\end{array}
\end{equation}Next, we will set up our system of equations and solve.
\begin{equation}
\left\{\begin{array}{l}
f_{x}=\lambda g_{x} \\
f_{y}=\lambda g_{y} \\
g(x, y)=c
\end{array} \quad \Rightarrow \quad \begin{array}{c}
y=\lambda(8 x) \\
x=\lambda(18 y) \\
4 x^{2}+9 y^{2}-36=0
\end{array}\right.
\end{equation}Now let’s substitute our second equation into our first and solve.
\begin{equation}
\text { If } y=8 x \lambda \text { and } x=18 y \lambda \text {, then }
\end{equation}\begin{equation}
\begin{aligned}
&y=8 \lambda(18 y \lambda) \\
&y=144 y \lambda^{2} \\
&y-144 y \lambda^{2}=0 \\
&y\left(1-144 \lambda^{2}\right)=0
\end{aligned}
\end{equation}\begin{equation}
\begin{array}{lll}
y=0 & \text { or } & 1-144 \lambda^{2}=0 \\
y=0 & \text { or } & \lambda=\frac{1}{12},-\frac{1}{12}
\end{array}
\end{equation}Now we need to find the points that correspond to the values we have just found.
\begin{equation}
\text { If } y=0 \text { when } x=18 y \lambda \text { and } 4 x^{2}+9 y^{2}-36=0, \text { then }
\end{equation}\begin{equation}
x=18(0) \lambda \Rightarrow x=0
\end{equation}\begin{equation}
4(0)^{2}+9(0)^{2}-36=0 \Rightarrow-36 \neq 0
\end{equation}But this yields an undefined solution. Therefore, \[x = 0\] and \(y=0\) are not a critical point.
Now let’s find any critical points that correspond to:
\begin{equation}
\lambda=\frac{1}{12}
\end{equation}\begin{equation}
\text { If } \lambda=\frac{1}{12} \text { when } x=18 y \lambda \text { and } 4 x^{2}+9 y^{2}-36=0 \text {, then }
\end{equation}\begin{equation}
\begin{aligned}
&x=18 y\left(\frac{1}{12}\right) \Rightarrow x=\frac{3}{2} y \\
&4\left(\frac{3}{2} y\right)^{2}+9 y^{2}-36=0 \\
&9 y^{2}+9 y^{2}-36=0 \\
&18 y^{2}=36 \\
&y^{2}=2 \\
&y=\sqrt{2},-\sqrt{2}
\end{aligned}
\end{equation}Thus, if\[y = \sqrt 2 , – \sqrt 2 \], then we can substitute these values into \(x = \frac{3}{2}y\) and \(z = f\left( {x,y} \right) = xy\) to find our critical points.
\begin{equation}
\begin{aligned}
&y=\sqrt{2}, \quad x=\frac{3}{2}(\sqrt{2}), \quad z=\left(\frac{3 \sqrt{2}}{2}\right)(\sqrt{2}) \quad\left(\frac{3 \sqrt{2}}{2}, \sqrt{2}, 3\right) \\
&y=-\sqrt{2}, \quad x=\frac{3}{2}(-\sqrt{2}), \quad z=\left(\frac{-3 \sqrt{2}}{2}\right)(-\sqrt{2}) \quad\left(-\frac{3 \sqrt{2}}{2},-\sqrt{2}, 3\right)
\end{aligned}
\end{equation}Now we must find any critical points that correspond to:
\begin{equation}
\lambda=-\frac{1}{12}
\end{equation}\begin{equation}
\text { If } \lambda=-\frac{1}{12} \text { when } x=18 y \lambda \text { and } 4 x^{2}+9 y^{2}-36=0, \text { then }
\end{equation}\begin{equation}
\begin{aligned}
&x=18 y-\left(\frac{1}{12}\right) \Rightarrow x=-\frac{3}{2} y \\
&4\left(-\frac{3}{2} y\right)^{2}+9 y^{2}-36=0 \\
&9 y^{2}+9 y^{2}-36=0 \\
&18 y^{2}=36 \\
&y^{2}=2 \\
&y=\sqrt{2},-\sqrt{2}
\end{aligned}
\end{equation}Thus, if\[y = \sqrt 2 , – \sqrt 2 \], then we can substitute these values into \(x=\frac{3}{2} y\) and \(z = f\left( {x,y} \right) = xy\) to find our critical points.
\begin{equation}
\begin{aligned}
&y=\sqrt{2}, \quad x=-\frac{3}{2}(\sqrt{2}), \quad z=\left(-\frac{3 \sqrt{2}}{2}\right)(\sqrt{2}) \quad\left(-\frac{3 \sqrt{2}}{2}, \sqrt{2},-3\right) \\
&y=-\sqrt{2}, \quad x=-\frac{3}{2}(-\sqrt{2}), \quad z=\left(\frac{3 \sqrt{2}}{2}\right)(-\sqrt{2}) \quad\left(\frac{3 \sqrt{2}}{2},-\sqrt{2},-3\right)
\end{aligned}
\end{equation}Alright, now we have all of our critical points, and the last thing we have to do is identify the largest z-value (global maximum) and our smallest z-value (global minimum).
\begin{equation}
\left(\frac{3 \sqrt{2}}{2}, \sqrt{2}, 3\right),\left(\frac{3 \sqrt{2}}{2},-\sqrt{2},-3\right),\left(-\frac{3 \sqrt{2}}{2}, \sqrt{2},-3\right),\left(-\frac{3 \sqrt{2}}{2},-\sqrt{2}, 3\right)
\end{equation}Thus, our absolute maximum is at \(\left( {\frac{{3\sqrt 2 }}{2},\sqrt 2 ,3} \right)\) and \(\left( { – \frac{{3\sqrt 2 }}{2}, – \sqrt 2 ,3} \right)\), and our absolute minimum is at \(\left( {\frac{{3\sqrt 2 }}{2}, – \sqrt 2 , – 3} \right)\) and \(\left( { – \frac{{3\sqrt 2 }}{2},\sqrt 2 , – 3} \right)\).
While it still took some effort to arrive at our answer, the process was more straightforward and methodical, making it easier to achieve our solution.
So, together we will learn how the clever technique of using the method of Lagrange Multipliers provides us with an easier way for solving constrained optimization problems for absolute extrema.
We will work through various examples in detail for when a function is subject to
- One Constraint.
- Two Constraints.
- Or Even An Unbounded Constraint.
It’s going to be great, so let’s get to it!
Video Tutorial w/ Full Lesson & Detailed Examples (Video)
Lagrange Multipliers
Lagrange Multipliers
- Overview of how and why we use Lagrange Multipliers to find Absolute Extrema
- Steps for how to optimize a function using Lagrange multipliers
- Example #1 of using Lagrange multipliers given one constraint
- Example #2 of using Lagrange multipliers given two constraints
- Example #3 of using Lagrange multipliers given an inequality
Get access to all the courses and over 450 HD videos with your subscription
Monthly and Yearly Plans Available
Still wondering if CalcWorkshop is right for you?
Take a Tour and find out how a membership can take the struggle out of learning math.