7.4 Optimization with inequality constraints: nonnegativity conditions
This problem is a special case of the general maximization problem with inequality constraints, studied previously: the nonnegativity constraint on each variable is simply an additional inequality constraint. Specifically, if we define the function g_{m+i} for i = 1, ..., n by g_{m+i}(x) = −x_{i} and let c_{m+i} = 0 for i = 1, ..., n, then we may write the problem as
L_{i}'(x)  = 0 for i = 1 ,..., n 
λ_{j} ≥ 0, g_{j}(x) ≤ c_{j} and λ_{j}[g_{j}(x) − c_{j}]  = 0 for j = 1, ..., m + n, 
j=1λ_{j}(g_{j}(x) − c_{j}).
Approaching the problem in this way involves working with n + m Lagrange multipliers, which can be difficult if n is large. It turns out that the simple form of the inequality constraints associated with the nonnegativity conditions allows us to simplify the calculations as follows.
First, we form the modified Lagrangean
j=1λ_{j}(g_{j}(x) − c_{j}).
M_{i}'(x) ≤ 0, x_{i} ≥ 0, and x_{i}·M_{i}'(x)  =  0 for i = 1, ..., n 
g_{j}(x) ≤ c_{j}, λ_{j} ≥ 0, and λ_{j}·[g_{j}(x) − c_{j}]  =  0 for j = 1, ..., m. 
This result means that in any problem for which the original KuhnTucker conditions may be used, we may alternatively use the conditions for the modified Lagrangean. For most problems in which the variables are constrained to be nonnegative, the KuhnTucker conditions for the modified Lagrangean are easier to work with than the conditions for the original Lagrangean.
 Example

Consider the problem
max_{x,y} xy subject to x + y ≤ 6, x ≥ 0, and y ≥ 0
studied in the previous section. The modified Lagrangean is
M(x, y) = xy − λ(x + y − 6)and the KuhnTucker conditions for this Lagrangean are
y − λ ≤ 0, x ≥ 0, and x(y − λ) = 0 x − λ ≤ 0, y ≥ 0, and y(x − λ) = 0 λ ≥ 0, x + y ≤ 6, λ(x + y − 6) = 0. We can find a solution of these conditions as follows.
 If x > 0 then from the first set of conditions we have y = λ. If y = 0 in this case then λ = 0, so that the second set of conditions implies x ≤ 0, contradicting x > 0. Hence y > 0, and thus x = λ, so that x = y = λ = 3.
 If x = 0 then if y > 0 we have λ = 0 from the second set of conditions, so that the first condition contradicts y > 0. Thus y = 0 and hence λ = 0 from the third set of conditions.
We conclude (as before) that there are two solutions of the KuhnTucker conditions, in this case (x, y, λ) = (3, 3, 3) and (0, 0, 0). Since the value of the objective function at (3, 3) is greater than the value of the objective function at (0, 0), the solution of the problem is (3, 3).