Disciplined convex programming error: Cannot perform the operation {convex}*{convex}

Uncategorized
Dec 20, 2024
S

Hi all,
I am having quite some trouble to implement the function. And the function I have proven is convex. Below is a minimum example of where I am at now. Note that a,b and c is strictly positive.

The error I get is “Cannot perform the operation {convex}*{convex}”.
Any suggestions on how to improve the code are welcome as well.

Thanks,

E

Please show us your proof that the objective function is concave. Unless that is the case you cannot use cvx.

S

Sorry, there is a mistake in my code.The objective function is convex. So the maximize is wrong.Below is the correct one.

S

We know that if the function is twice differentiable and the Hessian is positive semidefinite in the entire domain, then the function is convex. Below is the prove:

E

So now you changed the problem. Please show that

a*b <= 15
a,b>=0

is a convex constraint i.e. f(a,b) is convex function.

Btw the

geometric mean(t,a,b,b) >= 1

implies

t >= 1/(a*b^2)

So now you can easily handle the objective using the geometric mean function in cvx.

S
Replying to #5

Thanks for your help !! And I’m so sorry. I can’t run the code if there is no constraint before. So i casually add the constraint behind. And didn’t realize the constraint is not convex.
What if this kind of function f(a,b) = a^-1*b^2 (the domain of a,b : a>0,b>0) show up in the constraint. Ex: f(a,b) <= {such a complicated concave function} How to deal with in this situation.

E
Replying to #6

It is for you to figure out which convex problem that make sense for you to solve.

S
Replying to #7

Fully grateful for your reply!!!