In terms of the arbitrary complex number, ''$z$'', the following formula expansion can be done based on the Taylor series expansion.
\begin{eqnarray}
sin\;z&=&z-\frac{z^3}{3!}+\frac{z^5}{5!}-\frac{z^7}{7!}+\cdots+\frac{(-1)^n}{(2n+1)!}z^{2n+1}+\cdots \nonumber \\
cos\;z&=&1-\frac{z^2}{2!}+\frac{z^4}{4!}-\frac{z^6}{6!}+\cdots+\frac{(-1)^n}{(2n)!}z^{2n}+\cdots \nonumber \\
e^{iz}&=&1+iz+\frac{i^2z^2}{2!}+\frac{i^3z^3}{3!}+\frac{i^4z^4}{4!}+\frac{i^5z^5}{5!}+\cdots \nonumber \\
&=&1+iz-\frac{z^2}{2!}-i\frac{z^3}{3!}+\frac{z^4}{4!}+i\frac{z^5}{5!}+\cdots \nonumber \\
&=&(1-\frac{z^2}{2!}+\frac{z^4}{4!}-\cdots)+i(z-\frac{z^3}{3!}+\frac{z^5}{5!}-\cdots) \nonumber \\
&=&cos z+i sin z \nonumber
\end{eqnarray}
The Euler's formula\index{Euler's formula} can be accordingly obtained as shown in the following.
\begin{eqnarray}
e^{iz}=cos z+i sin z \nonumber
\end{eqnarray}
In case of the condition, ''$z =\pi$'', it becomes the equation in the following.
\begin{eqnarray}
e^{i\pi}=cos \pi+i sin \pi=-1 \nonumber
\end{eqnarray}