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

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

$$ \sin x=\frac{e^{ix}-e^{-ix}}{2i} $$