How to solve integrals like $\int \frac{e^{\pm i 2\pi t/T}}{a^{2}+t^{2}} dt$ How can one solve integrals of the form
$$\int \frac{e^{\pm i 2\pi t/T}}{a^{2}+t^{2}} dt, $$
in general (indefinite) and in the definite cases with integration domains over the period ($T$) or infinity, 
$$\int_{-T/2}^{T/2}\cdots \ \ \ \ \text{or} \ \ \ \ \int_{-\infty}^{\infty}\cdots, $$ 
where $i=\sqrt{-1}$ and $a\neq0$ ?
Note: please note that I am looking for direct methods, not methods that rely on Fourier analysis and the Fourier duality property. 
 A: For the definite integral case, if we have $$\int_{-\infty}^\infty\frac{e^{2\pi i t/T}}{a^2+t^2}\mathrm dt$$then we can evaluate this using contour integration by picking a semi-circular contour in the upper half plane. This encloses a simple pole at $t=ai$, and it can be shown that as the radius of the semi-circle tends to $\infty$, the contribution to the integral from the curved part of the contour is zero. So the integral is equal to $$2\pi i\,\text{Res}\left(\frac{e^{2\pi i t/T}}{a^2+t^2},ai\right)=2\pi i \frac{e^{-2\pi a/T}}{2ai}=\frac\pi ae^{-2\pi a/T}$$

For $$\int_{-T/2}^{T/2}\frac{e^{2\pi i t/T}}{a^2+t^2}\mathrm dt$$we have that this integral equals $$\int_0^\pi\frac{e^{\pi i e^{i\theta}}}{a^2+T^2/4\cdot e^{2i\theta}}(T/2) e^{i\theta}i\mathrm d\theta+\frac\pi ae^{-2\pi a/T}\textbf 1_{[0,T/2]}(|a|)$$ where $\textbf 1_{A}(x)=\begin{cases}1&x\in A\\0&x\not\in A\end{cases}$ is an indicator function. I am not sure of a simple way to compute this integral. 

The indefinite case is, of course, the hardest.
A: The indefinite integral can't be done using elementary functions.  It can be expressed in terms of special functions. Thus Maple writes it as
$$ {\frac {i}{2a} \left( {{\rm e}^{-{\frac {2\pi\,a}{T}}}}{\rm Ei}_1
 \left( -{\frac {2\pi\, \left( it+a \right) }{T}} \right) -{
{\rm e}^{{\frac {2\pi\,a}{T}}}}{\rm Ei}_1 \left(-{\frac {2\pi\,
 \left( it-a \right) }{T}} \right)  \right) }$$
EDIT: The fact that there is no elementary antiderivative can be proven.  It follows from the Risch theory (actually this case is a theorem of Liouville, IIRC) that the only cases where $\int r(t) \exp(a t)\; dt$ is elementary, where $a$ is a nonzero constant and $r(t)$ is a rational function, is where the antiderivatives are of the form $R(t) \exp(a t) + c$, and then $r(t) = R'(t) + a R(t)$.  In particular, this can't happen if $r(t)$ has a simple pole.
