# Show that $e^{f(x)}$ is convex.

Let $f:(0,\infty) \to \mathbb{R}$ be a convex function. Prove that $e^{f(x)}$ is a convex function on $(0,\infty)$.

My original idea was to try and show that the second derivative is positive, but this will not work since $f(x)$ need not be differentiable. Here's my second attempt:

By definition, since $f$ is convex, we have that $f(\lambda x+(1-\lambda)y)\leq\lambda f(x)+(1-\lambda)f(y)$ for any $\lambda \in (0,1)$ and $x,y \in (0,\infty)$. Then, by applying the exponential to both sides we have that $e^{f(\lambda x+(1-\lambda)y))}\leq e^{\lambda f(x)+(1-\lambda)f(y)}$ . Applying rules of exponents, $e^{f(\lambda x+(1-\lambda)y))} \leq e^{\lambda f(x)}e^{(1-\lambda)f(y)}$. From here, I want to bring the $\lambda$ and $1-\lambda$ terms down in front of the exponential, but I am stuck as to how to do this.

• More generally, if $g$ is a convex non-decreasing function, and $f$ is a convex function on a convex domain, then $g(f)$ is convex on the domain of $f$. This can be adapted to your specific problem, see math.stackexchange.com/questions/287716/… – David Apr 20 '17 at 19:49
• Is there a way for me to do this without showing the more general fact that the composition of two convex functions is convex? I would like to avoid proving this and proving the fact that $e^x$ is convex. It seems like it would be less work to continue with the proof I started in the question. – mathqueen459 Apr 20 '17 at 19:56
• @britgirl5: you have to exploit the convexity of $e^x$ at some point, so I do not see why you should avoid the one-line proof already provided. – Jack D'Aurizio Apr 20 '17 at 19:57
• If $f$ is non-decreasing and convex, and if $g$ is convex, then $gof$ is convex. See the second answer here for a proof. – Mark Viola Apr 20 '17 at 20:12

## 3 Answers

\begin{align} f(\lambda x + (1-\lambda)y) & \le \lambda f(x) + (1-\lambda) f(y) & & \text{because $f$ is convex.} \\[10pt] \text{Therefore } e^{f(\lambda x+(1-\lambda)y))} & \leq e^{\lambda f(x) + (1-\lambda) f(y)} & & \text{because $w\mapsto e^w$ is increasing,} \\[10pt] & = e^{\lambda v + (1-\lambda) w} \\[10pt] & \le \lambda e^v + (1-\lambda)e^w & & \text{because $w\mapsto e^w$ is convex, since} \\ & & & \text{its second derivative is positive,} \\[10pt] & = \lambda e^{f(x)} + (1-\lambda)e^{f(y)}. \end{align}

"From here, I want to bring the $\lambda$ and $1−λ$ terms down in front of the exponential, but I am stuck as to how to do this."

If you wish to continue from where you stuck: denoting $e^{f(x)}=A$, $e^{f(y)}=B$, you have to prove that $$A^\lambda B^{1-\lambda}\le\lambda A+(1-\lambda)B.$$ Taking the logarithm on the both sides, it is equivalent to $$\lambda\ln A+(1-\lambda)\ln B\le\ln(\lambda A+(1-\lambda)B)$$ which is the same as the definition of the logarithm being a concave function.

• And how does one show that the logarithm is concave without exploiting its smoothness? – Mark Viola Apr 20 '17 at 20:17
• @Dr.MV If one does not want to use calculus, one may try AM-GM inequality as it explained here, but it is easier with calculus, of course. – A.Γ. Apr 20 '17 at 20:28
• Yes, calculus makes it much easier. It just seemed that the OP might have wanted to see somewhere a more elementary, pre-calculus approach. – Mark Viola Apr 20 '17 at 20:33

Actually, there is a proof more in the spirit of convex analysis. Remember that we call a function convex iff its epigraph (i.e. the set of points lying on or above its graph) is convex. The intersection of any family of convex sets is convex, that's why the supremum of any family of convex functions is convex.
For the proof, we need only the elementary inequality $e^z\ge 1+z$ for all real $z$. Then, we have $$e^x=e^{x-y}e^y\ge e^y\,[1+(x-y)]=x\,e^y+(1-y)\,e^y,$$ and there's equality for $y=x$. Thus, $$e^x=\sup_{y\in\mathbb{R}}\,\left[x\,e^y+(1-y)\,e^y\right].$$ Substituting $f(x)$ instead of $x$, we have $$e^{f(x)}=\sup_{y\in\mathbb{R}}\,\left[f(x)\,e^y+(1-y)\,e^y\right],$$ and the RHS is a supremum of convex functions, since the coefficient $e^y$ of $f(x)$ is always positive.