(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 5720, 175]*) (*NotebookOutlinePosition[ 6795, 212]*) (* CellTagsIndexPosition[ 6751, 208]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData["General Equilibrium"], "Title", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Hal Varian\nJanuary 1992"], "Subsubtitle", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["General equilibrium dynamics"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "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:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "z1[pp1_,pp2_] := (pp1 + pp2 + 1)/(3 pp1)-1\nz2[pp1_,pp2_] := (pp1 + pp2 \ + 1)/(3 pp2)-1\n"], "Input", AspectRatioFixed->True], Cell[TextData[ "The equilibrium is obtained by solving these two equations in two \ unknowns:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Solve[{z1[p1,p2]==0,z2[p1,p2]==0},{p1,p2}]"], "Input", AspectRatioFixed->True], Cell[TextData[ "Now let's solve the differential equation describing the dynamics."], "Text",\ Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "solution=NDSolve[\n {p1'[t] == (p1[t] + p2[t] + 1)/(3 p1[t])-1,\n \ p2'[t] == (p1[t] + p2[t] + 1)/(3 p2[t])-1,\n p1[0]==0.1,\n \ p2[0]==0.2}, \n {p1[t],p2[t]},{t,1,10}]"], "Input", AspectRatioFixed->True], Cell[TextData[ "price1[t_] := Evaluate[p1[t]/.solution]\nprice2[t_] := \ Evaluate[p2[t]/.solution]"], "Input", AspectRatioFixed->True], Cell[TextData["Plot[price1[t],{t,0,10}]\nPlot[price2[t],{t,0,10}]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["I haven't been able to coerce ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox[ " 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 ", Evaluatable->False, AspectRatioFixed->True], StyleBox["PlotField", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ ". First we load it, then we ask it to plot the field generated by this \ dynamics.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "<True]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "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 ", Evaluatable->False, AspectRatioFixed->True], StyleBox["negative ", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ "of indirect utility since the Walrasian equilibrium minimizes indirect \ utility.)", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "PlotGradientField[-Log[p1 + p2 + 1] + (1/3)*Log[p1]\n + \ (1/3)*Log[p2],{p1,0.8,1.2},{p2,0.8,1.2},\n Axes->True]"], "Input", AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["An unstable system"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Do the Gale example with a unique unstable equilibrium."], "Text", Evaluatable->False, AspectRatioFixed->True]}, Open]]}, Open]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{20, Automatic}, {30, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, Magnification->1.5, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000V8nh09RAj0000000OXQ<097PXP0AP1Y06`0I@1^0642HSkP 0V97`0000001nR4@0TN2R000000000000000009R?^0000000000000000000000 00000000000000000000000000000000\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 94, 2, 70, "Title", Evaluatable->False], Cell[1828, 55, 105, 2, 70, "Subsubtitle", Evaluatable->False], Cell[CellGroupData[{ Cell[1956, 59, 105, 2, 70, "Section", Evaluatable->False], Cell[2064, 63, 327, 6, 70, "Text", Evaluatable->False], Cell[2394, 71, 148, 3, 70, "Input"], Cell[2545, 76, 152, 4, 70, "Text", Evaluatable->False], Cell[2700, 82, 95, 1, 70, "Input"], Cell[2798, 85, 143, 4, 70, "Text", Evaluatable->False], Cell[2944, 91, 265, 4, 70, "Input"], Cell[3212, 97, 136, 3, 70, "Input"], Cell[3351, 102, 103, 1, 70, "Input"], Cell[3457, 105, 798, 26, 70, "Text", Evaluatable->False], Cell[4258, 133, 232, 4, 70, "Input"], Cell[4493, 139, 740, 20, 70, "Text", Evaluatable->False], Cell[5236, 161, 203, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5471, 167, 95, 2, 70, "Section", Evaluatable->False], Cell[5569, 171, 130, 3, 70, "Text", Evaluatable->False] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)