0

Consider the function $f: \mathbb{R}^{+n} \rightarrow \mathbb{R}$ defined by

\begin{align*} f(x) = \frac{\displaystyle\sum_{i=1}^n a_i\exp(c x_i)}{\displaystyle\sum_{i=1}^n b_i\exp(c x_i)}, \end{align*}

where $c, x_i \geq 0$ and $0 < a_i \leq b_i$. Is this function convex?


For the case of $n = 1$ this is true because $f(x)$ is just a constant. For $n>1$ it seems the Hessian might be difficult to compute. I plotted a few examples for $n = 2$ and they seem to be convex.

KRL
  • 1,170

2 Answers2

1

Set $c=1$ for simplicity (this just amounts to scaling the variables). When $n=2$, the eigenvalues of the Hessian are $0$ and $$ \frac{2 e^{x_1+x_2} (a_2 b_1-a_1 b_2) \left(b_1 e^{x_1}-b_2 e^{x_2}\right)}{\left(b_1 e^{x_1}+b_2 e^{x_2}\right)^3}. $$ There doesn't seem to be any reason that this quantity should always be nonnegative.

Greg Martin
  • 78,820
1

No it's not. Try $n=2$ with

$$ f(x_1,x_2) = \frac{e^{x_1} + 2 e^{x_2}}{2 e^{x_1} + 2 e^{x_2}}$$

Note for constant $x_1$ this starts off $< 1$ and increases to $1$ in the limit $x_2 \to +\infty$. Such a function can't be convex.

Robert Israel
  • 448,999