1

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.

Blue
  • 75,673
Andreas C
  • 61
  • 7
  • Do you need the actual value or just an argument for convergence? – Randall Apr 21 '21 at 20:56
  • What is your mathematica formula, maybe a sign of $\infty$ problem? Expand $1/(e^x+1)=\sum_{k\ge 1} (-1)^{k+1} e^{-kx}$ then switch $\int,\sum$ to get a constant times $\zeta(n+1)$. – reuns Apr 21 '21 at 20:57
  • I need the actual answer. Now, I found the problem with Mathematica. I was writing e^x instead of Exp[x]. I will edit my post. However I would still like to know the general integral and how you find it. – Andreas C Apr 21 '21 at 21:00
  • 1
    @AndreasC Some other results you may find interesting: https://dlmf.nist.gov/25.5 – Gary Apr 22 '21 at 08:06
  • Thanks very much! – Andreas C Apr 27 '21 at 09:39

3 Answers3

5

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$.

J.G.
  • 115,835
  • 2
    Very succinct, +1. Given that OP is particularly interested in the value for $n = 2$ this answer surely suffices for them, but we can extend the answer to all complex $n$ with $\operatorname{Re} n > -1$ by replacing (as usual) $n!$ with $\Gamma(n + 1)$. – Travis Willse Apr 21 '21 at 21:10
4

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.

1

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$.

Lai
  • 20,421