(*********************************************************************** 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[ 5895, 189]*) (*NotebookOutlinePosition[ 6969, 226]*) (* CellTagsIndexPosition[ 6925, 222]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData["Competitive Markets"], "Title", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Hal Varian\nJanuary 1992"], "Subsubtitle", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["The supply function"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Let's construct a supply function with U-shaped average variable costs. \ First we experiment a bit to get a nice U-shape that we'll use for our AVC \ curve. Then we multiply by y to get variable costs, and finally, add a fixed \ cost:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["avcPlot=Plot[10+(y-5)^2,{y,0,15},AxesOrigin->{0,0}]"], "Input", AspectRatioFixed->True], Cell[TextData["c[y_] := 10y + y(y-5)^2+20"], "Input", AspectRatioFixed->True], Cell[TextData["acPlot=Plot[Evaluate[c[y]]/y,{y,.1,15}]"], "Input", AspectRatioFixed->True], Cell[TextData["mcPlot=Plot[Evaluate[D[c[y],y]],{y,.1,15}]"], "Input", AspectRatioFixed->True], Cell[TextData["Here they are all together:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Show[avcPlot,acPlot,mcPlot]"], "Input", AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Welfare economics"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Let's see how we get to a welfare maximum. Take the following utility and \ cost functions:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["u[x_] := Log[x]\nc[y_] := y^2"], "Input", AspectRatioFixed->True], Cell[TextData[ "inverseDemand[x_] := Evaluate[u'[x]]\ninverseSupply[x_] := Evaluate[c'[x]]\n\ Plot[{inverseSupply[x],inverseDemand[x]},{x,.1,3}]"], "Input", AspectRatioFixed->True], Cell[TextData["We'll plot benefit minus cost on the same scale:"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Plot[u[x]-c[x],{x,.1,3}]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["The equilibrium value of ", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" is given by", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "solution1=Solve[inverseDemand[x] == inverseSupply[x],][[1]]"], "Input", AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Taxes"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Let's use the same demand and supply functions to calculate equilibrium with \ taxes. If a tax of t=.10 is imposed, the new equilibrium is"], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "solution2=Solve[inverseDemand[x] == \n inverseSupply[x]+ \ 0.1][[1]]"], "Input", AspectRatioFixed->True], Cell[TextData[ "Now we'll plug this into the welfare function and see what the deadweight \ loss is. "], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "deadweightLoss=N[(u[x]-c[x]/.solution2)-\n \ (u[x]-c[x])/.solution1]"], "Input", AspectRatioFixed->True], Cell[TextData[ "Let's make a little graph depicting deadweight loss as a function of the tax \ level. First we'll write a function to compute total benefits as a function \ of the tax rate."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData[ "solution3=Solve[inverseDemand[x] == \n inverseSupply[x]+ \ t,x][[1]]\nnetWelfare[t_] := (u[x]-c[x]/.solution3)\nnetWelfare[t]"], "Input",\ AspectRatioFixed->True], Cell[OutputFormData[ "\<\ -(-t + (8 + t^2)^(1/2))^2/16 + Log[(-t + (8 + t^2)^(1/2))/4]\ \>", "\<\ 2 2 2 -(-t + Sqrt[8 + t ]) -t + Sqrt[8 + t ] --------------------- + Log[-----------------] 16 4\ \>"], "Output", Evaluatable->False, AspectRatioFixed->True]}, Open]], Cell[TextData["Plot[netWelfare[t],{t,0,1}]"], "Input", AspectRatioFixed->True]}, Open]]}, Open]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{12, Automatic}, {Automatic, 1}}, 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, 96, 2, 70, "Section", Evaluatable->False], Cell[2055, 63, 312, 6, 70, "Text", Evaluatable->False], Cell[2370, 71, 104, 1, 70, "Input"], Cell[2477, 74, 79, 1, 70, "Input"], Cell[2559, 77, 92, 1, 70, "Input"], Cell[2654, 80, 95, 1, 70, "Input"], Cell[2752, 83, 101, 2, 70, "Text", Evaluatable->False], Cell[2856, 87, 80, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[2968, 90, 94, 2, 70, "Section", Evaluatable->False], Cell[3065, 94, 167, 4, 70, "Text", Evaluatable->False], Cell[3235, 100, 82, 1, 70, "Input"], Cell[3320, 103, 182, 3, 70, "Input"], Cell[3505, 108, 122, 2, 70, "Text", Evaluatable->False], Cell[3630, 112, 77, 1, 70, "Input"], Cell[3710, 115, 367, 14, 70, "Text", Evaluatable->False], Cell[4080, 131, 113, 2, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[4225, 135, 82, 2, 70, "Section", Evaluatable->False], Cell[4310, 139, 214, 4, 70, "Text", Evaluatable->False], Cell[4527, 145, 137, 3, 70, "Input"], Cell[4667, 150, 161, 4, 70, "Text", Evaluatable->False], Cell[4831, 156, 138, 3, 70, "Input"], Cell[4972, 161, 249, 5, 70, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[5244, 168, 196, 4, 70, "Input"], Cell[5443, 174, 339, 11, 70, "Output", Evaluatable->False] }, Open ]], Cell[5794, 187, 80, 1, 70, "Input"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)