STATICDYNAM OPT MOD
STATICDYNAM OPT MOD AEB 6533
Popular in Course
Popular in Agricultural Economics And Business
Weldon Rau I
verified elite notetaker
This 17 page Class Notes was uploaded by Weldon Rau I on Friday September 18, 2015. The Class Notes belongs to AEB 6533 at University of Florida taught by Staff in Fall. Since its upload, it has received 22 views. For similar materials see /class/206595/aeb-6533-university-of-florida in Agricultural Economics And Business at University of Florida.
Reviews for STATICDYNAM OPT MOD
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 09/18/15
Lecture XIX Euler Equations and a Basic Example 1 Review A Concepts borrowed from calculus 1 Maximum Minimum a The variable x maximizes fx if fxfx gt 0 for all x in the neighborhood of x b The function y0x maximizes Iy if IyIy gt 0 for all functions in the neighborhood of y 2 Continuity a Univariate fxjifg fxfxO b Continuity of functional Iy If8gt0 there is a 5gt0 such that y0xyx lt 5 implies that Iy0xIyxlt8 then Iy is continuous at y0x c Why are we concerned If the functional is continuous around y0x the optimal path then we can use concepts like differential calculus to determine the optimal path 3 Norms a The norm of a function is the largest absolute value that a function obtains over a stated range b The difference between two functions is then defined as the largest absolute difference between the two functions over a stated range c Extending the concept of the norm HyxH0 is the largest absolute value that the function yx obtains HyxH1 is the largest absolute value of the function plus the largest absolute value of the first derivative B Derivation of the Necessary Conditions 1 In the Lecture XVIII we developed the general calculus of variation problem as max1y Ifxyxy x dx yxO yoyx1 y1 We assumed that there existed an optimal path yx Further we assumed zx was in the neighborhood of yx zx was constructed as a deviation of yx zx yx 5yx 5yx zx yx Note that if zx is near to yx zx approaches yx l z x approaches y x Thus both 5yx and A5yx become very small E I1 I 1Cn Again changing notation 5yx 8 x where x0 x10 Further 8 is a scalar that we can let approach zero Thus the alternative feasible path can be expressed as zx yx 8 x The functional value as a function of the alternative feasible path can then be expressed as 1 lfxyx8 xy x 8 xdx To derive the maximum we will differentiate the functional expressed with respect to the alternative path with respect to 8 To be technically correct we must first define two new functions 138 and CD 8 based on the zx and z x functions Specifically zx gt D8 yx 8 x 2 00 gt 08 y x 8 x The above functional then becomes 1 j fx 138ltIgt 8dx Differentiating this functional with respect toe then yields the optimality condition along the optimal path ApplyingLiebinitz s rule il d o o d o 0 d8 damp a a dame a 2 lafdo de g a nnx a Under typical assumptions the first and second terms of this differentiation go to zero because the starting point and termination point of the dynamic optimum are exogenous to the optimization problem However these conditions can be revisited if the question regards optimum stopping time b More to the point the Euler equation is derived from the expression under the integral the last term in the differential This condition must be met at every time period c First we need to carry the integration through the sum yielding I1 I 1Cn I1 l In Bo Bonn Bo Bonn Intuitively we would like to be able to recombine these components in such a way as to factor a common d 1 term outside the multiplication To do this we note that the second term in the addition can be integrated by parts g d afd g d de dvltIgt dx 3f deCD d XUBCID de x FM xlafd b 3f WB 1113de XUBCD de BCID de BltD d8 in dx 31 d2 x Substituting for the derivative of I with respect to 8 this equation becomes afdcb af af 1 d af d 7 7 d lad d2 x acbmxl B x dx 31 x x Applyirg the de nition of a feasible path the first two terms drop out Substituting this result back into the original integral and substituting again for the derivative ofCD with respect to 8 1Cn yields a f dqidx ggmac i a f xdx 31 d2 BCD d8 dx MD x 31 1 3f 2 lie lt1 dx3 ID HMXWX IH 1CH d Finally letting8 approach zero we derive the Euler equation in terms of the optimal path 20 1Cn y xay Implying that d fy Efy 0 Vxex0xl 4 To operationalize the Euler equation we note that fy fyxxyxy x d i i d x Therefore another manifestation of the Euler equation is fy f fyxyy fyxyy fy yya l39fy y y II Solved Examples A Example 1 T min I x t2 dt 0 stx0 0 xT B Solving this example implies that 03 fx0 2 fat 0 frxrx r mo 2 fr 2 2m f 0 fr x 2 The Euler equation then becomes f f fxxx fxxx gt 0 0 0x 2x Solving the second order differential equation d2xt dxt dtz 0gt7dt J0altclc1 d t clgtctclciltczc1tc2 Using the boundary conditions to solve for the constants x00gt0010c2 gtc2 0 xTB gtBc1Tgtc1 Thus the optimal solution is the same as we saw in lecture XVIII xt for OSIST Example 2 x t2 10txtdt x0 1 x1 2 Derivation of the Euler equation o fr 10 2 f 0 ftxtx tx t 10txt gt fr 2 f 0 fr x 2 10t2x t x t 5 The solution of the differential equation is then d2xt dxt 5 2 75tgt715tdtcl t c1 Lem 7m r HW yr 7 t dt 2 CIgtx 2 01 cz 6 c1 c2 Using the initial conditions x0 5603c10c2 1gtc2 1 xl5613clll2gtcl1 The solution of the calculus of variations problem is then xt t3t1 C Example 3 The inventory problem T min I cl x t2 c2 xtdt 0 x0 0 xT b The Euler equation can then be derived as fa 62 0 ftxx clx t2 czxtgt f fix 201xtgt fa 0 frk 261 c2 201x t Solving the Euler equation d2xt 1 c1 dxt 1 c1 c1 77 idtk tk 462 dt AICZ 1 1 alt2 202 dxt c1 c1 i7tk gt t tdt kdtk dt 202 1 x 202 I1 2 c 1 t2k1tk2 402 Using the boundary conditions c x0 102k10k20gtk20 402 C1 2 B c1 xT T k1TBgtk1 T 402 T 402 c B c c t Tt Bt 39xt 1 t2 i T t 2 7 402 T 402 401 T In addition to the straightforward solution we have an implicit condition that X t20 To establish this we rst establish that X 0 is greater than zero Afterwards if we can establish that X t is greater than zero we will have shown that X t20 for all t in the interval Starting with the second part rst c x t 1 gt0 ifc 6 gt0 262 1 2 So the result that X t greater than zero is established if X 020 CZ t tk x 261 1 c1 B 02 c2 T2 x 0 0 iT 20cgtB2 202 T 401 401 III Interpreting the Euler Equation A First note that the Euler equation must hold between any two points in OstsT Thus choosing points t and tA in the previous example yields 2A 2A 12 clx s ds Iczds t t A t 2A 201 Ix s ds c2 Ids t t 261x t A x t c2 t A t 2 clx t A 2 clx t 02A 2c1x tA is the cost of producing in the next period 2c1x t is the cost of producing in the current period c2A is the inventory cost Thus at optimum the cost of producing in the next period is exactly equal to the cost of producing in this period plus inventory cost B Another form of the Euler condition implicit in the preceding discussion is bP N fxxtxtx t1205960x UDdt An example of this reformulation is the inventoryproblem with a discount rate This formulation becomes T min I 6 quot cl x t2 c2 xtdt 0 Following the reformulation in a in a 2 fx 8 cl ftxtx a e c x 0 mm 2 fr 284696 The general statement of the Euler equation then yields dfx fx dt 6 c2 Zeiquotclx t multiplying both sides of this equation bydt and integrating yields 0216 st k1 Jd267 c1x s t t c ie k1 Zei clx a r c xt kle ds k2 CZ k tile k2 2rc1 r Solving for the boundary conditions 62 k1 0 x0 70ie k2 0gtk2 2rc1 r E Iquot CT V 3 2 l xT 672Tequot 1 Bgtk A 2rc1 r 1 51 1 1 Examples Lecture XV Review of Dynamic Mathematics 11 A Homogeneous First Order Linear Differential Equations 1 2 Example 1 x 3 x 0 Proposed solution xt A 6732 Given an initial value of x0 5 what is the value of A Check tle solution xt 5e 3 x t 156732 x t 3 xt 15e 3 35e 3 0 Example 2 x6x0 Proposed solution xt A e Given the initial value of x04 what is the value of A Check the solution xt 4e 6 x t 24 e x t xt 24a 64e B Non Homogeneous First Order Linear Differential Equations with a Constant Right Hand Side 1 Example 1 x3x 6 Proposed solution 6 3 6 xtx0 e What is the particular solution to this problem What is the complementary solution to this problem Given an initial condition of x05 check the solution xt 5 2 2 xt 38732 2 x t 96732 x t 3 xt 9 e 33e 3 26 Could you solve for the initial conditions if you where given x2 10 x2x0 2equot 210 x0 10 2e4 2 3 Example 2 x6x6 Proposed solution 6 6 6 xt x0 g e g Taking the initial solution of x04 and checking the solution xt 3 6762 1 x t 18676 x t6xt 18e 6 63equot 16 C Non Homogeneous First Order Linear Differential Equations with a Variable Right Hand Side 1 Example 1 c x t 6quot 1 Step 1 What do we multiply both sides by and why at 96x te dx 6 t e xe Jses dsc t l xe Et2 e c l xt5tze lce Given an initial condition of x04 the solution becomes x00lc 5 04 1 xtEtze l4equot l x tte Etze 4 equot l l x txttequot Etzequot 4e 5tzequot l4e te 1 2 Example 2 c xtzeiztl de xtze e etxJsze S esdsc l Of course the cruelty in this formulation is in the firstintegrand 2 u 3 gt du 2 3 ds 5 dve S gtv e J szeisds tie 2 I seisds t t In this case the second half of the integration by parts must be integrated by parts again u s gtdu ds dveisdsgtv eis Iseisds seis 16st 2 l s e e The complete integral then becomes 2 t it Jsze SdS tze 2te 2e 2 To check on this integral d tie 2t 6quot 2 6 dt 2 2te t e 2e 2tequot 26 tleit The solution of this differential equation is then e x tzequot 2tequot 2e e c xt tie 2te 2e lce Checking the solution xt tie 2te 2 e lce x t 2te 2t2e 2e 4te 4e x txttze l D Linear First Order Difference Equations withNonconstant Lefthand Side and Right Hand Side Parameters 1 Example 1 2 it ce xezzxm hzexpej2sds 2 11243 2 s j 711 e l 41 2 x 52 s 7 22 s 1 1 xt2 ce Checkmg the soluhon 21 1 1 1 x39t21xt22 2 EEE z 11 QuahtauveSoluuons ofDxffe hua1 Equauons Phase Dxagrams A Some deferenual equahons do notpossess a closed form sohmoh Thxs fact e to yxeldready mterpretauons leads to graphxcal analysxs of dAerrennal equauonsthroughp as agrams B A has dAagramplotsLhedema me For example 1fwe taketh hve ofx agam xts value at angen pomt m e logxsncal gmmh funehon 1 X E k x erexxsthefxshpopulanonatu st nthegrowthmthe sh stoc atumetr15thegrowthrateofthepopulauonkxst emaxxmum rymg capamty and E 15 the shmg 1 Th e e phas dAagram forthxs sh e populauon gweh ho harvest 15 than an determme several Lhmgs about sh populauons we se that any p pulauon level 1ess than 100 eauses the sh stocks to mcrease m the hex penod However any opulanon over 100 eauses the stocks to deehhe Thus the a LA 4 population of 100 is an attractor The longrun steady state in the absence of harvesting is a sh stock of 100 The fact that the derivative of the function at a given level of stock is zeros indicates that a given point is a steady state However not all steady states are equal Speci cally notice that a stock level of zero is also a steady state Extinction is a steady state However as the stock level deviates from that steady state the solution does not return The steady state solution at X0 is a repeller How do we determine a repelling solution from an attracting solution Note that in the first case the function cuts the d Xdt aXis from above Thus any X less than the X100 causes the population to grow On the other hand at X0 the function cuts the d Xdt aXis from below Thus any at any stock level greater than zero the relationship implies a X is growing away from the equilibrium Lecture VIII Linear Inequality and Nonlinear Equality Constraints 1 A Review of Linear Equality Constraints A As previously developed the rst order necessary conditions for a linearly constrained equality can be written as Z V f x 0 An alternative specification for this constraint is V f x A A where 7 are a vector of lagrange multipliers Another way to look at the problem is that the lagrange multipliers are that set of constants which equate the gradient with the linear constraints B To offer an intuitive proof Lfxlibl aix zb a2x VLVfltxgt 2a aaz0 39 Thus foxlla1 za2 A A 39 The general concept of the lagrange multiplier and the null space matrix then work together C Another concept that I want to discuss is the fact that a equality constrained problem can have lagrange multipliers of either side Intuitively the lagrange multiplier is the change in the objective function associated with a one unit increase in the right hand side of the constraint Therefore in a maximization problem 1 If the constraint cuts the frontier below the global maximum assuming that the objective function resembles a quadratic function the lagrange multiplier will take on a positive value implying that an increase in the right hand side of the constraint will increase the objective function value Similarly if the constraint cuts the frontier above the global maximum again assuming that the objective function resembles a quadratic function the lagrange multiplier will take on a negative value implying that an increase in the right hand side of the constraint will cause the objective function to decline D A numerical example based on the gradients from last lecture I In the preceding lecture we developed a portfolio model solved for the minimum variance of a portfolio restricting income to 7 percent and using a portfolio balance equation The optimal portfolio was 1 1613 10666 39508 59546 The constraint matrix for this problem was N x AEB 6533 7 Static and Dynamic Optimization Lecture 8 Professor Charles B Moss 8199 11366 6298 8014 10 10 10 10 J 39 Forming the lagrange expression we will try to nd 711 and 7t 2 such that 437712 8199 10 388069 11366 10 x11 Vx x 2 467511 2 6298 10 12 39 440613 8014 10 2 The two shadow values can be found by solving the system 8199 10 436712 11366 10 388069 6298 10 467511 8014 10 440613 which yields a rowreduced form of 1 0 15675 0 1 566212 0 0 0 0 0 0 One cautionary note is that using automatic rowreduction procedures in Gauss or Mathematica may reduce the problem beyond the first two row operations due to rounding problems I would recommend manual reductions II The Case of Inequality Constraints A The conditions for inequality constraints are built from the concepts in the linear equality constraints Speci cally the general form of the LIP problem is stated max f x st Ax S b I Again we will use the null space but in applying the null space we will divide the set of linear constraints into active or binding and nonactive or nonbinding constraints Graphically AEB 5533 7 Static and Dynamic Optimization Professor Charles B Moss Lecture 8 K V Binding if Nonbinding DU 0 The binding constraints must satisfy all the properties that an equality must satisfy but a nonbinding constraint is omitted from the construction of the null space Mathematically the necessary conditions for a linear inequality constrained problem maxx 31 Axb are 1 Axb 2 Z39foltxgto or WW 3 20 4 Z39fo x Z is negative semidefinite Where Z the null space matrix is defined for only the active or binding constraints of A Given these conditions We see that the portfolio problem discussed above is not consistent With income greater than or equal to 7 percent rather than exactly equal 7 percent Specifically Al 15675 Thus the income constraint is constraining income below the global minimum for variance AEB 6533 7 Static and Dynamic Optimization Lecture 8 Professor Charles B Moss D Another example developed in the mathematica notebook Constrained2ma is the utility maximization problem where the consumer maximizes utility de ned as x1 1 025 0125 0166 x1 x2 025 75 0005 001 x2 4 3 1 9 m3X x3 x1 x2 x3 x 0125 0005 25 045 JCS 0166 001 045 125 x4 x4 Subject to the income constraint zx U N 1 O V gt5 gt5 lt 1 We see that the unconstrained problem has a global maximum in the positive quadrant The exact maximum is x1 191157 x2 194001 x2 x3 145741 39 x 352385 4 The required level of income to meet this global maximum is 330636 Thus we want to evaluate two scenarios Under the rst scenario the level of income is set at 400 which is beyond the level required for the global maximum a Under this scenario we solve me f x st3 2 4 5x40 which yields an optimal solution of 213964 212981 261004 377626 and an optimal 7 of 143 83 Following the classical necessary conditions for optimization we N x b see that this point fails even though the projected gradient is zero because the sign on the Lagrange multiplier is wrong c The utility maximizing point in this case is actually the global maximum 3 The second scenario then involves constrainingy to be less than 30 a In this case the optimum solution becomes AEB 6533 7 Static and Dynamic Optimization Lecture 8 Professor Charles B Moss 181084 185618 094317 341237 with K of0065537 Under this scenario it is possible to show that 1 the constraint set is met 2 the projected gradients vanish 3 the Lagrange multipliers are greater than or equal to zero and 4 the projected Hessian is negative de nite Thus this solution meets the rst and second order necessary and suf cient conditions for a maximum 6