\[\cos z=\frac{e^{\mathrm{i}z}+e^{-\mathrm{i}z}}{2},\]