1

How to prove that $x \mapsto \log(1+e^{-x})$ is a convex function?

I have tried with the basic definition of convex function, i.e., $f(ax+by) \leq af(x)+bf(y)$, but was not able to solve further.

tourism
  • 137

3 Answers3

5

Hint: it is a fact that if a function is twice differentiable and has positive second derivative everywhere, then it is convex.

Ivo Terek
  • 77,665
  • 1
    can i prove it with the basic definition of convex function ? – tourism Feb 04 '15 at 18:24
  • I don't think it will be easy.. You have to check that $$\log(1+e^{-(tx+(1-t)y)})\leq t \log(1-e^{-x})+(1-t)\log(1+e^{-y}).$$ Maybe trying to reverse engineering it gets you something. – Ivo Terek Feb 04 '15 at 18:26
  • I have tried it by first expanding log(1+x) series and then to simplify I have taken the log of both sides... but it's giving me 0=0. – tourism Feb 04 '15 at 18:31
  • It is not an equivalence, since a convex function is continuous for sure but not necessarily twice differentiable. Consider, for instance, $f(x)=|x|$ or $f(x)=|x|^3$. – Jack D'Aurizio Feb 04 '15 at 18:39
  • Oh, I see. Thanks for pointing. I have rephrased it. – Ivo Terek Feb 04 '15 at 18:42
0

$$\frac{d}{dx}\log(1+e^{-x}) = \frac{-e^{-x}}{1+e^{-x}} = -\frac{1}{e^x+1} $$ is an increasing function, since $e^x$ is an increasing function.

This gives that $\log(1+e^{-x})$ is a convex function.

Jack D'Aurizio
  • 353,855
0

$\def\me{{\rm e}}$Actually, it is a strictly convex function, since its second derivative $f''(x)=\me^x/(1+\me^x)^2$, is positive everywhere.

If you want to prove its strict convexity by the definition, you need to play with the mean value theorem several times, following the same routine to prove that positivity of the second derivative is sufficient (but not necessary) for strict convexity.

Eli4ph
  • 482