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.