Deriving formulas for complex trigonometric functions $\sin(z)$ and $\cos(z)$ I think it is simpler if I just focus on the derivation of $\cos(z)=\frac{e^{iz}+e^{-iz}}{2}$.

I start from the formulae for the complex exponential, assuming $z=x+iy$: $e^{iz}=e^{-y}*(\cos(x)+i\sin(x))$ and $e^{-iz}=e^{y}*(\cos(x)-i\sin(x))$.

And here I start running into problems, I can simply not reproduce the given formula! The furthest I obtain is $$e^{iz}+e^{iz}=(e^{-y}+e^{y})*\cos(x)+i(e^{y}-e^{-y})*\sin(x)$$ and an equivalent formula for the difference. 

Please help.
The Taylor series expansions for $e^z$, $\sin{(z)}$ and $\cos{(z)}$ which are valid for all $z\in\mathbb{C}$ are supplied below
$$e^z=1+\frac{z}{1!}+\frac{z^2}{2!}+\dots=\sum_{k=0}^\infty \frac{z^k}{k!}$$
$$\sin{(z)}=\frac{z}{1!}-\frac{z^3}{3!}+\frac{z^5}{5!}-\dots=\sum_{k=0}^\infty \frac{(-1)^kz^{2k+1}}{(2k+1)!}$$
$$\cos{(z)}=1-\frac{z^2}{2!}+\frac{z^4}{4!}-\dots=\sum_{k=0}^\infty \frac{(-1)^kz^{2k}}{(2k)!}$$
If we look at the sum
$$\begin{align}
\cos{(z)}+i\sin{(z)}
&amp;=\sum_{k=0}^\infty \frac{(-1)^kz^{2k}}{(2k)!}+i\sum_{k=0}^\infty \frac{(-1)^kz^{2k+1}}{(2k+1)!}\\
&amp;=\sum_{k=0}^\infty (-1)^k\left(\frac{z^{2k}}{(2k)!}+\frac{i\cdot z^{2k+1}}{(2k+1)!}\right)\\
\end{align}$$
it is in fact equal to
$$\begin{align}
e^{iz}
&amp;=\sum_{k=0}^\infty \frac{(iz)^k}{k!}\\
&amp;=\sum_{k=0}^\infty \frac{(iz)^{2k}}{(2k)!}+\frac{(iz)^{2k+1}}{(2k+1)!}\\
&amp;=\sum_{k=0}^\infty \frac{(-z^2)^{k}}{(2k)!}+\frac{(-z^2)^k(iz)}{(2k+1)!}\\
&amp;=\sum_{k=0}^\infty (-1)^k\left(\frac{z^{2k}}{(2k)!}+\frac{z^{2k}(iz)}{(2k+1)!}\right)\\
&amp;=\sum_{k=0}^\infty (-1)^k\left(\frac{z^{2k}}{(2k)!}+\frac{i\cdot z^{2k+1}}{(2k+1)!}\right)\\
\end{align}$$
for all $z\in\mathbb{C}$. So we can write that
$$e^{iz}=\cos{(z)}+i\sin{(z)}$$
for all $z\in\mathbb{C}$. Using this gives
$$e^{i(-z)}=e^{-iz}=\cos{(-z)}+i\sin{(-z)}=\cos{(z)}-i\sin{(z)}$$
A proof that
$$\sin{(-z)}=-\sin{(z)}$$
$$\cos{(-z)}=\cos{(z)}$$
for all $z\in\mathbb{C}$ comes from looking at the series expansions of $\sin{(-z)}$ and $\cos{(-z)}$ while using the facts that
$$(-z)^{2k}=z^{2k}$$
$$(-z)^{2k+1}=-z^{2k+1}$$
for all $z\in\mathbb{C}$. Finally we have
$$e^{iz}-e^{-iz}=\cos{(z)}+i\sin{(z)}-(\cos{(z)}-i\sin{(z)})=2i\sin{(z)}$$
$$\therefore \sin{(z)}=\frac{e^{iz}-e^{-iz}}{2i}$$
$$e^{iz}+e^{-iz}=\cos{(z)}+i\sin{(z)}+\cos{(z)}-i\sin{(z)}=2\cos{(z)}$$
$$\therefore \cos{(z)}=\frac{e^{iz}+e^{-iz}}{2}$$
with the above identities holding for all $z\in\mathbb{C}$.
Consider $e^{ix}$ and $e^{-ix}$ remember that sine is an odd function and cosine is an even function:

$$e^{ix}=\cos(x)+i\sin(x)$$
$$e^{-ix}=\cos(-x)+i\sin(-x)=\cos(x)-i\sin(x)$$

Sum both sides:

$$e^{ix}+e^{-ix}=2\cos(x)$$

:)