(*^
::[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; ]
General Equilibrium
:[font = subsubtitle; inactive; preserveAspect; ]
Hal Varian
January 1992
:[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
General equilibrium dynamics
:[font = text; inactive; preserveAspect; ]
Let's look at a few trajectories generated by the dynamics in the text. We'll use a one-consumer symmetric Cobb-Douglas economy. We'll assume an endowment of (1,1,1). In this case the excess demand function for goods 1 and 2 looks like this:
:[font = input; preserveAspect; ]
z1[pp1_,pp2_] := (pp1 + pp2 + 1)/(3 pp1)-1
z2[pp1_,pp2_] := (pp1 + pp2 + 1)/(3 pp2)-1
:[font = text; inactive; preserveAspect; ]
The equilibrium is obtained by solving these two equations in two unknowns:
:[font = input; preserveAspect; ]
Solve[{z1[p1,p2]==0,z2[p1,p2]==0},{p1,p2}]
:[font = text; inactive; preserveAspect; ]
Now let's solve the differential equation describing the dynamics.
:[font = input; preserveAspect; ]
solution=NDSolve[
{p1'[t] == (p1[t] + p2[t] + 1)/(3 p1[t])-1,
p2'[t] == (p1[t] + p2[t] + 1)/(3 p2[t])-1,
p1[0]==0.1,
p2[0]==0.2},
{p1[t],p2[t]},{t,1,10}]
:[font = input; preserveAspect; ]
price1[t_] := Evaluate[p1[t]/.solution]
price2[t_] := Evaluate[p2[t]/.solution]
:[font = input; preserveAspect; ]
Plot[price1[t],{t,0,10}]
Plot[price2[t],{t,0,10}]
:[font = text; inactive; preserveAspect; ]
I haven't been able to coerce Mathematica into displaying the trajectories for this system yet, but I have been able to plot the vector field generated by the system using the package PlotField. First we load it, then we ask it to plot the field generated by this dynamics.
;[s]
5:0,0;30,1;41,2;184,3;193,4;274,-1;
5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,3,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; ]
<True]
:[font = text; inactive; preserveAspect; ]
Since we have only one consumer, the vector field described by the excess demand functions is in fact a gradient filed. This means that we should get qualitatively the same vector field if we plot a potential function for this system. Indirect utility is a suitable potential function in this case. (Actually, we want to use the negative of indirect utility since the Walrasian equilibrium minimizes indirect utility.)
;[s]
3:0,0;332,1;341,2;421,-1;
3: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;
:[font = input; preserveAspect; endGroup; ]
PlotGradientField[-Log[p1 + p2 + 1] + (1/3)*Log[p1]
+ (1/3)*Log[p2],{p1,0.8,1.2},{p2,0.8,1.2},
Axes->True]
:[font = section; inactive; preserveAspect; startGroup; ]
An unstable system
:[font = text; inactive; preserveAspect; endGroup; endGroup; ]
Do the Gale example with a unique unstable equilibrium.
^*)