$|\cos(z)|\leq e^{|z|}$ Problem is proving inequality for all $z \in \mathbb{C}$
$$|\cos(z)|\leq e^{|z|}$$
My attempt:

We know $$|\cos(z)|=|\frac{e^{iz}+e^{-iz}}{2}|\leq |\frac{e^{iz}}{2}|+ |\frac{e^{-iz}}{2}|$$
$$|e^{iz}|=|e^{i(x+iy)}|=|e^{(xi-y)}|=|\frac{e^{xi}}{e^y}|=\frac{1}{e^y}.$$
By analog claim we can conclude $|e^{-iz}|=e^y.$
So we can $$|\cos(z)|< |\frac{1}{2}[\frac{1}{e^y}| + |e^y|]$$
$$\frac{1}{2}[\frac{1}{e^y}| + |e^y|] \leq e^{\sqrt{x^2+y^2}}$$
But if I put $x=0$. I have problem with this inequality.
 A: Note that\begin{align}(\forall z\in\mathbb C):\bigl\lvert\cos(z)\bigr\rvert&=\left\lvert1-\frac{z^2}{2!}+\frac{z^4}{4!}-\frac{z^6}{6!}+\cdots\right\rvert\\&\leqslant1+\frac{\lvert z\rvert^2}{2!}+\frac{\lvert z\rvert^4}{4!}+\frac{\lvert z\rvert^6}{6!}+\cdots\\&\leqslant1+\lvert z\rvert+\frac{\lvert z\rvert^2}{2!}+\frac{\lvert z\rvert^3}{3!}+\frac{\lvert z\rvert^4}{4}+\cdots\\&=e^{\lvert z\rvert}.\end{align}
A: For any $z = x + iy\in \mathbb{C}$, we have
$$
|e^{z}| = |e^{x+iy}| = e^{x} \leq e^{\sqrt{x^{2} + y^{2}}} = e^{|z|}
$$
so
$$
|\cos(z)| \leq \frac{1}{2} e^{|iz|} + \frac{1}{2} e^{|-iz|} = e^{|z|}.
$$
A: Your attempt 

$$ |\cos(z)|< |\frac{1}{2}[\frac{1}{e^y}| + |e^y|] $$ 

is not completely right: It should be $\le$ instead of $<$, that solves your problem with $x=0$. Also note that taking absolute values is not necessary since all values on the right are non-negative. So we have
$$
|\cos(z)| \le \frac{1}{2} \left(e^{-y} + e^y\right)
$$
and then you can continue using the monotonicity of the (real) exponential function:
$$
 \frac{1}{2} \left(e^{-y} + e^y\right) \le \frac{1}{2} \left(e^{|y|} + e^{|y|}\right) = e^{|y|} \le e^{|z|}
$$
