# Use rectangular contour to integrate $\sin(ax)/(\exp(2\pi x)-1)$

I have been self-studying CA and find it very interesting. So, working through problems in a book I have, I ran across

$$\int_{0}^{\infty}\frac{\sin(ax)}{e^{2\pi x}-1}dx=\frac{1}{4}\coth(a/2)-\frac{1}{2a}$$

and $$\int_{0}^{\infty}\frac{\sin(ax)}{e^{x}+1}dx=\frac{1}{2a}-\frac{\pi}{2\sinh(\pi a)}$$

For the former, I wrote it as $\frac{e^{aiz}}{e^{2\pi z}-1}$ and used a rectangular contour with vertices $0, \;\ R. \;\ R+i, \;\ i$

$e^{2\pi z}-1$ has poles at $ni$. Of these, I think $i$ only lies within the contour.

Unless I am in error, I then calculated the residue at $i$ to be $\frac{e^{-a}}{2\pi}$

So, $2\pi i(\frac{e^{-a}}{2\pi})=ie^{-a}$

Now, where I get hung up is setting up the integrals around the contour. Two of which should tend to 0 as $R\to \infty$.

Here is what I done.

$$\int_{0}^{R}\frac{e^{iax}}{e^{2\pi x}-1}dx+\int_{0}^{\infty}\frac{e^{ai(R+iy)}}{e^{2\pi (R+iy)}-1}idy+\int_{R}^{0}\frac{e^{ai(x+i)}}{e^{2\pi (x+i)}-1}dx+\int_{\infty}^{0}\frac{e^{ai(iy)}}{e^{2\pi iy}-1}dy=-\sinh(a)$$

I am unsure of the limits on the second and fourth integrals.

I am not so sure this is correct. The second and fourth ones, which represent the vertical sides, should tend to 0 as $R\to\infty$. I hope :).

This than gave me $(1-e^{-a})\int\frac{e^{iax}}{e^{2\pi x}-1}dx=-\sinh(a)$.

Which does not look correct. I did manage to solve this using series and $\pi csc(\pi z)$, but the contour I am unsure of.

Can someone lend a hand here?. Any advice on either would be appreciated.

For the other one, I only posted it because it looks similar, but I believe is actually more involved and 'tougher' if you will. If I can get one, perhaps I can manage to evaluate the other.

With that one, I think the same rectangle with the same vertices can be used, but $\pi i$ would have to be avoided. Perhaps a Principal Value in there somewhere. But, I was told to use vertices $0, \;\ R, \;\ R+2\pi i, \;\ 2\pi i$

Since I am relatively new to CA, setting up those integrals is the confusing part.

I can do easier types of contour integrals, but want to learn more about these more challenging ones.

Thanks for any assistance.

-
Wow... talk about a race condition! –  Asaf Karagila May 5 '12 at 18:33
I think your contour may be goingthrough a pole. –  Argon May 5 '12 at 18:47
Yes, I see that. There is a pole at 'i' which lies on the rectangle. Perhaps vertices of $0, \;\ R, \;\ R+2\pi i, \;\ 2\pi i$ would be better. The book I got the problem from gave a hint that suggested using a rectangle with vertices $0, \;\ R, \;\ r+i, \;\ i$. It is a miscellaneous problem from Schaum's Complex Variables. –  Cody May 5 '12 at 20:30
@Cody I see, its question 7.81-2. Perhaps we can approach the singularity in the limit? –  Argon May 5 '12 at 21:30
Yeah, maybe we can. I am certainly open for suggestions :). If the rectangle had corners $0,R,2\pi i, R+2\pi i$, maybe we could set it up as $$\int_{0}^{R}\frac{e^{aiz}}{e^{2\pi x}-1}dx+\int_{0}^{2\pi}\frac{e^{ai(R+iy)}}{e^{2\pi(R+iy)}-1}idy+\int_{R}^{0}\fra‌​c{e^{ai(x+2\pi i)}}{e^{2\pi(x+2\pi i)}-1}dx+\int_{2\pi}^{0}\frac{e^{ai(iy)}}{e^{2\pi(iy)}-1}dy=\frac{e^{-a}}{2\pi}‌​. Just an idea. I really don't know what I'm doing at this point. :) The problem here though, is the third integral. – Cody May 5 '12 at 22:24 ## 1 Answer I found$$\int_{C}\frac{e^{iaz}}{e^{2\pi z}-1}dz$$in "Applied Complex Analysis with PDE" by Nakhle Asmar. If anyone is interested, he uses a contour with a line segment and quarter circle with I_{1}, ...., I_{6} \int_{C}\frac{e^{iaz}}{e^{2\pi z}-1}dz=I_{1}+I_{2}+I_{3}+I_{4}+I_{5}+I_{6} starting with a line segment [\epsilon,R] and moving counterclockwise. As \epsilon\to 0^{+} and R\to \infty, I_{1}\to I. i.e. I_{2}, \;\ z=R+iy, where y varies from 0 to 1. I_{3}, \;\ z=x+i, where x varies from R to \epsilon I_{4} is done over the quarter circle from (\epsilon,\epsilon+i) to 0,i-i\epsilon) I_{5}, \;\ z=iy where y varies from i-\epsilon to \epsilon I_{6} is done over the quarter circle from (0,i\epsilon) to (\epsilon,0) For instance, I_{6} gives$$\lim_{\epsilon\to 0}\int\frac{e^{iaz}}{e^{2\pi z}-1}dz=\frac{-\pi}{2}\text{Res}\left(\frac{e^{iaz}}{e^{2\pi z}-1},0\right)=\frac{-\pi i}{2}\cdot \frac{e^{iaz}}{2\pi e^{2\pi (i)}}=-i\cdot \frac{e^{-a}}{4}

It is rather lengthy and ultimately results in $\frac{-1}{2a}+\frac{1}{4}\frac{e^{a}+1}{e^{a}-1}=\frac{-1}{2a}+\frac{1}{4}\coth(\frac{a}{2})$

-