Constrained optimization BUSINESS MATHEMATICS 1
CONTENTS Unconstrained optimization Constrained optimization Lagrange method Old exam question Further study 2
UNCONSTRAINED OPTIMIZATION Recall extreme values in two dimensions 1. First-order conditions: stationary points occur when f x y 2. Second-order conditions: extreme value if 2 f 2 f x 2 y 2 2 f x y 3. (If. > 0 in 2.) Nature of extreme value: minimum when 2 f > 0 x 2 maximum when 2 f x 2 < 0 2 > 0 3
UNCONSTRAINED OPTIMIZATION Recall Cobb-Douglas production function q K, L = AK α L β Obviously (?) you want to maximize output so set and q = K AαKα 1 L β = 0 q = L AKα βl β 1 = 0 4
UNCONSTRAINED OPTIMIZATION Recall Cobb-Douglas production function q K, L = AK α L β Obviously (?) you want to maximize output so set and q = K AαKα 1 L β = 0 q = L AKα βl β 1 = 0 This never happens! [check!] But you still want to maximize output within the constraints of your budget 5
CONSTRAINED OPTIMIZATION Suppose: the price of 1 unit of K is k the price of 1 unit of L is l the available budget is m Budget line: kk + ll = m 6
CONSTRAINED OPTIMIZATION L Iso-production line for q 1 Optimum point on line for optimum production q Iso-production line for q 2 Budget line L q 1 q 2 q K K 7
CONSTRAINED OPTIMIZATION Problem formulation: maximize subject to q K, L = AKα L β kk + ll = m In general, ቊ max s.t. f x, y g x, y = c This is a constrained optimization problem f x, y is the objective function g x, y = c is the constraint x and y are the decision variables 8
EXERCISE 1 Given is the profit function π a, b = 5a 2 + 12b 2 and the capacity constraint 8a + 4b = 20. Write as ቊ min/max subject to. 9
CONSTRAINED OPTIMIZATION Visualisation of z = f x, y in 3D as level curve 11
How to solve the constrained optimization problem? ቊ max s.t. f x, y g x, y = c Trick: introduce extra variable (Lagrange multiplier) λ define new function (Lagrangian) L x, y, λ as follows L x, y, λ = f x, y λ g x, y c 12
How to solve the constrained optimization problem? ቊ max s.t. f x, y g x, y = c Trick: introduce extra variable (Lagrange multiplier) λ define new function (Lagrangian) L x, y, λ as follows L x, y, λ = f x, y λ g x, y c Observe that L is a function of 3 variables, while the objective function f is a function of 2 variables 13
Key: Solutions of the constrained optimization are among the stationary points of L Put differently: all stationary points of L are candidate solutions of the original constrained maximization problem Joseph-Louis Lagrange (1736-1813) 14
max f x, y So, ቊ s.t. g x, y = c is equivalent to max L x, y, λ, where L x, y, λ = f x, y λ g x, y c We have written the constrained optimization problem with 2 decision variables as an unconstrained optimization problem with 3 decision variables Trade-off: (i) unconstrained easier than constrained, (ii) 3 decision variables harder than 2 15
EXERCISE 2 Given is the profit function π a, b = 5a 2 + 12b 2 and the capacity constraint 8a + 4b = 20. Write the Lagrangian. 16
Example 1 Constrained problem: max f x, y = x2 + y 2 s.t. g x, y = x 2 + xy + y 2 = 3 Lagrangian: L x, y, λ = x 2 + y 2 λ x 2 + xy + y 2 3 First-order conditions for stationary points: L L L = 0, = 0, x y λ = 0 18
Example 1 (continue) L x L y = 2x λ 2x + y = 0 = 2y λ x + 2y = 0 L λ = x2 xy y 2 + 3 = 0 So: 2x = 2x+y 2y x+2y 2x2 + 4xy = 4xy + 2y 2 x 2 = y 2 In constraint: x 2 ± x 2 x 2 + 3 = 0 3x 2 = 3 x 2 = 3 Solution: x = 1 x = 1 x = 3 x = 3 y follows, and so does λ 19
Example 1 (continued) Four stationary points x, y, λ of Lagrangian: 1,1, 2, 1, 1, 2, 3, 3, 2 and 3, 3, 2 [check!] 3 3 Four other points x, y, λ do not satisfy all equations: 1, 1,2, 1,1,2, 3, 3, 2 3 and 3, 3, 2 3 [check!] So, x, y = 1,1, 1, 1, 3, 3 and 3, 3 are candidate solutions to the original constrained problem 20
Example 1 (continued) Determine the function values at these points f 1,1 = 1 2 + 1 2 = 2 f 1, 1 = 1 2 + 1 2 = 2 f 3, 3 = 3 2 + 3 2 = 6 f 3, 3 = 3 2 + 3 2 = 6 Conclusion: 3, 3 and 3, 3 are maximum points and (1,1) and 1, 1 are mimimum points 21
Example 1 (continued) Determine the function values at these points f 1,1 = 1 2 + 1 2 = 2 f 1, 1 = 1 2 + 1 2 = 2 f 3, 3 = 3 2 + 3 2 = 6 f 3, 3 = 3 2 + 3 2 = 6 Conclusion: 3, 3 and 3, 3 are maximum points and (1,1) and 1, 1 are mimimum points [Constraint is closed curve.] 22
Example 2 Constrained problem: maximize q K, L = AK0.4 L 0.7 (A > 0) subject to 25K + 10L = m (m > 0) Lagrangian L K, L, λ = AK 0.4 L 0.7 λ 25K + 10L m Conditions for stationary points L = K 0.4AK 0.6 L 0.7 25λ = 0 L = L 0.7AK0.4 L 0.3 10λ = 0 L λ = 25K + 10L m = 0 23
Example 2 (continued) λ = 0.4AK 0.6 L 0.7 = 0.7AK0.4 L 0.3 25 10 multiply both sides with K 0.6 (to get rid of K 0.6 ) and with L 0.3 (to get rid of L 0.3 ) 24
Example 2 (continued) λ = 0.4AK 0.6 L 0.7 = 0.7AK0.4 L 0.3 25 10 multiply both sides with K 0.6 (to get rid of K 0.6 ) and with L 0.3 (to get rid of L 0.3 ) 0.4AL = 0.7AK 25 10 10 0.4 0.7 25K = 10 0.4 0.7 L + 10L = m L = 0.7 1.1 λ = (not intetesting) L m 10 and K = 0.4 1.1 m 25 25
Example 2 (continued) λ = 0.4AK 0.6 L 0.7 = 0.7AK0.4 L 0.3 25 10 multiply both sides with K 0.6 (to get rid of K 0.6 ) and with L 0.3 (to get rid of L 0.3 ) 0.4AL = 0.7AK 25 10 10 0.4 0.7 25K = 10 0.4 0.7 L + 10L = m L = 0.7 1.1 λ = (not intetesting) L m 10 and K = 0.4 1.1 m 25 Candidate maximum point: K, L = 0.4 1.1 m, 0.7 25 1.1 m 25 26
Example 2 (continued) Determine nature of the stationary point of Lagrangian: take K = 0 L = m and see that q = 0 10 likewise take L = 0 K = m and see that q = 0 25 27
Example 2 (continued) Determine nature of the stationary point of Lagrangian: take K = 0 L = m and see that q = 0 10 likewise take L = 0 K = m and see that q = 0 25 So for 0 < 0.4 1.1 m 25 < m 25 and 0 < 0.7 1.1 m 10 < m 10, also q > 0 28
Example 2 (continued) Determine nature of the stationary point of Lagrangian: take K = 0 L = m and see that q = 0 10 likewise take L = 0 K = m and see that q = 0 25 So for 0 < 0.4 1.1 m 25 < m 25 and 0 < 0.7 1.1 m 10 < m 10, also q > 0 Here, we look at two neighbouring points of the stationary point: one to the left and one to the right. We find that both have a lower function value, so the stationary point is a maximum. 29
Example 2 (continued) Determine nature of the stationary point of Lagrangian: take K = 0 L = m and see that q = 0 10 likewise take L = 0 K = m and see that q = 0 25 So for 0 < 0.4 1.1 m 25 < m 25 and 0 < 0.7 1.1 m 10 < m 10, also q > 0 Here, we look at two neighbouring points of the stationary point: one to the left and one to the right. We find that both have a lower function value, so the stationary point is a maximum. Therefore K, L = 0.4 1.1 m, 0.7 25 1.1 m 10 is a maximum 30
Different point on the same budget line with q < q Optimal Cobb- Douglas line q = AK 0.4 L 0.7 L L = 0.7 m 1.1 10 Optimum point on line for optimum production q Budget line 25K + 10L = m Different point on the same budget line with q < q K = 0.4 m 1.1 25 K 31
: FULL PROCEDURE Transform into max f x, y ቊ s. t. g x, y = c max L x, y, λ L = 0 x L Find x and y such that = 0 y L = 0 λ Check if the stationary points are indeed a maximum 32
: FULL PROCEDURE Transform into max f x, y ቊ s. t. g x, y = c max L x, y, λ L = 0 x L Find x and y such that = 0 y L = 0 λ Check if the stationary points are indeed a maximum 2 L x 2 Do not use 2 L 2 L y 2 x y for this! 2 33
OLD EXAM QUESTION 22 October 2014, Q2a 34
OLD EXAM QUESTION 27 March 2015, Q2b 35
FURTHER STUDY Sydsæter et al. 5/E 14.1-14.2 Tutorial exercises week 5 Lagrange method Lagrange for Cobb-Douglas Intuitive idea of Lagrange 36