- Home
- >
- Lagrange Multipliers – Definition, Optimization Problems, and Examples
JUMP TO TOPIC [show]
Lagrange Multipliers – Definition, Optimization Problems, and Examples
The method of Lagrange multipliers allows us to address optimization problems in different fields of applications. This includes physics, economics, and information theory. Seeing the wide range of applications this method opens up for us, it’s important that we understand the process of finding extreme values using Lagrange multipliers.
The Lagrange multiplier represents the constant we can use used to find the extreme values of a function that is subject to one or more constraints.
In this article, we’ll cover all the fundamental definitions of Lagrange multipliers. We’ll also show you how to implement the method to solve optimization problems. Since we’ll need partial derivatives and gradients in our discussion, brush up on your knowledge when you need to. For now, let’s start with understanding how Lagrange multipliers help us solve complex problems!
What Is a Lagrange Multiplier?
Lagrange multipliers equip us with another method to solve optimization problems with constraints. By the end of this article, you’ll appreciate the importance of the following set of equations, where
In the past, we’ve learned how to solve optimization problems involving single or multiple variables. These techniques, however, are limited to addressing problems with more constraints. This is when Lagrange multipliers come in handy – a more helpful method (developed by Joseph-Louis Lagrange) allows us to address the limitations of other optimization methods.
The best way to appreciate this method is by illustrating a situation where Lagrange multipliers are most helpful. Let’s say we have a profit function,
Through our previous knowledge, we’ll be able to calculate the maximum profit per month given a limit on the number of soap bars manufactured per month and a cap on hours spent on marketing. The graph above shows how the objective function,
Now, what if we make it more interesting by adding a combined constraint on the budget? Suppose that the accounting team wants a budget involving both soap bar production and marketing cost in one inequality:
This graph highlights at the values of
The method of Lagrange multipliers simply allows us to find the point where the objective function’s curve is tangent to the constraint function. We’ve learned in the past that a multivariable function’s gradient represents a vector with components that contains two or more variables. When working with vectors, two vectors are lying along the same direction when they share a common factor. This also means that the gradients of both the objective and constraint functions will lie in the same direction. This is where Lagrange multipliers come in.
METHOD OF LAGRANGE MULTIPLIERS: WORKING WITH ONE CONSTRAINT Suppose that we have two functions, When
|
We can also extend this method to apply them to problems with two or more constraints. Here’s a summary of how the method of Lagrange multipliers can be applied for optimization problems with more than one constraint.
METHOD OF LAGRANGE MULTIPLIERS: WORKING WITH TWO CONSTRAINTS Suppose that we have three functions, Given that |
Before we learn how to apply these important conditions to solve optimization problems, let’s see how this formula was established. If you’re too excited to try out problems involving Lagrange multipliers, feel free to head over the next section as well!
Proof of the Lagrange Multiplier Formula
We begin by assuming that
The variable,
Notice something about
- The vector,
, contains the components of ’s partial derivatives, so this represents the function’s gradient. - The vector,
, represents the unit tangent vector of the constraint curve.
Using the fact that the point
By inspecting the equation, we can see that for the equation to be true, the gradient of
where
How To Use Lagrange Multipliers?
We can use the Lagrange multipliers to solve problems that involve finding the local minimum or maximum values given one or more constraints. Here are some pointers to remember when working with problems that will benefit from Lagrange multipliers:
- Identify which of the functions represent the objective function,
, and the constraint function, . - Set up the system of equations associated with one constraint (or two constraints).
One Constraint | |
Two Constraints |
- Find the gradients of the functions – take the partial derivatives of each function then write the result as a vector.
- Solve the resulting system of equations to find the values of the variables and the Lagrange multipliers.
- For each of the resulting solutions, calculate the value of
or then compare these values. - Review the problem to determine you’re looking for the maximum or minimum value.
Let’s try to apply these pointers to find the maximum and minimum values of the function,
where this function is subjected to the constraint,
- The objective function is equal to
. - The constraint function is equal to
or .
Now that we’ve determined
We now have the gradients of the two functions, so we can now set up the system of equations that involve Lagrange multipliers.
Equate each corresponding component and use
Substitute
Now, substitute these Lagrange multipliers back into our equations for
This means that we have the following extreme points:
From this, we can see that the maximum value of the function is
Use a similar process when solving optimization problems that involve Lagrange multipliers. Don’t worry, we’ve prepared a wide range of problems for you to work on. When you’re ready, head over to the next two sections to test your understanding and for you to master this topic!
Example 1
Using the method of Lagrange multipliers, find the dimensions of the rectangle that will maximize its area given that it has a perimeter of
Solution
Here’s an illustration showing the problem we need to solve: we want to maximize the area,
Now that we’ve identified the objective and constraint functions, let’s write down each of their gradients as shown below.
\begin{aligned}\nabla f(x, y) &= \left<\dfrac{\partial f}{\partial x}, \dfrac{\partial f}{\partial y}\right>\&= \left<\dfrac{\partial }{\partial x} (xy) , \dfrac{\partial }{\partial y} (xy)\right>\&= \left<1(y), x(1)\right>\&= \left | |
Let’s now set up the system of equations using the resulting gradients as shown below.
\begin{aligned}\nabla f(x_o, y_o) &= \lambda \nabla g(x_o, y_o)\g(x_o, y_o) &= 0\& \Downarrow\ \left
From this, we can see that we can optimize the function when
This means that we can optimize the value of
The maximum area of a rectangle with a perimeter of
Example 2
Now that we know how to use Lagrange multipliers to solve the problem in the first section, why don’t we calculate the maximum profit earned by the soap manufacturer? Here are the following functions discussed earlier:
- The profit earned by the soap bar manufacturer can be modeled by the function,
, measured in thousands of dollars. - The accounting team wants to constrain the budget of the number of bars manufactured (
) and the number of hours spent in marketing ( ) with the following function: .
Estimate the maximum profit to the nearest cents.
Solution
As we have identified earlier, we have the following objective function and constraint function:
Take the partial derivatives of the two functions to write down their respective gradients.
Use these gradients to set up a key system of equations we can use to solve for
Let’s now break down the equations that we have by equating each component from the left-hand side to the corresponding component from the right-hand side vector. We’ll also use the equation derived from the constraint function,
Since
With this new equation, let’s find an expression for
Let’s now use the third equation,
Now that we have the extremum,
This means that the maximum profit earned by the manufacturer is approximately equal to
Example 3
Find the maximum and minimum values of the function,
where this function is subjected to the constraint,
Solution
We’re now working with three-variable functions with one constraint.
- The objective function is equal to
. - The constraint function is equal to
or .
As with the previous examples, we’ll evaluate the gradients of the two functions.
Let’s now set up the equation using these two gradients.
Using the constraint function and the components of the two vectors, we’ll have the following four equations.
Simplify the first three equations and use their simplified forms to rewrite the fourth equation and solve for
Let’s now plug this value of
We now have one extreme point to observe, so use these values to find the value of
To determine whether this represents the local maximum or minimum, let’s see what happens when
This shows that we have a local minimum at
Example 4
Determine the points on the circle,
Solution
Let’s first write an expression for the distance of the point,
Keep in mind that if we want to maximize the distance, we’ll also want the square of the distance to be optimized.
This means that we want to maximize
Let’s now find the gradients of the two functions as shown below.
Now that we have the gradients of the two functions, set up the system of equations we need to find the values of
This means that we have the following equations from the gradients:
Now, let’s further simplify this equation as shown below.
Use
Let’s evaluate the function,
This means that the maximum value of the function is approximately equal to
Practice Questions
1. Find the maximum and minimum values of the function,
where this function is subjected to the constraint,
2. Using the method of Lagrange multipliers, find the dimensions of the rectangle that will maximize its area given that it has a perimeter of
3. Sophie’s company supplies phone cases and she has developed a profit model that depends on the number (
where
What are the values of
4. Find the maximum and minimum values of the function,
where this function is subjected to the constraint,
5. Determine the points on the circle,
Answer Key
1. Minimum value:
2. The maximum area is equal to
3.
4. Local minimum:
5. Farthest:
Images/mathematical drawings are created with GeoGebra.