I want to calculate the fourier transform $\hat{A}$ of the following function:
$$A(x) = \begin{cases} 1, & \text{if $\lvert x \rvert \le \frac{b}{2}$ } \\[2ex] 0, & \text{else} \end{cases}$$
The fourier transform can be calculated by using the formula:
$$\hat{A}=\int_{-\infty}^{+\infty}\frac{1}{\sqrt{2\pi}}A(x)e^{-ikx} dx$$
I don't know how to deal with the condition $1, \space \space \space \text{if $\lvert x\rvert \le \frac{b}{2}$}$. How can I integrate that?