<s>[INST] Integral of weird function I am trying to solve the following integral
\begin{equation}
{\cal I}=\int_{-\infty}^{\infty}\frac{d\omega}{2\pi}\frac{2\tau}{1+\omega^{2}\tau^{2}}\frac{\sin^{2}\left[\left(\omega+\Omega\right)t/2\right]}{\left[\left(\omega+\Omega\right)/2\right]^{2}}
\end{equation}
for finite $\Omega$. I could only solve it for $\Omega=0$, yielding
\begin{equation}
{\cal I}=2 \left[\tau^{2}\left(e^{-t/\tau}-1\right)+\tau \thinspace t\right]
\end{equation}
I also tried to solve using the fact below
\begin{equation}
{\cal I}=\int_{0}^{t}\int_{0}^{t}dt_{1}dt_{2} e^{-|t_1-t_2|/\tau}e^{i\Omega\left(t_{1}-t_{2}\right)}=\int_{-\infty}^{\infty}\frac{d\omega}{2\pi}\frac{2\tau}{1+\omega^{2}\tau^{2}}\frac{\sin^{2}\left[\left(\omega+\Omega\right)t/2\right]}{\left[\left(\omega+\Omega\right)/2\right]^{2}}
\end{equation}
although this did not help much. Any thoughts?
 [/INST] After some minor simplification, we have for the antiderivative
$$I=\frac{4\tau}\pi\int \frac{\sin ^2\left(\frac{1}{2} t (\omega +\Omega )\right)}{\left(\tau ^2 \omega
   ^2+1\right) (\omega +\Omega )^2}\,d\omega$$ Using $x=\frac{t (\omega +\Omega )}2$ gives
$$\int \frac{\sin ^2\left(\frac{1}{2} t (\omega +\Omega )\right)}{\left(\tau ^2 \omega
   ^2+1\right) (\omega +\Omega )^2}\,d\omega=\frac {t^3}{8\tau^2}\int \frac{\sin^2(x) }{x^2(x^2+ax+b) }\,dx$$ with $a=-t \Omega$ and $b=\frac{t^2 \left(\tau ^2 \Omega ^2+1\right)}{4 \tau ^2}$.
Let $r$ and $s$ be the complex roots of the quadratic and use partial fraction decomposition
$$\frac 1{x^2(x-r)(x-s)}=\frac{r+s}{r^2 s^2 x}+\frac{1}{r^2 (r-s) (x-r)}-\frac{1}{s^2 (r-s)
   (x-s)}+\frac{1}{r s x^2}$$ which make that we face two kinds of integratels
$$J=\int \frac{\sin^2(x) }{x^2} \,dx=\text{Si}(2 x)+\frac{\cos (2 x)-1}{2 x}$$
$$K_c=\int \frac{\sin^2(x) }{x-c} \,dx=-\frac{1}{2} (\cos (2 c) \text{Ci}(2 x-2 c)+\sin (2 c) \text{Si}(2 c-2 x)-\log
   (x-c))$$
</s>