Optimization and Lagrange Multipliers

The underlying mechanism of optimization problems is best understood after taking upper-level calculus courses. So, in this course, we will introduce you to Lagrange equations as a very simple way to handle optimization problems given the knowledge we have built up in previous chapters. Lagrange multipliers are a specialized method developed to handle optimization problems with constraints.

So far, we have learned how to find derivatives and how to find the maximum and minimum values of a function. While these methods are useful to know, they allow for only one input variable. Further, in the real world, a business does not have unlimited resources to achieve the maximum profit, the minimum costs, or the most efficient production. The reality is that every business has constraints, such as budget, labor, or raw materials. We can determine the best solution for a scenario given certain constraints using Lagrange multipliers. We are going to illustrate how to solve an optimization problem with an example.

Suppose that your company produces and sells volleyballs. You can sell x volleyballs a month (in thousands), and your sales force will spend y hours (in thousands) each month selling the volleyballs. The profit function that you come up with is

f ( x , y ) = 72 x + 144 y x 2 8 x y 16 y 2

The cost of producing a volleyball is $20 a ball, and the wage of salespeople is $10 per hour. The monthly budget is $240 (in thousands). We can write the profit-maximizing equation with a constraint as follows:

max x , y 72 x + 144 y x 2 8 x y 16 y 2 s.t. 20 x + 10 y 240

This means that we are trying to find the maximum value of the profit equation by changing variables x and y subject to the budgetary constraint.

First, we want to set up the Lagrange equation as follows:

L = 72 x + 144 y x 2 8 x y 16 y 2 λ ( 240 20 x 10 y )

First, the Greek letter λ (lambda) is called the Lagrange multiplier. There is some significance to λ, but for this course, just know that you have to multiply the constraint by λ. In the equation above, the Lagrange multiplier has a negative sign in front of it, and it is multiplied by the part in parentheses, which is the greater side of the inequality minus the smaller side of the inequality.

The next step is to take the derivative with respect to the input variables (x, y) and with respect to the Lagrange multiplier (λ) separately and set each equation equal to zero.

L x = 72 2 x 8 y + 20 λ = 0 L y = 144 8 x 32 y + 10 λ = 0 L λ = 240 20 x 10 y = 0

Now we have a system of equations: three equations with three unknowns. We solve the system for the input variables x and y. To solve the system of equations, we first eliminate λ using the first two equations. If you cannot see any easy ways to eliminate λ, you can simply divide each equation by the coefficient of λ (20 for the first equation and 10 for the second) and then set the equations in the form λ =  . In this example, we can divide the first equation by 2 and then set both the first and second equations in the form 10 λ =  .

36 x 4 y = 10 λ 144 8 x 32 y = 10 λ

Now we set these two equations equal to each other, then simplify.

36 x 4 y = 144 8 x 32 y 108 7 x 28 y = 0

So we have a system of equations with two equations and two unknowns.

108 7 x 28 y = 0 240 20 x 10 y = 0

By solving the above system of equations, we get

x = 11.51 balls (in thousands) y = 0.98 hours (in thousands)

This may seem like a lot to process, but the reality is that we have taken all the tools we have learned in this course up through Chapter 5 and then used them to find the optimal solution to the problem.