(*^ ::[paletteColors = 128; automaticGrouping; magnification = 150; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 10, "Times"; ; fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = Left Header, nohscroll, cellOutline, 12; fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1, 12; fontset = Left Footer, cellOutline, blackBox, 12; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; next21StandardFontEncoding; ] :[font = title; inactive; preserveAspect; startGroup; ] Cost Minimization :[font = subsubtitle; inactive; preserveAspect; ] Hal R. Varian January, 1992 :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Minimizing costs :[font = text; inactive; preserveAspect; ] Let's solve a cost minimization problem for a Cobb-Douglas function. First we set up the Lagrangian, :[font = input; preserveAspect; ] L= w1 x1 + w2 x2 - lambda*((x1^(1/4))*(x2^(3/4))-y) :[font = text; inactive; preserveAspect; ] Now differentiate the Lagrangian with respect to x1, x2, and lambda, set the derivatives equal to zero, and solve for each of these variables. ;[s] 7:0,0;49,1;51,2;53,3;55,4;61,5;115,6;121,-1; 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,10,8,Courier,1,12,0,0,0; :[font = input; preserveAspect; ] solution=Solve[{D[L,x1]==0, D[L,x2]==0, D[L,lambda]==0}, {x1,x2,lambda}][[1]] :[font = text; inactive; preserveAspect; ] Now substitute into the expression for costs to derive the cost function :[font = input; preserveAspect; ] c[w1_,w2_,y_] := w1*x1 + w2*x2 /.solution :[font = input; preserveAspect; ] c[w1,w2,y] :[font = text; inactive; preserveAspect; ] Let's check Shephard's lemma to make sure it works :[font = input; preserveAspect; endGroup; ] Simplify[{D[c[w1,w2,y],w2],D[c[w1,w2,y],w1]}] :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] The CES cost function :[font = text; inactive; preserveAspect; ] Here's a CES cost function with rho=1 :[font = input; preserveAspect; ] L=w1 x1 + w2 x2 - lambda*(y - x1^(-1) - x2^(-1)) :[font = input; preserveAspect; ] solution=Simplify[Solve[{D[L,x1]==0, D[L,x2]==0, D[L,lambda]==0}, {x1,x2,lambda}]][[1]] :[font = text; inactive; preserveAspect; ] Again, we substitute into the cost function and verify Shephard's lemma: :[font = input; preserveAspect; ] c[w1_,w2_,y_] := w1 x1 + w2 x2 /. solution :[font = input; preserveAspect; ] c[w1,w2,y] :[font = input; preserveAspect; ] {D[c[w1,w2,y],w1],D[c[w1,w2,y],w2]} :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] CES with rho=2 :[font = text; inactive; preserveAspect; ] Here's the Lagrangian for a CES cost function with rho=2 :[font = input; preserveAspect; ] L=w1 x1 + w2 x2 - lambda*(y - 1/(x1*x1) - 1/(x2*x2)) :[font = input; preserveAspect; ] FOC={D[L,x1]==0,D[L,x2]==0,D[L,lambda]==0} :[font = text; inactive; preserveAspect; ] Unfortunately, Mathematica finds this system of equations difficult to solve, so we'll have to resort to some tricks. In general, if Mathematica finds a system of equations difficult to solve, try some transformations to make the system look like a system of polynomials---or, even better, a system of linear equations. In this case, we'll introduce auxiliary variables z1=1/x1 and z2=1/x2. With these additions, the system we want to solve is ;[s] 9:0,0;15,1;26,2;134,3;145,4;371,5;380,6;384,7;391,8;448,-1; 9:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] transFOC=FOC/.{x1->1/z1,x2->1/z2} solution=Solve[Evaluate[transFOC],{z1,z2,lambda}][[1]] :[font = text; inactive; preserveAspect; ] The demand functions and the cost function are :[font = input; preserveAspect; ] {x1,x2} = Simplify[{1/z1,1/z2}/.solution] :[font = input; preserveAspect; ] c[w1_,w2_,y_] := (w1 /z1 + w2 /z2)/.solution :[font = input; preserveAspect; endGroup; endGroup; endGroup; ] Simplify[c[w1,w2,y]] ^*)