UNIVERSITY OF BRISTOL : DEPARTMENT OF ECONOMICS MATHEMATICS FOR ECONOMISTS - COURSE 11122 Chapter 6 - INTRODUCTION TO CONSTRAINED OPTIMISATION In Chapter 5, section 7, we were concerned with finding the maximum/minimum value of a function f x1 , x 2 ,....., x n without any constraints on the input variables x1 , x 2 ,......., x n . In this chapter we are interested in finding the maximum/minimum value of a function f x1 , x 2 ,....., x n subject to a constraint. The first is called unconstrained optimisation whereas the latter is called constrained optimisation. 6.1 An Example to introduce the Lagrangian technique. The problem of maximising/minimising a function subject to a constraint is a familiar one in microeconomics. For example, maximising the utility of a bundle of goods subject to a budget constraint; maximising profit subject to a cost constraint or minimising cost subject to an output target. Suppose a consumer wishes to maximise their utility function for two goods u( x1 , x2 ) , subject to a constraint on their budget of the form m p1x1 p2 x2 where m is total income, p1 and x1 are the price and quantity consumed of good 1 respectively and p2 and x2 , the price and quantity consumed of good 2 . So that, for the moment all income is spent. We relax this assumption in 6.3 where we consider inequality constraints. Figure 1 shows a set of indifference curves - the contours of the utility function u( x1 , x 2 ) - together with the linear budget constraint. The solution to the problem is the optimal point P, ( x1 , x 2 ) which is characterised by equality between the slopes of the budget constraint and of the indifference curve which passes through the point P. The budget constraint is linear and we assume that income, m, and the prices of the goods p1 and p2 are given constants. The constraint can then can be rearranged to write: so that the slope of the budget constraint is Let the value of the contour of u( x1 , x 2 ) which passes through the point P be given by u*, so that u x1 , x 2 = u* where u* is a constant. The equation u x1 , x 2 = u* defines x 2 as an 2 implicit function of x1 i.e. x 2 g x1 and the equation of the indifference curve is given by x 2 g x1 . Its slope is defined as g x1 where 3 But why bother with this alternative way of representing P? The reason lies in the relationship between the equations in (6.2) and (6.4) and the following function of x1 , x 2 , and : L ( x1 , x 2 , ) u( x1 , x 2 ) (m p1 x1 p2 x 2 ) (6.5) Equation (6.5) is known as the Lagrangian function and is called the Lagrange multiplier. Suppose we wanted to optimise the function in (6.5) with respect to x1 , x 2 and , i.e. treating as an additional variable in the problem. What would we do? We would differentiate (6.5) partially with respect to x1 , x 2 and and equate each partial derivative to zero. That is: 4 Note that the first two equations in (6.6) are identical to equations (6.4) evaluated at * and the last equation is merely the budget constraint evaluated at ( x1 , x 2 ). These three equations characterise the optimal point P in Figure 1. We have turned a constrained optimisation problem into one that resembles an unconstrained optimisation problem with the same answer. That is, the stationary point of the unconstrained function in (6.5) gives the solution to the constrained problem. It turns out that we can adopt this procedure in the general case. If the problem is to maximise an objective function f (x1 , x2 ,..., xn) subject to a constraint of the form h( x1 ,..., xn ) = c where c is a constant. The problem is usually written: max f ( x1 ,..., x n ) x1 ,..., x n subject to h( x1 ,..., xn ) = c. The solution procedure is as follows: 1. Set up the Lagrangian: L ( x1 ,..., x n , ) f ( x1 ,..., x n ) c h( x1 ,..., x n ) 2. Find the first order partial derivatives of the Lagrangian with respect to x1 ,..., x n , and set them to zero: L 0 f 1 h1 0 x1 L 0 f n hn 0 xn L 0 h( x1 ,..., x n ) c where f j f h and h j , for j = 1,...,n xj xj 3. Solve the (n + 1) equations in 2. for the (n + 1) unknowns ( x1 ,..., x n , ) . Of course, if the problem is to minimise the objective function, f (x1 , x2 ,..., xn ), subject to the constraint, we simply multiply the objective function by -1 and maximise the resulting function - f (x1 , x2 ,..., xn ), subject to the constraint i.e. max f ( x1 ,..., x n ) x1 ,..., xn subject to h( x1 ,..., xn ) = c. 5 The Lagrangian in this case is as follows: L ( x1 ,..., x n , ) f ( x1 ,..., x n ) h( x1 ,..., x n ) c Then follow steps 2-3 as above. The equations in step 2 are now as follows: L 0 f 1 h1 0 x1 L 0 f n hn 0 xn L 0 h( x1 ,..., x n ) c Example 6.1 Assume that a consumer has a utility function of the form : u x1 , x 2 2 ln x1 3 ln x 2 and the budget constraint is 2 x1 4 x 2 36 . Find the value of x1 and x 2 which maximise the consumer’s utility subject to his budget constraint and the maximum utility. . 6 Example 6.2 A producer’s production function is Q = f k , l 4 k 0.5 l 0.5 . His cost function is 2 k 8l . Find his least-combination of k and l for producing exactly 32 units of output and the minimum cost. 7 8 6.2 An Interpretation of the Lagrange Multiplier Suppose we have the problem of maximising a utility function subject to a budget constraint of the form p1 x1 p2 x 2 m . That is : max u( x1 , x 2 ) x1 , x 2 subject to p1 x1 p2 x 2 m L ( x1 , x 2 , ) u( x1 , x 2 ) (m p1 x1 p2 x 2 ) The Lagrangian is: and the conditions characterising a solution are: L 0 u1* * p1 0 x1 (6.9) L 0 u2* * p2 0 x2 (6.10) m p1 x1* p2 x2* 0 (6.11) From equations (6.9) and (6.10), u1* * p1 u2* * p2 (6.12) Rearranging equation (6.11) gives m p1 x1* p2 x2* so partially differentiating m with respect to x1 gives Partially differentiating m with respect to x 2 gives Substituting for p1 and p 2 in equations (6.12) gives u u x1 u * u2 x 2 * 1 (6.13) Using the chain rule , we can say u u m x1 m x1 and u u m x 2 m x 2 Comparing equations (6.13) and (6.14) we can see that (6.14) u which is the change in the m maximum value of utility ( u ) for a marginal change in the level of income m. 9 In this example therefore is the marginal utility of money when the utility is maximised. In general is equal to the change in the maximum value of the objective function for a marginal relaxation in the constraint. It measures the worth in terms of the objective function of having an additional unit of the resource or an additional unit less of the resource, which the constraint specifies to be in limited supply. For this reason the Lagrange multiplier is often referred to as the shadow price of the constraint. In the above example, if we decrease (increase) the income by one unit, which is the limited resource, the decrease (increase) in maximum utility is measured by . Generally, if the problem is to maximise an objective function f (x1 , x2 ,..., xn) subject to a constraint of the form h( x1 ,..., xn ) = c, the Lagrangian is Then f c L ( x1 ,..., x n , ) f ( x1 ,..., x n ) c h( x1 ,..., x n ) . where f f ( x1 ,..., xn ) , the maximum value of f. Worked example 6.3 to illustrate the interpretation of the Lagrange multiplier Suppose we maximise the same objective function as in Example 6.1, namely u x1 , x 2 2 ln x1 3 ln x 2 but we decrease the amount of income by 1 unit . i.e. the budget constraint becomes 2 x1 4 x 2 35 . The Lagrangian is L ( x1 , x 2 , ) 2 ln x1 3 ln x 2 35 2 x1 4 x 2 L L 0 and 0 gives the same equations as in Example 6.1, so eliminating Taking x1 x2 3 from these two equations gives the equation x 2 x1 . 4 L 0 gives a different equation from that obtained in Example 6.1 because income Taking 35 2 x1 4 x 2 0 . has gone down from 36 to 35. The equation is Now substituting for x 2 in this equation using the fact that x 2 which implies that x1 3 x1 , gives 35 2 x1 3x1 0 4 35 3 7 . Also x 2 7 5.25 so the optimum solution is 5 4 x1 7 and x 2 5.25 . L 1 0 and solving for , gives 0.14 to 2 decimal places. Using the equation x1 x1 The maximum utility is u u x1 , x 2 = u (7 , 5.25) = 8.87 to 2 decimal places. 10 The maximum utility for Example 6.1 was u u x1 , x 2 = u (7.2, 5.4) = 9.01 to 2 decimal places. The decrease in maximum utility for an decrease in income of 1 unit is 9.01 - 8.87 = 0.14 which is the value of to two decimal places. For an example of where the income is increased by one unit, i.e. the limited resource is increased by one unit, see Example 7.21, Chapter 7 in Bradley and Patton. Example 6.4 (i) For Example 6.1, find the consumer’s marginal utility of money when his utility is maximised. (ii) For Example 6.2 find the producer’s marginal cost of production when his total cost is minimised. Example 6.5 (see Worked Example 6. 5) A certain consumer has a utility function u x1 , x 2 , x3 which is differentiable and concave of the form u x1 1 x 2 2 x 3 3 3 where i < 1 . Given that the consumer makes an optimal choice and utilises all his income 1 m on these n goods, what is the optimal proportion of income he will spend on each good where the faces prices pi i 1, 2,3 ?