According to euler's formula \begin{equation} e^{i\pi}=-1 \tag{1} \label{1} \end{equation}
\begin{equation} e^{-i\pi}=-1 \tag{2} \end{equation}
Comparing $(1)$ and $(2)$, we get
$$ e^{i\pi}=e^{-i\pi} $$
Comparing the exponents on both sides, $$i\pi=-i\pi$$ Simplifying yields $$i=-i$$ Is this correct? If not, what is the mistake?
You have a function $f$, for which $f(x_1)=f(x_2)\nRightarrow x_1=x_2$. Such a function is not injective. In your case $f(z)=e^z, z\in\mathbb C$. A simpler problem, which relies on the same principle is: Choose $f(x)=x^2, x\in\mathbb R$. Then $f(3)=3^2=9$ and $f(-3)=(-3)^2=9$. Does this mean that $3=-3$?