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$
Consider the generalized integral: $$J(a)=\int_0^{\infty} \frac{1}{e^{ax}-1} \; dx$$ Then, $$J'(a)=\int_0^{\infty} \frac{-xe^{ax}}{{\left(e^{ax}-1\right)}^2} \; dx$$ The integral you're looking for is quite similar to $J'(a)$ above. We want to construct a new integral, $I(a)$, so that $I'(1)$ is the integral you're looking for in your question. $$I(a)=-\int_0^{\infty} \frac{x^{n-1}e^{-x}}{{\left(e^{ax}-1\right)}} \; dx$$ $$I'(a)=\int_0^{\infty} \frac{x^{n}e^{-x}e^{ax}}{{\left(e^{ax}-1\right)}^2} \; dx$$ This works because $I'(1)$ equals the integral in your question. Okay, now begins the fun. We will begin to integrate $I(a)$: $$I(a)=-\int_0^{\infty} \frac{x^{n-1}e^{-x}e^{-ax}}{{\left(1-e^{-ax}\right)}} \; dx$$ $$I(a)=-\int_0^{\infty} x^{n-1}e^{-x(1+a)} \sum_{k=0}^{\infty} e^{-axk} \; dx$$ Here, we can interchange the summation and integral sign: $$I(a)=-\sum_{k=0}^{\infty} \int_0^{\infty} x^{n-1}e^{-x(1+a)} e^{-axk} \; dx$$ $$I(a)=-\sum_{k=0}^{\infty} \int_0^{\infty} x^{n-1}e^{-x(1+a+ak)} \; dx$$ Let $u=x(1+a+ak)$: $$I(a)=-\sum_{k=0}^{\infty} \frac{1}{{\left(1+a+ak\right)}^n} \int_0^{\infty} u^{n-1}e^{-u} \; du$$ Recognize this integral as the gamma function: $$I(a)=-(n-1)! \sum_{k=0}^{\infty} \frac{1}{{\left(1+a+ak\right)}^n} $$ Now, differentiate both sides with respect to $a$ to obtain $I'(a)$: $$I'(a)=-(n-1)! \sum_{k=0}^{\infty} \frac{-n(k+1)}{{\left(1+a+ak\right)}^{n+1}} $$ $$I'(a)=n! \sum_{k=0}^{\infty} \frac{k+1}{{\left(1+a+ak\right)}^{n+1}} $$ Plug in $a=1$ to find what the integral in your question evaluates to: $$I'(1)=n! \sum_{k=0}^{\infty} \frac{k+1}{{\left(k+2\right)}^{n+1}} $$ $$I'(1)=n! \sum_{k=0}^{\infty} \frac{k+2-1}{{\left(k+2\right)}^{n+1}} $$ $$I'(1)=n! \left(\sum_{k=0}^{\infty} \frac{1}{{\left(k+2\right)}^{n}} -\sum_{k=0}^{\infty} \frac{1}{{\left(k+2\right)}^{n+1}}\right)$$ $$I'(1)=n! \left(\sum_{k=1}^{\infty} \frac{1}{{k}^{n}} -1 -\sum_{k=1}^{\infty} \frac{1}{{k}^{n+1}}+1\right)$$ $$\boxed{I'(1)=\int_0^{\infty} \frac{x^n}{{\left(e^x-1\right)}^2} \; dx = n! \left(\zeta(n) -\zeta(n+1)\right)}$$
According to desmos, it appears that the integral converges for all $n >1$ and blows up at around $n=8$.