## help with an irregular integral

I am looking for help with doing the following integral :
$$\frac{1}{2\pi i}\int_{1}^{\infty}\ln\left(\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}} \right )\frac{dx}{x\left(\ln x+z\right)}\;\;\;\;z\in \mathbb{C}$$
i tried to transform it into a complex integral along a 'keyhole' contour, with a branch cut along the +ive real line $\left[1,\infty\right)$. but then $\;\ln x\;$ would be transformed into $\;\ln x+2\pi i\;$ when doing the integral along $\left(\infty,1\right]\;$ which doesn't add up nicely to the portion along $\left[1,\infty\right)$. any insights are appreciated.
 PhysOrg.com science news on PhysOrg.com >> Galaxies fed by funnels of fuel>> The better to see you with: Scientists build record-setting metamaterial flat lens>> Google eyes emerging markets networks

Recognitions:
Homework Help
Doesn't this simplify fairly easily?
 Quote by mmzaj $$\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}}$$
 you would think !!! but no, it doesn't ....

## help with an irregular integral

The integral above is equivalent to :

$$\int_{1}^{\infty}\left(\frac{1}{2}-x+\left \lfloor x \right \rfloor \right )\left(\frac{1}{x\left(\ln x+z\right)}\right)dx$$
And
$$\int_{1}^{\infty}\sum_{n=1}^{\infty}\frac{\sin(2 \pi n x)}{n\pi}\left(\frac{1}{x\left(\ln x+z\right)}\right)dx$$
 Recognitions: Homework Help Science Advisor $\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}} = \frac{e^{-2\pi i x}(e^{2\pi i x}-1)}{1-e^{2\pi i x}} = -e^{-2\pi i x}$ I end up with $\int_0^∞\frac{1-2e^u}{2(u+z)}du$ which surely doesn't converge?

 Quote by haruspex $\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}} = \frac{e^{-2\pi i x}(e^{2\pi i x}-1)}{1-e^{2\pi i x}} = -e^{-2\pi i x}$ I end up with $\int_0^∞\frac{1-2e^u}{2(u+z)}du$ which surely doesn't converge?
you missed the fact that the inverse of the complex exponential - the complex $\log$ function- is multivalued. namely :
$$\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}}=-e^{-2\pi i x}=e^{-2\pi i \left(x-1/2\right)}=e^{-2\pi i \left(\left \{ x \right \}-1/2\right)}$$
Where $\left \{ x \right \}$ is the fractional part of x. Thus:
$$\frac{1}{2\pi i}\ln\left(\frac{1-e^{-2\pi i x}}{1-e^{2\pi i x}}\right)=\frac{1}{2}-\left \{ x \right \}$$
Another way to think of it is to take the Taylor expansion of the $\log$:
$$\frac{1}{2\pi i}\left(\ln\left(1-e^{-2\pi i x}\right)-\ln(1-e^{2\pi i x})\right)=\frac{1}{2\pi i}\sum_{k=1}^{\infty}\frac{e^{2\pi i k x}-e^{-2\pi i kx}}{k}=\sum_{n=1}^{\infty}\frac{\sin(2\pi k x)}{k\pi}$$
Which in turn is the Fourier expansion of $\frac{1}{2}-\left \{ x \right \}$
Using these facts, we can prove that the integral in question is equal to the limit:
$$e^{-z}\text{Ei}(z)+\lim_{N\rightarrow \infty}\sum_{n=1}^{N}\left(n+\frac{1}{2} \right )\ln\left(\frac{\ln(n+1)+z}{\ln(n)+z} \right )-e^{-z}\text{Ei}(z+\ln N)$$
Where $\text{Ei}(z)$ is the exponential integral function. But i'm stuck with this cumbersome limit