Question: Help with lagrange

I'm trying to solve a lagrange multiplier problem Max

d*(1-r)

s.t.

r^z*(1-(1-r)*d)+(1-(r^z))*(1-d)=x

solving for r and d where 0<=d,r,=<1.    z and x are constants.

I have the problem set up in Maple as

> f:=d*(1-r);

> q:=r^z*(1-(1-r)*d)+(1-(r^z))*(1-d)-x;

> g:=f+mu*q;

eq1:=diff(g,mu);

> eq2:=diff(g,d);

> eq3:=diff(g,r);

solve({eq1=0,eq2=0,eq3=0},{d,r,mu});

 

Maple retuns an unbelievable hard to interpret solution.I believe I have the problem set up correctly, although I wonder if maple would solve it in a simpler form if I added the constriant that 0<=d,r=<1.  I have tried to do this with solve({equations},{variables},{d=0..1,r=0..1}), but maple returns an error   "(in solve) invalid arguments"  .  Any thoughts.  thanks for your help.

 



 

 






 



 

Please Wait...