Consider the function $e^{|t|} - |t| - 1, t \in \mathbb{R}$. I want to show that such function is convex. I am trying to use that $e^x - x - 1, x>0$ is convex (this follows by the test of the second derivative) but I am getting anywhere . Someone could help me?

Thanks in advance

  • 2
    $\begingroup$ Try to find some thing about composition of two convex functions. That can be use to prove the result which you need. $\endgroup$ – Bumblebee Sep 15 '16 at 18:25
  • 2
    $\begingroup$ Hint: $e^x - x - 1$ is convex and non-decreasing for $x \ge 0$, and $|x|$ is convex on $\mathbb{R}$. $\endgroup$ – dxiv Sep 15 '16 at 18:25

If $f(x)$ is a convex function on $\mathbb{R}^+$, $g(x)=f(\left|x\right|)$ is a convex function on $\mathbb{R}$, since it is the composition of two convex functions. As you noticed, the convexity of $f(x)=e^x-x-1$ on $\mathbb{R}^+$ is trivial since $$ e^x-1-x = \frac{x^2}{2}+\frac{x^3}{6}+\ldots $$ obviously has a positive second derivative on $\mathbb{R}^+$.

A small variation: since $g$ is a continuous function (as a composition of two continuous functions) in order to prove its convexity it is enough to prove its midpoint-convexity. On the other hand, $$g\left(\frac{x+y}{2}\right)=f\left(\frac{|x+y|}{2}\right)\stackrel{(1)}{\leq}f\left(\frac{|x|+|y|}{2}\right)\stackrel{(2)}{\leq} \frac{f(|x|)+f(|y|)}{2}=\frac{g(x)+g(y)}{2}$$ holds, since $(1)$ follows from the fact that $|\cdot|$ is convex on $\mathbb{R}$ and $f$ is increasing on $\mathbb{R}^+$ and $(2)$ follows from the fact that $f$ is (midpoint-)convex on $\mathbb{R}^+$.


Answer 1

Let $ f(x) = e^{x} - x - 1 $ and $g(x) = f(|x|)$

by the chain rule:

$$ g'(x) = f'(|x|) \frac{d|x|}{dx}$$

by the chain and product rules:

$$ g''(x) = f''(|x|) \left ( \frac{d|x|}{dx} \right )^2 + f'(|x|)\frac{d|x|}{dx} \frac{d^2|x|}{dx^2} $$

now $\frac{d|x|}{dx}$ is just $-1$ if $x$ is negative and $1$ if $x$ is positive, so $\frac{d^2|x|}{dx^2} = 0$ and $\left ( \frac{d|x|}{dx} \right )^2 = 1$, so

$$ g''(x) = f''(|x|) $$

so your second derivative test works for $g$ as well as $f$

Note: this reasoning breaks down at $x=0$ so you still need to check the value of $g''(0)$

Answer 2

$f$ isn't just convex, it's monotonically increasing for $x\ge0$. So mirroring it around the $y$ axis is convex.

  • $\begingroup$ Did you mean to say $f(x) = e^x - x -1$? $\endgroup$ – Alex Sep 15 '16 at 20:56
  • $\begingroup$ yes, thank you. $\endgroup$ – Larry D'Anna Sep 15 '16 at 21:22
  • $\begingroup$ +1 for Answer 2. Answer 1 is not accurate for the reason that you mentioned. $g$ has infinite curvature at $x=0$. $\endgroup$ – Alt Sep 15 '16 at 21:26
  • $\begingroup$ @Alt infinite curvature? $g$ is twice differentiable at 0. $g''(0) = 1$ $\endgroup$ – Larry D'Anna Sep 15 '16 at 21:40
  • $\begingroup$ Sorry, I meant $\frac{\partial^2|x|}{\partial^2x}$ not $g$. $\endgroup$ – Alt Sep 15 '16 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.