0
$\begingroup$

Possible Duplicate:
How to evaluate these integrals by hand

I am trying to evaluate the following: $\int_{-\infty}^\infty \frac{\cos x}{e^x+e^{-x}}\, dx$ using the residue theorem but I could not do it. Any help will be much appreciated.

  • 0
    not a very good example either from its history... ;-)2012-12-13

1 Answers 1

0

Let us put

$f(z):=\frac{e^{iz}}{e^z+e^{-z}}=\frac{e^ze^{iz}}{e^{2z}+1}$

We can see the poles of the function are $2z_k=\pi i(1+2k)\Longleftrightarrow z_k=\frac{\pi i}{2}(1+2k)\,\,,\,\,k\in\Bbb Z$

We're going to take the contour

$C_R:=[-R,R]\cup\gamma_R:=\{z=Re^{it}\;;\;0\leq t\leq \pi\}\,\,,\,R\in\Bbb R^+$

and since the poles are simple and taking into account that $\,\displaystyle{e^{\pm z_k}=(-1)^k\,(\pm i)}\,$:

$Res_{z=z_k}(F)=\lim_{z\to z_k}(z-z_k)f(z)\stackrel{\text{L'Hospital}}=\lim_{z\to z_k}\frac{e^{iz}}{e^z-e^{-z}}=\frac{e^{-\frac{\pi(1+2k)}{2}}}{e^{z_k}-e^{-z_k}}=\frac{e^{-\frac{\pi(1+2k)}{2}}}{2i(-1)^k}$

Since when $\,R\to\infty\,$ we're going to contain all the poles with positive imaginary part within $\,C_r\,$ (taking care the contour never touches one of the poles), we get

$\sum_{Res(f)}=\frac{e^{-\pi/2}}{2i}\sum_{k=0}^\infty \left(-e^{-\pi}\right)^k=\frac{e^{-\pi/2}}{2i}\cdot\frac{1}{1+e^{-\pi}}=(-i)\frac{1}{4\cosh \pi/2}$

so that

$\oint_{C_R}f(z)\,dz=2\pi i\left(\sum_{Res(f)}\right)=\frac{\pi}{2\cosh\frac{\pi}{2}}$

Finally, just check

$\frac{\pi}{2\cosh\frac{\pi}{2}}=\lim_{R\to\infty}\oint_{C_R}f(z)\,dz=\int_{-\infty}^\infty\frac{e^{ix}}{e^x+e^{-x}}dx+\lim_{R\to\infty}\int_{\gamma_R}f(z)\,dz$

and

$\int_{\gamma_R}f(z)\,dz\xrightarrow [R\to\infty]{} 0$

by Jordan's Lemma , since

$z\in\gamma_R\Longrightarrow \max_{z\in\gamma_R}\left|\frac{e^{z}}{z^{2z}+1}\right|\leq\max_{z\in\gamma_R}\left|\frac{e^{Re^{it}}}{e^{2Re^{it}}+1}\right|\xrightarrow [R\to\infty]{}0$