<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] An elementary closed-form antiderivative is obtainable.  Integration by parts with the choice $u = x$, $du = dx$, $dv = \sqrt{1-e^{-x}} e^{-x} \, dx$, $v = \frac{2}{3}(1-e^{-x})^{3/2}$ yields $$F(x) = \int u \, dv = \frac{2x}{3} (1-e^{-x})^{3/2} - \frac{2}{3} \int (1-e^{-x})^{3/2} \, dx.$$  This suggests a trigonometric substitution of the form $e^{-x} = \cos^2 t$, or $x = -2 \log \cos t$, and $dx = 2 \tan t \, dt$:  $$\begin{align*} \int (1-e^{-x})^{3/2} \, dx &= \int (1-\cos^2 t)^{3/2} \cdot 2 \tan t \, dt \\ &= 2\int \sin^3 t \tan t \, dt \\ &= 2 \int (1-\cos^2 t)^2 \sec t \, dt \\ &= 2 \int \sec t - \cos t - \sin^2 t \cos t \, dt. \end{align*}$$  This latter integral can be easily evaluated term by term using known formulas, which I leave to you.
</s>