How can I find the fourier transform of the function
$$ F(x) = \begin{cases} 1 & |x| < 1/2 \\ 1/2 & |x| = 1/2 \\ 0 & \text{otherwise} \end{cases} $$
and a second question of the integrate circle of Cauchy theorem,
$$ \oint \frac{z+2}{z^2 + 1} \ \mathrm{d}z \quad \quad |z| = 2$$
I will be grateful for solution or any example that I can use to calculate it.
Starting with the Fourier transform, define a $\hat f(\xi)$ as the Fourier transform of $f(x)$ such that
$$\hat f(\xi ) = \int\limits_{-\infty}^\infty f(x)e^{-2\pi i x\xi}\, \mathrm dx $$ Using this definition, in our case $$\hat f(\xi) = \int\limits_{-1/2}^{1/2} e^{-2\pi i x\xi} \,\mathrm dx $$ Because the other integrals will be $0$. Evaluating this integral using Euler's formula gives us $\hat f(\xi ) = \frac{\sin(\pi \xi)}{\pi\xi} $.
Now the contour integral. We notice that the integrand has simple poles inside the contour at $z=i,-i$. The residues at these points are $\frac{i+2}{2i}$ and $\frac{i-2}{2i}$ respectively. Finally using the Cauchy residue theorem, we conclude that $$\int\limits_{|z|=2}\frac{z+2}{z^2+1}\,\mathrm dz =2\pi i$$