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$$
Answer
$$\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
$$
No comments:
Post a Comment