Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How do you enforce positivity constraints in non-linear optimization (e.g. a constraint $x > 0$)? I remember there being a good reason for why most models use non-negativity constraints.

share|improve this question
How about the KKT conditions? en.wikipedia.org/wiki/… –  matt Jan 18 '12 at 11:43
@matt:They handle non-negative and equality constraints. –  Jacob Jan 18 '12 at 12:03
:You could use "Log Barrier methods". I will post an answer with more detail. –  matt Jan 19 '12 at 10:12

1 Answer 1

up vote 2 down vote accepted

Consider the following: $$\begin{array}{rll} \min_x& f(x)&\\ \text{subject to}& g_i(x)\leq0 &\text{for each }i\\ & h_i(x)=0 &\text{for each }j \\ \end{array}$$

For $\alpha>0$ we define the log barrier penalty function, $P_\alpha$, to be:

$$ P_\alpha(x)=f(x)-\frac1\alpha\sum_i\log(-g(_i(x))+\alpha\sum_jh_j(x)^2 $$

where $x$ must be strictly feasible, i.e. $g_i(x)<0$ for each $i$, in order for the log term to be defined.

We seek to minimise $P_\alpha(x)$. The idea is that the boundary of the feasible region (i.e $g_i(x)=0$) acts a a barrier for $x$ close to $0$.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.