# Relationship between e, sin and cos

## Converting from e to sin/cos

It is often useful when doing signal processing to understand the relationship between e, sin and cos. Sometimes difficult calculations involving even or odd functions of ${\displaystyle e}$ can be greatly simplified by using the relationship to simplify things. The relationship is as follows:

${\displaystyle e^{j\theta }=cos(\theta )+j*sin(\theta ).}$

## Converting from sin/cos to e

The reverse conversion is also often helpful:

${\displaystyle cos(\theta )={\frac {e^{j\theta }+e^{-j\theta }}{2}}}$

${\displaystyle sin(\theta )={\frac {e^{j\theta }-e^{-j\theta }}{2j}}}$

We can test to see that this works as follows:

 ${\displaystyle {e^{j\theta }}}$ ${\displaystyle =cos(\theta )+j*sin(\theta )}$ ${\displaystyle ={\frac {e^{j\theta }+e^{-j\theta }}{2}}+j*{\frac {e^{j\theta }-e^{-j\theta }}{2j}}}$ ${\displaystyle ={\frac {e^{j\theta }+e^{-j\theta }}{2}}+{\frac {e^{j\theta }-e^{-j\theta }}{2}}}$ ${\displaystyle ={\frac {(e^{j\theta }+e^{-j\theta })+(e^{j\theta }-e^{-j\theta })}{2}}}$ ${\displaystyle ={\frac {2*e^{j\theta }}{2}}}$ ${\displaystyle e^{j\theta }}$ ${\displaystyle =e^{j\theta }}$