Finance 30210: Managerial Economics Optimization Optimization deals with functions. A function is simply a mapping from one space to another. (that is, a set of instructions describing how to get from one location to another) B f :A B f Is the range is a function A f A B Is the domain For example For 0 x5 Domain f x 3x 5 Range Function A 0,5 3 x A 5 y 20 B [5,20] f 3 14 14 y y 3x 5 20 Y =14 0 x5 Range For 5 0 Domain X =3 x 5 max 3x 5 y 20 0 x5 Range Here, the optimum occurs at x = 5 (y = 20) 5 0 Domain x 5 Optimization involves finding the maximum value for y over an allowable domain. What is the solution to this optimization problem? 1 max 5 x y 0 x 10 5 10 x There is no optimum because f(x) is discontinuous at x = 5 What is the solution to this optimization problem? max 2 x y 0 x6 12 There is no optimum because the domain is open (that is, the maximum occurs at x = 6, but x = 6 is NOT in the domain!) x 0 6 What is the solution to this optimization problem? y max x x0 12 There is no optimum because the domain is unbounded (x is allowed to become arbitrarily large) x 0 The Weierstrass theorem provides sufficient conditions for an optimum to exist, the conditions are as follows: y f x is continuous max f ( x) over the domain of x The domain for x is closed and bounded x Finding maxima/minima involves taking derivatives…. Formally, the derivative of f x is defined as follows: f ( x x) f ( x) f ' x lim x 0 x All you need to remember is the derivative represents a slope (a rate of change) Actually, to be more accurate, the derivative represents a trajectory Graphically… y y f x x f x f x x x x f ( x x) f ( x) slope x x x x Now, let the change in x get arbitrarily small f ( x x) f ( x) f ' x lim x 0 x First Order Necessary Conditions If x* is a solution to the optimization problem max f ( x) min f ( x ) or x x then f ' ( x*) 0 f x f ' x 0 f ' x 0 x* f x f ' x 0 x f ' x 0 f ' x 0 x* x f ' x 0 Useful derivatives Logarithms Linear Functions f ( x) Ax f ' ( x) A Example: f ( x) 4 x f ' x 4 A f ( x) A ln( x) f ' ( x) x Example: Exponents f ( x) Ax n f ' ( x) nAx n1 Example: f ( x) 3x 5 f ' x 15 x 4 f ( x) 12 ln x 12 f ' x x An Example Suppose that your company owns a corporate jet. Your annual expenses are as follows: You pay your flight crew (pilot, co-pilot, and navigator a combined annual salary of $500,000. Annual insurance costs on the jet are $250,000 Fuel/Supplies cost $1,500 per flight hour Per hour maintenance costs on the jet are proportional to the number of hours flown per year. Maintenance costs (per flight hour) = 1.5(Annual Flight Hours) If you would like to minimize the hourly cost of your jet, how many hours should you use it per year? Let x = Number of Flight Hours $750,000 Hourly Cost $1500 $1.5 x x $750,000 min $1500 $1.5 x x 0 x First Order Necessary Condition $750,000 750,000 $1.5 0 x 707hrs 2 x 1.5 Hourly Cost ($) An Example Annual Flight Hours How can we be sure we are at a maximum/minimum? For a maximization… For a minimization… f x f x f ' x 0 f ' x 0 f ' x 0 x* x f ' x 0 f ' x 0 x* x f ' x 0 f ' ' ( x*) 0 f ' ' ( x*) 0 Slope is decreasing Slope is increasing Let x = Number of Flight Hours $750,000 min $1500 $1.5 x x x First Order Necessary Conditions $750,000 750,000 $1.5 0 x 707hrs 2 x 1.5 Second Order Necessary Conditions $1,500,000 0 3 x For X>0 Suppose you know that demand for your product depends on the price that you set and the level of advertising expenditures. Q p, A 5,000 10 p 40 A pA .8 A2 .5 p 2 Choose the level of advertising AND price to maximize sales When you have functions of multiple variables, a partial derivative is the derivative with respect to one variable, holding everything else constant max 5,000 10 p 40 A pA .8 A2 .5 p 2 p 0 , A 0 First Order Necessary Conditions Q p ( p, A) 10 A p 0 QA ( p, A) 40 p 1.6 A 0 With our two first order conditions, we have two variables and two unknowns 10 A p 0 A p 10 Q p ( p, A) 10 A p 0 QA ( p, A) 40 p 1.6 A 0 40 p 1.6 A 0 40 p 1.6 p 10 0 24 .6 p 0 p 40 A 50 How can we be sure we are at a maximum? f ' ' ( x*) 0 its generally sufficient to see if all the second derivatives are negative… Q p ( p, A) 10 A p QA ( p, A) 40 p 1.6 A Q pp ( p, A) 1 0 QAA ( p, A) 1.6 0 Practice Questions 1) Suppose that profits are a function of quantity produced and can be written as 10 20Q 2Q 2 Find the quantity that maximizes profits 2) Suppose that costs are a function of two inputs and can be written as C 4 3 X1 4 X 2 2 X 3 X X1 X 2 2 1 2 2 Find the quantities of the two inputs to minimize costs Constrained optimizations attempt to maximize/minimize a function subject to a series of restrictions on the allowable domain max f x, y x, y subject to g x,y 0 To solve these types of problems, we set up the lagrangian ( x, y) f x, y g x, y Function to be maximized Constraint(s) Multiplier To solve these types of problems, we set up the lagrangian ( x) f x g x 0 (x ) f x We know that at the maximum… (x ) f x x* x x ( x) 0 g x 0 Once you have set up the lagrangian, take the derivatives and set them equal to zero ( x, y) f x, y g x, y First Order Necessary Conditions x ( x, y ) f x x, y g x x, y 0 y ( x , y ) f y x , y g y x, y 0 Now, we have the “Multiplier” conditions… 0 g x, y 0 g x, y 0 Example: Suppose you sell two products ( X and Y ). Your profits as a function of sales of X and Y are as follows: ( x, y) 10 x 20 y .1( x 2 y 2 ) Your production capacity is equal to 100 total units. Choose X and Y to maximize profits subject to your capacity constraints. x y 100 The key is to get the problem in the right format f x, y max 10 x 20 y .1( x 2 y 2 ) x 0, y 0 subject to 100 x y 0 g x, y Multiplier The first step is to create a Lagrangian ( x, y) 10 x 20 y .1( x y ) (100 x y) 2 Objective Function 2 Constraint Now, take the derivative with respect to x and y ( x, y) 10 x 20 y .1( x y ) (100 x y) 2 2 First Order Necessary Conditions x ( x, y ) 10 .2 x 0 y ( x, y ) 20 .2 y 0 “Multiplier” conditions 0 100 x y 0 (100 x y ) 0 First, lets consider the possibility that lambda equals zero 10 .2 x 0 20 .2 y 0 10 .2 x 0 x 50 0 100 x y 0 100 x y 0 20 .2 y 0 y 100 100 50 100 50 0 Nope! This can’t work! The other possibility is that lambda is positive 10 .2 x 0 20 .2 y 0 10 .2x 20 .2 y 10 .2 x 20 .2 y y x 50 y x 50 0 100 x y 0 100 x y 0 100 x y 0 100 x x 50 0 50 2 x 0 x 25 y 75 Lambda indicates the marginal value of relaxing the constraint. In this case, suppose that our capacity increased to 101 units of total production. 10 .2 x 20 .2 y y 75 x 25 50 Assuming we respond optimally, our profits increase by $5 Example: Postal regulations require that a package whose length plus girth exceeds 108 inches must be mailed at an oversize rate. What size package will maximize the volume while staying within the 108 inch limit? Z Girth = 2x +2y Volume = x*y*z X Y xyz x 0, y 0, z 0 max subject to 2 x 2 y z 108 xyz x 0, y 0, z 0 max subject to 2 x 2 y z 108 First set up the lagrangian… ( x, y, z ) xyz (108 2 x 2 y z ) Now, take derivatives… x ( x, y, z ) yz 2 0 y ( x, y, z ) xz 2 0 z ( x, y, z ) xy 0 Lets assume lambda is positive yz 2 0 xz 2 0 xy 0 108 2 x 2 y z 0 xy yz 2 0 yz 2 xy 0 z 2x xz 2 0 xz 2 xy 0 z 2y 0 108 2x 2 y z 0 z 2x z 2y 2 x 2 y z 108 z z z 108 z 108 y 18 xy 324 x 18 z 36 Suppose that you are able to produce output using capital (k) and labor (L) according to the following process: yk l .5 .5 Labor costs $10 per hour and capital costs $40 per unit. You want to minimize the cost of producing 100 units of output. TC 10l 40k min 10l 40k l 0,k 0 subject to k .5l .5 100 Minimizations need a minor adjustment… ( x, y) f x, y g x, y A negative sign instead of a positive sign!! So, we set up the lagrangian again…now with a negative sign (k , l ) 10l 40 (k .5l .5 100) Take derivatives… l (k , l ) 10 .5k l .5 .5 0 k (k , l ) 40 .5k .5l .5 0 Lets again assume lambda is positive 0 k l 100 .5 .5 10 .5k l .5 .5 0 40 .5k l 0 .5 .5 40 .5k .5l .5 0 80k .5l .5 10 .5k .5l .5 0 20l .5 k .5 k .5l .5 100 .5 20l k l 4k .5 .5 .5 80k l k .5 4k 100 2k 100 .5 k 50 l 200 Suppose that you are choosing purchases of apples and bananas. Your total satisfaction as a function of your consumption of apples and bananas can be written as UA B .4 .6 Apples cost $4 each and bananas cost $5 each. You want to maximize your satisfaction given that you have $100 to spend 4 A 5B 100 .4 max A B .6 A 0 , B 0 subject to 100 4 A 5B 0 max A.4 B.6 A 0 , B 0 subject to 100 4 A 5B 0 First set up the lagrangian… ( A, B) A B (100 4 A 5B) .4 .6 Now, take derivatives… A ( A, B) .4 A.6 B.6 4 0 B ( A, B) .6 A.4 B .4 5 0 Lets again assume lambda is positive .4 A B 4 0 .6 .4 .6 A B .6 .4 0 4 A 5B 100 5 0 .6 A.4 B .4 5 0 .12 A.4 B .4 .4 A.6 B.6 4 0 .1A.6 B.6 .1A.6 B .6 .12 A.4 B .4 B 1.2 A 4 A 5B 100 4 A 51.2 A 100 A 10 B 12 Suppose that you are able to produce output using capital (k) and labor (l) according to the following process: yk l .5 .5 The prices of capital and labor are p and w respectively. Union agreements obligate you to use at least one unit of labor. Assuming you need to produce y units of output, how would you choose capital and labor to minimize costs? Non-Binding Constraints min pk wl k ,l subject to y k .5l .5 l 1 Just as in the previous problem, we set up the lagrangian. This time we have two constraints. Will hold with equality (k , l ) pk wl (k .5l .5 y ) (l 1) Doesn’t necessarily hold with equality (k , l ) pk wl (k .5l .5 y ) (l 1) First Order Necessary Conditions .5 .5 ( k , l ) p .5 k l 0 k (k , l ) w .5k l .5 .5 l 0 y k .5l .5 0 l 1 0 (l 1) 0 0 l -1 0 Case #1: 0 l 1 Constraint is non-binding First Order Necessary Conditions w .5k 0 p . 5 k .5 l . 5 0 .5 . 5 l w k p l w k l p y k .5 l . 5 0 w 2 y kl l l p w p p l y 1 w w py 2 Case #2: l 1 0 Constraint is binding First Order Necessary Conditions w .5k 0 p .5k .5 0 .5 yk 0 .5 2 p k 2 py ky 2 w py 2 py 2 w Constraint is Binding w py 2 k y2 l 1 Constraint is Non-Binding p ly w w k y p p Try this one… You have the choice between buying apples and bananas. You utility (enjoyment) from eating apples and bananas can be written as: U A, B A 2 B .5 The prices of Apples and Bananas are given by PA and PB Maximize your utility assuming that you have $100 available to spend max A 2 B A, B .5 (Objective) subject to PA A PB B $100 A0 B0 (Income Constraint) (You can’t eat negative apples/bananas!!) ( A, B) A.5 2B ($100 PA A PB B) 1 A 2 B Objective Income Constraint Non-Negative Consumption Constraint ( A, B) A.5 2B ($100 PA A PB B) 1 A 2 B First Order Necessary Conditions A ( A, B ) .5 A.5 PA 1 0 B ( A, B ) 2 PB 2 0 $100 PA A PB B 0 We can eliminate some of the multiplier conditions with a little reasoning… 1. You will always spend all your income 0 2. You will always consume a positive amount of apples 2 0 B0 2 B 0 1 0 Case #1: Constraint is non-binding B 0 2 0 First Order Necessary Conditions A ( A, B ) .5 A.5 PA 0 B ( A, B ) 2 PB 0 $100 PA A PB B 0 .5 .5 A PA 2 PB $100 PA A B PB B 0 PB 40 PA Case #1: Constraint is binding B 0 2 0 First Order Necessary Conditions A ( A, B) .5 A.5 PA 0 B ( A, B) 2 PB 2 0 $100 PA A 0 .5 A.5 PA $100 A PA 2 PB 2 2 0 PB 40 PA PB Constraint is Binding B0 PB 40 PA $100 A PA Constraint is Non-Binding PB A .25 PA 2 $100 PA A B PB PA