Why this proof $0=1$ is wrong?(breakfast joke)

Your error is (as in most of those fake-proofs) in the step where you use the power law $(a^b)^c=a^{bc}$ without the conditions of that power law being fulfilled.


The proof is wrong because an expression of the form $x^y$ is actually ambiguous, when $x$ is a complex number: Rewrite it as $e^{y\ln x}$ and note the multivalued nature of the natural logarithm as used on complex numbers. For your proof to be correct, you would need $\ln e^{2\pi in+1}=2\pi in+1$, but that is not consistent with $\ln e=1$.


From wikipedia on Euler identity

The identity is a special case of Euler's formula from complex analysis, which states that $e^{i x}=\cos x+i\sin x$. for any real number $x$.

Note $x$ should be real number.

$$e e^{i x} \neq e^{i x + 1} = e^{i(x-i)} = \text{undefined} $$