The Internet Economy

 

Econ 407: An application of inequality constraint:

Maximize 26*x-3*x^2+5*x*y-6*y^2+12*y subject to:

170-3*x -y equal or greater than zero.

> L:=26*x-3*x^2+5*x*y-6*y^2+12*y+lambda*(170.0-3*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]

Since lambda is negative, the constraint is binding--i.e. we have not reached the optimum point.

> plot3d(26*x-3*x^2+5*x*y-6*y^2+12*y,x=0..60,y=0..35);

[Maple Plot]

Let us increase the constraint to 180.

> L:=26*x-3*x^2+5*x*y-6*y^2+12*y+lambda*(27.0-3*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]

> L:=26*x-3*x^2+5*x*y-6*y^2+12.0*y;

[Maple Math]

> Lx:=diff(L,x);

[Maple Math]

> Ly:=diff(L,y);

[Maple Math]

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

[Maple Math]

>

> eval(26*x-3*x^2+5*x*y-6*y^2+12.0*y,{y = 25., x = 48.33333333, lambda = -46.33333333});

[Maple Math]

> eval(26*x-3*x^2+5*x*y-6*y^2+12*y,{x = 7.914893617, y = 4.297872340});

[Maple Math]

Please note that by changing the value of the constraint from 170 to 30, the objective function went from -3160 to +128.