16
$\begingroup$

How can I evaluate$$\int_{-\infty}^\infty \frac{\cos x}{\cosh x}\,\mathrm dx\text{ and }\int_0^\infty\frac{\sin x}{e^x-1}\,\mathrm dx.$$ Thanks in advance.

$\endgroup$
18
$\begingroup$

For the second one,

$$ \begin{align*} \int_{0}^{\infty} \frac{\sin x}{e^x - 1} \; dx &= \int_{0}^{\infty} \frac{\sin x \, e^{-x}}{1 - e^{-x}} \; dx \\ &= \int_{0}^{\infty} \left( \sum_{n=1}^{\infty} \sin x \, e^{-nx} \right) \; dx \\ &\stackrel{\ast}{=} \sum_{n=1}^{\infty} \int_{0}^{\infty} \sin x \, e^{-nx} \; dx \\ &= \sum_{n=1}^{\infty} \frac{1}{1+n^2}, \end{align*}$$

where the starred identity is justified by the following formula

$$ \begin{align*} \int_{0}^{\infty} \frac{\sin x}{e^x - 1} \; dx &= \int_{0}^{\infty} \left( \frac{1 - e^{-Nx}}{1 - e^{-x}} e^{-x} + \frac{e^{-Nx}}{e^x - 1} \right) \sin x \; dx \\ &= \sum_{n=1}^{N} \int_{0}^{\infty} \sin x \, e^{-nx} \; dx + \int_{0}^{\infty} \frac{\sin x \, e^{-Nx}}{e^x - 1} \; dx, \end{align*}$$

together with the dominated convergence theorem. Now the resulting infinite summation can be evaluated in numerous ways. For example, exploiting identities involving the digamma function,

$$ \sum_{n=1}^{\infty} \frac{1}{1+n^2} = \frac{1}{2i} \sum_{n=1}^{\infty} \left( \frac{1}{n-i} - \frac{1}{n+i} \right) = \frac{\psi_0(1+i) - \psi_0(1-i)}{2i} = -\frac{1}{2} + \frac{\pi}{2} \coth \pi. $$

Similar techniques apply to the first integral.

$\endgroup$
  • 1
    $\begingroup$ Or, there's always the partial fraction series for the hyperbolic cotangent (which can be derived by logarithmically differentiating the infinite product for hyperbolic sine). $\endgroup$ – J. M. is a poor mathematician Jul 15 '12 at 11:26
  • $\begingroup$ Hmmm...shouldn't it be $$-\frac{1}{2}+\frac{\pi}{2}\coth\pi\,\,?$$I mean, otherwise it is far and away from the approximations WA gives...although I didn't succeeded to obtain the value in WA with the upper limit infinity. $\endgroup$ – DonAntonio Jul 15 '12 at 11:44
  • $\begingroup$ @DonAntonio: You're right! $\endgroup$ – Sangchul Lee Jul 15 '12 at 12:22
  • $\begingroup$ @J. M.: good point (+1) $\endgroup$ – user 1357113 Dec 13 '12 at 16:08
  • $\begingroup$ @sos440: hi (sister here). Do you know a nice way to prove that $\int_{0}^{\infty} \frac{\sin x \, e^{-nx}}{e^x - 1} \; dx$ tends to $0$ when $n\to\infty$? $\endgroup$ – user 1357113 Dec 13 '12 at 16:46
13
$\begingroup$

For the first one for example by using the rectangular contour $-R\to +R \to +R+2\pi i \to -R+2\pi i \to -R$
and since there are two simple poles from $\cosh(z)$ at $z=\frac {\pi i}2$ and $z=\frac {3\pi i}2$ of values $-ie^{-\frac {\pi i}2}$ and $ie^{-\frac {3\pi i}2}$ we have : $$2\pi i\ \left(\rm{Res}\left(\frac {e^{iz}}{cosh(z)}; \frac {\pi i}2\right)+\rm{Res}\left(\frac {e^{iz}}{cosh(z)}; \frac {3\pi i}2\right)\right)=2\pi i \left(-ie^{-\frac {\pi}2}+ie^{-\frac {3\pi}2}\right)$$

so that the integral over the rectangular contour of $\dfrac {e^{i x}}{\cosh(x)}$ will be : $$\int_{-R}^R \frac {e^{i x}}{\cosh(x)}\;dx+\int_0^{2\pi} \frac {e^{i R-y}}{\cosh (R+iy)}\;dy+\int_R^{-R} \frac {e^{-2\pi+i x}}{\cosh(2\pi i+x)}\;dx+\int_{2\pi}^0 \frac {e^{-i R-y}}{\cosh (-R+iy)}\;dy=2\pi \left(e^{-\frac {\pi}2}-e^{-\frac {3\pi}2}\right)$$

I'll let you prove that the two integrals in $y$ disappear as $R\to\infty$ so that only remains :

$$\lim_{R\to \infty} \int_{-R}^R \frac {e^{i x}}{\cosh(x)}\;dx-\lim_{R\to \infty}\int_{-R}^R \frac {e^{-2\pi-i x}}{\cosh(2\pi i-x)}\;dx=2\pi \left(e^{-\frac {\pi}2}-e^{-\frac {3\pi}2}\right)$$

it is easy to show that $\ \cosh(2\pi i+x)=\cosh(x)$ (use exponential notation) so that :

$$(1-e^{-2\pi})\int_{-\infty}^\infty \frac {e^{i x}}{\cosh(x)}\;dx=2\pi \left(e^{-\frac {\pi}2}-e^{-\frac {3\pi}2}\right)$$

and the result (keeping the real part) : $$\int_{-\infty}^\infty \frac {\cos x}{\cosh x}\;dx=2\pi \frac{e^{-\frac {\pi}2}}{1+e^{-\pi}}=\frac{\pi}{\cosh \frac{\pi}2}$$

(the second one may be solved the same way...)

$\endgroup$
  • $\begingroup$ I just knew contours could be used (as with a lot of these sorts of integrals), but I got stuck picking the right one. +1, of course. $\endgroup$ – J. M. is a poor mathematician Jul 15 '12 at 12:06
  • $\begingroup$ @J.M.: I must admit that it is rather laborious this way (I am much more fond of derivation under the integral and so on...) $\endgroup$ – Raymond Manzoni Jul 15 '12 at 12:17
  • 1
    $\begingroup$ I prefer real analysis methods to complex ones because of my personal taste, but I also agree that complex method is undisputedly the most general and elegant method to evaluate these kinds of integrals or summations, in the sense that this often shows the glimpse of the true nature behind them. +1, of course! $\endgroup$ – Sangchul Lee Jul 15 '12 at 12:31
  • $\begingroup$ @sos440: with clearly the advantage of speed here! :-) (when other methods exist they are often more direct and thus faster than complex integration...). Your nice derivation got my vote too! $\endgroup$ – Raymond Manzoni Jul 15 '12 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.