Re: Re: [Maxima] Econ 101A operations in Maxima



Hi

For example we may use share/algebra/solver package written by Eckhard. in this dir,little messy before use.

(%1) EquationP(e):=if part(e,0)= "=" then true else false$
(%2)  load("misc.mac")$
(%3) load("solver.mac")$ 
this is same problem as your's.
(%5) cost:w*L+r*K$
(%6)  constraint:x-K^alpha*L^beta$
(%7) mincost:cost+lambda*constraint$ 
//lambda is lagurange multiplier
(%8)  FOC1:diff(mincost,K)$
(%9)  FOC2:diff(mincost,L)$
(%10) FOC3:diff(mincost,lambda)$
(%11) solver([FOC1=0,FOC2=0,FOC3=0],[lambda,K,L],[ALPHA,BETA,r,w,x]);
(o11)  [[K = ALPHA*w*(BETA^ALPHA*r^ALPHA*x/(ALPHA^ALPHA*w^ALPHA))^(1/(BETA+ALPHA))/(BETA*r),
        L = (BETA^ALPHA*r^ALPHA*x/(ALPHA^ALPHA*w^ALPHA))^(1/(BETA+ALPHA)),
        LAMBDA = BETA^(ALPHA-1)*r^ALPHA*w^(1-ALPHA)
*(BETA^ALPHA*r^ALPHA*x/(ALPHA^ALPHA*w^ALPHA))^(-BETA/(BETA+ALPHA)-ALPHA/(BETA+ALPHA)
+1/(BETA+ALPHA))/ALPHA^ALPHA]]

solver([equation list],[main var list],[parameter list])
Similarly your problem must be solved,I think.
good luck !
gosei furuya

> Hi list,
> 
> Perhaps everyone (especially Dr. Fateman, whose prompt reply I very
> much appreciate) will forgive me if I ask for a more elementary
> answer.
> 
> Here is a rather simple example:
> 
> Optimize:  u(x,y):= (x^a) * (y^(1-a));
> Subject to:  c(x,y) := px * x + py * y, where c(x,y) =I.   ( I for income)
> 
> Could someone explain how to get from the above two definitions to a
> description of the optimums in terms of px and py (see below),
> including any load statements and the exact call to an optimization
> routine.  An example result:
> 
> xopt(px, py) := a  * px * I; (or whatever it is for the Cobb Douglas
> utility function)
> 
> Thx
> W
> 
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>