How to establish a formula for $\int_{-\infty}^\infty \frac{e^x(1-e^x)}{1-e^{n x}}dx$ I am finding 
$$\int_{-\infty}^{+\infty} \frac{e^x(1-e^x)}{1-e^{nx}}dx$$ 
for positive integer $n$.  
I think maybe use contour integral. Let $w = nx$, we will get  
$$\int_{-\infty}^{+\infty} \frac{e^x(1-e^x)}{1-e^{nx}}dx = \int_{-\infty}^{+\infty} \frac{e^{w/n}(1-e^{w/n})}{1-e^{w}}dw$$
Denominator $=0$ when $w=2\pi ki$, where $k\in\mathbb{Z}$. What is the proper contour for this?
Thank you.

It's divergent when $n\leq 2.$ Otherwise, why not substitute $e^x = t$ so that: $$\int_{-\infty}^\infty \dfrac{e^x(1-e^x)}{1-e^{nx}}dx = \int_0^\infty \dfrac{1-t}{1-t^n}dt$$
and the poles of the integrand is on the unit circle so the contour to be chosen is clear. 
