Log{convex} log(1+1/(1+x))

Uncategorized
Dec 20, 2017
K

log(1+1/(1+x)) is a convex function over a<=x<=b, a,b>0, so how can i implement it in cvx?

M

Just because it’s convex doesn’t mean CVX can implement it. It does not claim to be able to handy any and all convex problems. Please read the FAQ.

M
Replying to #1

You may be able to use a polynomial approximation; please see the function reference for the use of polyval.

K
Replying to #3

Thank you for quick reply. I also find on the forum a way to do this

M
Replying to #4

Hey that’s a good find! Share here if you find a solution to your particular case.

It’s actually very useful to understand that you really never need to know how to “implement” a function f(x). Rather, you need a way to implement the inequality f(x) \leq y (or, f(x) \geq y if f is concave). Any set of equations that returns the same subset on (x,y) is a valid implementation of f(x) \leq y. That’s what the user is doing in that post.

Z

Consisder another variable y satisfying 1/y=1+1/x. Then, we can minimize the convex objective function -log(y) s.t.a/(a+1) <=y<=b/(1+b)

A

log(1+1/(1+x))=rel_entr(x+1,x+2)+rel_entr(x+2,x+1)