Value of sine of complex numbers I stumbled upon a problem with evaluating the sine function for complex arguments.
I know that in general I can use 
$$
\sin(ix)=\frac{1}{2i}(\exp(-x)-\exp(x))=i\sinh(x).
$$
But I could also write the sine function as the imaginary part of the exponential function as 
$$\sin(ix)=\text{Im}(\exp(i(ix)))=\text{Im}(\exp(-x))=0$$
where Im is the imaginary part.
Well, apparently I am not allowed to write it like that, but I don't see why. Could you give me a hint what went wrong here?
 A: This, of course, uses three interconnected formulas:
$e^{ix}= cos(x)+ i sin(x)$,
$cos(x)= \frac{e^{ix}+ e^{-ix}}{2}$, and 
$sin(x)= \frac{e^{ix}- e^{-ix}}{2}$
Your error is that you are assuming that the imaginary part of $e^{ix}$ is "i sin(x)".  That is true only if itself is real.  If x is not real the $i sin(x)$ is not imaginary because sin(x) is not real.
A: First, note that
$$\mbox{for }y\in\mathbb{R}\ \mbox{we have}\ \sin{y}=\mathrm{Im}\{e^{iy}\}.$$
Stating $\mathrm{Im}\left\{\mathrm{exp}(-x)\right\}=0$ means you assume $x\in\mathbb{R}$. However, then $ix$ is complex, such that you cannot apply the above rule.
A: For $x\in\mathbb{R}$ we have
$$e^{ix}= \cos x+ i \sin x,$$
$$\cos ix= \frac{e^{-x}+ e^{x}}{2}=\cosh x,$$ and 
$$\sin i x= \frac{e^{-x}- e^{-x}}{2i}=i\sinh x$$
Thus, 
$$ \cos ix+ i \sin ix=\cosh x-\sinh = \frac{e^{x}+ e^{-x}}{2} - \frac{e^{x}- e^{-x}}{2}=e^x$$
so, 
$$\sin ix = i({\cos ix- e^x})= i({\cosh x- e^x})=i\sinh x,$$ i.e. 
$\sin ix$ is an imaginary number and $Re(\sin ix) =0$.
