TITLE: Got $e^{-x}=\cos(ix)$ from Euler's formula. Where is my mistake?
QUESTION [8 upvotes]: When I was messing around with Euler's formula, I came across this: $$e^{ix}=\cos(x)+\sin(x)i$$ Then, let $x$ be an imaginary value, $ix$, so then: $$e^{i(ix)}=\cos(ix)+\sin(ix)i$$ which we can simplify to $$e^{-x}=\cos(ix)+\sin(ix)i,$$ but since $e^{-x}$ is a real value for all real inputs, then $\sin(ix)i$ must be equal to $0$. so that means that $$e^{-x}=\cos(ix)$$ This doesn't seem right, so could someone please point out where I made a mistake?

REPLY [6 votes]: $$e^{-x}=\cos(ix)+\sin(ix)i,$$ but since $e^{-x}$ is a real value for all real inputs, then $\sin(ix)i$ must be equal to $0$.

That does not follow unless you know that $\sin(ix)$ is real, and there's no reason to think that.
$$
\sin(ix) = \frac{e^{i(ix)} - e^{-i(ix)}}{2i} = \frac{e^{-x} - e^x}{2i}.
$$