Based on
sinx=∑n=0∞(−1)n(2n+1)!x2n+1 cosx=∑n=0∞(−1)n(2n)!x2n
Refer to Complex Numbers to see the link between trigonometry and exponential functions.
And
ex=∑n=0∞xnn!
Suppose x=iθ
Thus
Substituting θ as π