Express -log(sum of the squared exponential) in cvx

Nonconvex
Sep 11, 2022
R

Hi, I want to express -log(exp(-x.^2)+exp(-2*x.^2)). But I cannot find a way that CVX accepts it. Can anyone help?

M

log-convex can be added, so log(exp(x^2) + exp(2*x^2)) is allowed.
log-concave can’t be added, so log(exp(-x^2) + exp(-2*x^2)) is not allowed.

Read the answer by mcg at Log of sigmoid function to learn the CVX rules for log-convex and log-concave. This material is not really addressed in the CVX Users’ Guide.

R
Replying to #2

Thanks so much for your reply. But I think **-**log(exp(-x.^2)+exp(-2*x.^2)) is convex at least for x\in [-20, 20].

M

You think? Or you’ve proved?

R
Replying to #4

I plot it with MATLAB.

M

Did you read the link in my previous post? That is not a proof.