# Integral calculation - where the $i$ came from?

$$\frac{e^{it(c-n)}}{i(c-n)} |_{-\pi}^\pi = \frac{e^{i\pi(c-n)} - e^{-i\pi(c-n)}}{i(c-n)} =\frac{2\sin(\pi(c-n))}{i(c-n)}$$

Correct answer is:$$\frac{2\color{red}{i}\sin(\pi(c-n))}{i(c-n)}$$

Why? :/

Because

$$\sin(x) = \frac{e^{ix}-e^{-ix}}{2i}$$

and not

$$\sin(x) = \frac{e^{ix}-e^{-ix}}{2}$$