MODULE TWO: CONSTRAINED OPTIMIZATION
1.1 Introduction
In this lecture, the focus on the method of maximizing or minimizing a function subject to
constraints on the variables. Lagrangian multiplier approach is very useful when handling
constrained optimization problems. It involves the use of variables called Lagrange Multipliers,
named after the French Mathematician Joseph Loins Lagrange (1736-1813).
1.2 Method of Lagrangian Multipliers
If (x, y) has a minimum or maximum subject to the constraint of g(x, y) = 0, then it will occur at
the critical numbers of the function F defined as:
𝐹(𝑥, 𝑦, 𝜆) = 𝑓(𝑥, 𝑦) − 𝜆𝑔(𝑥, 𝑦) … .. ………………………………………….(1)
The variable 𝜆 (the inner case Greek letter landa) is called a Lagrange multiplier.
For a function of three variables, equation (1) takes the form:
𝐹(𝑥, 𝑦, 𝑧, 𝜆) = 𝑓(𝑥, 𝑦, 𝑧) − 𝜆𝑔(𝑥, 𝑦, 𝑧) ……………………..…………… (2)
Equations (1) and (2) above are known as Lagrangian functions and the first order conditions for
optimization could be obtained from these functions.
In general, given a function 𝑍 = 𝑓(𝑥, 𝑦) to be maximized, subject to h(x, y) = c, the Lagrangian
function can be written as:
𝑧 = 𝑓(𝑥, 𝑦) + 𝜆[𝑐 − ℎ(𝑥, 𝑦)] ………………………………………………….…………(3)
The first order condition (FOC) for optimization is:
𝜕𝑧
=𝑧𝑥 = 𝑓𝑥 − 𝜆ℎ′(𝑥) = 0
𝜕𝑥
𝜕𝑧
= 𝑧𝑦 = 𝑓𝑦 − 𝜆ℎ′(𝑦) = 0
𝜕𝑦
𝜕𝑧
= 𝑧𝜆 = 𝑐 − ℎ(𝑥, 𝑦) = 0
𝜕𝜆
1
The second order condition (SOC) must be examined to determine whether the value of the
function at the critical values (CV) of the independent variables is a relative minimum or
maximum.
The SOC involves the determination of the Bordered Hessian Determinant (BHD) which is given
as:
f xx f xy h '( x)
|𝐻| f yx f yy h '( y ) 0
h '( x) h '( y ) 0
H 2 f xy h '( x)h '( y) f xx (h '( y))2 f yy (h '( x))2 0
The above can also be represented using matrix positional values (rows and columns) as:
𝑓11 𝑓12 𝑓13
|𝐻|= | 𝑓21 𝑓22 𝑓23 | > 0
𝑓31 𝑓32 𝑓33
1.3 Numerical Examples
A). If the total cost (C) of production is given thus:
C= 0.1𝑞12 + 7𝑞1 + 15𝑞2 + 1000 ………………………………………………[1]
And the constraint imposed by the production function as:
100=q1+q2………………………………………………………………………[2]
i. Find the levels of q1 and q2 that could be produced in the production set up given the
constraint above
ii. Is the cost minimized or not? Give plausible reason.
Solution
i. The Lagrangian function by combining equations [1] and [2] is:
𝑍 = 0.1𝑞12 + 7𝑞1 + 15𝑞2 + 1000 +𝜆(100 − 𝑞1 − 𝑞2 ) ………………………………[3]
FOCs are as follows:
𝜕𝑧
= 0.2𝑞1 + 7𝑞1 − 𝜆=0 ……………………………..…………………………....[4]
𝜕𝑞1
2
𝜕𝑧
= 15 − 𝜆 = 0 → 𝜆 = 15 …….. ………………………………….…………….[5]
𝜕𝑞2
𝜕𝑧
= 100 − 𝑞1 − 𝑞2 = 0 ………………………………………………….…………[6]
𝜕𝜆
Substituting [5] into [4] will yield:
q1 = 8/0.2 = 40 units
Substituting the value of q1 into equation [6] will result to: q2 = 60 units.
Thus, the levels of q1 and q2 that could be produced s.t. the given constraint will be 40 and 60
units, respectively.
To determine whether cost in minimized at the units above is optimal or not, the Second Order
Condition (SOC) is required.
SOC:
𝜕2 𝑧
= 0.2 i.e. f11 =0.2
𝜕𝑞12
𝜕2 𝑧
=0 i.e. f12 =0
𝜕𝑞1 𝜕𝑞2
𝜕2 𝑧
= −1 i.e. f13 =-1
𝜕𝑞1 𝜕𝜆
𝜕2 𝑧
=0 i.e. f21 =0
𝜕𝑞2 𝜕𝑞1
𝜕2 𝑧
=0 i.e. f22 =0
𝜕𝑞22
𝜕2 𝑧
= −1 i.e. f23 =-1
𝜕𝑞2 𝜕𝜆
3
𝜕2 𝑧
= −1 i.e. f31 = -1
𝜕𝜆𝜕𝑞1
𝜕2 𝑧
= −1 i.e. f32 =-1
𝜕𝜆𝜕𝑞2
𝜕2 𝑧
=0 i.e. f33 = 0
𝜕𝜆2
Combining the values above and putting in the BHD, will result to:
0.2 0 1
H 0 0 1
1 1 0
|𝐻| = 0.2 | 0 −1| + [0] − 1 | 0 0
|
−1 0 −1 −1
=0.2 (0-1) -1 (0-0)
= -0.2 <0
Since, BHD is <0, thus, the levels of output q1 = 40 and q2 = 60 units is neither a relative maximum
or minimum. It is known as saddle point.
Since 𝑓𝑞1 𝑞1 < 𝑓 2 𝑞 (i.e. f11< f12)
1 𝑞2
-2 < 0 i.e. based on the fact that the Bordered Hessian Determinant (BHD) is <0.
B). A firm’s production function is given as:
𝑄 = 𝐾 0.3 𝐿0.5 ………………………………………………………………………….[1]
The firm’s budget equation is
500 = 8K + 5L i.e. 500-8K-5L =0………………………………………………[2]
4
Determine the optimum input mix.
Solution
The Lagrange function:
𝑍 = 𝐾 0.3 𝐿0.5 − 𝜆[500 − 8𝑘 − 5𝐿] ……………………………………………………[3]
The FOC:
𝜕𝑧 0.5𝑘 0.3
= 0.5𝐾 0.3 𝐿−0.5 − 5𝜆 = 0 ≫ − 5𝜆 = 0…………………………………….....[4]
𝜕𝐿 𝐿0.5
𝜕𝑧 0.3𝐿0.5
= 0.3𝐾 −0.7 𝐿0.5 − 8𝜆 = 0 ≫ − 8𝜆 = 0……………………………………….[5]
𝜕𝑘 𝐾0.7
𝜕𝑧
= 500 − 8𝑘 − 5𝐿 = 0 ………………………………...........................................[6]
𝜕𝜆
0.5𝑘 0.3
From equation [4]: 5𝜆 = 𝐿0.5
0.5 𝐾0.3
𝜆= 5 𝐿0.5
𝑘 0.3
𝜆 = 0.1 𝐿0.5 ………………………………………………………..[7]
0.3 𝐿0.5
From equation [5]: = 𝜆 ……………………………………….………….. [8]
8 𝐾0.7
Equating [7] and [8] will yield:
0.3𝐿 8
=
0.5𝐾 5
Thus, L = 2.67K ……………………………………………………………………[9]
Substituting the value of L as in equation [9] above into [6] will result to:
500 – 8K – 5 (2.67K) = 0
500 = 21.35K
K = 23.42
5
∴ 𝑳 = 𝟔𝟐. 𝟓𝟏 𝑎𝑛𝑑 𝑲 = 𝟐𝟑. 𝟒𝟒; and 𝝀 =0.032
1.4 Tutorial/Review Question
Examine the SOC conditions of above and verify the values of L, K and 𝜆
1.5 Application of Constrained Optimization
The major areas in economics where the concept of Constrained Optimization are applied include:
the theory of consumer behaviour (utility maximization subject to budget/income constraint) and
theory of the firm (firm’s cost minimization subject to output constraint and output maximization
to input/cost constraint).
1.5.1 Consumer Choice Problem
This involves the maximization of utility subject to an income constraint.
The problem of the consumer is such that:
(i) Maximize 𝑢 = 𝑓(𝑥, 𝑦) … … … … … … … … … … … … … … … … … [1] 𝑜𝑏𝑗𝑒𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛
(ii) s.t. 𝑝𝑥 𝑥 + 𝑝𝑦 𝑦 = 𝑀 … … … … … … … … … … … … … … … … … . . . [2] 𝑏𝑢𝑑𝑔𝑒𝑡 𝑐𝑜𝑛𝑠𝑡𝑟𝑎𝑛𝑡
(iii) Lagrangian function by combining 1 and 2:
𝐿(∙, 𝜆) = 𝑓(𝑥, 𝑦) + 𝜆[𝑀 − 𝑝𝑥 𝑥 − 𝑝𝑦 𝑦] … … … … … … … . . … [3]
is the Lagrange multiplier
(iv) Find FOC by taking partial derivatives with respect to (wrt) the three variables 𝑥, 𝑦, 𝜆 and
equate to zero (0) as:
𝜕𝐿
= 𝑓𝑥 − 𝜆𝑝𝑥 = 0 ……………………………………………………[4]
𝜕𝑥
𝜕𝐿
= 𝑓𝑦 − 𝜆𝑝𝑦 = 0 … … … … … … … … … … … … … … … … … … … … … … … [5]
𝜕𝑦
𝜕𝐿
= 𝑀 − 𝑝𝑥 𝑥-𝑝𝑦 𝑦 = 0 … … … … … … … … … … … … … … … … … … … … … … [6]
𝜕𝜆
The values of 𝑥 𝑎𝑛𝑑 𝑦 that satisfy these three equations are those values that maximize utility for
the consumer if the SOC is met.
6
From equations [4] and [5]
𝑓𝑥
𝜆=
𝑝𝑥
𝑓𝑦
𝜆=
𝑝𝑦
𝑓𝑥 𝑓𝑦
→ =
𝑝𝑥 𝑝𝑦
𝑓 𝑝
→ 𝑓𝑥 = 𝑝𝑥 ………………………………………………………………………………….[7]
𝑦 𝑦
𝜕𝑓
Where: 𝑓𝑥= 𝜕𝑥 → 𝑚𝑎𝑟𝑔𝑖𝑛𝑎𝑙 𝑢𝑡𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑥
𝜕𝑓
𝑓𝑦 = 𝜕𝑦 → 𝑚𝑎𝑟𝑔𝑖𝑛𝑎𝑙 𝑢𝑡𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑦
Equation [7] implies that the ratio of marginal utilities must equal the ratio of commodity prices
for the consumer to obtain maximum utility.
Equation [7] can also be rewritten as:
𝑓𝑥 𝑓𝑦
= … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … . . [8]
𝑝𝑥 𝑝𝑦
Equation [8] means that for the consumer to maximize his total utility, marginal utility divided
by price must be the same for all the commodities.
Equation [7] or [8] gives the famous equilibrium condition for the consumer in utility theory.
Recall your Microeconomic knowledge in consumer utility maximization:
MRCS: the Marginal Rate of Commodity Substitution.
7
For the equilibrium condition to be maximized, the SOC must be fulfilled. In this case the BHD
must be positive as:
f xx f xy px 𝑓11 𝑓12 𝑓13
H f yx f yy py 0 i.e. |𝐻|= | 𝑓21 𝑓22 𝑓23 | > 0 …………………………[9]
py px o 𝑓31 𝑓32 𝑓33
By expanding, equation [9] will result to:
2𝑓𝑥𝑦 𝑓𝑥 𝑓𝑦 − 𝑓𝑥𝑥 𝑓𝑦2 − 𝑓𝑦𝑦 𝑓𝑥2 > 0 …….. ……………………………..………………[10]
(Verify the above using the concept of matrix determinant)!
Thus, the consumer attains maximum utility from his purchases when [7] or [8] holds in addition
to [9] or [10].
Numerical Examples
A). Assume that a consumer has the utility function 𝑢(𝑐, 𝑦) = 𝑥𝑦. where 𝑥 𝑎𝑛𝑑 𝑦 represent the
amounts of two goods consumed in a specified time period. Find his utility-maximising
consumption levels subject to the budget constraint:
5𝑥 + 4𝑦 = 50
Solution
𝑀𝑎𝑥𝑈 = 𝑈(𝑥, 𝑦) = 𝑥𝑦 … … … … … … … … … … … … … … … … … … … … … … … … … … … . [1]
s.t .
5𝑥 + 4𝑦 = 50 i.e. 50-5x-4y =0……….………………………………………….……[2]
𝐿(∙, 𝜆) = 𝑥𝑦 + 𝜆(50 − 5𝑥 − 4𝑦) … … … … … … … … … … … … … … … … … … … … … … … . [3]
FOC
𝜕𝐿
= 𝑦 − 5𝜆 = 0 … … … … … … … … … … … … … … … … … … … … … … … … … … … … . . … . [4]
𝜕𝑥
𝜕𝐿
= 𝑥 − 4𝜆 = 0……. …………………………………………………………………..[5]
𝜕𝑦
8
𝜕𝐿
= 50 − 5𝑥 − 4𝑦 = 0 …………………………………………………………………[6]
𝜕𝜆
From [4] and [5]
𝑦 𝑥
𝜆= 𝑎𝑛𝑑 𝜆 =
5 4
𝑦 5 5
→ = 𝑖. 𝑒. 𝑦 = 𝑥
5 4 4
Substitute y into equation [6]
5
50 − 5𝑥 − 4 ∗ 𝑥 = 0
4
50-10x=0
x=5
y = 6.25
𝝀 = 𝟏. 𝟐𝟓
SOC
0 1 5
H 1 0 4 0
5 4 0
1 4 1 0
H 5
5 0 5 4
>0
= (-1)(-20)-5(-4) = 20+20=40>0
∴ Maximum value: : 𝑥𝑦 = 5 ∗ 6.25 = 31.25
9
𝜆 = 1.25 means that if the money income of the consumer is increased (decreased) by a unit
amount, his total utility will increase (decrease) by 1.25 units.
Tutorial/Review Question
Verify the values in the BHD/SOC conditions of above.
1.5.2 Entrepreneur Choice Problem I
The first variant is the maximization of output subject to cost constraint.
Given:
q = f (K,L)
s.t. C = wL + rK + b
Where: C is Total cost; L is labour ; K is capital ; b is fixed cost; and q is output.
Assuming perfect competition in the factor markets, the problem of the entrepreneur is to choose
the levels of L and K which will maximize output subject to the fact that cost is at a given level,
Co.
max 𝑞 = 𝑓(𝐿, 𝐾) ………………………………………………………..[1]
s.t. Co = wL + rK + b.................................................................................[2]
Lagrangian function:
𝐿(∙, 𝜆) = 𝑓(𝐿, 𝐾) + 𝜆[𝑐 0 − 𝑤𝐿 − 𝑟𝑘 − 𝑏] ……………………………………...[3]
FOC:
𝜕ℓ
= 𝑓𝐿 − 𝜆𝑤 = 0 ……………………………………………………………….[4]
𝜕𝐿
𝜕ℓ
= 𝑓𝑘 − 𝜆𝑟 = 0 ……………………………………………………………....[5]
𝜕𝐾
𝜕ℓ
= 𝑐𝑜 − 𝑤𝐿 − 𝑟𝑘 − 𝑏 = 0 …………………………………………………..[6]
𝜕𝜆
By definition:
f
fL : MPL
L
10
f
fK : MPK
K
The value of L and K which simultaneously satisfy these equations are those that give maximum
output if the SOC is satisfied.
By eliminating from [4] and [5] will result to:
fL w
……………………………………………………………………………[7]
fK r
This means that the ratio of marginal products of factor inputs must be equal to the ratio of factor
prices
w
MRTSLK = ……………………………………………………………………………[8]
r
Recall your Microeconomic knowledge in firm’s optimization:
MRTSLK Symbolizes Marginal Rate of Technical Substitution.
The second order conditions to maximize output require the relevant BHD determinant to be
positive.
f LL f LK w
H f KL f KK r 0
w r 0
fL fK
And
w r
Numerical Example
B). Consider an entrepreneur wishing to:
Max q = LK + 15 …………………………………………………………………………[1]
s.t. 24 = 6L + 3K ……………… ..……………………………………………………... [2]
L(., ) LK 15 24 6L 3K …………………………………………………….. [3]
FOC
K 6 =0…………………………………………………………………………... [4]
L
11
L 3 =0……………………………………………………………………………[5]
K
24 6 L 3K = 0 …………………………………………………………………...[6]
From [4] and [5]
K L K 6
2 K 2L
6 3 ; L 3 ;
Substitute for K in equation [6]
24 – 6L – 6L = 0
24 – 12L = 0
L = 2, K = 4, = 2⁄3
SOC
f LL f LK w
H f KL f KK r 0
w r 0
1 3 1 0
H b 1 6
6 0 6 3
|H| = -1(−18) − 6 (−3) = 18 + 18 = 36 > 0
Since Hb = 36 > 0, then L = 2 and K = 4 maximize output q.
Thus, maximum output is:
q = LK + 15 ; =2*4 + 15 ; = 23 units.
= 2⁄3, implies that a unit change in the cost of production leads to a less than unit change in
output.
1.5.3 Entrepreneur Choice Problem II
The second variant is the minimization of cost subject to an output constraint.
Given:
12
Min C = wL + rK + b …………………………………………………………….[1]
s.t. q0 f ( L, K ) ………………………………………………………………..[2]
The Lagrangian:
(., ) wL rK b q0 f ( L, K ) ……………………………………[3]
FOC
w f L …………………….……………………………………….[4]
L
r fK ……………………..………………………………………[5]
K
q 0 f ( L, K ) 0 ……………..………………………………………[6]
Accordingly, the result is:
w fL
………………………………………………………………....[7]
r fK
Or
fK f
L …………………………………………………………………..[8]
r w
Equation [8] implies that the ratio of marginal product of one factor to its unit cost must be equal
to the other factor.
The Second Order Condition, SOC. This requires the relevant bordered Hessian determinant to be
negative i.e.
w
f LL f LK
r
H b f KL f KK 0
w r
0
w
Substitute f L
13
r
fK
Then it follows that:
f LL f LK w
1
Hb f KL f KK r 0
w r 0
Since > 0, then:
Hb 0
Numerical Example
C). The total cost function of a firm is given as TC 25x2 xy 45 y 2 . The firm wished to meet a
fixed production quota given by the production function 3x 5 y 120 . What is the optimum
combination of x and y that minimizes the firm’s cost of meeting this order.
Solution
Min TC 25x2 xy 45 y 2
s.t. 3x 5 y 120
(., ) 25x2 xy 45 y 2 120 3x 5 y
FOC:
50 x y 3 0
x
x 90 y 5 0
y
120 3x 5 y 0
Tutorial/Review Question
a) Solve for the values of X, Y and .
b) Verify the values in the BHD/SOC conditions of above.
Hint:
The resulting Matrix A is:
14
50 1 3 𝑓11 𝑓12 𝑓13
A 1 90 5 using the notation: |𝐻|= | 𝑓21 𝑓22 𝑓23 | > 0
3 5 0 𝑓31 𝑓32 𝑓33
15