Consider the following integral
$$ I = \frac{4}{\pi} \int_0^R \frac{\cos qt}{(1+t^2)^2} \, \mathrm{d} t \, , $$ where $R>0$ and $q \ge 0$ is a parameter. In the limit $R\to\infty$, it is easy to show that $$ \lim_{R\to\,\infty} I = (1+q) e^{-q} \, . $$
But how about a finite value of $R$. I was wondering whether the integral $I$ can be evaluated analytically for an arbitrary value of $R$. Any help is highly appreciated. Thanks.
r
Just for the records, the integral does exist previous some necessary conditions.
The solution is this: (from Wolfram Mathematica)
$$\int_0^R \frac{4}{\pi}\frac{\cos(qt)}{(1+t^2)^2}\ \text{d}t = $$
$$ = \pi\left(i \text{Ci}(-q (-i+R)) (q \sinh (q)-\cosh (q))+i \text{Ci}(q (i+R)) (\cosh (q)-q \sinh (q))+\frac{2 R \cos (q R)}{R^2+1}-\sinh (q) \text{Si}(q (i+R))+\sinh (q) \text{Si}(i q-q R)+q \cosh (q) \text{Si}(q (i+R))-q \cosh (q) \text{Si}(i q-q R)\right)$$
And the conditions are:
$$(\Re(R)\neq 0\lor -1<\Im(R)<0\lor 0<\Im(R)<1)\land \left(\Re(q)=0\lor \Im(R) \Re(q)+\Im(q) \Re(R)=0\lor (\Re(q)<0\land ((\Im(R) \Re(q)+\Im(q) \Re(R)<0\land \Im(R) \Re(q)+\Im(q) \Re(R)\geq \Re(q))\lor (\Im(R) \Re(q)+\Im(q) \Re(R)>0\land \Im(R) \Re(q)+\Im(q) \Re(R)+\Re(q)\leq 0)))\lor \left(\Im(R) \Re(q)+\Im(q) \Re(R)<0\land \left(\Re(R) \left(\Im(q)^2+\Re(q)^2\right)\geq 0\lor (\Re(q)>0\land \Im(R) \Re(q)+\Im(q) \Re(R)+\Re(q)\geq 0)\right)\right)\lor \left(\Im(R) \Re(q)+\Im(q) \Re(R)>0\land \left(\Re(R) \left(\Im(q)^2+\Re(q)^2\right)\leq 0\lor (\Re(q)>0\land \Im(R) \Re(q)+\Im(q) \Re(R)\leq \Re(q))\right)\right)\right)$$
Special functions:
$$\text{Si} = \text{Sine Integral}$$
$$\text{Ci} = \text{Cosine Integral}$$
For $\Re(q)>0$ and $\Re(R)>0$ we get
$$-\frac{i\pi}{ \left(R^2+1\right)}\left(\left(R^2+1\right) \text{Ci}(q (i+R)) (q \sinh (q)-\cosh (q))+\left(R^2+1\right) \text{Ci}(q (-i+R)) (\cosh (q)-q \sinh (q))-i R^2 \sinh (q) \text{Si}(q (i+R))+i R^2 \sinh (q) \text{Si}(i q-q R)+i q R^2 \cosh (q) \text{Si}(q (i+R))-i q R^2 \cosh (q) \text{Si}(i q-q R)-q R^2 \sinh (q) \log (-q (R-i))+q R^2 \sinh (q) \log (q (R-i))+R^2 \cosh (q) \log (-q (R-i))-R^2 \cosh (q) \log (q (R-i))-i \sinh (q) \text{Si}(q (i+R))+i \sinh (q) \text{Si}(i q-q R)+i q \cosh (q) \text{Si}(q (i+R))-i q \cosh (q) \text{Si}(i q-q R)+2 i R \cos (q R)-q \sinh (q) \log (-q (R-i))+q \sinh (q) \log (q (R-i))+\cosh (q) \log (-q (R-i))-\cosh (q) \log (q (R-i))\right)$$
And now the conditions are:
$$\Re(q)=0\lor \left(\Re(q)\geq 0\land \frac{\Re(q)}{\Im(R) \Re(q)+\Im(q) \Re(R)}\geq 1\right)\lor \left(\Re(q)\leq 0\land \frac{\Re(q)}{\Im(R) \Re(q)+\Im(q) \Re(R)}\leq -1\right)\lor \Im(q)^2+\Re(q)^2\leq 0\lor \Im(R) \Re(q)+\Im(q) \Re(R)\leq 0$$
Notice that the fact that we have $\Re(R)>0$ does not imply $R$ is purely real. So this formula gives you a very general treatment. (Same story for $q$).