How to evaluate $\int_{-\infty}^{\infty}\frac{x^2e^x}{\left(1 + e^x\right)^2}dx$

261 Views Asked by At

How to evaluate the following integral:

$$\int_{-\infty}^{\infty}\frac{x^2e^x}{\left(1 + e^x\right)^2}dx$$

So far I know that this function is even, so we can take $\int_{0}^{\infty}\frac{x^2e^x}{\left(1 + e^x\right)^2}dx$ or $\int_{-\infty}^{0}\frac{x^2e^x}{\left(1 + e^x\right)^2}dx$ and then multiply by 2.

If we substitute $x = \ln z$ then $\int_{-\infty}^{0}\frac{x^2e^x}{\left(1 + e^x\right)^2}dx = \int_{0}^{1}\frac{\ln^2z}{\left(1 + x\right)^2}dz$

And I don't know what to do next.

1

There are 1 best solutions below

3
On BEST ANSWER

Since the function is even, the integral $I$ is

$$I=2\int_0^\infty\frac{x^2e^{-x}}{(1+e^{-x})^2}\,dx.$$

Now, using that

$$\frac1{(1+x)^2}=\sum_{n\geq1}n(-1)^{n-1}x^{n-1}$$

it follows that

$$I=2\sum_{n\geq1}n(-1)^n\underbrace{\int_0^\infty x^2e^{-nx}\,dx}_{2/n^3} =4\underbrace{\sum_{n\geq1}\frac{(-1)^{n-1}}{n^2}}_{\pi^2/12} =\frac{\pi^2}3.$$

Sum and integral can be interchanged by absolute convergence.

Edit:

$$\int_0^\infty x^2e^{-nx}\,dx \underbrace{=}_{y=nx}\frac1{n^3}\underbrace{\int_0^\infty e^{-y}y^2\,dy}_{\text{gamma function }\Gamma(3)=2} =\frac{2}{n^3}$$

$$\sum_{n\geq1}\frac{(-1)^{n-1}}{n^2}= \sum_{n\text{ odd}}\frac1{n^2}- \sum_{n\text{ even}}\frac1{n^2} =\sum_{\text{all }n}\frac1{n^2}-2\sum_{n\text{ even}}\frac1{n^2} =\zeta(2)-2\sum_{n\geq1}\frac1{(2n)^2} =\zeta(2)-\frac12\zeta(2)=\frac{\pi^2}{12}$$