Home»Math Guides»Lagrange Multipliers for Optimization and Finding Extreme Points (Example 2)
Multivariable Optimization using Lagrange Multipliers (Example 2)
We can use Lagrange multipliers to solve problems where we’re asked to find the max/min of an objective function, subject to equation constraints.
Find the extreme values of \[f(x,y,z) = x + 2y\] subject to both constraints:
\[\begin{array}{l}x + y + z = 1\\{y^2} + {z^2} = 4\end{array}\]
For Lagrange multipliers involving 2 constraint equations, we can use:
\[\nabla f = \lambda \nabla g + \mu \nabla h\]
Where \(\lambda \) and \(\mu \) are unknown values.
We can also set the components of the gradients equal individually, so we can obtain 3 equations, each one with the variables x, y and z.
For now I will use vector notation and I’ll fill in the gradients.
\[\left\langle {1,2,0} \right\rangle = \lambda \left\langle {1,1,1} \right\rangle + \mu \left\langle {0,2y,2z} \right\rangle \]
In this vector equation, as I said earlier you can set each component equal to create three equations.
Looking at just the first component,
\[\begin{array}{l}1 = \lambda (1) + \mu (0)\\\lambda = 1\end{array}\]
Now use the y and z components from our vector equations and solve.
\[\begin{array}{l}2 = (1)(1) + \mu (2y)\\0 = (1)(1) + \mu (2z)\end{array}\]
From these two equations, we find that:
\[\begin{array}{l}y = \frac{1}{2}\mu \\z = – \frac{1}{2}\mu \end{array}\]
Or in other words,
\[y = – z\]
Then plug into the constraint \[{y^2} + {z^2} = 4\]
\[\begin{array}{l}{( – z)^2} + {z^2} = 4\\{z^2} = 2\\z = \pm \sqrt 2 \end{array}\]
And we know that y is just negative z.
I flip the plus or minus sign to a minus or plus sign for y.
\[y = \mp \sqrt 2 \]
Now plug these values into the other constraint, \[x + y + z = 1\]
\[\begin{array}{l}x + \sqrt 2 – \sqrt 2 = 1\\x = 1\\x – \sqrt 2 + \sqrt 2 = 1\\x = 1\end{array}\]
So the two critical points are (f(1,sqrt 2 , – sqrt 2 )) and (f(1, – sqrt 2 ,sqrt 2 )).
Then just plug these points into our objective function, \(f(x,y,z) = x + 2y\), and see which point is the max and which is the min.
\[\begin{array}{l}f(1,\sqrt 2 , – \sqrt 2 ) = 1 + 2\sqrt 2 \\f(1, – \sqrt 2 ,\sqrt 2 ) = 1 – 2\sqrt 2 \end{array}\]
So the first point above is the max, while the second point above is the min.
Try the next example for Lagrange Multipliers for multivariable function optimization