Trick for converting integral to a sum If $$\text {I}=\int_0^{\infty} \frac {x}{1+e^x} \, dx $$ and $\sum _{i=1}^n \frac {1}{k^2}=\frac {\pi^2}{6} $ 
I am feeling that this integral need not be solved analytically but should be converted into sum so that we can use the next information given. The only step I have taken  is $$\text {I}=\lim_{n\to \infty} \int _0^n \frac {x}{1+\sum_{i=0}^n \frac {x^n}{n!}}\, dx$$
 A: \begin{eqnarray*}
\int_{0}^{\infty} \frac{x dx }{ e^x-1} &=& \int_{0}^{\infty}\sum_{i=0}^{\infty} x e^{-(i+1)x} dx  \\
&=&  \sum_{i=0}^{\infty} \int_{0}^{\infty} x e^{-(i+1)x} dx  \\
&=&  \sum_{i=0}^{\infty} \frac{1}{(i+1)^2} = \frac{\pi^2}{6}. \\
\end{eqnarray*}
Or
\begin{eqnarray*}
\int_{0}^{\infty} \frac{x dx }{1+ e^x} &=& \int_{0}^{\infty}\sum_{i=0}^{\infty} (-1)^ix e^{-(i+1)x} dx  \\
&=&  \sum_{i=0}^{\infty} (-1)^i\int_{0}^{\infty} x e^{-(i+1)x} dx  \\
&=&  \sum_{i=0}^{\infty} \frac{(-1)^i}{(i+1)^2} = \frac{\pi^2}{12}. \\
\end{eqnarray*}
Edit:
\begin{eqnarray*}
\frac{1}{e^x-1} =\frac{1}{e^x} \frac{1}{(1-e^{-x}) } =\sum_{i=0} ^{\infty} e^{-(i+1)x}.
\end{eqnarray*}
A: Hint for $ x>0$ we have $0\le e^{-x}<1$ then we have 
$$\frac {1}{1+e^x} =\frac {    e^{-x}}{1+e^{-x}} =\sum_{n=0}^\infty (-1)^n e^{-(n+1)x}$$
From this we have $$I=\int_0^{\infty} \frac {x}{1+e^x} \, dx  =\sum_{n=0}^\infty (-1)^n 
\int_0^{\infty}  xe^{-(n+1)x}\, dx$$
From you can easily get the result after integration by part..
