Constrained Optimization PDF
Constrained Optimization PDF
Constrained Optimization PDF
section 5.5
Constrained optimization
Objectives
Advice
In this section we begin by proving some theoretical results before describing the method
of substitution. You might prefer to skip the theory at a first reading, and begin with the
two worked examples.
In Section 5.4 we described how to find the optimum (that is, maximum or minimum) of a
function of two variables
z = f(x, y)
where the variables x and y are free to take any values. As we pointed out at the beginning of
that section, this assumption is unrealistic in many economic situations. An individual wishing
to maximize utility is subject to an income constraint and a firm wishing to maximize output
is subject to a cost constraint.
MFE_C05e.qxd 16/12/2005 10:43 Page 401
K = A− L DL +
P M
C PK F PK
The isocost curve is therefore a straight line with slope −PL/PK and intercept M/PK. Graphically,
our constrained problem is to choose that point on the isocost line which maximizes output.
This is given by the point labelled A in Figure 5.14. Point A certainly lies on the isocost line and
it maximizes output because it also lies on the highest isoquant. Other points, such as B and C,
also satisfy the constraint but they lie on lower isoquants and so yield smaller levels of output
than A. Point A is characterized by the fact that the isocost line is tangential to an isoquant. In
other words, the slope of the isocost line is the same as that of the isoquant at A.
MFE_C05e.qxd 16/12/2005 10:43 Page 402
Figure 5.14
Now we have already shown that the isocost line has slope −PL/PK. In Section 5.2 we defined
the marginal rate of technical substitution, MRTS, to be minus the slope of an isoquant, so at
point A we must have
PL
= MRTS
PK
We also showed that
MPL
MRTS =
MPK
so
PL MPL
=
PK MPK
the ratio of the input prices is equal to the ratio of their marginal products
the ratio of marginal product to price is the same for all inputs
The marginal product determines the change in output due to a 1 unit increase in input. This
optimization condition therefore states that the last dollar spent on labour yields the same
addition to output as the last dollar spent on capital.
The above discussion has concentrated on production functions. An analogous situation
arises when we maximize utility functions
MFE_C05e.qxd 16/12/2005 10:43 Page 403
U = U(x1, x2)
where x1, x2 denote the number of items of goods G1, G2 that an individual buys. If the prices
of these goods are denoted by P1 and P2 and the individual has a fixed budget, M, to spend on
these goods then the corresponding constraint is
P1x1 + P2x2 = M
This budgetary constraint plays the role of the cost constraint, and indifference curves are ana-
logous to isoquants. Consequently, we analyse the problem by superimposing the budget line
on an indifference map. The corresponding diagram is virtually indistinguishable from that of
Figure 5.14. The only change is that the axes would be labelled x1 and x2 rather than L and K.
Once again, the maximum point of the constrained problem occurs at the point of tangency,
so that at this point the slope of the budget line is that of an indifference curve. Hence
P1
= MRCS
P2
In Section 5.2 we derived the result
∂U/∂x1
MRCS =
∂U/∂x2
Writing the partial derivatives ∂U/∂xi more concisely as Ui we can deduce that
P1 U1
=
P2 U2
that is,
the ratio of the prices of the goods is equal to the ratio of their marginal utilities
Again, this relationship can be rearranged into the more familiar form
U1 U2
=
P1 P2
so when utility is maximized subject to a budgetary constraint,
the ratio of marginal utility to price is the same for all goods consumed
If individuals allocate their budgets between goods in this way then utility is maximized when
the last dollar spent on each good yields the same addition to total utility. Under these cir-
cumstances, the consumer has achieved maximum satisfaction within the constraint of a fixed
budget, so there is no tendency to reallocate income between these goods. Obviously, the con-
sumer’s equilibrium will be affected if there is a change in external conditions such as income
or the price of any good. For example, suppose that P1 suddenly increases, while P2 and M
remain fixed. If this happens then the equation
U1 U2
=
P1 P2
turns into an inequality
U1 U2
<
P1 P2
MFE_C05e.qxd 16/12/2005 10:43 Page 404
so equilibrium no longer holds. Given that P1 has increased, consumers find that the last dol-
lar spent no longer buys as many items of G1, so utility can be increased by purchasing more
of G2 and less of G1. By the law of diminishing marginal utility, the effect is to increase U1 and
to decrease U2. The process of reallocation continues until the ratio of marginal utilities to
prices is again equal and equilibrium is again established.
The graphical approach provides a useful interpretation of constrained optimization. It has
also enabled us to justify some familiar results in microeconomics. However, it does not give
us a practical way of actually solving such problems. It is very difficult to produce an accurate
isoquant or indifference map from any given production or utility function. We now describe
an alternative approach, known as the method of substitution. To illustrate the method we
begin with an easy example.
Example
Solution
In this example we need to optimize the function
z = −2x2 + y2
given that x and y are related by
y = 2x − 1
The obvious thing to do is to substitute the expression for y given by the constraint directly into the func-
tion that we are trying to optimize to get
z = −2x2 + (2x − 1)2
= −2x2 + 4x2 − 4x + 1
= 2x2 − 4x + 1
Note the wonderful effect that this has on z. Instead of z being a function of two variables, x and y, it is now
just a function of the one variable, x. Consequently, the minimum value of z can be found using the theory
of stationary points discussed in Chapter 4.
At a stationary point
dz
=0
dx
that is,
4x − 4 = 0
which has solution x = 1. Differentiating a second time we see that
d 2z
=4>0
dx2
confirming that the stationary point is a minimum. The value of z can be found by substituting x = 1 into
z = 2x2 − 4x + 1
MFE_C05e.qxd 16/12/2005 10:43 Page 405
to get
z = 2(1)2 − 4(1) + 1 = −1
It is also possible to find the value of y at the minimum. To do this we substitute x = 1 into the constraint
y = 2x − 1
to get
y = 2(1) − 1 = 1
The constrained function therefore has a minimum value of −1 at the point (1, 1).
Step 1
Use the constraint
ϕ(x, y) = M
to express y in terms of x.
Step 2
Substitute this expression for y into the objective function
z = f(x, y)
to write z as a function of x only.
Step 3
Use the theory of stationary points of functions of one variable to optimize z.
Practice Problem
Advice
The most difficult part of the three-step strategy is step 1, where we rearrange the given
constraint to write y in terms of x. In the previous example and in Practice Problem 1 this step
was exceptionally easy because the constraint was linear. In both cases the constraint was
even presented in the appropriate form to begin with, so no extra work was required. In
general, if the constraint is non-linear, it may be difficult or impossible to perform the initial
rearrangement. If this happens then you could try working the other way round and
expressing x in terms of y, although there is no guarantee that this will be possible either.
However, when step 1 can be tackled successfully, the method does provide a really quick
way of solving constrained optimization problems.
To illustrate this we now use the method of substitution to solve two economic problems
that both involve production functions. In the first example output is maximized subject to
cost constraint and in the second example cost is minimized subject to an output constraint.
Example
A firm’s unit capital and labour costs are $1 and $2 respectively. If the production function is given by
Q = 4LK + L2
find the maximum output and the levels of K and L at which it is achieved when the total input costs are
fixed at $105. Verify that the ratio of marginal product to price is the same for both inputs at the optimum.
Solution
We are told that 1 unit of capital costs $1 and that 1 unit of labour costs $2. If the firm uses K units of
capital and L units of labour then the total input costs are
K + 2L
This is fixed at $105, so
K + 2L = 105
The mathematical problem is to maximize the objective function
Q = 4LK + L2
subject to the constraint
K + 2L = 105
The three-step strategy is as follows:
Step 1
Rearranging the constraint to express K in terms of L gives
K = 105 − 2L
Step 2
Substituting this into the objective function
Q = 4LK + L2
gives
Q = 4L(105 − 2L) + L2 = 420L − 7L2
and so output is now a function of the one variable, L.
MFE_C05e.qxd 16/12/2005 10:43 Page 407
Step 3
At a stationary point
dQ
=0
dL
that is,
420 − 14L = 0
which has solution L = 30. Differentiating a second time gives
d 2Q
= −14 < 0
dL2
confirming that the stationary point is a maximum.
The maximum output is found by substituting L = 30 into the objective function
Q = 420L − 7L2
to get
Q = 420(30) − 7(30)2 = 6300
The corresponding level of capital is found by substituting L = 30 into the constraint
K = 105 − 2L
to get
K = 105 − 2(30) = 45
The firm should therefore use 30 units of labour and 45 units of capital to produce a maximum output
of 6300.
Finally, we are asked to check that the ratio of marginal product to price is the same for both inputs. From
the formula
Q = 4LK + L2
we see that the marginal products are given by
∂Q ∂Q
MPL = = 4K + 2L and MPK = = 4L
∂L ∂K
so at the optimum
MPL = 4(45) + 2(30) = 240
and
MPK = 4(30) = 120
The ratios of marginal products to prices are then
MPL 240
= = 120
PL 2
and
MPK 120
= = 120
PK 1
which are seen to be the same.
MFE_C05e.qxd 16/12/2005 10:43 Page 408
Practice Problem
Example
Solution
Given that capital and labour costs are $4 and $3 per unit, the total cost of using K units of capital and L
units of labour is
TC = 4K + 3L
The firm’s production quota is 160, so
2K1/2L1/2 = 160
The mathematical problem is to minimize the objective function
TC = 4K + 3L
subject to the constraint
2K1/2L1/2 = 160
Step 1
Step 2
19 200
TC = 4K +
K
and so total cost is now a function of the one variable, K.
Step 3
At a stationary point
d(TC)
=0
dK
that is,
19 200
4− =0
K2
This can be written as
19 200
4=
K2
so that
19 200
K2 = = 4800
4
Hence
K = √4800 = 69.28
Differentiating a second time gives
d2(TC) 38 400
= >0 because K > 0
dK 2 K3
confirming that the stationary point is a minimum.
Finally, the value of L can be found by substituting K = 69.28 into the constraint
6400
L=
K
to get
6400
L= = 92.38
69.28
We are not asked for the minimum cost, although this could easily be found by substituting the values of K
and L into the objective function.
Practice Problem
Key Terms
Isocost curve A line showing all combinations of two factors which can be bought for a
fixed cost.
Method of substitution The method of solving constrained optimization problems
whereby the constraint is used to eliminate one of the variables in the objective function.
Objective function A function that one seeks to optimize (usually) subject to constraints.
Practice Problems
section 5.6
Lagrange multipliers
Objectives
We now describe the method of Lagrange multipliers for solving constrained optimization
problems. This is the preferred method, since it handles non-linear constraints and problems
involving more than two variables with ease. It also provides some additional information that
is useful when solving economic problems.
To optimize an objective function
f(x, y)
subject to a constraint
ϕ(x, y) = M
we work as follows.
Step 1
Define a new function
g(x, y, λ) = f(x, y) + λ[M − ϕ(x, y)]
MFE_C05f.qxd 16/12/2005 10:43 Page 412
Step 2
Solve the simultaneous equations
∂g
=0
∂x
∂g
=0
∂y
∂g
=0
∂λ
for the three unknowns, x, y and λ.
The basic steps of the method are straightforward. In step 1 we combine the objective func-
tion and constraint into a single function. To do this we first rearrange the constraint as
M − ϕ(x, y)
and multiply by the scalar (i.e. number) λ (the Greek letter ‘lambda’). This scalar is called the
Lagrange multiplier. Finally, we add on the objective function to produce the new function
g(x, y, λ) = f(x, y) + λ[M − ϕ(x, y)]
This is called the Lagrangian function. The right-hand side involves the three letters x, y and λ,
so g is a function of three variables.
In step 2 we work out the three first-order partial derivatives
∂g ∂g ∂g
, ,
∂x ∂y ∂λ
and equate these to zero to produce a system of three simultaneous equations for the three
unknowns x, y and λ. The point (x, y) is then the optimal solution of the constrained problem.
The number λ can also be given a meaning and we consider this later. For the moment we con-
sider a simple example to get us started.
Example
Solution
Step 1
In this example
f(x, y) = x2 − 3xy + 12x
ϕ(x, y) = 2x + 3y
M=6
so the Lagrangian function is given by
g(x, y, λ) = x2 − 3xy + 12x + λ(6 − 2x − 3y)
MFE_C05f.qxd 16/12/2005 10:43 Page 413
Step 2
The optimal solution is therefore (−1, 8/3) and the corresponding value of the objective function
x2 − 3xy + 12x
is
(−1)2 − 3(−1)(8/3) + 12(−1) = −3
Practice Problem
Looking back at the worked example and your own solution to Practice Problem 1, notice
that the third equation in step 2 is just a restatement of the original constraint. It is easy to see
that this is always the case because if
g(x, y, λ) = f(x, y) + λ[M − ϕ(x, y)]
then
∂g
= M − ϕ(x,y)
∂λ
The equation
∂g
=0
∂λ
then implies the constraint
ϕ(x, y) = M
It is possible to make use of second-order partial derivatives to classify the optimal point.
Unfortunately, these conditions are quite complicated and are considered in Appendix 3. In all
problems that we consider there is only a single optimum and it is usually obvious on economic
grounds whether it is a maximum or a minimum.
Example
A monopolistic producer of two goods, G1 and G2, has a joint total cost function
TC = 10Q1 + Q1Q2 + 10Q2
where Q1 and Q2 denote the quantities of G1 and G2 respectively. If P1 and P2 denote the corresponding
prices then the demand equations are
P1 = 50 − Q1 + Q2
P2 = 30 + 2Q1 − Q2
Find the maximum profit if the firm is contracted to produce a total of 15 goods of either type. Estimate the
new optimal profit if the production quota rises by 1 unit.
Solution
The first thing that we need to do is to write down expressions for the objective function and constraint. The
objective function is profit and is given by
π = TR − TC
The total cost function is given to be
TC = 10Q1 + Q1Q2 + 10Q2
However, we need to use the demand equations to obtain an expression for TR. Total revenue from the sale
of G1 is
TR1 = P1Q1 = (50 − Q1 + Q2)Q1 = 50Q1 − Q 21 + Q2Q1
and total revenue from the sale of G2 is
TR2 = P2Q2 = (30 + 2Q1 − Q2)Q2 = 30Q2 + 2Q1Q2 − Q22
so
MFE_C05f.qxd 16/12/2005 10:43 Page 415
TR = TR1 + TR2
= 50Q1 − Q 21 + Q2Q1 + 30Q2 + 2Q1Q2 − Q22
= 50Q1 − Q 21 + 3Q1Q2 + 30Q2 − Q22
Hence
π = TR − TC
= (50Q1 − Q 21 + 3Q1Q2 + 30Q2 − Q 22) − (10Q1 + Q1Q2 + 10Q2)
= 40Q1 − Q 21 + 2Q1Q2 + 20Q2 − Q 22
The constraint is more easily determined. We are told that the firm produces 15 goods in total, so
Q1 + Q2 = 15
The mathematical problem is to maximize the objective function
π = 40Q1 − Q21 + 2Q1Q2 + 20Q2 − Q22
subject to the constraint
Q1 + Q2 = 15
Step 1
Step 2
The interpretation placed on the value of λ in this example applies quite generally. Given an
objective function
f(x, y)
and constraint
ϕ(x, y) = M
the value of λ gives the approximate change in the optimal value of f due to a 1 unit increase
in M.
Practice Problem
Example
Use Lagrange multipliers to find expressions for K and L which maximize output given by a Cobb–Douglas
production function
Q = AK αLβ (A, α and β are positive constants)
subject to a cost constraint
PKK + PLL = M
Solution
This example appears very hard at first sight because it does not involve specific numbers. However, it is easy
to handle such generalized problems provided that we do not panic.
Step 1
Step 2
so that
αQ βQ
=
PKK PLL
and hence
PKK PLL
= (divide both sides by Q and turn both sides upside down)
α β
that is,
α
PK K = P L (multiply through by α) (7)
β L
Substituting this into equation (6) gives
α
P L + PLL = M
β L
βM
αL + βL = (multiply through by β/PL)
PL
βM
(α + β)L = (factorize)
PL
βM
L= (divide through by α + β)
(α + β)PL
Finally, we can put this into equation (7) to get
αM
PK K =
α+β
so
αM
K=
(α + β)PK
The values of K and L which optimize Q are therefore
αM βM
and
(α + β)PK (α + β)PL
Practice Problem
3 Use Lagrange multipliers to find expressions for x1 and x2 which maximize the utility function
U = x 1/2
1 + x2
1/2
The previous example illustrates the power of mathematics when solving economics prob-
lems. The main advantage of using algebra and calculus rather than just graphs and tables of
numbers is their generality. In future, if we need to maximize any particular Cobb–Douglas
production function subject to any particular cost constraint, then all we have to do is to quote
the result of the previous example. By substituting specific values of M, α, β, PK and PL into the
general formulas for K and L, we can write down the solution in a matter of seconds. In fact,
MFE_C05f.qxd 16/12/2005 10:43 Page 419
we can use mathematics to generalize still further. Rather than work with production functions
of a prescribed form such as
Q = AK αLβ
we can obtain results pertaining to any production function
Q = f(K, L)
For instance, we can use Lagrange multipliers to justify a result that we derived graphically in
Section 5.5. At the beginning of that section we showed that when output is maximized subject
to a cost constraint, the ratio of marginal product to price is the same for all inputs. To obtain
this result using Lagrange multipliers we simply write down the Lagrangian function
g(K, L, λ) = f(K, L) + λ(M − PKK − PLL)
which corresponds to a production function
f(K, L)
and cost constraint
PK K + PL L = M
The simultaneous equations
∂g ∂g ∂g
= 0, = 0, =0
∂K ∂L ∂λ
are
MPK − λPK = 0 (1)
MPL − λPL = 0 (2)
M − PK K − PL L = 0 (3)
because
∂f ∂f
= MPK and = MPL
∂K ∂L
Equations (1) and (2) can be rearranged to give
MPK MPL
λ= and λ=
PK PL
so
MPK MPL
=
PK PL
as required.
Key Terms
Lagrange multiplier The number λ which is used in the Lagrangian function. In eco-
nomics this gives the change in the value of the objective function when the value of the con-
straint is increased by 1 unit.
Lagrangian The function f(x, y) + λ[M − ϕ(x, y)], where f(x, y) is the objective function
and φ(x, y) = M is the constraint. The stationary point of this function is the solution of the
associated constrained optimization problem.
MFE_C05f.qxd 16/12/2005 10:43 Page 420
Advice
There now follow five new Practice Problems for you to attempt. If you feel that you need
even more practice then you are advised to rework the nine Practice Problems given in
Section 5.5 using Lagrange multipliers.
Practice Problems