Improper integral $\int\limits_0^\infty x\exp (-x-x^2)\,\text dx$ Integrate $\int\limits_0^\infty 
x\exp (-x-x^2)\,\text dx$
Hint: Use $\int\limits_0^\infty
\exp (-x-x^2)\,\text{d}x = 0.4965$
I don't know how to use this hint in solving the integration. Help! 
 A: $I= \int xe^{-x-x^2}dx = \frac{1}{2} \left[ \int (2x-1+1)e^{-x-x^2}dx\right]=\frac{1}{2} \left[ \int (2x+1)e^{-x-x^2}dx - \int e^{-x-x^2}dx \right]$ 
Observe that $\frac{d}{dx}(-x-x^2)=-(1+2x)$ 
Thus the previous expression simplifies to $\frac{1}{2} \left[ -e^{-x-x^2} - \int e^{-x-x^2}dx \right]$
On applying the limits we get $\int_0^{\infty} xe^{-x-x^2}dx=\frac{1}{2} \left[ -e^{-x-x^2} - \int e^{-x-x^2}dx \right]_0^{\infty} = \frac{1}{2} \left[0-(-1) - 0.4965\right] = \frac{1}{2} \left[ 0.5035 \right]=0.25175$
A: $$x\,e^{-x^2-x}=\frac 12(2x+1-1)\,e^{-x^2-x}=\frac 12(2x+1)\,e^{-x^2-x}- \frac 12e^{-x^2-x}$$ So, $$\int x\,e^{-x^2-x}\,dx=\frac 12\int(2x+1)\,e^{-x^2-x}\,dx- \frac 12\int e^{-x^2-x}\,dx$$ For the first integral changing variable $$x^2+x=u\implies du=(2x+1)dx$$ seems to meake the problem simple. 
Concerning the value given wrong, computing $$I=\int e^{-x^2-x}\,dx$$ complete the square and change variable $x+\frac 12=y$ to get $$I=e^{\frac{1}{4}}\int e^{-y^2}\,dy=\frac{1}{2} \sqrt[4]{e} \sqrt{\pi } \text{erf}(y)=\frac{1}{2} \sqrt[4]{e} \sqrt{\pi } \text{erf}\left(x+\frac{1}{2}\right)$$ which makes $$\int_0^\infty e^{-x^2-x}\,dx=\frac{1}{2} \sqrt[4]{e} \sqrt{\pi } \text{erfc}\left(\frac{1}{2}\right)\approx 0.545641$$
