Complex integral calculation Consider the integral
$$\int_{-\infty}^{\infty}{\frac{\sin^2\big(\frac{\omega}{2}\big)e^{j\omega}}{\omega^2(a+j\omega)^n}d\omega}$$
with $a$ positive real number and $n$ some positive integer. Is it well defined and what is its value?  
Edit: I will provide a calculation based on a comment by Jack.
Let $f_1(t)=\frac{t^n}{(n-1)!}e^{-at}u(t)$ with $u(t)$ the step function and $f_2(t)$ defined by an isosceles triangle on $[0,2]$ with $q(0)=q(2)=0$ and $q(1)=1$. Then
$$F_1(j\omega):=\mathcal{F}[f_1(t)]=\frac{1}{(a+j\omega)^n}$$
 $$F_2(j\omega):=\mathcal{F}\big[f_2(t)\big]=\frac{4\sin^2\big(\frac{\omega}{2}\big)}{\omega^2}e^{-j\omega}$$
The integral can then be written as
$$ \frac{1}{4}\int_{-\infty}^{\infty}{F_2(-j\omega)F_1(j\omega)d\omega}$$
Now, from Parseval's identity it holds true that
$$\int_{-\infty}^{\infty}{F_2(-j\omega)F_1(j\omega)d\omega}=2\pi\int_{-\infty}^{\infty}{f_2(t)f_1(t)dt}=2\pi\int_{0}^{2}{f_2(t)f_1(t)dt}$$
and therefore
$$\int_{-\infty}^{\infty}{\frac{\sin^2\big(\frac{\omega}{2}\big)e^{j\omega}}{\omega^2(a+j\omega)^n}d\omega}=\frac{\pi}{2(n-1)!}\bigg[\int_0^1{t^{n+1}e^{-at}dt}+\int_1^2{t^{n}(2-t)e^{-at}dt}\bigg]$$
 A: As a mathematician, I prefer to denote the imaginary unit by $i$. Now:
$$\begin{eqnarray*} I(a,n)=\int_{\mathbb{R}}\frac{\sin^2\left(\frac{x}{2}\right) e^{ix}}{x^2(a+ix)^n}\,dx &=& -\frac{1}{4}\int_{\mathbb{R}}\frac{1-2e^{ix}+e^{2ix}}{x^2(a+ix)^n}\,dx\\&=&-\frac{\pi i}{2}\,\operatorname{Res}\left(\left(\frac{1-e^{ix}}{x}\right)^2\frac{1}{(a+ix)^n},x=ia\right)\end{eqnarray*}$$
by the residue theorem. This residue can be computed by exploiting:
$$\left(\frac{1-e^{-z}}{z}\right)^2 = \sum_{n\geq 0}\frac{(-1)^n\left(2^{n+2}-2\right)}{(n+2)!}\,z^n, $$
$$\frac{1}{(1+z)^m} = \sum_{n\geq 0}(-1)^n\binom{n+m-1}{n}\,z^n.$$
By using the Fourier transform we can also see that $I(a,n)$ is given by the convolution between a Gamma distribution and a distribution supported on $[-2,0]$ having an isosceles triangle as probability density function. That leads to:

$$ I(a,n) = \frac{\pi}{2}\int_{0}^{2}\frac{x^{n-1}}{(n-1)!}e^{-ax}\min(x,2-x)\,dx$$

so $I(a,n)$ can be expressed in terms of incomplete $\Gamma$ functions.
