Apparently from Mathematica we have: $$\int_{-\infty}^{+\infty}dx\frac{x\cos(xt)}{e^{ax}-e^{-ax}}=\frac{\pi^2\mathrm{sech}^2\left(\frac{\pi t}{2a}\right)}{4a^2}$$ for $a,t$ both real and positive.

I am trying to derive this by hand. I couldn't see any obvious substitution, so tried looking at contour integrals. We have simple poles at:


with residues:

$$(-1)^k\frac{k\pi\mathrm{cosh}\left(\frac{k\pi t}{a}\right)}{2a^2}i$$

for $k\in\mathbb{N}$. Taking as my contour the disc in the upper half-plane failed however as the sum of the residues does not converge. Does anyone have any ideas on other approaches?


1 Answer 1



The factor of $x$ in the numerator can be conveniently absorbed into a partial derivative with respect to the parameter $t$. Pulling the derivative outside the integral, we're left with a much nicer integrand:

$$\begin{align} \mathcal{I}{(a,t)} &=\int_{-\infty}^{\infty}\mathrm{d}x\,\frac{x\cos{(xt)}}{e^{ax}-e^{-ax}}\\ &=\int_{-\infty}^{\infty}\mathrm{d}x\,\frac{\partial}{\partial t}\frac{\sin{(xt)}}{e^{ax}-e^{-ax}}\\ &=\frac{\partial}{\partial t}\int_{-\infty}^{\infty}\mathrm{d}x\,\frac{\sin{(xt)}}{e^{ax}-e^{-ax}}\\ &=\frac{\partial}{\partial t}\int_{-\infty}^{\infty}\mathrm{d}x\,\frac{\sin{(xt)}}{2\sinh{(ax)}}\\ &=\frac{\partial}{\partial t}\int_{0}^{\infty}\mathrm{d}x\,\frac{\sin{(xt)}}{\sinh{(ax)}}\\ &=\frac{\partial}{\partial t}\frac{1}{a}\int_{0}^{\infty}\mathrm{d}z\,\frac{\sin{(\frac{tz}{a})}}{\sinh{(z)}}.\\ \end{align}$$

Next, expand hyperbolic sine term in the denominator as a geometric series of exponentials:


Switching the order of summation and integration, the only integrals we have to evaluate now are products of exponentials and sine functions, which are elementary.

  • $\begingroup$ Thanks very much for that. If I may ask, how did you see that? Is there a particular book which is a good reference on evaluating complicated integrals, or is it just experience? $\endgroup$ Oct 20, 2014 at 5:23
  • 2
    $\begingroup$ @AndrewLedesma Mostly experience, a lot of which was gained by studying questions and answers on this site. Honestly, I think the archive of previous questions here would surpass any book as a resource on advanced integration techniques. $\endgroup$
    – David H
    Oct 20, 2014 at 6:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .