Upper bound for $e^x$

How do I prove that $$e^x \leq x + e^{x^2}$$ for all $x\in\mathbb R$?

My probability book (Grimmett and Stirzaker) says that it's a simple exercise but I don't see it. For $x\leq 0$, we have $$e^x = \sum_{k=0}^\infty \frac{x^{2k}}{(2k)!} + x + \sum_{k=1}^\infty \frac{x^{2k+1}}{(2k+1)!} \leq \sum_{k=0}^\infty \frac{x^{2k}}{k!} + x = e^{x^2} + x.$$ How do I show it for $x>0$?


Solution 1:

How about this:

For $x\geq 0$, we have $$ x e^{-x}+e^{x^2-x}\geq x(1-x)+1+x^2-x=1$$ where we used the inequality $e^{u} \geq 1+u$ for all $u$. Multiplying on both sides by $e^x$, we find $$x+e^{x^2}\geq e^x$$ For $x<0$, note that $e^{x^2}\geq 1+x^2$, then $$ x+e^{x^2}\geq1+x+x^2=3/4+(x+1/2)^2>0 $$ Consequently, we also have $$ \left(x+e^{x^2}\right)e^{-x}\geq(x+1+x^2)(1-x)=1-x^3, $$ which implies that $$ x+e^{x^2}\geq(1-x^3)e^x>e^x $$

Solution 2:

The function $$f(x):=e^{x^2}-e^x$$ has $f(0)=0$, $f'(0)=-1$ and $$f''(x)=(4x^2+2)e^{x^2}-e^x\ .$$ Obviously $f''(x)>0$ when $x\leq0$ or $x\geq1$. For $0\leq x\leq1$ note that $$4x^2+2=\left(2x-{1\over2}\right)^2+{7\over4}+2x>1+(e-1)x\geq e^x\ ,$$ since $e-1<2$ and $\exp$ is convex. It follows that $f$ is convex, and this implies that the line $y=-x$ supports the graph of $f$ at $(0,0)$, i.e. $$-x\leq e^{x^2}-e^x\qquad(-\infty<x<\infty)\ .$$