How to compute the Fourier transform of $\operatorname{rect}$?

83 Views Asked by At

I am trying to compute the Fourier transform of $\operatorname{rect}$, where

$$\operatorname{rect}(t) = \begin{cases}1 &, 0 \leqslant t \leqslant 1\\ 0 &, \text{otherwise.} \end{cases}$$

I used

$$\int_0^1 e^{-i\omega t}\,dt$$

and after inserting limits and substituting Euler's formula got back

$$\frac{i\cos \omega + \sin \omega}{\omega} - \frac{i}{\omega}.$$

But the answer is supposed to be

$$\frac{\sin \omega}{\omega}.$$

Where is the mistake?