# How to prove that $e^x$ is convex? [closed]

I need a help with proving convexity of $e^x$ function. $f(x)$ is a convex function, If it satisfies following condition.

$$f(c\cdot x_1+(1-c)\cdot x_2) ≤ c\cdot f(x_1)+(1-c)\cdot f(x_2), \quad 0 ≤ c ≤ 1$$

• The second derivative of $e^x$ is $e^x$ which is greater than $0$ for all $x$ Mar 6, 2014 at 21:27
• Or just the first derivative which is increasing.
– user119228
Mar 6, 2014 at 21:29
• Can this be proved just by using definitions and not using second derivatives Sep 25, 2017 at 13:42

A continuously differentiable function $\mathrm{f}$ is convex on an interval $I$ if, and only if $$\mathrm{f}(x) \ge \mathrm{f}(y)+\mathrm{f}'(y)\cdot(x-y)$$ for all $x,y \in I$. In your case $\mathrm{f}(x) = \mathrm{e}^x$ and $I = \mathbb{R}$. Hence, we need to show that $$\mathrm{e}^x \ge \mathrm{e}^y + \mathrm{e}^y \cdot(x-y)$$ for all $x,y\in \mathbb{R}$. This inequality can be rearranged to give $$\mathrm{e}^{x-y} \ge 1+x-y$$ This is equivalent to $\mathrm{e}^z \ge 1+z$ for all $z \in \mathbb{R}$. Since $\mathrm{e}^z > 0$ for all $z \in \mathbb{R}$ it is clear that $\mathrm{e}^z \ge 1+z$ for all $z \le -1$. It remains to prove that $\mathrm{e}^z \ge 1+z$ for all $z \ge -1$.

The Taylor Series of $\mathrm{e}^z$ is $$\mathrm{e}^z = 1+z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots$$

If $z > 0$ then all of the terms $\frac{z^k}{k!}$ are positive and hence $$\mathrm{e}^z = 1+z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots \ge 1 + z$$

If $-1 \le z \le 0$ then $z^2+z^3 \ge 0$, $z^4 + z^5 \ge 0$ and, in fact, $z^{2k}+z^{2k+1} \ge 0$ for all positive integers $k$. It follows that $\frac{z^2}{2!}+\frac{z^3}{3!} \ge 0$, $\frac{z^4}{4!}+\frac{z^5}{5!} \ge 0$ and, in fact, $$\frac{z^{2k}}{(2k)!} + \frac{z^{2k+1}}{(2k+1)!} \ge 0$$ Since the Taylor Series for $\mathrm{e}^z$ is absolutely convergent for all $-1 \le z \le 0$ (the exponential function converges on the entire complex plane, and power series converge absolutely within their radius of convergence) it follows that $$\mathrm{e}^z = 1+z + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots \ge 1+z$$ for all $-1 \le z \le 0$.

• Well done, although I would be a little more careful in the region $[-1,0]$. Mar 6, 2014 at 21:40
• @Arkamis You're right. I'm just trying to edit that now. Mar 6, 2014 at 21:42
• @Arkamis I think I've fixed it. Do you agree? Mar 6, 2014 at 22:17
• That's great and actually does not rely on derivative arguments: A function $f$ is convex if for every $x$ there exists $c$ such that for all $y$ it holds $f(y) \geq f(x) + c(y-x)$. You showed that $c=e^x$ works. This does not only show that $f$ is convex but also that $e^x$ is a subgradient of $\exp$ at $x$.)
– Dirk
Jul 20, 2015 at 8:08
• @Dirk Thank you for your kind words :-) Jul 22, 2015 at 22:40

The second derivative describes where a function is concave or convex. $(e^x)'' > 0$ for all $x$ so $e^x$ is convex everywhere.

A function of real variable is convex on an interval if it has nonnegative second derivative on this interval. This is a simplification of the Hessian condition for convexity to the case $\mathbb{R}\rightarrow \mathbb{R}$. The second derivative of $e^{x}$ is $e^{x}$, and this is of course nonnegative on the entire real line.