Integrating $\int_0^\infty \frac{x^n}{e^x+1} \,dx$, where $n$ is an integer

227 Views Asked by At

If the general case is too hard for some reason, I mostly need the $n=2$ case of the following integral: $$ \int_0^\infty \frac{x^n}{e^x+1} \,dx $$

For some reason Mathematica fails me, as it claims the integral doesn't converge, which, uh, I'm pretty damn sure it does. So if someone can also tell me why Mathematica fails me here, that would also be great as a bonus.

EDIT: Alright, I found what I was doing wrong with Mathematica, I was inputting e^x instead of Exp[x]. However I would still like to know the general integral and how you find it.

3

There are 3 best solutions below

1
On BEST ANSWER

As @reuns notes,$$\begin{align}\int_0^\infty\frac{x^n\mathrm{d}x}{e^x+1}&=\int_0^\infty\frac{x^ne^{-x}\mathrm{d}x}{1+e^{-x}}\\ &=\int_0^\infty x^n(e^{-x}-e^{-2x}+\cdots)\mathrm{d}x \\&=n!(1-1/2^{n+1}+1/3^{n+1}-\cdots)\\&=n!\eta(n+1)\\&=n!(1-2^{-n}) \zeta(n+1)\end{align}$$in terms of these functions, provided $\Re n>-1$.

0
On

You could make the problem more general $$I_n(a)=\int_0^\infty \frac{x^n}{e^x+a} \,dx$$ $$\frac{1}{e^x+a}=\sum_{k=0}^\infty (-1)^k e^{-(1+k)x} a^k$$ $$I_n(a)=\sum_{k=0}^\infty (-1)^k\, (k+1)^{-(n+1)}\, \Gamma (n+1)\,a^k$$ $$I_n(a)=-\frac 1a\, \Gamma (n+1)\, \text{Li}_{n+1}(-a)$$ If $a=1$ $$I_n(1)=-\Gamma (n+1)\, \text{Li}_{n+1}(-1)=\left(1-2^{-n}\right) \zeta (n+1) \Gamma (n+1)$$ as already given.

0
On

I am going to use the Gamma function to get the answer.

\begin{aligned} I_{n} &=\int_{0}^{\infty} \frac{x^{n} e^{-x}}{1+e^{-x}} d x \\ &=\int_{0}^{\infty} e^{-x} x^{n} \sum_{k=0}^{\infty}(-1)^{k} e^{-k x} d x\\&= \sum_{k=0}^{\infty}(-1)^{k} \underbrace{\int_{0}^{\infty} x^{n} e^{-(k+1) x} d x}_{J_{k}} \end{aligned}

Converting the integral $$J_{k} =\int_{0}^{\infty} x^{n} e^{-(k+1) x} d x$$

into a Gamma Function by letting $t=(k+1) x$, then

\begin{aligned}J_{k} &=\int_{0}^{\infty}\left(\frac{t}{k+1}\right)^{n} e^{-t} d t \\ &=\frac{1}{(k+1)^{n}} \int_{0}^{\infty} t^{n} e^{-t} d t \\ &=\frac{1}{(k+1)^{n}} \Gamma(n+1) \end{aligned} Hence $$ \boxed{I_n=\left(1-\frac{1}{2^{n}}\right) \Gamma(n+1) \zeta(n+1)}, $$ where $n$ is not necessarily a natural number but $\Re(n)>0$.