$e^{|t|} - |t| -1 , t \in \mathbb{R}$ is convex 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
 A: 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.
A: 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}^+$.
