INTRODUCTORY MATHEMATICS FOR ECONOMICS MSCS. LECTURE 3: MULTIVARIABLE FUNCTIONS AND CONSTRAINED OPTIMIZATION. HUW DAVID DIXON CARDIFF BUSINESS SCHOOL. SEPTEMBER 2009. 3.1
Functions of more than one variable. Production Function: Y F( K, L) Utility Function: U U(, ) How do we differentiate these? This is called partial differentiation. If you differentiate a function with respect to one of its two (or more) variables, then you treat the other values as constants. Some more maths eamples: 1 Y K L Y Y K K 1 1 K L (1 ) K L Y Y Y e e and e Y Y Y ( ) e (1 ) e and (1 ) e The rules of differentiation all apply to the partial derivates (product/quotient/chain rule etc.). Second order partial derivates: simply do it twice! 3.2
Y Y Y e e and e 2 2 2 Y Y Y 0 and e ; e 2 2 The last item is called a cross-partial derivative: you differentiate first with and then with (or the other way around: you get the same result Young s Theorem). Total Differential. Consider y f(, ) variables (,).. How much does the dependant variable (y) change if there is a small change in the independent dy f d f d Where f, f are the partial derivatives of f with respect to and (equivalent to f ). This epression is called the Total Differential. Economic Application: Indifference curves: Combinations of (,) that keep u constant. U U(, ) du U d U d 0 UdUd d U MRS. d U UU Utility depends on,y. Let and y change by d and dy: the change in u is du For the indifference curve, we only allow changes in,y that leave utility unchanged The slope of the indifference curve in (,) space is the MRS 3.3
For eample: Cobb-Douglas preferences U U du 0.5 d 0.5 d 0 d d d MRS d UU Indifference curves: U= 0.5, 0.7, 1, 1.2. Note: we can treat d and d just like any number/variable and do algebra with them. Implicit Differentiation. Take the Total differential. Now, suppose we want to see what happens if we hold one of the variables constant: 3.4
U U(, ) du U d U d du d d 0 du U d U Implicit differentiation says that if we hold constant, there is an implicit relationship (function) between y and. This is obvious: the partial differential equals the implicit derivative when we hold constant. However, we can do this operation even when we do not know the eact function. For eample, we might not know the Utility function U, but just that (y,,) satisfy a general relationship F(,y,)=0. We can then use the Total differential to solve for any of the total differentials: F(, y, ) 0 FdFdyFd0 y If d 0 FdFdy0 dy d F F y y This is almost the same algebra as the indifference curve. Note, at the last step: this can only be done if 0. F y (cannot divide by ero). Total Derivative. Suppose that we have two functions of the form: 3.5
y f(, ) g ( ) We can substitute the second function into the first and then differentiate using the function of a function rule: y f( g( ), ) dy f dg f d d The Total effect of on y takes two forms: the direct effect represented by the partial derivative f f dg indirect effect via g on :. d, and the Eample: y 1 We can substitute the second relation into the first and differentiate w.r.t. : dy y (1 ) 0.5(1 ) 0.5(1 ) d The first epression is the indirect effect: the second the direct. 0.5.5 3.6
Unconstrained Dynamic Optimiation with two or more variables. Similar to one variable, but have more dimensions! In this course, I stick to two dimensions (can look in books for n dimensional case). Maimie y f(, ) Step 1: First order conditions y y 0 A necessary condition for a local or global maimum is that both (all if more than two variables) are ero. Step 2: Second order conditions. A local maimum requires that the function is strictly concave at the point where the first order conditions are met. There are three second order conditions are 2 2 2 2 2 2 y y y y y 0 and 0 and 0 2 2 2 2 3.7
These three second order conditions ensure strict concavity. First two are obvious: third arises because of the etra dimension. Can have a saddlepoint if first two are satisfied but not the third. Here are a couple of saddlepoints: the vertical ais is y, and in both cases the first order conditions are satisfied at ==0. But in neither case iis it a maimum! 3.8
Economic Eample. In economics we usually make assumptions that ensure that the multivariate function is strictly concave (when maimiing). Multi-Product competitive firm. The first order conditions are: Second order conditions are: P P C(, ) 2 2 c (, ) a.. P 2a P 2a 2 and 2 since a 2 2 4 a We have a (global) maimum if 2 a 2: global because 2 a 2 ensures profits are a strictly concave function everywhere. To solve for the optimum: we need to epress and as a function of the two prices. 3.9
P a 2 2 2 P a a 4 a P 2a 0 P P 2 2 2 2 Hence: 2 a P P 2 2 4a 4a Likewise we can show that 2 a P P 2 2 4a 4a Use the first order condition for to obtain an epression for in terms of P and. Substitute into the first order condition for Rearrange and solve for The model is symmetric, so the solution for should look like that for : you simply swap the prices around. Note: in this model, there is an interdependence in the marginal cost if a 0. If a>0, then we have diseconomies of scope: production of increases marginal cost and vice versa. If a<0, we have economies of scope: production of lowers the MC of. We can see that if a2 or a2 then the first order conditions can imply nonsense: negative outputs. 3.10
Constrained Optimiation. In economics, we mostly use constrained optimisation. This means maimiation subject to some constraint. For eample: a household will maimie utility subject to a budget constraint: its total ependiture is less than income Y. Budget constraint: two goods. P P Y. This is an inequality constraint total ependiture is less than 1 2 or equal to Y. However, if we assume that both goods are liked (non-satiation, more is better ), then we know that all the money will be spent! So then we have an equality constraint: This defines a straight line: P P Y 1 2 The Budget constraint can also Be written as: Y P P P 1 2 1 2 2 The slope of the budget line is the price ratio. 3.11
Of course, we also require the quantities consumed to be non-negative: so are only interested in the positive orthant, where both 0, 0. So the utility function can be represented by indifference curves : these are like altitude contours on a map. For eample U(, ) 3.12
Lagrange Multipliers: Joseph-Louis Lagrange (1736-1813). In Economics we use this method a lot: we can apply it when we have an equality constraint. Ma U (, ) s.t. P P Y 1 2 3.13
How to solve this: we invent a variable, the lagrange multiplier λ. Then we treat the constrained optimisation like an unconstrained one. We specify the Lagrangean L (,, ) where L (,, ) U (, ) [ Y p p 1 2 That is, we have the original objective function (utility function) and add on the invented variable λ times the constraint. Now, note a that: Since the constraint is Y P P 0, the term in square brackets is ero when the constraint is 1 2 satisfied, so that (,, ) U (, ). The value of the lagrangean equals utility. L Now, having defined the lagrangean, we net take the first order conditions: ] L L U P 0 1 1 1 1 L L U P 0 2 2 2 2 L L Y P P 0 1 2 This gives us three equations and three unkowns ((,, ). So, we can solve for the three variables. Lagrange: the solution to the these three equations give us the solution to the constrained optimiation! (There are also some second order conditions: but, so long as U is concave, it is OK)! 3.14
Magic: invent a new variable and it lets you treat a constrained optimiation like an unconstrained one. From the first order conditions we can get the general properties of the optimum. U L U P 0 1 1 1 P U L U P 0 2 2 2 P Hence U U U P 1 1 P P U P 2 2 1 1 2 2 Take the first order conditions for both goods to get an epression for λ Hence the MRS = slope of budget line (sounds familiar?) Hence we have the tangency condition: at the optimum consumption bundle, the indifference curve is tangent to the budget constraint. For eample P P 1: Y 0 U * * 1.5. 3.15
We can also use this method to get the eact solution if we have eplicit functional forms. mau 1 2 st. 3 0 First Step: form the Lagrangean: L Y [ ] Second step: First order conditions. 0.5 0 1 0.5 0 2 L L L 3 0 Third Step: solve for (,, ) From L L 0, we have MRS=1: 0.5 0.5. This means that the optimal solution lies on a ray from the origin where the s are equal. Now we need to find where on the ray: we use the budget constraint: L 0 3 and 3 2 3 * 1.5. i i 3.16
To find the Lagrange multiplier: We can use the first or second condition: L 00.5 * * 1 * 0.5. Finally: what is the maimum level of utility (which indifference curve are you on?): U * * * 1.5 So, what is the meaning of the Lagrange multiplier? The Lagrange multiplier tells you the increase in the maimum utility you can obtain if you get a little more income. This is often called the shadow price. It is the derivative of maimum utility with respect to Y. In this case: du*. dy. So, let us suppose that we had Y=4. The budget constrain moves out: the first order conditions for the s are the same: so they will be chosen to be equal. If they are equal, then the optimal solution becomes 2 of each. In this case, U* 2. An increase in income dy of 1 has given rise to an increase in maimum utility du * of 0.5. So, we can see eactly that 0.5 giv es the ratio (derivative) of these. So, this is really magic: you introduce an etra number: not only does it let you solve the problem, but it also means something useful! COOL.. 3.17
Some more standard results. Eample 1. Two goods, but let us take one good as the numeraire: set its price equal to 1 (good 2), so P is the price of good 1 relative to good two. ma 1 st.. Y p 0 Form Lagrangean: 1 L Y p [ ] First order conditions: 1 (1 ) L p 1 L 0 (1 ) 0 2 L Y p 0 1 (1 ) U 1 (1 ) U Note, since and (1 ) we can rewrite the first two first order conditions U as p and (1 ) U. Hence MRS=P becomes 1 2 U 1 2 2 (1 ) U p p p 1 1 1 3.18
This gives us the ratio of the s as a function of p: this defines a slope of the ray from the origin. We then u se the budget constraint to solve for the levels. From the previous epression : 1 p 2 1 So that the budget constraint becomes 1 Y p p 0 1 1 1 p Y p[1 ] 1 1 Y * or p * Y 1 1 p The α gives the share of ependiture on good 1. This is constant, implying that the demand curve for a Cobb-Douglas utility is a rectangular hyperbola. Eample 2: Cost Minimiation. The firm wants to minimie cost (the dual; of maimiing output) of producing given output Y. Cost: input costs wl rk Constraint: the choice of r,k must be sufficient to produce Y. 3.19
min rk wl s.. t F( K, L) Y. Now: this is a minimisation problem. We know in (r,k)-space, that the iso-cost lines are given by C w i rk wl C K L r r. That is, negatively sloped lines with slope w/r and lines further i away from origin mean higher cost. We consider iso-cost lines for w=2 and r=3: cost levels 2,3,5. Higher levels of cost are represented by lines further out from origin: slope is -2/3, 3.20
Now let us look at the constraint: F( K, L) Y. Again, if we assume that the marginal products of capital and labour are both strictly positive, we know that to minimie cost, the firm will use as little as possible. Hence the inequality constrain becomes an equality constraint F( K, L) Y. Suppose that FKL (, ) K L Y 2 Then the constraint is a particular isoquant line: The slope of the isoquant: F F dy 0.5 dk 0.5 dl 0 K L dl L dk K Y This is the ratio of the marginal products. The solution to find the lowest iso-cost line that produces this output (cuts the isoquant) : 3.21
There are three isocost lines. The one nearest the origin is the lowest (C=5), but cannot produce Y=2. The one furthest out is the highest cost level (C=12), and can produce Y=2. The one that minimies cost is the one where the isocost is tangential to the isoquant (C=9.8) Now, let us see how this comes out of the LAGRANGEAN method. Cost minimiation step one. Specify the lagrangean. LKL (,, ) wkrk[ Y FKL (, )] 3.22
F.O.C. L wf 0 L L rf 0 K K L F( K, L) Y 0. L Solve for (K,L,λ). w r w FL F F r F L K K Looks familiar? Slope of isocost = slope of isoquant (tangency condition). Lastly, the third FOC tells us that we need a tangency AND it must produce Y. Let us use our eample: w=2,r=3,y=2. with the production function w 2 F K 3 L L K r 3 F L 2 k FKL (, ) K L : The tangency condition implies that the solution must lie on a ray from the origin with slope 1.5. We can substitute this into the production function to solve for the optimal K,L 0.5 0.5 3 2 FKL (, ) K L Y2 K K 2 K* 1.63 2 1.5 3.23
Hence: 2 1.5 0.5 L 0.5 2 L2 1.5 2.45. The minimum level of cost is thus: 6 C* wl. * rk* 4 1.5 4.90 4.90 9.80 1.5 Eample 3. Cobb-Douglas cost minimiation. The Cobb-Douglas specification is used a lot in macroeconomics. Historically, the shares of labour and capital pretty constant not so true in last 10 years, but true in 1950-90. Let us set r=1 (numeraire), so now w is the wage-rental ratio. min s.. t wl K K L 1 Y Set up lagrangean FOC: LKL (,, ) wlk[ Y KL F F L L w K L Y K L K L 1 1 0 ; 1 0 ; 0 L 1 ] 3.24
From FOC for K,L: (1 ) K (1 ) w L L K w Put this back into the technological constraint ( L 0): (1 ) K (1 ) 1 1 Y K 0 Y K K* Yw w w 1 Hence we have L* Yw 1 1 1 1 The minimum total cost is thus: 1 C* wl* K* Yw Yw 1 1 1 1 1 1 1 Now: note that the share of labour costs in total costs is 1 Yw wl* 1 C * 1 1 Yw 1 1 Hence the share of capital in total costs is α. 1 3.25
Thus, if labours share of income is fairly constant, you can calibrate the Cobb-Douglas parameter α directly from the data! In US/UK calibrates at around α=0.3. Here is labour s share in US over 1930-2000+. Highest is 0.73 (α=0.27) and lowest 0.66 (α=0.34). 3.26
Conclusions Partial Differentiation: when you differentiate with one variable, treat others as fied. Apply same rules. Second order: get cross-partial derivatives. The conditions for concavity and conveity need to be etended to allow for this cross effect. Constrained optimiation: maimie subject to a constraint: budget constraint for consumer, technology for firm etc. Lagrange: magic method for solving constrained optimisation. 3.27