The Internet Economy

 

Econ 407: answers to some of pre-test questions. Please redo and see if our calculations are correct.

> Qs:=2*p^2-p+4;

[Maple Math]

> dQs:=diff(Qs,p);

[Maple Math]

> eval(Qs,p=5);

[Maple Math]

> E:=(4*5-1)*(5.0/49);

[Maple Math]

Demand is elastic.

Maximize the following utility function subject to the constraint that you have $100 and you buy 2 commodities. Commodity 1, x, costs $2 a piece while commodity 2, y, costs $1 a piece. First, write the budget constraint, then, maximize the utility function using the Lagrangian method. Interpret your results, including the meaning of the Lagrangian.

> const:=100-2*x-y;

[Maple Math]

> u:=2*x+y+2*x*y;

[Maple Math]

Form the Lagrangian function as follows:

> L:=u+lambda*(100-2*x-y);

[Maple Math]

Take the first derivative of the Lagrangian function with respect to x, y, and lambda. Then set equal to zero, and solve for the three unknowns.

> Lx:=diff(L,x);

[Maple Math]

> Ly:=diff(L,y);

[Maple Math]

> Llambda:=diff(L,lambda);

[Maple Math]

> solve({Lx,Ly,Llambda},{x,y,lambda});

[Maple Math]

You can now find the value of utility for x=25 and y=50.

> eval(u,{x=25,y=50});

[Maple Math]

Now let us increase the value of the constraint by 51, which is the value of Lambda, and see what happens to total utility.

> L:=u+lambda*(151.0-2*x-y);

[Maple Math]

> Lx:=diff(L,x);

[Maple Math]

> Ly:=diff(L,y);

[Maple Math]

> Llambda:=diff(L,lambda);

[Maple Math]

> solve({Lx,Ly,Llambda},{x,y,lambda});

[Maple Math]

> eval(u,{x=37,y=75});

[Maple Math]

> deltau:=5699-2600;

[Maple Math]

> plot3d(u,x=0..50,y=0..100);

[Maple Plot]

To check the second order conditions, you need to take the second derivatives and cross derivatives.

>