A while ago, I asked a question: Finding a closed form for this expression
The expression in that question,
$$\frac{1}{4}\sum_{k=0}^{\infty} \frac {1}{4^k}\int_{0}^{\infty}\frac{x^ne^{-x}}{e^{kx}}(1+e^x)^{2k}dx$$
Was actually (wrongly) derived from this harmless looking integral:
$$I = \int_{0}^{\infty}\frac{x^n dx}{(e^x-1)^2}$$
Which can be tackled by:
$$I = \int_{0}^{\infty}\frac{x^ne^{-2x} dx}{1-2e^{-x}+e^{-2x}}$$ Then interpreting $2e^{-x} + e^{-2x}$ as the common ratio of a geometric progression with first term $=1$ $$\implies I = \int_{0}^{\infty}x^ne^{-2x}\sum_{r=0}^{\infty}e^{-rx}(2-e^{-x})^rdx$$
Now, after interchanging the integral and the summation sign, I applied the Binomial theorem on $(2-e^{-x})^r$
After which I interchanged the integral and summation again;
Which made $$I = \sum_{r=0}^\infty\sum_{p=0}^{r}\binom{r}{p}(-1)^p2^{r-p}\int_0^\infty x^n e^{-(p+r+2)x}dx$$
Now after a change of variable and applying the gamma function, I finally got:
$$I = n!\sum_{r=0}^\infty\sum_{p=0}^{r}\binom{r}{p}(-1)^p\frac{2^{r-p}}{(p+r+2)^{1+n}}$$
Which may not look like much, but after a close inspection, I found that $$I = n!(\zeta(n)-\zeta(1+n))$$
Keeping this result in mind, I wanted to evaluate the original integral, I, in a different way.
So I started by plugging in $x \rightarrow it$
$$\implies I = \int_{0}^{\infty}\frac{i^nt^ne^{-2it} (-i dt)}{(1-e^{-it})^2}$$ After some simplification:
$$I = \frac{-i^{1+n}}{4}\int_{0}^{\infty}\frac{t^ne^{-it} dt}{\sin^2(t/2)}$$ Writing $\sin^2(t/2) = 1-\cos^2(t/2)$ and interpreting $\cos^2t/2$ as the common ratio of a G.P with first term = $1$: $$\implies I = \frac{-i^{1+n}}{4}\int_{0}^{\infty}t^ne^{-it}\sum_{k=0}^{\infty}\cos^{2k}(t/2) dt$$ Interchanging the summation and integration sign and plugging $x = it$ back in this integral, I got:
$$I = \frac{1}{4}\sum_{k=0}^{\infty}\int_{0}^{\infty}x^ne^{-x}\cos^{2k}(ix/2) dx$$
After which I used $\cos x = (e^{ix}+e^{-ix})/2$ which led me to this: $$I = \frac{1}{4}\sum_{k=0}^{\infty} \frac {1}{4^k}\int_{0}^{\infty}\frac{x^ne^{-x}}{e^{kx}}(1+e^x)^{2k}dx$$ Where I got stuck.
My questions are:
- How do I approach this integral using the second method I tried? (As my approach is definitely wrong.)
- What actually happens when I substitute $x \rightarrow it$?
I just assumed that as $x \rightarrow \infty, t \rightarrow \infty$
But am I thinking about this the wrong way?
Edit: Different ways to approach this problem are appreciated, but please think about ways to solve this after substituting $x \rightarrow it$