Question: Analytical optimization

Dear Mapleprimes,


I am trying to solve an Optimization problem analytically. I set up a lagrangian as follows:


L:= Objective function + mu_1 (constraint 1) + mu_2 (constraint 2)


I maximise with respect to two variables, call them x1 and x2


I want constraint one to bind but not constraint 2. Hence, I set mu_2=0. The I do:


diff(L,x1); diff(L,x2), diff(L,mu1), diff(L,mu2)


Question 1 is, why won't the following work:


solve( {diff(L,x1); diff(L,x2), diff(L,mu1), mu2=0, diff(L,mu2)>0},{x1,x2,mu1} )


it seems Maple won't accept mu2=0 in the solver.


Question 2. When I solve the following:


solve( {diff(L,x1); diff(L,x2) },{x1,mu1} )


That is I'm not yet using the constraints, then I get 2 solutions. One has mu1=0 and I don't want that. Then I'm left with two solutions that work fine. One doesn't satisfy the second constraint which I didn't want to be binding. Hence I'm left with a unique solution. But why wouldn't the easier way in Question 1 not work?


Question 3. Does Maple have an analytical Optimization package? Such as for example NLPSolve which is numerical? So I need an analytical equivalent?


Many thanks in advance.



Please Wait...