By Euler's identity, , so that
Similarly, , so that
Finally, from the polar representation for complex numbers,