<s>[INST] Trying to evaluate integral$\int_0^\infty x \sqrt{1-e^{-x}}\,e^{-x}dx$ I am trying to integrating
$$
\int_0^\infty  x \sqrt{1-e^{-x}}\,e^{-x}dx\equiv I
$$
but cannot get the answer, I would like a proof not a numerical answer.  My attempt at proof: 
$$
y=\sqrt{1-e^{-x}}\\
y(0)=0, \ y(\infty)=1\\
y^2=1-e^{-x}\\
2ydy=e^{-x}dx\\
e^{-x}=1-y^2\\
x=\ln\frac{1}{1-y^2} \rightarrow\\
I=2\int_0^1 y^2\ln\frac{1}{1-y^2} dy=\\
-2\int_0^1y^2\ln(1-y^2)\,dy=\\2\int_0^1y^2\sum_{k=1}^\infty \frac{y^{2k}}{k}=\\
2\sum_{k=1}^\infty \frac{1}{k}\int_0^1 y^{2(k+1)}dy=\\
2\sum_{k=1}^\infty \frac{1}{k(3+2k)}=\\
2\sum_{k=1}^\infty \left(\frac{1}{3k}-\frac{2}{3(2k+3)}    \right)
$$
but this diverges because $\sum_k\frac{1}{k}\to\infty$?  Mistakes I made...
Please help if can on doing the sum or integral. Thank you, Grazie
 [/INST] By partial integration we have
$$
\int x \sqrt{1-e^{-x}}e^{-x}dx = \frac{2}{3} x (1-e^{-x})^{3/2} -\frac{2}{3}\int dx (1-e^{-x})^{3/2}
$$
now by letting $y=e^{-x}$, $-\ln y =x$, $dx = -dy / y$ we have
$$
\int dx (1-e^{-x})^{3/2} = \int \frac{-dy}{y}(1-y)^{3/2}
$$
now let $\sqrt{1-y} = \tau$, $y= 1-\tau^2$, $dy = -2\tau d \tau$ so
$$
\int \frac{+2\tau d \tau}{1-\tau^2}\tau^3 = 2\int d\tau \frac{\tau^4-\tau^2+\tau^2-1+1}{1-\tau^2} = -2 \int \tau^2 d\tau - 2\int d\tau +2\int \frac{d\tau}{1-\tau^2}=\\
-\frac{2\tau^3}{3}-2\tau +  \ln \frac{1+\tau}{1-\tau}.
$$
We have to put everything back together in orderly fashion:
$$
\frac{2}{3}x(1-e^{-x})^{3/2}-\frac{2}{3}\left[-\frac{2}{3}(1-e^{-x})^{3/2}-2\sqrt{1-e^{-x}}+\ln \frac{1+\sqrt{1-e^{-x}}}{1-\sqrt{1-e^{-x}}}\right].
$$
Now, as $x\to 0$, the primitive approaches $0$. As $x\to \infty$ we have to handle an indeterminate form:
$$
\lim_{x\to \infty}\left[\ln\frac{1+\sqrt{1-e^{-x}}}{1-\sqrt{1-e^{-x}}}-x(1-e^{-x})^{3/2}\right]=\\
=\lim_{y\to 0}\left[\ln\frac{1+\sqrt{1-y}}{1-\sqrt{1-y}}+\ln y \cdot (1-y)^{3/2}\right]=\\
=\lim_{y\to 0}\left[\ln\frac{1+1-y/2}{1-1+y/2}+\ln y \cdot (1-3y/2)\right] =\lim_{y\to 0}\ln\frac{(2-y/2)y}{y/2} = \ln 4.
$$ 
If we have done everything right our result is:
$$
\frac{2}{3}(-\ln 4+2+\frac{2}{3}) = \frac{2}{9}(8-3\ln 4).
$$
</s>