(*^ ::[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; ] Competitive Markets :[font = subsubtitle; inactive; preserveAspect; ] Hal Varian January 1992 :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] The supply function :[font = text; inactive; preserveAspect; ] 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: :[font = input; preserveAspect; ] avcPlot=Plot[10+(y-5)^2,{y,0,15},AxesOrigin->{0,0}] :[font = input; preserveAspect; ] c[y_] := 10y + y(y-5)^2+20 :[font = input; preserveAspect; ] acPlot=Plot[Evaluate[c[y]]/y,{y,.1,15}] :[font = input; preserveAspect; ] mcPlot=Plot[Evaluate[D[c[y],y]],{y,.1,15}] :[font = text; inactive; preserveAspect; ] Here they are all together: :[font = input; preserveAspect; endGroup; ] Show[avcPlot,acPlot,mcPlot] :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Welfare economics :[font = text; inactive; preserveAspect; ] Let's see how we get to a welfare maximum. Take the following utility and cost functions: :[font = input; preserveAspect; ] u[x_] := Log[x] c[y_] := y^2 :[font = input; preserveAspect; ] inverseDemand[x_] := Evaluate[u'[x]] inverseSupply[x_] := Evaluate[c'[x]] Plot[{inverseSupply[x],inverseDemand[x]},{x,.1,3}] :[font = text; inactive; preserveAspect; ] We'll plot benefit minus cost on the same scale: :[font = input; preserveAspect; ] Plot[u[x]-c[x],{x,.1,3}] :[font = text; inactive; preserveAspect; ] The equilibrium value of x is given by ;[s] 3:0,0;25,1;26,2;39,-1; 3: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; endGroup; ] solution1=Solve[inverseDemand[x] == inverseSupply[x],][[1]] :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Taxes :[font = text; inactive; preserveAspect; ] 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 :[font = input; preserveAspect; ] solution2=Solve[inverseDemand[x] == inverseSupply[x]+ 0.1][[1]] :[font = text; inactive; preserveAspect; ] Now we'll plug this into the welfare function and see what the deadweight loss is. :[font = input; preserveAspect; ] deadweightLoss=N[(u[x]-c[x]/.solution2)- (u[x]-c[x])/.solution1] :[font = text; inactive; preserveAspect; ] 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. :[font = input; preserveAspect; startGroup; ] solution3=Solve[inverseDemand[x] == inverseSupply[x]+ t,x][[1]] netWelfare[t_] := (u[x]-c[x]/.solution3) netWelfare[t] :[font = output; output; inactive; preserveAspect; endGroup; ] -(-t + (8 + t^2)^(1/2))^2/16 + Log[(-t + (8 + t^2)^(1/2))/4] ;[o] 2 2 2 -(-t + Sqrt[8 + t ]) -t + Sqrt[8 + t ] --------------------- + Log[-----------------] 16 4 :[font = input; preserveAspect; endGroup; endGroup; ] Plot[netWelfare[t],{t,0,1}] ^*)