Mathematica Problem Set 2

Use Mathematica to solve the following problems:

A firm produces output Q using labor, L, and capital, K.  Its production function is:



                  Q = 10 L^.6 K^.4

1. Plot the production function in 3 dimensions with Q on the vertical axis. Set the range on L from 0 to 15 and the range on K from 0 to 1000.

Clear[f,L,K]

f[L_,K_] = 10 L^(.6) K^(.4)

Plot3D[f[L,K], {L, 0, 15}, {K, 0, 1000},

AxesLabel->{"Labor","   Capital",""},

PlotLabel->"Total Product"];

2) Hold K constant at 800, and graph the MP and AP of labor. Set the range on L from 0 to 15.

MP is Blue, AP is red.

Clear[f,L]

f[L_] = 10 L^(.6) 800^(.4)

Plot[{f'[L],(f[L]/L)},{L,1,15},

PlotRange->{0,150},

	PlotStyle->{{Blue,Thickness[0.01]},

	{Red,Thickness[0.01]}},

		AxesLabel->{"Labor","Output"},

		PlotLabel->"MP and AP of Labor"];

3) Hold L constant at 6 and graph the MP and AP of capital.

MP is Blue, AP is red.

Clear[f,L]

f[K_] = 10 6^(.6) K^(.4)

Plot[{f'[K],(f[K]/K)},{K,1,15},

	PlotStyle->{{Blue,Thickness[0.01]},

	{Red,Thickness[0.01]}},

		AxesLabel->{"Capital","Output"},

		PlotLabel->"MP and AP of Capital"];

4) Suppose the wage, W, equals 10 and the price of capital, r, equals .05, graph the equal-cost curves for total costs, TC, of $50, $100 and $200.

(TC = .05 K + 10 L)  is the starting equation.  When solved for K it yields (K = TC/.05 - 200 L).  This will be plotted in blue along with TC at 100 (red) and TC at 200 (green).

Clear[TC1,TC2,TC3,L]

TC1[L_] = 1000 - 200 L;

TC2[L_] = 2000 - 200 L;

TC3[L_] = 4000 - 200 L;

Plot[{TC1[L],TC2[L],TC3[L]},{L,0,4000/200},

    PlotRange->{0,4000},

    PlotStyle->{{Blue,Thickness[0.01]},

    {Red,Thickness[0.010]},{Green,Thickness[0.01]}},

    AxesLabel->{"Labor","Capital"},

    PlotLabel->"Equal Cost Lines 1, 2 & 3"];

5) Graph the equal product lines for products of 225, 425, and 625.

Q = 50 is blue, Q = 100 is red, Q = 200 is green.

Clear[L,K]

Solve[225 == 10 L^(.6) K^(.4), K]

Clear[L,K]

Solve[425 == 10 L^(.6) K^(.4), K]

Clear[L,K]

Solve[625 == 10 L^(.6) K^(.4), K]

Clear[TP1,TP2,TP3,L]

TP1[L_] = 2401.35/(L^(3/2));

TP2[L_] = 11775.3/(L^(3/2));

TP3[L_] = 30881.6/(L^(3/2));

Plot[{TP1[L],TP2[L],TP3[L]},{L,.01,15},

    PlotRange->{0,5000},

    PlotStyle->{{Blue,Thickness[0.01]},

    {Red,Thickness[0.010]},{Green,Thickness[0.01]}},

    AxesLabel->{"Labor","Capital"},

    PlotLabel->"Equal-Product Lines 1, 2 & 3"];

6) For Q = 425, W = 10, r = .05, and TC = $100, graph the equal-product and equal-cost curves on the same diagram.  What is the cost-minimizing combination of capital and labor that should be used to produce 100 units of Q.

Plot[{TP2[L],TC1[L],TC2[L],TC3[L]},{L,.01,20},

    PlotRange->{0,4000},

    PlotStyle->{{Blue,Thickness[0.01]},

    {Red,Thickness[0.010]},{Blue,Thickness[0.01]}

    ,{Green,Thickness[0.01]}},

    AxesLabel->{"Labor","Capital"},

    PlotLabel->"Equal Product and Equal Cost Lines"];

The total cost line for TC = 100 is tangent to the TP = 425 equal-cost line.

7) If W = 10 and r = .05, TC = 10 L + .05 K, solve for TC in terms of Q and graph the TC curve.  Q should be on the horizontal axis. Limit the range of Q to 600.

By the total cost rule, MPK/(Price K) = MPL/(Price L) where MPK is the marginal product of capital and MPL is the marginal product of labor.

Clear[f,K,L]

f[K_,L_] = 10 K^(.4) L^.6

D[f[K,L],K]

D[f[K,L],L]

Clear[K,L]

Solve[(6*K^.4)/(10 L^.4) == (4*L^.6)/(.05 K^.6), K]

Solve[Q == 10 (L^(.6))*((133.333*L)^.4), L]

Clear[TC5,Q]

TC5[Q_] = .05*133.333*.0141262*Q+10*.0141262*Q

Plot[TC5[Q],{Q,0,600},

	PlotStyle->{{Blue,Thickness[0.01]}},

		AxesLabel->{"Quantity","Total Cost"},

		PlotLabel->"Total Cost"];

8) Graph the MC and AC curves for W = 10 and r = .05. Limit the range of Q to 300.

Clear[AC,MC]

AC[Q_] = .235436 

MC[Q_] = .235436

Plot[{AC[Q],MC[Q]},{Q,0,300},

    PlotRange->{0,1},

    PlotStyle->{{Blue,Thickness[0.015]},

    {Red,Thickness[0.010]},{Green,Thickness[0.015]}},

    AxesLabel->{"Quantity","Cost"},

    PlotLabel->"Average and Marginal Cost"];

9) Suppose this is a monopoly firm facing the demand curve:



           P= 1 - .00093 Q



where P is the price of its output.  Graph the demand and marginal revenue, MR, curve for this firm.

Clear[P,MR,Q]

P[Q_] = 1 - .00093 Q;

MR[Q_] = 1 - .00093 (2 Q);

Plot[{P[Q],MR[Q]},{Q,0,1/.00093},

    PlotRange->{0,1},

    PlotStyle->{{Blue,Thickness[0.01]},

    {Red,Thickness[0.010]}},

    AxesLabel->{"Quantity","Price"},

    PlotLabel->"    Demand and Marginal Revenue"];

10) Add the marginal cost and average cost curves to your diagram in question 9 and determine the profit maximizing output for the firm.  What are the monopoly profits?

Clear[P,MR,Q]

P[Q_] = 1 - .00093 Q;

MR[Q_] = 1 - .00093 (2 Q);

Plot[{P[Q],MR[Q],MC[Q],AC[Q]},{Q,0,1/.00093},

    PlotRange->{0,1},

    PlotStyle->{{Blue,Thickness[0.01]},

    {Red,Thickness[0.010]},{Green,Thickness[0.015]},

	{Blue,Thickness[0.01]}},

    AxesLabel->{"Quantity","Cost"},

    PlotLabel->"The Monopoly Firm"];

Solve[ MC[Q] == MR[Q],Q]

(P[411.056] - AC[411.056]) * 411.056

The profit maximizing output is 411.056 and the monopoly profits are 157.139.

11.) Determine the price and output if this were a competitive industry.

Solve[MC[Q] == P[Q],Q]

P[822.112]

The price would be .235436 and the quantity would be822.112 if this were a competitive industry.

12.) Determine the deadweight loss of this monopoly.

(822.112 - 411.056)*(P[411.056] - .235436)/2