Skip to content

Disciplined convex programming representation of $x\sqrt{1-x}$

An answer to this question on the Operations Research Stack Exchange.

Question

Anyone have an idea for a disciplined convex programming (DCP) representation of the concave function $x\sqrt{1-x}$, which is defined over the domain $[0,1]$?

The Taylor series about $x=0$ is $$x - \frac{x^2}{2} - \frac{x^3}{8} - \frac{x^4}{16} + O(x^5),$$ which is DCP. However, I'm trying to find a DCP representation for the function itself, preferably.

Answer

I don't think you can represent this as a concave function in the (cvxpy-)DCP sense:

import cvxpy as cp
x=cp.Variable()
a=x*cp.sqrt(1-x)
a.curvature

'UNKNOWN'

However, you can represent it using DQCP (disciplined quasiconvex programming):

import cvxpy as cp
x=cp.Variable(pos=True)
a=x*cp.sqrt(1-x)
a.curvature

'QUASICONCAVE'