$\int_0^L \frac{\cos(2 \pi x /\ell)}{t^2+x^2} \,dx$