Is there any way to linearize $x-x^2\leq 0$?

364 Views Asked by At

I am trying to solve an optimization problem. The objective function and all constraints of this problem are linear except $x-x^2\leq 0$. Is there any way to linearize $x-x^2\leq 0$, where $x$ is a continuous variable? Note that $x$ is not in the objective function. It should be noted that the original problem is a binary linear problem, to relax this problem, I add constraint $x-x^2\leq 0$ to the problem where $0\leq x \leq 1$. Constraint $x-x^2\leq 0$ forces $x$ to $0$ or $1$, but this constraint converts problem to a non-linear problem.

1

There are 1 best solutions below

5
On

Since $x-x^2=x(1-x)\le 0,$ then $x$ and $1-x$ cannot have the same sign. Thus, one of them must be $0,$ or else they must have opposite signs. The zero case you've already determined as $x=0$ or $x=1.$ But how could they have opposite signs? Well, if $x<0,$ then $-x>0,$ so $1-x>0,$ so that works out fine. Otherwise, we need $1-x<0,$ in which case $1<x,$ and so $x>0,$ so that works out fine. Thus, the constraint can be rewritten as $$x\le 0\textrm{ or }x\ge 1.$$