1

Suppose there is a function $f (a,b) = \log \Big(e^{a - b} + e^{-a + b} \Big)$, we know that log-sum-exp is convex (related link), and I want to show whether $f(a,b)$ is also convex.

My answer (probability not correct) is that $f(a,b)$ is a convex function because $a-b$ and $-a+b$ are both affine, and they are composed in the convex log-sum-exp function, so $f(a,b)$ is also convex. Is my answer correct? If not, how to show whether $f(a,b)$ is convex or not?

Glorfindel
  • 3,955
JYY
  • 169

3 Answers3

1

The answer in general is no. Composition preserves convexity only if the inner function (in your case $g(a,b) = a-b$) is convex and non-decreasing. $g(a,b) = a-b$ is affine, but it's not non-decreasing. This means you can't use the composition argument to prove convexity, but the function might still be convex.

Since this is a relatively simply 2-D function, you can plot it to "see" if it's convex or not. If it "looks" convex, you can try proving convexity using the Hessian test, which will be a 2x2 matrix. This test will also allow you to show it's not convex (in case the Hessian is not PSD).

iarbel84
  • 1,513
1

Hint : $a-b=x=-(-x)=-(b-a)$ In fact it's a single variable problem.

Hope it helps !

0

The function is indeed convex. More generally, the function $$ f(x) := \log\Big( \sum_{i=1}^n e^{l_i(x)}\Big) $$ where each $l_i(x)$ is an affine function is a convex function since each summand $e^{l_i(x)}$ in $\log$ is a log-convex function (even log-linear) and a sum of log-convex functions is also log-convex.

Levent
  • 4,804