I would first note that the problem you are posing can be reduced to a two-variable one by substituting in your inequality constraint, to eliminate z
. I note that your constraint g
implies x + y < 1
.
Minimize[{f[x, y, 1 - x - y], x + y < 1, m1 > 0, m2 > 0, m3 > 0,
x > 0, y > 0}, {x, y}]
I then tried solving the unconstrained problem by differentiating the value function to get the first-order conditions and Solve
ing for them:
Solve[{D[f[x, y, 1 - x - y], x] == 0,
D[f[x, y, 1 - x - y], y] == 0}, {x, y}]
This yields an empty set {}
.
Traditionally, when solving the Lagrangian, you include the constraint in the equations to be solved, like this:
Solve[{D[f[x, y, 1 - x - y] + lambda (1 - x - y), x] == 0,
D[f[x, y, 1 - x - y] + lambda (1 - x - y), y] == 0}, {x, y}]
This gives a (complicated) answer almost immediately. I would note that setting lambda (the Lagrangian multiplier) to zero in the solution generates a division by zero, confirming that lambda is non-zero and the required constraint g
is an equality.
g
, why don't you simplify the problem to a two-variable one,Minimize[{f[x, y, 1 - x - y], x + y < 1, m1 > 0, m2 > 0, m3 > 0, x > 0, y > 0}, {x, y}]
, and furthermore solve for the first-order conditions instead of using brute-force minimisation? $\endgroup$ms
are different :) $\endgroup$