# Convex optimization with non-convex objective function

Consider the following optimization problem: $$\min_x \quad x^3 \quad \text{s.t.} \quad x\geq0$$

We know that the objective function $x^3$ is not a convex function for $x\in\Re$. But we know that it is convex for $x\in\Re^+$

So my question is:

Can we define the above problem, a convex optimization problem?

To make it general:

Is it necessary for the objective function to be convex over its domain? or is it sufficient for the objective function to be convex only over the feasible set, in order to classify the problem as a convex optimization problem?

I have searched a lot for this question and everywhere,both on the textbooks and internet, the answer is that the objective function "MUST" be convex. But I think that we can consider these problems as convex.

• The problem is certainly convex as you can redefine the objective to by $+\infty$ when $x$ is not in the feasible set. However, some algorithms may require the objective to be convex everywhere. – copper.hat Nov 20 '16 at 8:24
• @copper.hat in this instance I'd prefer rewriting that objective as $\max\{x,0\}^3$, so you get monotonicity as well as convexity. – Michael Grant Nov 25 '16 at 19:59
• @MichaelGrant: Yes, that would be a better approach here. – copper.hat Nov 26 '16 at 2:31

Few optimization algorithms only require the objective/constraint functions to be convex merely over the feasible set. Feasible interior point solvers (IPMs) are a good example. Most solvers however (like infeasible IPMs and SQPs), which btw are more efficient than feasible IPMs since they do not require a feasible starting point and can take longer Newton steps, require your functions to be convex everywhere (and finite valued, so "tricking" the solver by taking the value $+\infty$ outside the feasible region does not help).
However, most solvers satisfy box constraints (like $x\geq 0$) in all iterations, so the problem you pose will be solved by most convex optimization solvers.
• Thanks for your help. But I just used that example to demonstrate what I mean. My real question is about the general case, e.g. when the other constraints like $g(x) \leq 0$ limit the feasible set to an area in which the objective function is convex. What happens if I use one of the "infeasible solvers" to solve such problems? – Mohammadreza Barazesh Nov 20 '16 at 12:23