3
$\begingroup$

Problem: I'm to show that $\int_{-\infty}^\infty\frac{\cos(x)}{e^x+e^{-x}}dx=\frac{\pi}{e^{\pi/2}+e^{-\pi/2}}$. I'm given the following hint: integrate $f(z)=\frac{e^{iz}}{e^z+e^{-z}}$ over the rectangle with vertices $+R$, $+R+i\pi$, $-R+i\pi$, and $-R$.

Attempted solution: I'm trying to figure out the hint first. I decided to parameterize the rectangle over each of its sides, take the integrals over each parameterizations, and then add the integrals. But I become stuck on my first such parameterization and integration:

$\gamma_1(t)=R+i{\pi}t$, $d{\gamma_1}=i{\pi}dt$, $\int_{\gamma_1}f(z)dz=\int_{t=0}^1{\frac{e^{i(R+i{\pi}t)}}{e^{R+i{\pi}t}+e^{-(R+i{\pi}t)}}(i{\pi}dt)}$

Is my approach correct, and, if so, how can I proceed with this integral? Typing a similar integral into Wolfram yielded a solution involving the "hypergeometric function", which I'm entirely unfamiliar with.

  • 0
    @sos440 - The top of the rectangle can be parameterized by $\gamma(z)=R+i{\pi}-2Rt$, $d{\gamma}=-i{\pi}t$ 0. So we can write $\int_{\gamma}{f(z)dz}=\int_{t=0}^{1}\frac{e^{i(-R+i{\pi}-2Rt)}}{e^{R+i{\pi}-2Rt}+e^{-{R+i{\pi}-2Rt}}}(-2Rdt)$. However, I'm struggling to figure out what happens as R approaches infinity. It appears to me as if the integral also approaches infinity, due to the $-2Rdt$ term. I suppose there is an $e^R$ term in the denominator, but I'm just not sure how to work it all out.2012-10-28

1 Answers 1

7

The trick here is that the contour in consideration yields two copies of the integral to be evaluated. To see how this happens, let us consider the following contour as hinted out.

enter image description here

Let $C$ denote this contour, and let $\gamma$ denote the union of the left side contour and the right side contour. By the Cauchy integration formula, we have

$ \oint_{C} \frac{e^{iz}}{e^{z} + e^{-z}} \, dz = 2\pi i \operatorname{Res}\limits_{z=i\pi/2} \frac{e^{iz}}{e^{z} + e^{-z}} = \pi e^{-\pi/2}.$

Then we have

$ \int_{-R}^{R} \frac{\cos x}{e^{x} + e^{-x}} \, dx + \int_{R+i\pi}^{-R+i\pi} \frac{e^{iz}}{e^{z} + e^{-z}} \, dz + \int_{\gamma} \frac{e^{iz}}{e^{z} + e^{-z}} \, dz = \pi e^{-\pi/2}. $

The first integral converges to what we want to evaluate. For the second integral, we have

$ \begin{align*} \int_{R+i\pi}^{-R+i\pi} \frac{e^{iz}}{e^{z} + e^{-z}} \, dz &= -\int_{-R}^{R} \frac{e^{i(z+i\pi)}}{e^{z+i\pi} + e^{-(z+i\pi)}} \, dz = e^{-\pi} \int_{-R}^{R} \frac{e^{iz}}{e^{z} + e^{-z}} \, dz \\ &= e^{-\pi} \int_{-R}^{R} \frac{\cos x}{e^{x} + e^{-x}} \, dx. \end{align*}$

This confirms our claim that the contour $C$ yields two copy of the integral. Finally, the third integral over $\gamma$ vanishes as $R \to \infty$. Therefore by taking $R\to\infty$, we have

$ (1 + e^{-\pi}) \int_{-\infty}^{\infty} \frac{\cos x}{e^{x} + e^{-x}} \, dx = \pi e^{-\pi/2},$

hence the identity follows.