How do I evaluate the following integral, the answer according to Wolfram Alpha is $2$, but I keep on getting $0$ after using integration by parts.$$\frac12\int_{-\infty}^\infty x^2e^{-|x|}\ dx$$
2026-04-03 00:55:53.1775177753
On
Evaluate integral
137 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
Hint: By parity, $$ \frac12\int_{-\infty}^\infty x^2e^{-\vert x \rvert}dx = \int_{0}^\infty x^2e^{- x }dx $$ Then, use integration by parts, now that there is no absolute values to cause trouble.
It cannot be zero, as your function (which happens to be the second raw moment of a Laplace distribution, incidentally) is always positive (except at $0$).
$$\frac12\int_{-\infty}^\infty x^2e^{-|x|}dx = \frac12\int_{-\infty}^0x^2e^{x}dx +\frac12\int_{0}^\infty x^2e^{-x}dx \\ = \int_{0}^\infty x^2e^{-x}dx = [x^2(-e^{-x})]_{0}^\infty + 2\int_{0}^\infty xe^{-x} dx \\ =0+ 2[x(-e^{-x})]_{0}^\infty + 2\int_{0}^\infty e^{-x}dx = 0+0+2[(-e^{-x})]_{0}^\infty =2 $$