Alternative approach to error function for integration

124 Views Asked by At

I am integrating $\int_{-\infty}^{\infty}x^2\frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}x^2e^{-x^2/2}dx$

I start with integration by parts:

$u=x \rightarrow \frac{du}{dx}=1 \rightarrow dx=du$

$dv = xe^{-x^2/2}$ and I find v by u-substitution where $x=\frac{-x^2}{2} \rightarrow \frac{du}{dx} =-x \rightarrow dx=\frac{-1}{x}du$ and $v=-e^{-x^2/2}$

Then proceeding with integration by parts, $uv-\int vdu = -xe^{-x^2/2}-\int-e^{-x^2/2}dx$

I am trying to integrate $\int -e^{-x^2/2}dx$ without using the error function. Is there another approach?

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Note that you are integrating over $(-\infty, \infty)$. You can compute $\int_{-\infty}^\infty e^{-x^2/2} \, dx$ either by appealing to the knowledge of the PDF of the standard Gaussian distribution ($\int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \, dx = 1$) or by going through the usual "polar coordinates" approach in the proof of the Gaussian integral.

If the integral were instead on some particular interval (not all of $(-\infty, \infty)$), then you would need the error function.