You are on page 1of 6

Constrained Optimization

Megan Accordino
Oct. 5, 2012
A constrained optimization problem will ask you to nd the values of x
1
, x
2
, . . ., x
n
that max-
imize or minimize the function f(x
1
, x
2
, . . . , x
n
) subject to the constraint that g(x
1
, x
2
, . . . , x
n
) =
A.
1 Utility Maximization
The usual interpretation of a maximization problem is that you are nding the quantity of
good x
1
, the quantity of good x
2
, etc. to maximize your utility (or happiness) subject to a budget
constraint. Your utility from each good is dened by a utility function u(x
1
, x
2
, . . . , x
n
). Your
budget constraint says that your expenditures must be less than or equal to your budget, p
1
x
1
+
p
2
x
2
+ . . . + p
n
x
n
B, where p
i
indicates the price of good i.
To solve a constrained maximization problem we follow the following steps:
Step 1: Set up the problem
max
x
1
,x
2
,...,xn
u(x
1
, x
2
, . . . , x
n
)
s.t. p
1
x
1
+ p
2
x
2
+ + p
n
x
n
B
Step 2: Set up the Lagrangian
The Lagrangian is a mathematical trick, developed by a mathematician named Lagrange, to
nd the maximum or minimum of a function when the possible solutions are constrained.
L = u(x
1
, x
2
, . . . , x
n
) + (B p
1
x
1
p
2
x
2
p
n
x
n
)
1
is called the Lagrange multiplier. Whatever the constraint is for the problem, say g(x
1
, x
2
, . . . , x
n
)
A, you simply rearrange your constraint such that A g(x
1
, x
2
, . . . , x
n
) 0. Next, write the La-
grangian as the sum of the objective function (the function we are maximizing) plus multiplied
by the rearranged version of the constraint. Note that it matters how you rearrange the constraint.
Plugging g(x
1
, x
2
, . . . , x
n
) A into the Lagrangian gives a different answer than plugging in
Ag(x
1
, x
2
, . . . , x
n
). When you have a constrained maximization problem, the constraint must be
rearranged such that it is greater than or equal to zero. In the example of a budget constraint, which
is the usual example, the rearranged budget constraint must be: Bp
1
x
1
p
2
x
2
p
n
x
n
0
because you cannot spend more than your budget, but its ne if you spend less.
Therefore, if you are given a constraint that says g(x
1
, x
2
, . . . , x
n
) = A, you must consider
which way the inequality would go. In most problems where you are maximizing something, the
constraint is basically a budget that cannot be exceeded, and therefore you know you must write
Ag(x
1
, x
2
, . . . , x
n
) because you cannot exceed your budget.
Step 3: Find the First Order Conditions (FOCs)
Creating the Lagrangian has created a new variable, . Therefore when we take the rst order
conditions, we must nd the rst order conditions with respect to each x
i
and with respect to .
The rst order conditions in a constrained optimization problem are just the partial derivatives of
the Lagrangian with respect to each x
i
and with respect to , set equal to zero. Thus we have:
L
x
1
=u
1
(x
1
, x
2
, . . . , x
n
) p
1
= 0
L
x
2
=u
2
(x
1
, x
2
, . . . , x
n
) p
2
= 0
.
.
.
L
x
n
=u
n
(x
1
, x
2
, . . . , x
n
) p
n
= 0
L

=B p
1
x
1
p
2
x
2
p
n
x
n
= 0
Step 4: Solve for x
1
, x
2
, . . . , x
n
To solve for each x
i
, note that each of the rst n equations can be rearranged such that
u
i
(x
1
, x
2
, . . . , x
n
) = p
i
, where i is some number between 1 and n and therefore indicates which
equation we are looking at. This equation can be rearranged again to make:
u
i
(x
1
, x
2
, . . . , x
n
)
p
i
=
As each equation from 1 to n can be arranged in this way:
=
u
1
(x
1
, x
2
, . . . , x
n
)
p
1
=
u
2
(x
1
, x
2
, . . . , x
n
)
p
2
= =
u
n
(x
1
, x
2
, . . . , x
n
)
p
n
2
This relationship along with the nal FOC for can then be used to nd the values of each x
i
.
Most of the time the actual value of is not important, and you do not need to solve for it.
The interpretation of u
i
(x
1
, x
2
, . . . , x
n
) is the marginal utility of good i or the additional utility
or happiness the person receives when consuming one more unit of good i. p
i
, is the price of 1
unit of good i, which can also be called the marginal cost of good i. Therefore, is the ratio
of marginal utility to marginal cost. A high indicates that additional units of good i would be
very valuable, while a low indicates that additional units of good i are not very valuable to the
consumer. equal to zero indicates that the consumer is satised with the amount of good i he
currently consumes and does not want any more.
2 Cost Minimization
A constrained minimization problem is very similar, but the interpretation is different. A con-
strained minimization problem is thought of as the dual of the constrained maximization problem,
meaning that we can nd the same answer from the constrained minimization problem as with
the constrained maximization problem, though we set up each problem differently. The dual of
the utility maximization problem solved above is a cost minimization problem. Here we set a
minimum utility level, u, and minimize the cost of achieving that level of utility.
For the purposes of this class, the utility maximization problem is the most important problem
to learn how to solve. Cost minimization is presented here for reference. If the professor does not
discuss it in class and it does not show up on the homeworks, you do not need to worry about it on
tests. Just in case, the steps to solve the problem are as follows:
Step 1: Set up the problem
min
x
1
,x
2
,...,xn
p
1
x
1
+ p
2
x
2
+ + p
n
x
n
s.t. u(x
1
, x
2
, . . . , x
n
) u
Step 2: Set up the Lagrangian
L = p
1
x
1
+ p
2
x
2
+ + p
n
x
n
+ (u u(x
1
, x
2
, . . . , x
n
))
In a minimization problem, take the constraint for the problem, say g(x
1
, x
2
, . . . , x
n
) A, and
rearrange it such that A g(x
1
, x
2
, . . . , x
n
) 0. Next, write the Lagrangian as the sum of the
objective function (the function we are minimizing) plus multiplied by the rearranged version of
the constraint. Again, it matters how you rearrange the constraint. Plugging g(x
1
, x
2
, . . . , x
n
) A
3
into the Lagrangian gives a different answer than plugging in A g(x
1
, x
2
, . . . , x
n
). When you
have a constrained minimization problem, the constraint must be rearranged such that it is less
than or equal to zero. In the example of a minimum utility constraint, which is the usual example,
the rearranged minimum utility constraint must be: u u(x
1
, x
2
, . . . , x
n
) 0 because you must
achieve a utility of at least u, but higher utilities are also acceptable.
Note that in both maximization and minimization you are just subtracting the side of the equa-
tion with the variables from the side with the constant, u here or B in the utility maximization
problem.
Step 3: Find the First Order Conditions (FOCs)
Again, the rst order conditions are just the partial derivatives of the Lagrangian with respect
to each x
i
and with respect to , set equal to zero. Thus we have:
L
x
1
=p
1
u
1
(x
1
, x
2
, . . . , x
n
) = 0
L
x
2
=p
2
u
2
(x
1
, x
2
, . . . , x
n
) = 0
.
.
.
L
x
n
=p
n
u
n
(x
1
, x
2
, . . . , x
n
) = 0
L

=u u(x
1
, x
2
, . . . , x
n
) = 0
Step 4: Solve for x
1
, x
2
, . . . , x
n
To solve for each x
i
, note that each of the rst n equations can be rearranged such that
u
i
(x
1
, x
2
, . . . , x
n
) = p
i
, where i is some number between 1 and n and therefore indicates which
equation we are looking at. This equation can be rearranged again to make:
p
i
u
i
(x
1
, x
2
, . . . , x
n
)
=
Note that this equation is just the inverse of the equation from the utility maximization problem.
As each equation from 1 to n can be arranged in this way:
=
p
1
u
1
(x
1
, x
2
, . . . , x
n
)
=
p
2
u
2
(x
1
, x
2
, . . . , x
n
)
= =
p
n
u
n
(x
1
, x
2
, . . . , x
n
)
This relationship along with the nal FOC for can then be used to nd the values of each x
i
.
4
3 A Practice Constrained Maximization Problem
Find the values of (x
1
, x
2
) that maximize the expression Y = x
2/3
1
x
1/3
2
subject to the following
constraint: x
1
+ 2x
2
= 600.
Step 1: Set up the problem
max
x
1
,x
2
x
2/3
1
x
1/3
2
s.t. x
1
+ 2x
2
= 600
Step 2: Set up the Lagrangian
L = x
2/3
1
x
1/3
2
+ (600 x
1
2x
2
)
Here, I assume that the constraint is a budget constraint and that I cannot exceed 600, thus 600
x
1
2x
2
0. This is a safe assumption to make in most any constrained maximization problem.
Step 3: Find the First Order Conditions (FOCs)
L
x
1
=
2
3
x
1/3
1
x
1/3
2
= 0
L
x
2
=
1
3
x
2/3
1
x
2/3
2
2 = 0
L

=600 x
1
2x
2
= 0
Step 4: Solve for x
1
, x
2
, . . . , x
n
I begin by rearranging the rst two equations to set them equal to :
2
3
x
1/3
1
x
1/3
2
=
1
6
x
2/3
1
x
2/3
2
=
Setting the left side of each equation equal to each other yields:
2
3
x
1/3
1
x
1/3
2
=
1
6
x
2/3
1
x
2/3
2
5
This can be simplied considerably to nd a relationship between x
1
and x
2
:
4x
2
= x
1
I then plug this into the FOC for since that equation contains only x
1
and x
2
and not .
600 4x
2
2x
2
= 0
Solving for x
2
yields
x
2
= 100
Since 4x
2
= x
1
:
x
1
= 400
6

You might also like