I want to check if the following improper integral converges or diverges:
$$\int_0^{\infty} x^2e^{-x^2}\space dx$$
Rewriting the integrand:
$$\int_0^{\infty}-\frac{1}{2}x(-2x e^{-x^2}) \space dx$$
Integrating by parts:
$u=-\frac{1}{2}x; \space u'=-\frac{1}{2}; \space v=e^{-x^2}; \space v'=-2xe^{-x^2}$
$$\implies\int_0^{\infty} -\frac{1}{2}x(-2x e^{-x^2}) \space dx=((-\frac{1}{2}xe^{-x^2})_0^\infty-(-\frac{1}{2}e^{-x^2})_0^{\infty}) $$
$$=(\lim_{N \to \infty}(Ne^{-N^2})-0)-(\lim_{N \to \infty}(-\frac{1}{2}e^{-N^2})-(-\frac{1}{2}))=\color{red}{-\frac{1}{2}}$$
As far as I know the answer should be $\frac{1}{4}$ but I can't figure out where I am making a mistake.
$\int f \frac{dg}{dx} dx = f g - \int \frac{df}{dx} g d x$
– johannesvalks Jul 20 '15 at 11:48